Commit Graph

822 Commits

Author SHA1 Message Date
Michael Klein 445356eedb Use HDS in peers.edit.exported 2022-10-13 16:43:31 +02:00
Michael Klein 964991ce02 Configure tailwind-jit for sub-apps as well 2022-10-13 10:44:07 +02:00
Michael Klein 34ec12202d add external-services method to peer repo 2022-10-13 10:44:07 +02:00
Michael Klein 3559549db7 Move javascript tab class to tab-nav 2022-10-13 10:44:07 +02:00
Michael Klein a8b44eb6e2 Pass provider data for peering tab-nav 2022-10-13 10:44:07 +02:00
Michael Klein 9c1f907ed9 Create Peerings::Provider
We need a component abstraction that encapsulates
creating the dynamic tabs based on peering-type.

We create a `PeerTab`-abstraction that behaves like
the data-structure the tab-nav expects to achieve this
effect.
2022-10-13 10:44:07 +02:00
Michael Klein 8b962b5c30 Transition to exported/imported based on peer type 2022-10-13 10:44:07 +02:00
Michael Klein 991bc5a6cd Add imported/exported tabs to peers.edit 2022-10-13 10:44:07 +02:00
Michael Klein 552af5a428 Add imported and exported routes for peers.edit 2022-10-13 10:44:07 +02:00
Michael Klein a6e4239e7d Handle case when this.element is undefined outlet 2022-10-13 10:44:07 +02:00
Michael Klein ef83c0799f Add link to peers.edit to peerings list 2022-10-13 10:44:07 +02:00
Michael Klein e2ca73ecbe Bring back edit-route for peerings 2022-10-13 10:44:07 +02:00
Michael Klein 686e0f5ad4 Only display regenerate token when peer is dialer
Regenerating only makes sense if we are dealing with the
side that created  the token - i.e. the dialer.
2022-10-13 10:44:07 +02:00
Michael Klein b6384d9ffa Differentiate between dialer / receiver peer model 2022-10-13 10:44:06 +02:00
Michael Klein 63e40df307 Allow deleting terminated peers 2022-10-12 09:33:23 +02:00
Michael Klein 0afe8c14ee pass dc/partition when normalizing peerings 2022-10-12 09:29:24 +02:00
Michael Klein 6793f82d01 default to an empty array peering services 2022-10-12 09:29:24 +02:00
Michael Klein 454424145a Update peer repo with latest API changes 2022-10-12 09:29:24 +02:00
Tyler Wendlandt 06b67a9928
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 2c349bb126
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 f0be55df86
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
Michael Klein 62a66a32d7
ui: Setup Hashicorp Design System for usage in consul-ui (#14394)
* Use postcss instead of ember-cli-sass

This will make it possible to work with tailwindcss.

* configure postcss to compile sass
* add "sub-app" css into app/styles tree

* pin node@14 via volta

Only used by people that use volta

* Install tailwind and autoprefixer

* Create tailwind config

* Use tailwind via postcss

* Fix: tailwind changes current styling

When adding tailwind to the bottom of app.scss we apparently
change the way the application looks. We will import
it first to make sure we don't change the current styling
of the application right now.

* Automatic import of HDS colors in tailwind

* Install @hashicorp/design-system-components

* install add-on
* setup postcss scss pipeline to include tokens css
* import add-on css

* Install ember-auto-import v2

HDS depends on v2 of ember-auto-import so we need to upgrade.

* Upgrade ember-cli-yadda

v0.6.0 of ember-cli-yadda adds configuration for webpack.
This configuration is incompatible with webpack v5
which ember-auto-import v2 is using.
We need to upgrade ember-cli-yadda to the latest
version that fixes this incompatability with auto-import v2

* Install ember-flight-icons

HDS components are using the addon internally.

* Document HDS usage in engineering docs

* Upgrade ember-cli-api-double

* fix new linting errors
2022-10-06 17:17:20 +02:00
Tyler Wendlandt 3638dc13fb
ui: Wrap service names on show and instance routes (#14771)
* Wrap service names on show and instance routes
Moves the trailing type/kind/actions to the second row of the header
no matter what length the service name is. Wraps service name text.

* Change grid format of AppView globally

* Add tooltips to the last element of breadcrumbs
2022-10-05 13:21:34 -06:00
Michael Klein 6fbe799178
Allow managed-runtime badge to be dynamic (#14853) 2022-10-05 11:48:03 +02:00
Michael Klein 0af2c3639e
fix link back to hcp not showing up (#14812) 2022-09-30 20:32:02 +02:00
John Cowen 38b5367d42
ui: Move nvmrc to the root of the workspace (#14567) 2022-09-29 09:41:57 -07:00
John Cowen cf6faa4d59
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 8056242f16
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 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