Commit Graph

798 Commits

Author SHA1 Message Date
Michael Klein 1832806fca
fix link back to hcp not showing up (#14812) 2022-09-30 20:32:02 +02:00
John Cowen 355cca49e4
ui: Move nvmrc to the root of the workspace (#14567) 2022-09-29 09:41:57 -07:00
John Cowen ad47911ad9
ui: Amends to existing topology notice/banner texts (#14527)
* ui: Amends to existing topology notice/banner texts

* Changelog

* Update ui/packages/consul-ui/translations/routes/en-us.yaml

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>

Co-authored-by: Jared Kirschner <85913323+jkirschner-hashicorp@users.noreply.github.com>
2022-09-29 09:39:06 -07: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 f3a508f55b
ui: Update mock intention metadata to only include possible values (#14607) 2022-09-15 09:37:40 +01:00
John Cowen 71a7b03b94
ui: Completely remove the Overview routes when running the UI in HCP (#14606) 2022-09-14 19:39:50 +01:00
John Cowen f658ee9996
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 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
John Cowen 2df2276ffa
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 f0066ee262
ui: Action docs typo (#14512) 2022-09-12 10:39:13 +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 84039e3d57
ui: Add 'self-managed' badge when CONSUL_HCP_MANAGED_RUNTIME=self (#14496) 2022-09-08 11:45:20 +01:00
John Cowen efb2ecbb2e
ui: Detect token in a cookie and passthrough (#14495) 2022-09-08 11:43:39 +01: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
John Cowen 9d555e538e
ui: Additionally use message for displaying errors in DataWriter (#14074) 2022-09-05 19:17:33 +01:00
John Cowen a4a4383aa8
ui: Adds a HCP home link when in HCP (#14417) 2022-09-01 18:26:12 +01:00
John Cowen fc6b2ccb00
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 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
Tyler Wendlandt f3e50ea5ee
ui: Replace file-mask with file-text icon usage on policy list (#14275) 2022-08-24 06:44:01 -06:00
Tyler Wendlandt 7a3c20ce64
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 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
Michael Klein 4e740bf824
Don't surface partitions in service search sources (#14078) 2022-08-10 20:04:30 +02:00
Michael Klein 576680ddf2
Use actual intention for permission check intentions edit (#14113) 2022-08-10 20:02:43 +02:00
John Cowen 7ebfd066ef
ui: Add undefined check for peer model creation (#14075) 2022-08-09 11:08:07 +01:00
Michael Klein 231cc28e0b
Update peerings docs links (#14040) 2022-08-08 16:12:17 +02:00
John Cowen b843b6bcb0
ui: Add additional generation/initiation data-sources (#14018) 2022-08-08 11:23:02 +01:00
John Cowen 6aedc41d81
ui: Ensure we dispatch validation state (#14021)
* ui: Ensure we dispatch validation state

* Changelog
2022-08-08 11:12:40 +01:00
John Cowen d7ed357b5b
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 a3f1ae2fd5
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 317709f469
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 f386122633
ui: Re-hook up regenerate button (#14015) 2022-08-03 13:55:57 +01: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
John Cowen f41a754cbe
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 bf9045db69
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 27a55683d5
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 b8131704ea
Improve peered service empty downstreams message (#13854) 2022-07-22 19:28:13 +02:00
John Cowen 2875cbe856
ui: Change initiate > establish for peering the modal tab (#13839) 2022-07-21 17:39:15 +01:00
John Cowen 83d2204c7c
ui: Allow searching for peerings by ID (#13837) 2022-07-21 17:38:57 +01:00
John Cowen a7b8f7738b
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 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 1475ec0349
ui: Update peerings empty state copy (#13834) 2022-07-21 14:59:38 +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
John Cowen 9176d3ed33
ui: Add Peer Form (#13794) 2022-07-20 12:58:47 +01:00