diff --git a/ui/packages/consul-ui/app/components/app-error/index.hbs b/ui/packages/consul-ui/app/components/app-error/index.hbs index fabaec5ea..aa243ac48 100644 --- a/ui/packages/consul-ui/app/components/app-error/index.hbs +++ b/ui/packages/consul-ui/app/components/app-error/index.hbs @@ -5,6 +5,9 @@ - + diff --git a/ui/packages/consul-ui/app/components/app-view/index.hbs b/ui/packages/consul-ui/app/components/app-view/index.hbs index 783cd8e6f..eca3d01bb 100644 --- a/ui/packages/consul-ui/app/components/app-view/index.hbs +++ b/ui/packages/consul-ui/app/components/app-view/index.hbs @@ -108,7 +108,7 @@ @error={{hash status='403' }} - @allowLogin={{true}} + @login={{login}} /> {{else}} {{yield}} diff --git a/ui/packages/consul-ui/app/components/app/index.hbs b/ui/packages/consul-ui/app/components/app/index.hbs index f18811831..726f03c61 100644 --- a/ui/packages/consul-ui/app/components/app/index.hbs +++ b/ui/packages/consul-ui/app/components/app/index.hbs @@ -6,12 +6,15 @@ class="app" ...attributes > - + + diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs index 193fbf047..096658810 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/form/index.hbs @@ -38,6 +38,9 @@ as |api|> diff --git a/ui/packages/consul-ui/app/components/empty-state/README.mdx b/ui/packages/consul-ui/app/components/empty-state/README.mdx new file mode 100644 index 000000000..2e3d9e466 --- /dev/null +++ b/ui/packages/consul-ui/app/components/empty-state/README.mdx @@ -0,0 +1,81 @@ +--- +class: ember +--- +# EmptyState + +Consul UIs default 'empty state' used for when we retrive an empty result set, +whether that set is successful or erroneous. This is mainly used via the +`ErrorState` component, so also consider using that directly instead of this +component if dealing with errors. + +## Arguments + +| Argument | Type | Default | Description | +| --- | --- | --- | --- | +| `login` | `Function` | `undefined` | A login action to call when the login button is pressed (if not provided no login button will be shown | + +Icons are controlled via a `status-xxx` class. `xxx` should be some sort of +3 digit error code, special icons are used for `404` and `403`, otherwise a +generic icon will be used. To add any further special icons please add to the +component's `skin` file. + +If the `@login` attribute is provided, a button will be shown directly +underneath the body text clicking on which will fire the provided `@login` +function. + +```hbs preview-template + + +

+ Header +

+
+ +

+ Subheader +

+
+ +

+ Body text +

+
+ + + + +
+``` + +The component has four slots for specifying header, subheader, body and +'actions', although the component will show a minimal empty slot if only the +body slot is specified: + +```hbs preview-template + + +

+ Minimal text +

+
+
+``` diff --git a/ui/packages/consul-ui/app/components/empty-state/index.hbs b/ui/packages/consul-ui/app/components/empty-state/index.hbs index 9b16309fe..c55053495 100644 --- a/ui/packages/consul-ui/app/components/empty-state/index.hbs +++ b/ui/packages/consul-ui/app/components/empty-state/index.hbs @@ -16,8 +16,11 @@ {{#yield-slot name="body"}}
{{yield}} - {{#if (and (env 'CONSUL_ACLS_ENABLED') allowLogin)}} -
{{/yield-slot}} diff --git a/ui/packages/consul-ui/app/styles/components/empty-state/index.scss b/ui/packages/consul-ui/app/components/empty-state/index.scss similarity index 92% rename from ui/packages/consul-ui/app/styles/components/empty-state/index.scss rename to ui/packages/consul-ui/app/components/empty-state/index.scss index fae69d384..04fc9dfee 100644 --- a/ui/packages/consul-ui/app/styles/components/empty-state/index.scss +++ b/ui/packages/consul-ui/app/components/empty-state/index.scss @@ -13,6 +13,6 @@ %empty-state > ul > li > label > button { @extend %empty-state-anchor; } -%empty-state label { +%empty-state div > button { @extend %primary-button; } diff --git a/ui/packages/consul-ui/app/styles/components/empty-state/layout.scss b/ui/packages/consul-ui/app/components/empty-state/layout.scss similarity index 91% rename from ui/packages/consul-ui/app/styles/components/empty-state/layout.scss rename to ui/packages/consul-ui/app/components/empty-state/layout.scss index d035f9a36..60a8f7f54 100644 --- a/ui/packages/consul-ui/app/styles/components/empty-state/layout.scss +++ b/ui/packages/consul-ui/app/components/empty-state/layout.scss @@ -15,8 +15,9 @@ width: 370px; margin: 0 auto; } -%empty-state label { - margin: 0 auto !important; +%empty-state button { + margin: 0 auto; + display: inline; } %empty-state-header { margin-bottom: -3px; diff --git a/ui/packages/consul-ui/app/styles/components/empty-state/skin.scss b/ui/packages/consul-ui/app/components/empty-state/skin.scss similarity index 100% rename from ui/packages/consul-ui/app/styles/components/empty-state/skin.scss rename to ui/packages/consul-ui/app/components/empty-state/skin.scss diff --git a/ui/packages/consul-ui/app/components/error-state/README.mdx b/ui/packages/consul-ui/app/components/error-state/README.mdx new file mode 100644 index 000000000..252b41937 --- /dev/null +++ b/ui/packages/consul-ui/app/components/error-state/README.mdx @@ -0,0 +1,34 @@ +# ErrorState + +Consul UIs default 'error state' used when an error is returned form the +backend. This component used `EmptyState` internally, so please refer to that +for more details. + +Using this component for all of our errors means we can show a consistent +error page for generic errors. + +This component show slighltly different visuals and copy depending on the +`status` of the error (the status is generally a HTTP error code) + +## Arguments + +| Argument | Type | Default | Description | +| --- | --- | --- | --- | +| `login` | `Function` | `undefined` | A login action to call when the login button is pressed (if not provided no login button will be shown | +| `error` | `Object` | `undefined` | 'Consul UI error shaped' JSON `{status: String, message: String, detail: String}` | + +```hbs preview-template + +``` + +As with `EmptyState` you can optionally chose to show a login button using the +`@login` argument. + +```hbs preview-template + +``` diff --git a/ui/packages/consul-ui/app/components/error-state/README.stories.mdx b/ui/packages/consul-ui/app/components/error-state/README.stories.mdx deleted file mode 100644 index 4742d859b..000000000 --- a/ui/packages/consul-ui/app/components/error-state/README.stories.mdx +++ /dev/null @@ -1,38 +0,0 @@ -import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks'; -import { hbs } from 'ember-cli-htmlbars'; - - - -# ErrorState - - - {(args) => ({ - template: hbs``, - context: args - })} - - diff --git a/ui/packages/consul-ui/app/components/error-state/index.hbs b/ui/packages/consul-ui/app/components/error-state/index.hbs index 039fb4ade..d32ad7c0e 100644 --- a/ui/packages/consul-ui/app/components/error-state/index.hbs +++ b/ui/packages/consul-ui/app/components/error-state/index.hbs @@ -1,7 +1,7 @@ {{#if (not-eq @error.status "403")}}

{{or @error.message "Consul returned an error"}}

@@ -34,7 +34,7 @@ {{else}}

You are not authorized

diff --git a/ui/packages/consul-ui/app/components/error-state/index.js b/ui/packages/consul-ui/app/components/error-state/index.js deleted file mode 100644 index 479865264..000000000 --- a/ui/packages/consul-ui/app/components/error-state/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import Component from '@ember/component'; - -export default Component.extend({ - tagName: '', -}); diff --git a/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs b/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs index 581945293..e5c467e34 100644 --- a/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs +++ b/ui/packages/consul-ui/app/components/hashicorp-consul/index.hbs @@ -218,14 +218,28 @@ > {{#let components.AuthForm components.AuthProfile as |AuthForm AuthProfile|}} - - +

Log in with a different token

@@ -261,6 +282,14 @@
+ + + Logout @@ -295,7 +324,7 @@ <:main> {{yield (hash - modal=this.modal + login=(if (env 'CONSUL_ACLS_ENABLED') this.modal (hash open=undefined)) )}} diff --git a/ui/packages/consul-ui/app/components/hashicorp-consul/pageobject.js b/ui/packages/consul-ui/app/components/hashicorp-consul/pageobject.js index b5d3075c7..6b650defa 100644 --- a/ui/packages/consul-ui/app/components/hashicorp-consul/pageobject.js +++ b/ui/packages/consul-ui/app/components/hashicorp-consul/pageobject.js @@ -42,7 +42,7 @@ export default (collection, clickable, attribute, is, authForm, emptyState) => s status: attribute('data-test-status', '[data-test-status]'), }, }; - page.navigation.login = clickable('[data-test-main-nav-auth] label'); + page.navigation.login = clickable('[data-test-main-nav-auth] button'); page.navigation.dc = clickable('[data-test-datacenter-menu] button'); page.navigation.nspace = clickable('[data-test-nspace-menu] button'); page.navigation.manageNspaces = clickable('[data-test-main-nav-nspaces] a'); diff --git a/ui/packages/consul-ui/app/components/main-nav-horizontal/index.scss b/ui/packages/consul-ui/app/components/main-nav-horizontal/index.scss index 45fef2c07..a8484febe 100644 --- a/ui/packages/consul-ui/app/components/main-nav-horizontal/index.scss +++ b/ui/packages/consul-ui/app/components/main-nav-horizontal/index.scss @@ -4,13 +4,13 @@ /* things that should look like nav buttons */ %main-nav-horizontal > ul > li > a, %main-nav-horizontal > ul > li > span, -%main-nav-horizontal > ul > li > label, +%main-nav-horizontal > ul > li > button, %main-nav-horizontal > ul > li > .popover-menu > label > button { @extend %main-nav-horizontal-action; } %main-nav-horizontal .popover-menu [type='checkbox']:checked + label > *, %main-nav-horizontal > ul > li.is-active > a, -%main-nav-horizontal > ul > li.is-active > label > * { +%main-nav-horizontal > ul > li.is-active > button { @extend %main-nav-horizontal-action-active; } /* Whilst we want spans to look the same as actions */ diff --git a/ui/packages/consul-ui/app/components/modal-dialog/README.mdx b/ui/packages/consul-ui/app/components/modal-dialog/README.mdx new file mode 100644 index 000000000..0fbcbde88 --- /dev/null +++ b/ui/packages/consul-ui/app/components/modal-dialog/README.mdx @@ -0,0 +1,69 @@ +--- +class: ember +--- +# ModalDialog + +## Arguments + +| Argument | Type | Default | Description | +| --- | --- | --- | --- | +| `onopen` | `Function` | `undefined` | A function to call when the modal has opened | +| `onclose` | `Function` | `undefined` | A function to call when the modal has closed | +| `aria` | `Object` | `undefined` | A `hash` of aria properties used in the component, currently only label is supported | + +## Exports + +| Name | Type | Description | +| --- | --- | --- | +| `open` | `Function` | Opens the modal dialog | +| `close` | `Function` | Closes the modal dialog | + +Works in tandem with `` to render modals. First of all ensure +you have a modal layer on the page (it doesn't have to be in the same +template) + +```hbs + +``` + +Then all modals will be rendered into the `` for example: + +```hbs preview-template + + + + {{did-insert (set this 'modal' modal)}} + + +

+ Modal Header +

+
+ +

+ Modal body +

+
+ + + +
+ + + +``` diff --git a/ui/packages/consul-ui/app/components/modal-dialog/index.hbs b/ui/packages/consul-ui/app/components/modal-dialog/index.hbs index 80f1e2fc1..9ad3cd6f3 100644 --- a/ui/packages/consul-ui/app/components/modal-dialog/index.hbs +++ b/ui/packages/consul-ui/app/components/modal-dialog/index.hbs @@ -1,56 +1,59 @@ - - {{yield}} - - + {{/let}} + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/metadata.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/metadata.hbs index d97fd9740..b3cecf142 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/metadata.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/metadata.hbs @@ -1,13 +1,17 @@ -
-{{#if item.Meta}} - -{{else}} - - -

- This node has no metadata. -

-
-
-{{/if}} -
+ +
+ {{#if item.Meta}} + + {{else}} + + +

+ This node has no metadata. +

+
+
+ {{/if}} +
+
diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/rtt.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/rtt.hbs index cc1539259..a37eb7670 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/rtt.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/rtt.hbs @@ -1,26 +1,29 @@ -
-
-
-
- Minimum -
-
- {{format-number tomography.min maximumFractionDigits=2}}ms -
-
- Median -
-
- {{format-number tomography.median maximumFractionDigits=2}}ms -
-
- Maximum -
-
- {{format-number tomography.max maximumFractionDigits=2}}ms -
-
+ +
+
+
+
+ Minimum +
+
+ {{format-number tomography.min maximumFractionDigits=2}}ms +
+
+ Median +
+
+ {{format-number tomography.median maximumFractionDigits=2}}ms +
+
+ Maximum +
+
+ {{format-number tomography.max maximumFractionDigits=2}}ms +
+
+
+
- -
- + diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/services.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/services.hbs index 68b0ff9ec..f9cccb8a6 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/services.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/services.hbs @@ -1,71 +1,75 @@ -{{#let + + {{#let - (hash - value=(or sortBy "Status:asc") - change=(action (mut sortBy) value="target.selected") - ) + (hash + value=(or sortBy "Status:asc") + change=(action (mut sortBy) value="target.selected") + ) - (hash - status=(hash - value=(if status (split status ',') undefined) - change=(action (mut status) value="target.selectedItems") - ) - source=(hash - value=(if source (split source ',') undefined) - change=(action (mut source) value="target.selectedItems") - ) - searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - searchProperties + (hash + status=(hash + value=(if status (split status ',') undefined) + change=(action (mut status) value="target.selectedItems") + ) + source=(hash + value=(if source (split source ',') undefined) + change=(action (mut source) value="target.selectedItems") + ) + searchproperty=(hash + value=(if (not-eq searchproperty undefined) + (split searchproperty ',') + searchProperties + ) + change=(action (mut searchproperty) value="target.selectedItems") + default=searchProperties ) - change=(action (mut searchproperty) value="target.selectedItems") - default=searchProperties ) - ) - item.MeshServiceInstances + item.MeshServiceInstances -as |sort filters items|}} -
- {{#if (gt items.length 0) }} - - + {{#if (gt items.length 0) }} + + - {{/if}} - {{! filter out any sidecar proxies }} - - - - - - - -

- This node has no service instances{{#if (gt items.length 0)}} matching that search{{/if}}. -

-
-
-
-
-
-{{/let}} \ No newline at end of file + {{/if}} + {{! filter out any sidecar proxies }} + + + + + + + +

+ This node has no service instances{{#if (gt items.length 0)}} matching that search{{/if}}. +

+
+
+
+
+
+ {{/let}} + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs b/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs index a4321d23f..5b78fc669 100644 --- a/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nodes/show/sessions.hbs @@ -1,30 +1,36 @@ - -
-{{#if (gt sessions.length 0)}} - -{{else}} - - -

- Welcome to Lock Sessions -

-
- -

- Consul provides a session mechanism which can be used to build distributed locks. Sessions act as a binding layer between nodes, health checks, and key/value data. There are currently no lock sessions present, or you may not have permission to view lock sessions. -

-
- - - - -
-{{/if}} -
+ + +
+ {{#if (gt sessions.length 0)}} + + {{else}} + + +

+ Welcome to Lock Sessions +

+
+ +

+ Consul provides a session mechanism which can be used to build distributed locks. Sessions act as a binding layer between nodes, health checks, and key/value data. There are currently no lock sessions present, or you may not have permission to view lock sessions. +

+
+ + + + +
+ {{/if}} +
+
diff --git a/ui/packages/consul-ui/app/templates/dc/nspaces/edit.hbs b/ui/packages/consul-ui/app/templates/dc/nspaces/edit.hbs index bf2a5eab6..246daba37 100644 --- a/ui/packages/consul-ui/app/templates/dc/nspaces/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nspaces/edit.hbs @@ -1,33 +1,33 @@ -{{#if create }} - {{page-title 'New Namespace'}} -{{else}} - {{page-title 'Edit Namespace'}} -{{/if}} - - - - - -
    -
  1. All Namespaces
  2. -
-
- -

-{{#if create }} - New Namespace -{{else}} - Edit {{item.Name}} -{{/if}} -

-
- - - - {{ partial 'dc/nspaces/form'}} - -
+ + + + + + +
    +
  1. All Namespaces
  2. +
+
+ +

+ {{#if create }} + New Namespace + {{else}} + Edit {{item.Name}} + {{/if}} +

+
+ + + + {{ partial 'dc/nspaces/form'}} + +
+
diff --git a/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs b/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs index a3a9eadd5..6b874cc00 100644 --- a/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/nspaces/index.hbs @@ -1,100 +1,106 @@ -{{page-title 'Namespaces'}} - -{{#let + + + {{#let - (hash - value=(or sortBy "Name:asc") - change=(action (mut sortBy) value="target.selected") - ) - - (hash - searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - searchProperties - ) - change=(action (mut searchproperty) value="target.selectedItems") - default=searchProperties + (hash + value=(or sortBy "Name:asc") + change=(action (mut sortBy) value="target.selected") ) - ) - items + (hash + searchproperty=(hash + value=(if (not-eq searchproperty undefined) + (split searchproperty ',') + searchProperties + ) + change=(action (mut searchproperty) value="target.selectedItems") + default=searchProperties + ) + ) -as |sort filters items|}} + items - - - - - -

- Namespaces -

-
- - Create - - - {{#if (gt items.length 0)}} - + + + + +

+ Namespaces +

+
+ + Create + + + {{#if (gt items.length 0)}} + - {{/if}} - - - - - - - - - -

- {{#if (gt items.length 0)}} - No namespaces found - {{else}} - Welcome to Namespaces - {{/if}} -

-
- -

- {{#if (gt items.length 0)}} - No namespaces where found matching that search, or you may not have access to view the namespaces you are searching for. - {{else}} - There don't seem to be any namespaces, or you may not have access to view namespaces yet. - {{/if}} -

-
- - - - -
-
-
-
-
-{{/let}} \ No newline at end of file + @sort={{sort}} + + @filter={{filters}} + /> + {{/if}} +
+ + + + + + + + +

+ {{#if (gt items.length 0)}} + No namespaces found + {{else}} + Welcome to Namespaces + {{/if}} +

+
+ +

+ {{#if (gt items.length 0)}} + No namespaces where found matching that search, or you may not have access to view the namespaces you are searching for. + {{else}} + There don't seem to be any namespaces, or you may not have access to view namespaces yet. + {{/if}} +

+
+ + + + +
+
+
+
+ + {{/let}} + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/services/index.hbs b/ui/packages/consul-ui/app/templates/dc/services/index.hbs index 205827a24..51de43d71 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/index.hbs @@ -1,7 +1,7 @@ -{{page-title 'Services'}} + @title="Services" +as |route|> @@ -76,7 +76,9 @@ as |sort filters items|}} - +

{{#if (gt services.length 0)}} diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance.hbs index 417ce5209..d42586c88 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance.hbs @@ -1,4 +1,7 @@ -{{page-title item.Service.ID}} + @@ -10,7 +13,10 @@ - + @@ -88,10 +94,12 @@ }}/> {{outlet}} - \ No newline at end of file + + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/addresses.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/addresses.hbs index 6e11c73be..10b412226 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/addresses.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/addresses.hbs @@ -1,28 +1,32 @@ -
- {{#if item.Service.TaggedAddresses }} - - - Tag - Address - - - {{#with (object-at 1 taggedAddress) as |address|}} - - {{object-at 0 taggedAddress}}{{#if (and (eq address.Address item.Address) (eq address.Port item.Port))}} (default){{/if}} - - - {{address.Address}}:{{address.Port}} - - {{/with}} - - - {{else}} -

- There are no additional addresses. -

- {{/if}} -
+ +
+ {{#if item.Service.TaggedAddresses }} + + + Tag + Address + + + {{#with (object-at 1 taggedAddress) as |address|}} + + {{object-at 0 taggedAddress}}{{#if (and (eq address.Address item.Address) (eq address.Port item.Port))}} (default){{/if}} + + + {{address.Address}}:{{address.Port}} + + {{/with}} + + + {{else}} +

+ There are no additional addresses. +

+ {{/if}} +
+
diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs index 9b144f04b..8ac01041c 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/exposedpaths.hbs @@ -1,16 +1,20 @@ -
-{{#if (gt proxy.Service.Proxy.Expose.Paths.length 0)}} -

- The following list shows individual HTTP paths exposed through Envoy for external services like Prometheus. Read more about this in our documentation. -

- -{{else}} - - -

- There are no individual HTTP paths exposed through Envoy for external services like Prometheus. Read more about this in our documentation. -

-
-
-{{/if}} -
\ No newline at end of file + +
+ {{#if (gt proxy.Service.Proxy.Expose.Paths.length 0)}} +

+ The following list shows individual HTTP paths exposed through Envoy for external services like Prometheus. Read more about this in our documentation. +

+ + {{else}} + + +

+ There are no individual HTTP paths exposed through Envoy for external services like Prometheus. Read more about this in our documentation. +

+
+
+ {{/if}} +
+
\ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs index c718e194b..6be92a736 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs @@ -1,68 +1,72 @@ -{{#let + + {{#let - (hash - value=(or sortBy "Status:asc") - change=(action (mut sortBy) value="target.selected") - ) + (hash + value=(or sortBy "Status:asc") + change=(action (mut sortBy) value="target.selected") + ) - (hash - status=(hash - value=(if status (split status ',') undefined) - change=(action (mut status) value="target.selectedItems") - ) - check=(hash - value=(if check (split check ',') undefined) - change=(action (mut check) value="target.selectedItems") - ) - searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - searchProperties + (hash + status=(hash + value=(if status (split status ',') undefined) + change=(action (mut status) value="target.selectedItems") + ) + check=(hash + value=(if check (split check ',') undefined) + change=(action (mut check) value="target.selectedItems") + ) + searchproperty=(hash + value=(if (not-eq searchproperty undefined) + (split searchproperty ',') + searchProperties + ) + change=(action (mut searchproperty) value="target.selectedItems") + default=searchProperties ) - change=(action (mut searchproperty) value="target.selectedItems") - default=searchProperties ) - ) - item.MeshChecks + item.MeshChecks -as |sort filters items|}} -
+ as |sort filters items|}} +
- {{#if (gt items.length 0) }} - - + - {{/if}} - - - - - - - - -

- This instance has no health checks{{#if (gt items.length 0)}} matching that search{{/if}}. -

-
-
-
-
+ {{/if}} -
-{{/let}} + + + + + + + +

+ This instance has no health checks{{#if (gt items.length 0)}} matching that search{{/if}}. +

+
+
+
+
+ +
+ {{/let}} +
diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/metadata.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/metadata.hbs index 0f4a4328d..30cc783a5 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/metadata.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/metadata.hbs @@ -1,30 +1,34 @@ -
-
-

Tags

- {{#if (gt item.Tags.length 0) }} - - {{else}} - - -

- There are no tags. -

-
-
- {{/if}} -
- -
+ +
+
+

Tags

+ {{#if (gt item.Tags.length 0) }} + + {{else}} + + +

+ There are no tags. +

+
+
+ {{/if}} +
+ +
+
diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/upstreams.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/upstreams.hbs index 6cb5bd5e9..4034f711a 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/upstreams.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/upstreams.hbs @@ -1,60 +1,64 @@ -
-{{#let + +
+ {{#let - (hash - value=(or sortBy "DestinationName:asc") - change=(action (mut sortBy) value="target.selected") - ) - - (hash - searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - searchProperties - ) - change=(action (mut searchproperty) value="target.selectedItems") - default=searchProperties + (hash + value=(or sortBy "DestinationName:asc") + change=(action (mut sortBy) value="target.selected") ) - ) - proxy.Service.Proxy.Upstreams + (hash + searchproperty=(hash + value=(if (not-eq searchproperty undefined) + (split searchproperty ',') + searchProperties + ) + change=(action (mut searchproperty) value="target.selectedItems") + default=searchProperties + ) + ) -as |sort filters items|}} - {{#if (gt items.length 0)}} - - + - {{/if}} - - - - - - - -

- This service has no upstreams{{#if (gt items.length 0)}} matching that search{{/if}}. -

-
-
-
-
-{{/let}} -
\ No newline at end of file + {{/if}} + + + + + + + +

+ This service has no upstreams{{#if (gt items.length 0)}} matching that search{{/if}}. +

+
+
+
+
+ {{/let}} +
+ \ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/services/show.hbs b/ui/packages/consul-ui/app/templates/dc/services/show.hbs index 8bcc10232..2542ec769 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show.hbs @@ -1,8 +1,8 @@ +{{#let items.firstObject as |item|}} - {{#let items.firstObject as |item|}} - {{page-title item.Service.Service}} @@ -14,7 +14,10 @@ as |route|> - + @@ -107,6 +110,7 @@ as |route|> {{outlet}} @@ -114,5 +118,5 @@ as |route|> - {{/let}} - \ No newline at end of file + +{{/let}} \ No newline at end of file diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/instances.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/instances.hbs index d1907e017..b3dc2eb60 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/instances.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/instances.hbs @@ -1,6 +1,6 @@ +as |route|>
{{#let diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/intentions.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/intentions.hbs index d20d940ec..a02351727 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/intentions.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/intentions.hbs @@ -1,5 +1,10 @@ - - {{outlet}} - +as |route|> + + {{outlet}} + + diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/intentions/edit.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/intentions/edit.hbs index e92ea2c22..e7a71dc14 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/intentions/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/intentions/edit.hbs @@ -1,9 +1,13 @@ - + + + diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs index 8b594f32c..33a0e81ed 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/intentions/index.hbs @@ -1,96 +1,100 @@ - - - - - -{{#let - - (hash - value=(or sortBy "Action:asc") - change=(action (mut sortBy) value="target.selected") - ) - - (hash - access=(hash - value=(if access (split access ',') undefined) - change=(action (mut access) value="target.selectedItems") - ) - searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - searchProperties + + + + + + + {{#let + + (hash + value=(or sortBy "Action:asc") + change=(action (mut sortBy) value="target.selected") ) - ) - api.data + (hash + access=(hash + value=(if access (split access ',') undefined) + change=(action (mut access) value="target.selectedItems") + ) + searchproperty=(hash + value=(if (not-eq searchproperty undefined) + (split searchproperty ',') + searchProperties + ) + change=(action (mut searchproperty) value="target.selectedItems") + default=searchProperties + ) + ) -as |sort filters items|}} -
-{{#if (can 'create intentions')}} - - Create - -{{/if}} -{{#if (gt items.length 0) }} - + {{#if (can 'create intentions')}} + + Create + + {{/if}} + {{#if (gt items.length 0) }} + -{{/if}} + @sort={{sort}} - - - - - - - - - - - - - -

- There are no intentions {{if (gt items.length 0) 'found '}} for this service. -

-
-
-
-
-
-
-
-{{/let}} -
-
+ @filter={{filters}} + /> + {{/if}} + + + + + + + + + + + + + + +

+ There are no intentions {{if (gt items.length 0) 'found '}} for this service. +

+
+
+
+
+
+
+
+ {{/let}} + + +
diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/routing.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/routing.hbs index d89c5a284..bb81a5ebf 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/routing.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/routing.hbs @@ -1,7 +1,10 @@ - -
- -
- + + +
+ +
+
diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/services.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/services.hbs index a080c2363..35f4043af 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/services.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/services.hbs @@ -1,68 +1,72 @@ - -
-{{#let + + +
+ {{#let - (hash - value=(or sortBy "Status:asc") - change=(action (mut sortBy) value="target.selected") - ) - - (hash - instance=(hash - value=(if instance (split instance ',') undefined) - change=(action (mut instance) value="target.selectedItems") + (hash + value=(or sortBy "Status:asc") + change=(action (mut sortBy) value="target.selected") ) - searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - searchProperties + + (hash + instance=(hash + value=(if instance (split instance ',') undefined) + change=(action (mut instance) value="target.selectedItems") + ) + searchproperty=(hash + value=(if (not-eq searchproperty undefined) + (split searchproperty ',') + searchProperties + ) + change=(action (mut searchproperty) value="target.selectedItems") + default=searchProperties ) - change=(action (mut searchproperty) value="target.selectedItems") - default=searchProperties ) - ) - items + items -as |sort filters items|}} -{{#if (gt items.length 0)}} - - + -{{/if}} -

- The following services may receive traffic from external services through this gateway. Learn more about configuring gateways in our - step-by-step guide. -

- - - - - - - - -

- There are no linked services{{#if (gt items.length 0)}} matching that search{{/if}}. -

-
-
-
-
-{{/let}} -
+ @filter={{filters}} + /> + {{/if}} +

+ The following services may receive traffic from external services through this gateway. Learn more about configuring gateways in our + step-by-step guide. +

+ + + + + + + + +

+ There are no linked services{{#if (gt items.length 0)}} matching that search{{/if}}. +

+
+
+
+
+ {{/let}} +
+ diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/tags.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/tags.hbs index 6013df45e..eb70eb0c8 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/tags.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/tags.hbs @@ -1,15 +1,19 @@ -
-{{#let (flatten (map-by "Tags" items)) as |tags|}} - {{#if (gt tags.length 0) }} - - {{else}} - - -

- There are no tags. -

-
-
- {{/if}} -{{/let}} -
+ +
+ {{#let (flatten (map-by "Tags" items)) as |tags|}} + {{#if (gt tags.length 0) }} + + {{else}} + + +

+ There are no tags. +

+
+
+ {{/if}} + {{/let}} +
+
diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs index 67457639d..d9650f24a 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/topology.hbs @@ -1,39 +1,43 @@ - -
- {{#if (and (eq topology.Upstreams.length 0) (eq topology.Downstreams.length 0))}} - - -

- No dependencies -

-
- -

- This service has neither downstreams nor upstreams, which means that no services are configured to connect with it. Add upstreams and intentions to ensure this service is connected with the rest of your service mesh. -

-
- - - -
- {{else}} - {{#if topology.FilteredByACLs}} - + + +
+ {{#if (and (eq topology.Upstreams.length 0) (eq topology.Downstreams.length 0))}} + + +

+ No dependencies +

+
+ +

+ This service has neither downstreams nor upstreams, which means that no services are configured to connect with it. Add upstreams and intentions to ensure this service is connected with the rest of your service mesh. +

+
+ + + +
+ {{else}} + {{#if topology.FilteredByACLs}} + + {{/if}} + {{/if}} - - {{/if}} -
+
+ diff --git a/ui/packages/consul-ui/app/templates/dc/services/show/upstreams.hbs b/ui/packages/consul-ui/app/templates/dc/services/show/upstreams.hbs index f6f54c8f0..0288ce469 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/show/upstreams.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/show/upstreams.hbs @@ -1,68 +1,72 @@ - -
-{{#let + + +
+ {{#let - (hash - value=(or sortBy "Status:asc") - change=(action (mut sortBy) value="target.selected") - ) - - (hash - instance=(hash - value=(if instance (split instance ',') undefined) - change=(action (mut instance) value="target.selectedItems") + (hash + value=(or sortBy "Status:asc") + change=(action (mut sortBy) value="target.selected") ) - searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - searchProperties + + (hash + instance=(hash + value=(if instance (split instance ',') undefined) + change=(action (mut instance) value="target.selectedItems") + ) + searchproperty=(hash + value=(if (not-eq searchproperty undefined) + (split searchproperty ',') + searchProperties + ) + change=(action (mut searchproperty) value="target.selectedItems") + default=searchProperties ) - change=(action (mut searchproperty) value="target.selectedItems") - default=searchProperties ) - ) - items + items -as |sort filters items|}} -{{#if (gt items.length 0)}} - - -{{/if}} -

- Upstreams are services that may receive traffic from this gateway. Learn more about configuring gateways in our documentation. -

- + - - - - - - - -

- There are no upstreams{{#if (gt items.length 0)}} matching that search{{/if}}. -

-
-
-
-
-{{/let}} -
+ @onsearch={{action (mut search) value="target.value"}} + + @sort={{sort}} + + @filter={{filters}} + /> + {{/if}} +

+ Upstreams are services that may receive traffic from this gateway. Learn more about configuring gateways in our documentation. +

+ + + + + + + + +

+ There are no upstreams{{#if (gt items.length 0)}} matching that search{{/if}}. +

+
+
+
+
+ {{/let}} +
+ diff --git a/ui/packages/consul-ui/app/templates/nspace.hbs b/ui/packages/consul-ui/app/templates/nspace.hbs index 2929fdf92..a02351727 100644 --- a/ui/packages/consul-ui/app/templates/nspace.hbs +++ b/ui/packages/consul-ui/app/templates/nspace.hbs @@ -1,5 +1,10 @@ - - {{outlet}} - \ No newline at end of file +as |route|> + + {{outlet}} + + diff --git a/ui/packages/consul-ui/tests/acceptance/dc/acls/roles/as-many/add-new.feature b/ui/packages/consul-ui/tests/acceptance/dc/acls/roles/as-many/add-new.feature index 66dbb0603..7e0746ad2 100644 --- a/ui/packages/consul-ui/tests/acceptance/dc/acls/roles/as-many/add-new.feature +++ b/ui/packages/consul-ui/tests/acceptance/dc/acls/roles/as-many/add-new.feature @@ -51,7 +51,7 @@ Feature: dc / acls / roles / as-many / add-new: Add new And "[data-notification]" has the "notification-update" class And "[data-notification]" has the "success" class Scenario: Add Role that has an existing Policy - And I click "#new-role-toggle + div .ember-power-select-trigger" + And I click "#new-role .ember-power-select-trigger" And I click ".ember-power-select-option:first-child" And I click submit on the roles.form Then a PUT request was made to "/v1/acl/role?dc=datacenter" from yaml