Commit Graph

179 Commits

Author SHA1 Message Date
Ronald 6bcb98ea71
Add UI copyright headers files (#16614)
* Add copyright headers to UI files

* Ensure copywrite file ignores external libs
2023-03-14 09:18:55 -04:00
Valeriia Ruban d40fc3cc9e
feat: update notification to use hds toast component (#16519) 2023-03-06 14:10:09 -08:00
Andrew Stucki 431b5b4859
Add some basic UI improvements for api-gateway services (#16508)
* Add some basic ui improvements for api-gateway services

* Add changelog entry

* Use ternary for null check

* Update gateway doc links

* rename changelog entry for new PR

* Fix test
2023-03-03 16:59:04 -05:00
Valeriia Ruban d01ee172ea
[UI] CC-4031: change from Action, a and button to hds::Button (#16251) 2023-02-22 13:05:15 -08:00
Valeriia Ruban 1d64c98c51
[UI]: update Ember to 3.27 (#16227)
* Upgrade to 3.25 via ember-cli-update

* v3.25.3...v3.26.1

* v3.26.1...v3.27.0


Co-authored-by: Michael Klein <michael@firstiwaslike.com>
2023-02-10 13:32:19 -08:00
skpratt 9ee33dff3c
revert ui changes (#16180) 2023-02-06 23:27:49 +00:00
skpratt 9e99a30b77
Remove legacy acl policies (#15922)
* remove legacy tokens

* remove legacy acl policies

* flatten test policies to *_prefix

* address oss feedback re: phrasing and tests
2023-02-06 15:35:52 +00:00
Tyler Wendlandt 4a7fe5625a
ui: Add ServerExternalAddresses to peer token create form (#15555)
* ui: Add ServerExternalAddresses field to token generation

* Add test for ServerExternalAddresses on peer token create

* Add changelog entry

* Update translations

* Format hbs files

* Update translations
2022-11-30 11:42:36 -07:00
Michael Klein be97a2a4a8 Redirect to peers.show after establishing peering 2022-10-26 11:15:57 +02:00
Tyler Wendlandt ec7a7ca7d6
Merge pull request #15085 from hashicorp/ui/feature/net-889-prepopulate-partition-sso-login
ui: NET-889 pre-populate partition SSO login
2022-10-21 09:07:04 -06:00
wenincode 7b0a4f3eb8 Remove extra partition test 2022-10-20 16:23:53 -06:00
Michael Klein ab31edaaa6
Merge pull request #15023 from hashicorp/ui/fix/token-secret-id-handling
ui: Fix token in cookie passthrough
2022-10-20 08:49:37 +02:00
wenincode f89fc309ff Pre-populate partition on sso login 2022-10-19 17:26:25 -06:00
Tyler Wendlandt b790131289
Merge pull request #14971 from hashicorp/ui/feature/agentless-nodes-banner
ui: agentless nodes notice banner banner
2022-10-19 09:06:46 -06:00
Michael Klein 12a923c658 Add tests for TokenSecretID handling 2022-10-19 08:34:30 +02:00
wenincode 443b73435a Use local-storage service to manage localStorage
Use local-storage service, prototyped here https://github.com/LevelbossMike/local-storage-service, to manage local storage usage in an octane way. Does not write to local storage in tests by default and is easy to stub out.
2022-10-18 09:40:47 -06:00
wenincode f9f4ca8da4 Set postfix for agentless-notice storage key based on partition and dc 2022-10-14 14:08:40 -06:00
wenincode 9777ee0077 Save agentless node notice dismissal per dc 2022-10-14 12:21:25 -06:00
wenincode e36848111a Add tests for filtering node health checks 2022-10-13 18:45:15 -06:00
wenincode ae06401225 Update peers show tests to look for serverAddresses tab 2022-10-13 13:06:11 -06:00
Jasmine W aaf1277c6d Update index.js 2022-10-13 14:42:13 -04:00
wenincode 9d56feb77e Fix linting error 2022-10-13 10:59:48 -06:00
wenincode 31cbbc85e3 Move agentless-notice banner css to it's own file 2022-10-13 10:38:26 -06:00
wenincode eb2cdcfb94 Add tests for agentless-notice-banner 2022-10-13 10:29:03 -06:00
Tyler Wendlandt a6b9219808
Merge pull request #14970 from hashicorp/ui/feature/filter-synthetic-nodes
ui: Filter synthetic nodes on nodes list page
2022-10-13 09:12:03 -06:00
Michael Klein e8f2024e43 Add tests peers.show 2022-10-13 16:45:03 +02:00
Michael Klein c3237ebed4 Fix peering regenerate test
* only dialers will show a regenerate token action
* add test that receivers won't show regenerate action
2022-10-13 16:45:03 +02:00
wenincode 06711c8f51 Expect a boolean from synthetic-node meta key 2022-10-13 08:41:26 -06:00
wenincode 0aabfa921f Re-enable nodes in list feature test 2022-10-13 08:29:48 -06:00
wenincode ef681d06dc Add changelog 2022-10-12 17:16:01 -06:00
wenincode 1de0af4be1 Filter synthetic nodes on nodes list page 2022-10-12 17:16:01 -06:00
Tyler Wendlandt f8dab48cd4
ui: hide node name and meta on agentless instances (#14921)
* [NET-950] hide node name and meta on agentless instances

* Fix linting issues and set synthetic-node value

* ui: changelog entry
2022-10-11 09:59:53 -06:00
Tyler Wendlandt 11fe7dc8c5
ui: Remove node name from agentless service instance (#14903)
* [NET-949]: Remove node name from agentless instance

* Add changelog entry
2022-10-07 04:01:34 -06:00
Tyler Wendlandt d64b9d9722
ui: Update empty-state copy throughout app (#14721)
* Update empty-state copy throughout app

Update empty-states throughout the app to only include mentions of ACLs if the user has ACLs enabled.

* Update peers empty state copy
Flip the empty state copy logic for peers. Small typo fixes on other empty states.

* Update Node empty state with docs

* Update intentions empty state
Make ACL copy dependent on if acls are enabled.

* Update Nodes empty state learn copy

* Fix binding rule copy key
2022-10-06 11:01:49 -06:00
John Cowen 60400173b5
ui: Add more acceptance tests for cluster peering (#14707)
* ui: Add more acceptance tests for cluster peering

* Lint
2022-09-29 09:38:41 -07:00
John Cowen 733627e462
ui: Topology notices testing/refactor prep (#14575)
* ui: Topology notices testing/refactor prep

* ui: During testing ensure that when global-config=true can be mocked to false (#14578)
2022-09-20 15:49:31 +01:00
John Cowen e174ec3dce
ui: Add initial tests for peering searching/sorting (#14568)
* ui: Add initial tests for peering searching/sorting

* New lint
2022-09-20 15:34:08 +01:00
John Cowen ce4e8faa59
ui: Add merge-central-config to relevant HTTP requests (#14604) 2022-09-20 10:33:19 +01:00
Michael Klein 048572946c
ui: chore - upgrade ember and friends (#14518)
* v3.20.2...v3.24.0

* Fix handle undefined outlet in route component

* Don't use template helper for optional modal.open

Using the optional-helper here will trigger a computation
in the same runloop error. This is because we are setting
the `modal`-property when the `<Ref>` component gets
rendered which will update the `this.modal`-property which
will then recompute the `optional`-helper leading to this
error.

Instead we will create an action that will call the `open`-method
on the modal when it is defined. This gets rid of the double
computation error as we will not access the modal property
twice in the same runloop when `modal` is getting set.

* Fix - fn needs to be passed function tab-nav

We create functions in the component file instead
so that fn-helper stops complaining about the
need to pass a function.

* Update ember-exam to 6.1 version

"Makes it compatible" with ember-qunit v5

* scheduleOnce setMaxHeight paged-collection

We need to schedule to get around double-computation error.

* Fix - model.data is removed from ember-data

This has been private API all along - we need to
work around the removal.

Reference: https://github.com/emberjs/data/pull/7338/files#diff-9a8746fc5c86fd57e6122f00fef3155f76f0f3003a24b53fb7c4621d95dcd9bfL1310

* Fix `propContains` instead of `deepEqual` policy

Recent model.data works differently than iterating attributes.
We use `propContains` instead of `deepEqual`. We are only
interested in the properties we assert against and match
the previous behavior with this change.

* Fix `propContains` instead of `deepEqual` token

* Better handling single-records repo test-helper

`model.data` has been removed we need to handle proxies and
model instances differently.

* Fix remaining repository tests with propContains

We don't want to match entire objects - we don't care
about properties we haven't defined in the assertion.

* Don't use template helper for optional modal.open

Using a template helper will give us a recomputation error -
we work around it by creating an explicit action on
the component instead.

* Await `I $verb the $pageObject object` step

* Fix no more customization ember-can

No need to customize, the helper handles destruction
fine on its own.

* Fix - don't pass `optional` functions to fn

We will declare the functions on the component instead.
This gives us the same behavior but no error from
`fn`, which expects a function to be passed.

* Fix - handle `undefined` state on validate modifier

StateChart can yield out an undefined `state` we need
to handle that in the validate modifier

* Fix linting errors tests directory

* Warn / turn off new ember linting issues

We will tackle them one by one and don't want to
autofix issues that could be dangerous to auto-fix.

* Auto-fix linting issues

* More linting configuration

* Fix remaining linting issues

* Fix linting issues new files after rebase

* ui: Remove ember-cli-uglify config now we are using terser (#14574)

Co-authored-by: John Cowen <johncowen@users.noreply.github.com>
2022-09-15 09:43:17 +01:00
John Cowen 9f14171f6c
ui: Pass through default environment settings when when booting dev/test (#14519)
* ui: Add initial peering listing acceptance tests (#14522)
2022-09-12 11:22:06 +01:00
Michael Klein 6cd25728e5
ui: update tab nav steps to use `isVisible` vs `clickable` (#14517)
* Add `isVisible` property to tab-nav page-object

* Use `IsVisible` when testing visibility of tabs
2022-09-08 12:46:49 +02:00
John Cowen 39439d07bd
ui: Use HCPURL / .HCPURL (#14489) 2022-09-07 16:43:42 +01:00
Michael Klein b75a800e25
ui: fix - proper await page object step (#14510)
* Fix await page-object properties properly

* Remove "sleep"-hack show-routing test

* Fix - change serviceInstacesSelected test order

We need to change the order of test as the  tab-nav
tab-elements are actually clickable and will be triggered
via the "see" step.

Because we are now properly awaiting these promises
we need to change the test order and check if the
service-instances tab is selected first, as the following
steps will actually click the respective tabs during
testing and thus change what is selected
on the tab-nav.

* Update ember-cli-page-object to latest
2022-09-07 15:24:02 +02:00
John Cowen 9780aba54a
ui: Add support for prefixing the API path (#14342) 2022-09-06 11:13:51 +01:00
Michael Klein 7547f7535f
ui: chore upgrade to ember-qunit v5 (#14430)
* Refactor remaining `moduleFor`-tests

`moduleFor*` will be removed from ember-qunit v5

* Upgrade ember-qunit to v5

* Update how we use ember-sinon-qunit

With ember-qunit v5 we need to use ember-sinon-qunit differently.

* Fix submit-blank test

We can't click on disabled buttons with new test-helpers.
We need to adapt the test accordingly.

* Make sure we await fill-in with form yaml step

We need to await `fill-in`. This changes the reducer
function in the step to create a proper await
chain.

* Fix show-routing test

We need to await a tick before visiting again.

* Remove redundant `wait one tick`-step

* remove unneeded "next Tick" promise from form step

* Increase timeout show-routing feature

* Comment on pause hack for show-routing test
2022-09-01 17:37:37 +02:00
Michael Klein 97eec3f2b9
ui: Improve display peer info in service list (#14111)
* Include nspace when surfacing peer in bucket-list

Whenever we display a peer and we are not on OSS we will surface
the namespace as well. The rest of the ui logic of the bucket list
has not changed.

* Display bucket-list after instance-count service-list
2022-08-10 20:07:59 +02:00
John Cowen 4e5190245e
ui: Make peered intentions read-only (#13814)
* ui: Make peered intentions read-only

* Replace "" to undefined for SourcePeer so its the same as PeerName

* Fixup copypasta

* Ensure tests run with no peers
2022-07-26 17:29:37 +01:00
Michael Klein fdddf7af48
ui: peered services only show instance- and tags-tabs (#13840)
* Only show instances- and tags-tab peered services

* Adapt show-with-slashes test to peering changes

Tests always have the peering feature turned on and the default service
we load from the mock-api will be peered. This is why the topology
view of the service.show page will not be accessible in the updated
test it will show the instances instead. This change does not change
what the test is actually testing so just putting changing to the now
different url is fine.
2022-07-21 16:09:54 +01:00
Michael Klein 7863a00e2c
ui: Surface peer info in nodes.show view (#13832) 2022-07-21 15:35:54 +01:00
Michael Klein 59b044f96d
ui: no partition and peer in bucket-list at the same time (#13812)
* don't show partition / peer at the same time in bucket-list

* use bucket-list in intentions table

* add bucket-list tests

* Simplify bucket list - match old behavior

Refactor the bucket-list component to be easier to grok and match
how the old template based approach worked. I.e. do not surface
partition or namespace when it matches the passed nspace or partition
property.

* Update docs for bucket-list

* fix linting
2022-07-20 16:07:52 +01:00