Commit Graph

794 Commits

Author SHA1 Message Date
John Cowen f75804c3bd
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 443f5c3e5e
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 8b0c09d15c
ui: Add merge-central-config to relevant HTTP requests (#14604) 2022-09-20 10:33:19 +01:00
Michael Klein 03a1a86dfe
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 057d28f90e
ui: Update mock intention metadata to only include possible values (#14607) 2022-09-15 09:37:40 +01:00
John Cowen ea06d6c5aa
ui: Completely remove the Overview routes when running the UI in HCP (#14606) 2022-09-14 19:39:50 +01:00
John Cowen acd9d42914
ui: Add AWS Lambda as potential external source (#14605)
* ui: Add AWS Lambda as potential external source

* Update mocks to expect `lambda` as an external-source meta

* Additional mock to make sure all our mocks only contain whats possible
2022-09-14 18:38:03 +01:00
John Cowen 4a9f6101c9
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
John Cowen ad616a35d3
ui: Fix up tippy console warning... (#14524)
...enabling/disabling now depends on whether the string is non-empty
2022-09-12 11:21:26 +01:00
John Cowen 4a6253d689
ui: Action docs typo (#14512) 2022-09-12 10:39:13 +01:00
Michael Klein 3599aea1c5
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 e81f29f4b8
ui: Add 'self-managed' badge when CONSUL_HCP_MANAGED_RUNTIME=self (#14496) 2022-09-08 11:45:20 +01:00
John Cowen efbdf3dbb5
ui: Detect token in a cookie and passthrough (#14495) 2022-09-08 11:43:39 +01:00
John Cowen 31b75b7416
ui: Use HCPURL / .HCPURL (#14489) 2022-09-07 16:43:42 +01:00
Michael Klein 3c492ad784
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 9675faeab5
ui: Add support for prefixing the API path (#14342) 2022-09-06 11:13:51 +01:00
John Cowen 4f41eaf88f
ui: Additionally use message for displaying errors in DataWriter (#14074) 2022-09-05 19:17:33 +01:00
John Cowen 50380861d0
ui: Adds a HCP home link when in HCP (#14417) 2022-09-01 18:26:12 +01:00
John Cowen c06cc60b90
ui: Use credentials for all HTTP API requests (#14343)
Adds withCredentials/credentials to all HTTP API requests.
2022-09-01 18:15:06 +01:00
Michael Klein 39c5b91272
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
Tyler Wendlandt cdc6fd89d3
ui: Replace file-mask with file-text icon usage on policy list (#14275) 2022-08-24 06:44:01 -06:00
Tyler Wendlandt cb1043d8ac
ui: Update badge / pill icon sizing (#14282)
* Update badge icon sizing to be 16x16

* Update icon sizing in pill component
2022-08-23 13:02:40 -06:00
Michael Klein 7b16b5e9f1
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
Michael Klein 9349bbb706
Don't surface partitions in service search sources (#14078) 2022-08-10 20:04:30 +02:00
Michael Klein c30fce54c6
Use actual intention for permission check intentions edit (#14113) 2022-08-10 20:02:43 +02:00
John Cowen e4a579022b
ui: Add undefined check for peer model creation (#14075) 2022-08-09 11:08:07 +01:00
Michael Klein b955490852
Update peerings docs links (#14040) 2022-08-08 16:12:17 +02:00
John Cowen 9caf430e8e
ui: Add additional generation/initiation data-sources (#14018) 2022-08-08 11:23:02 +01:00
John Cowen e2eb4e620f
ui: Ensure we dispatch validation state (#14021)
* ui: Ensure we dispatch validation state

* Changelog
2022-08-08 11:12:40 +01:00
John Cowen 50b85c3189
ui: Make DataWriter also deal with more standard shaped errors (#14025)
* ui: Make DataWriter also deal with more standard shaped errors

* ui: Add error states/messages for peering establishment (#14026)

* ui: Add error states/messages for peering establishment

* Inspect state instead of asking about existence of error
2022-08-08 10:51:02 +01:00
John Cowen ff88fcdb39
ui: Ensure CopyableCode copy icon/button is fully clickable (#14016)
* ui: Ensure CopyableCode copy icon/button is fully clickable

* Give it a 40px height also
2022-08-04 13:30:52 +01:00
Michael Klein a06eeeda15
ui: peering UI fixes - api contract change / wrong link in peerings list (#14007)
* Don't send `Datacenter` when establishing peer

* Don't surface link to non-existing peers.edit route anymore
2022-08-03 15:04:19 +02:00
John Cowen 17d712c039
ui: Re-hook up regenerate button (#14015) 2022-08-03 13:55:57 +01:00
John Cowen 2547af7e1e
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
John Cowen e3f05adf3b
ui: Add peering establishment to the peer listing page (#13813)
* ui: Add peering establishment to the peer listing page

* Remove this.form.reset
2022-07-26 15:36:49 +01:00
Michael Klein a6a79d6811
ui: add deprecation worfklow addon (#13877)
* add ember-cli-deprecation-workflow

* Add deprecation workflow configuration

This will silence all deprecations by default reducing noise in the test
output significantly.

We can tackle deprecations now one by one but won't have to deal with
very verbose console logs anymore.
2022-07-26 15:01:09 +02:00
Michael Klein f7f26220ba
ui: add peers to node search (#13875)
* Make nodes searchable by peer

* fix only surface peer filter on service search when feature is on
2022-07-25 18:46:47 +02:00
Michael Klein bcbc36ecec
Improve peered service empty downstreams message (#13854) 2022-07-22 19:28:13 +02:00
John Cowen c9898fb38e
ui: Change initiate > establish for peering the modal tab (#13839) 2022-07-21 17:39:15 +01:00
John Cowen e2908679c6
ui: Allow searching for peerings by ID (#13837) 2022-07-21 17:38:57 +01:00
John Cowen b960cb671f
ui: Remove peering detail page (#13836)
* ui: Remove links to the peering detail page

* 404 everything
2022-07-21 17:38:10 +01:00
Michael Klein 2f81c7b292
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 b1a39fc12f
ui: Surface peer info in nodes.show view (#13832) 2022-07-21 15:35:54 +01:00
Michael Klein 07f30687d5
ui: Update peerings empty state copy (#13834) 2022-07-21 14:59:38 +01:00
Michael Klein cab88bcd1e
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
John Cowen 6be4a0629a
ui: Add Peer Form (#13794) 2022-07-20 12:58:47 +01:00
John Cowen 854b5a93e7
ui: Peer token use form (#13792) 2022-07-20 12:38:39 +01:00
Michael Klein dc84ea9f85
ui: chore - fix CI test-suite (#13799)
* fix linting issue

* Update datacenter selector page-object to not include separator.

* change non-valid li to div for singe dc name
2022-07-19 14:06:11 +01:00
John Cowen d6dcef18c8
ui: Add peer token generation form (#13755)
* ui: Add peer token generation form
2022-07-18 17:39:52 +01:00
John Cowen 56446d540a
ui: Adds Peer initiation form (#13754) 2022-07-18 17:39:22 +01:00