feat: update notification to use hds toast component (#16519)

This commit is contained in:
Valeriia Ruban 2023-03-06 14:10:09 -08:00 committed by GitHub
parent a673767fe9
commit d40fc3cc9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
59 changed files with 428 additions and 847 deletions

3
.changelog/16519.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:improvement
ui: Update to use Hds::Toast component to show notifications
```

View File

@ -1,37 +1,27 @@
{{#if (eq @type 'remove')}}
{{#if @error}}
<Notice
class="notification-delete"
@type="error"
<Hds::Toast
@color='critical'
...attributes
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
There was an error invalidating the Lock Session.
{{#if (and @error.status @error.detail)}}
as |T|>
<T.Title>Error!</T.Title>
<T.Description>
There was an error invalidating the Lock Session.
{{#if (and @error.status @error.detail)}}
<br />{{@error.status}}: {{@error.detail}}
{{/if}}
</p>
</notice.Body>
</Notice>
{{/if}}
</T.Description>
</Hds::Toast>
{{else}}
<Notice
class="notification-delete"
@type="success"
<Hds::Toast
@color='success'
...attributes
as |notice|>
<notice.Header>
<strong>Success!</strong>
</notice.Header>
<notice.Body>
<p>
Your Lock Session has been invalidated.
</p>
</notice.Body>
</Notice>
as |T|>
<T.Title>Success!</T.Title>
<T.Description>
Your Lock Session has been invalidated.
</T.Description>
</Hds::Toast>
{{/if}}
{{else if (eq @type 'kv')}}
<Hds::Alert @type='inline' @color='warning' class='mb-3' data-test-session-warning as |A|>

View File

@ -1,16 +1,8 @@
{{#if (eq @type 'remove')}}
<Notice
class="notification-delete"
@type="success"
...attributes
as |notice|>
<notice.Header>
<strong>Success!</strong>
</notice.Header>
<notice.Body>
<p>
Your Namespace has been marked for deletion.
</p>
</notice.Body>
</Notice>
<Hds::Toast @color='success'
...attributes
as |T|>
<T.Title>Success!</T.Title>
<T.Description>Your Namespace has been marked for deletion.</T.Description>
</Hds::Toast>
{{/if}}

View File

@ -1,16 +1,11 @@
{{#if (eq @type 'remove')}}
<Notice
class="notification-delete"
@type="success"
<Hds::Toast
@color='success'
...attributes
as |notice|>
<notice.Header>
<strong>Success!</strong>
</notice.Header>
<notice.Body>
<p>
Your Partition has been marked for deletion.
</p>
</notice.Body>
</Notice>
as |T|>
<T.Title>Success!</T.Title>
<T.Description>
Your Partition has been marked for deletion.
</T.Description>
</Hds::Toast>
{{/if}}

View File

@ -1,16 +1,11 @@
{{#if (eq @type 'remove')}}
<Notice
class="notification-delete"
@type="success"
<Hds::Toast
@color='success'
...attributes
as |notice|>
<notice.Header>
<strong>Success!</strong>
</notice.Header>
<notice.Body>
<p>
Your Peer has been marked for deletion.
</p>
</notice.Body>
</Notice>
as |T|>
<T.Title>Success!</T.Title>
<T.Description>
Your Peer has been marked for deletion.
</T.Description>
</Hds::Toast>
{{/if}}

View File

@ -5,14 +5,10 @@
@extend %app-notifications;
}
%app-notifications {
display: flex;
flex-direction: column;
align-items: center;
position: fixed;
z-index: 50;
top: -45px;
left: 0;
z-index: 100;
bottom: 2rem;
left: 1.5rem;
pointer-events: none;
}
@ -125,7 +121,6 @@ main {
%main-nav-horizontal-toggle:checked + header > div > nav:first-of-type {
left: calc(var(--chrome-width, 280px) * -1);
}
%main-nav-horizontal-toggle ~ main .notifications,
%main-nav-horizontal-toggle ~ main {
margin-left: var(--chrome-width, 280px);
}

View File

@ -1,5 +1,5 @@
<div
class="app-notification"
class='app-notification'
...attributes
{{style
(array

View File

@ -16,42 +16,32 @@ as |api|>
<BlockSlot @name="error" as |after|>
{{#if (string-starts-with api.error.detail 'duplicate intention found:')}}
<Notice
{{notification
after=(action after)
}}
class="notification-update"
@type="error"
as |notice|>
<notice.Header>
<strong>Intention exists!</strong>
</notice.Header>
<notice.Body>
<p>
An intention already exists for this Source-Destination pair. Please enter a different combination of Services, or search the intentions to edit an existing intention.
</p>
</notice.Body>
</Notice>
<Hds::Toast
@color='critical'
{{notification
after=(action after)
}}
as |T|>
<T.Title>Intention exists!</T.Title>
<T.Description>
An intention already exists for this Source-Destination pair. Please enter a different combination of Services, or search the intentions to edit an existing intention.
</T.Description>
</Hds::Toast>
{{else}}
<Notice
{{notification
after=(action after)
}}
class="notification-update"
@type="error"
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
There was an error saving your intention.
{{#if (and api.error.status api.error.detail)}}
<br />{{api.error.status}}: {{api.error.detail}}
{{/if}}
</p>
</notice.Body>
</Notice>
<Hds::Toast
@color='critical'
{{notification
after=(action after)
}}
as |T|>
<T.Title>Error!</T.Title>
<T.Description>
There was an error saving your intention.
{{#if (and api.error.status api.error.detail)}}
<br />{{api.error.status}}: {{api.error.detail}}
{{/if}}
</T.Description>
</Hds::Toast>
{{/if}}
</BlockSlot>

View File

@ -15,13 +15,4 @@
td.intent- strong {
@extend %pill-l7;
}
.notice.allow {
@extend %notice-success;
}
.notice.deny {
@extend %notice-error;
}
.notice.permissions {
@extend %notice-info;
}
}

View File

@ -56,22 +56,13 @@
{{#yield-slot name="disconnected" params=(block-params (action dispatch "RESET"))}}
{{yield api}}
{{else}}
<Notice
<Hds::Toast @color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
An error was returned whilst loading this data, refresh to try again.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>An error was returned whilst loading this data, refresh to try again.</T.Description>
</Hds::Toast>
{{/yield-slot}}
{{/if}}
</State>

View File

@ -39,22 +39,14 @@ as |after|}}
{{#yield-slot name="removed" params=(block-params after)}}
{{yield api}}
{{else}}
<Notice
{{notification
after=(action after)
}}
class="notification-delete"
@type="success"
as |notice|>
<notice.Header>
<strong>Success!</strong>
</notice.Header>
<notice.Body>
<p>
Your {{or label type}} has been deleted.
</p>
</notice.Body>
</Notice>
<Hds::Toast
@color='success'
{{notification
after=(action after)
}} as |T|>
<T.Title>Success!</T.Title>
<T.Description>Your {{or label type}} has been deleted.</T.Description>
</Hds::Toast>
{{/yield-slot}}
{{/let}}
</State>
@ -66,22 +58,14 @@ as |after|}}
{{#yield-slot name="persisted" params=(block-params after)}}
{{yield api}}
{{else}}
<Notice
<Hds::Toast
@color='success'
{{notification
after=(action after)
}}
class="notification-update"
@type="success"
as |notice|>
<notice.Header>
<strong>Success!</strong>
</notice.Header>
<notice.Body>
<p>
Your {{or label type}} has been saved.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Success!</T.Title>
<T.Description>Your {{or label type}} has been saved.</T.Description>
</Hds::Toast>
{{/yield-slot}}
{{/let}}
</State>
@ -93,27 +77,20 @@ as |after|}}
{{#yield-slot name="error" params=(block-params after api.error)}}
{{yield api}}
{{else}}
<Notice
<Hds::Toast
@color='critical'
{{notification
after=(action after)
}}
class="notification-update"
@type="error"
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
There was an error saving your {{or label type}}.
{{#if (and api.error.status api.error.detail)}}
}} as |T|>
<T.Title>Error!</T.Title>
<T.Description>There was an error saving your {{or label type}}.
{{#if (and api.error.status api.error.detail)}}
<br />{{api.error.status}}: {{api.error.detail}}
{{else if api.error.message}}
{{else if api.error.message}}
<br />{{api.error.message}}
{{/if}}
</p>
</notice.Body>
</Notice>
{{/if}}
</T.Description>
</Hds::Toast>
{{/yield-slot}}
{{/let}}
</State>

View File

@ -7,66 +7,58 @@
{{{flash.dom}}}
{{else}}
{{#let (lowercase flash.type) (lowercase flash.action) as |status type|}}
<Notice
role='alert'
class={{concat status ' notification-' type}}
<Hds::Toast
@color={{if (eq status 'error') 'critical' status}}
data-notification
@type={{status}}
as |notice|
>
<notice.Header>
<strong>
{{capitalize status}}!
</strong>
</notice.Header>
<notice.Body>
<p>
{{#if (eq type 'logout')}}
{{#if (eq status 'success')}}
You are now logged out.
{{else}}
There was an error logging out.
{{/if}}
{{else if (eq type 'authorize')}}
{{#if (eq status 'success')}}
You are now logged in.
{{else}}
There was an error, please check your SecretID/Token
{{/if}}
as |T|>
<T.Title>{{capitalize status}}!</T.Title>
<T.Description>
{{#if (eq type 'logout')}}
{{#if (eq status 'success')}}
You are now logged out.
{{else}}
{{#if (or (eq type 'use') (eq flash.model 'token'))}}
<Consul::Token::Notifications
@type={{type}}
@status={{status}}
@item={{flash.item}}
@error={{flash.error}}
/>
{{else if (eq flash.model 'intention')}}
<Consul::Intention::Notifications
@type={{type}}
@status={{status}}
@item={{flash.item}}
@error={{flash.error}}
/>
{{else if (eq flash.model 'role')}}
<Consul::Role::Notifications
@type={{type}}
@status={{status}}
@item={{flash.item}}
@error={{flash.error}}
/>
{{else if (eq flash.model 'policy')}}
<Consul::Policy::Notifications
@type={{type}}
@status={{status}}
@item={{flash.item}}
@error={{flash.error}}
/>
{{/if}}
There was an error logging out.
{{/if}}
</p>
</notice.Body>
</Notice>
{{else if (eq type 'authorize')}}
{{#if (eq status 'success')}}
You are now logged in.
{{else}}
There was an error, please check your SecretID/Token
{{/if}}
{{else}}
{{#if (or (eq type 'use') (eq flash.model 'token'))}}
<Consul::Token::Notifications
@type={{type}}
@status={{status}}
@item={{flash.item}}
@error={{flash.error}}
/>
{{else if (eq flash.model 'intention')}}
<Consul::Intention::Notifications
@type={{type}}
@status={{status}}
@item={{flash.item}}
@error={{flash.error}}
/>
{{else if (eq flash.model 'role')}}
<Consul::Role::Notifications
@type={{type}}
@status={{status}}
@item={{flash.item}}
@error={{flash.error}}
/>
{{else if (eq flash.model 'policy')}}
<Consul::Policy::Notifications
@type={{type}}
@status={{status}}
@item={{flash.item}}
@error={{flash.error}}
/>
{{/if}}
{{/if}}
</T.Description>
</Hds::Toast>
{{/let}}
{{/if}}
</app.Notification>

View File

@ -1,50 +0,0 @@
# Notice
Presentational component for informational/warning/error banners/notices.
```hbs preview-template
<Notice
@type={{this.type}}
as |notice|>
<notice.Header>
<h3>Header</h3>
</notice.Header>
<notice.Body>
<p>
Body
</p>
</notice.Body>
<notice.Footer>
<p>
<a href="">Footer link</a>
</p>
</notice.Footer>
</Notice>
<figure>
<figcaption>Provide a widget to change the <code>@type</code></figcaption>
<select
onchange={{action (mut this.type) value="target.value"}}
>
<option>info</option>
<option>success</option>
<option>warning</option>
<option>error</option>
</select>
</figure>
```
## Arguments
| Argument/Attribute | Type | Default | Description |
| --- | --- | --- | --- |
| `type` | `String` | `info` | Type of notice [info\|warning\|error] |
## See
- [Template Source Code](./index.hbs)
---

View File

@ -1,10 +0,0 @@
<div
class="notice {{or @type 'info'}}"
...attributes
>
{{yield (hash
Header=(component 'anonymous' tagName="header")
Body=(component 'anonymous')
Footer=(component 'anonymous' tagName="footer")
)}}
</div>

View File

@ -1,31 +0,0 @@
@import './skin';
@import './layout';
%notice {
margin: 1em 0;
}
/**/
.notice.success {
@extend %notice-success;
}
.notice.warning {
@extend %notice-warning;
}
.notice.error {
@extend %notice-error;
}
.notice.info {
@extend %notice-info;
}
.notice.highlight {
@extend %notice-highlight;
}
.notice.policy-management {
@extend %notice-highlight;
}
.notice.crd::before {
-webkit-mask-image: none;
mask-image: none;
background-color: transparent;
@extend %with-logo-kubernetes-color-icon;
}

View File

@ -1,24 +0,0 @@
%notice {
position: relative;
padding: 0.8rem;
}
%notice header {
margin-bottom: 0.1rem;
}
%notice header > * {
margin-bottom: 0;
}
%notice p {
margin-bottom: 0.3rem;
line-height: 1.4;
}
/* this is probably skin */
%notice {
padding-left: calc(0.8rem + 1.4rem);
}
%notice::before {
position: absolute;
top: 0.8rem;
left: 0.6rem;
font-size: 1rem;
}

View File

@ -1,77 +0,0 @@
%notice {
border-radius: var(--decor-radius-100);
border: var(--decor-border-100);
color: var(--token-color-hashicorp-brand);
}
%notice::before {
@extend %as-pseudo;
}
%notice header > * {
@extend %h300;
}
%notice footer * {
@extend %p3;
font-weight: var(--typo-weight-bold);
}
%notice-success,
%notice-info,
%notice-highlight,
%notice-error,
%notice-warning {
@extend %notice;
}
%notice-success {
background-color: var(--token-color-surface-success);
border-color: var(--token-color-foreground-success);
}
%notice-success header * {
color: var(--token-color-palette-green-400);
}
%notice-info {
border-color: var(--token-color-border-action);
background-color: var(--token-color-surface-action);
}
%notice-info header * {
color: var(--token-color-foreground-action-active);
}
%notice-highlight {
background-color: var(--token-color-surface-strong);
border-color: var(--token-color-palette-neutral-300);
}
%notice-info header * {
color: var(--token-color-foreground-action-active);
}
%notice-warning {
border-color: var(--token-color-vault-border);
background-color: var(--token-color-vault-gradient-faint-start);
}
%notice-warning header * {
color: var(--token-color-vault-foreground);
}
%notice-error {
background-color: var(--token-color-surface-critical);
border-color: var(--token-color-foreground-critical);
}
%notice-error header * {
color: var(--token-color-foreground-critical);
}
%notice-success::before {
@extend %with-check-circle-fill-mask;
color: var(--token-color-foreground-success);
}
%notice-info::before {
@extend %with-info-circle-fill-mask;
color: var(--token-color-foreground-action);
}
%notice-highlight::before {
@extend %with-star-fill-mask;
color: var(--token-color-vault-brand);
}
%notice-warning::before {
@extend %with-alert-triangle-mask;
color: var(--token-color-foreground-warning);
}
%notice-error::before {
@extend %with-cancel-square-fill-mask;
color: var(--token-color-foreground-critical);
}

View File

@ -7,24 +7,17 @@ like the below:
```hbs preview-template
<figure>
<figcaption>Attach a Warning notice to the top of the app ^^^</figcaption>
<Notice
class="notification-update"
@type="warning"
{{notification
sticky=true
}}
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
<Hds::Toast
@color='warning'
{{notification
sticky=true
}}
as |T|>
<T.Title>Warning!</T.Title>
<T.Description>
This service has been deregistered and no longer exists in the catalog.
</p>
</notice.Body>
</Notice>
</T.Description>
</Hds::Toast>
</figure>
```

View File

@ -66,7 +66,6 @@
@import 'consul-ui/components/inline-code';
@import 'consul-ui/components/overlay';
@import 'consul-ui/components/tooltip';
@import 'consul-ui/components/notice';
@import 'consul-ui/components/modal-dialog';
@import 'consul-ui/components/list-collection';
@import 'consul-ui/components/filter-bar';

View File

@ -79,9 +79,6 @@ html[data-route='dc.services.index'] .consul-service-list ul,
.consul-auth-method-list ul {
@extend %list-after-filter-bar;
}
.notice + .consul-token-list ul {
border-top-width: 1px !important;
}
// TODO: This shouldn't be done here, decide the best way to do this
// %main-decoration ? %main-skin ? %content-skin ?

View File

@ -30,56 +30,35 @@ as |route|>
</BlockSlot>
<BlockSlot @name="disconnected" as |after|>
{{#if (eq loader.error.status "404")}}
<Notice
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
This KV or parent of this KV was deleted.
</p>
</notice.Body>
</Notice>
<Hds::Toast
@color='warning'
{{notification sticky=true}}
as |T|>
<T.Title>Warning!</T.Title>
<T.Description>
This KV or parent of this KV was deleted.
</T.Description>
</Hds::Toast>
{{else if (eq loader.error.status "403")}}
<Notice
{{notification
sticky=true
}}
class="notification-update"
@type="error"
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
You no longer have access to this KV.
</p>
</notice.Body>
</Notice>
<Hds::Toast
@color='critical'
{{notification sticky=true}}
as |T|>
<T.Title>Error!</T.Title>
<T.Description>
You no longer have access to this KV.
</T.Description>
</Hds::Toast>
{{else}}
<Notice
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
An error was returned whilst loading this data, refresh to try again.
</p>
</notice.Body>
</Notice>
<Hds::Toast
@color='warning'
{{notification sticky=true}}
as |T|>
<T.Title>Warning!</T.Title>
<T.Description>
An error was returned whilst loading this data, refresh to try again.
</T.Description>
</Hds::Toast>
{{/if}}
</BlockSlot>

View File

@ -29,56 +29,32 @@ as |route|>
<BlockSlot @name="disconnected" as |after|>
{{#if (eq loader.error.status "404")}}
<Notice
<Hds::Toast
@color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
This node no longer exists in the catalog.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>This node no longer exists in the catalog.</T.Description>
</Hds::Toast>
{{else if (eq loader.error.status "403")}}
<Notice
<Hds::Toast
@color='critical'
{{notification
sticky=true
}}
class="notification-update"
@type="error"
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
You no longer have access to this node
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Error!</T.Title>
<T.Description>You no longer have access to this node.</T.Description>
</Hds::Toast>
{{else}}
<Notice
<Hds::Toast
@color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
An error was returned whilst loading this data, refresh to try again.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>An error was returned whilst loading this data, refresh to try again.</T.Description>
</Hds::Toast>
{{/if}}
</BlockSlot>
<BlockSlot @name="loaded">

View File

@ -21,43 +21,35 @@
<BlockSlot @name='disconnected' as |after|>
{{#if (eq loader.error.status '404')}}
<Notice
<Hds::Toast
@color='warning'
{{notification sticky=true}}
class='notification-update'
@type='warning'
as |notice|
>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
This service has been deregistered and no longer exists in the catalog.
</p>
</notice.Body>
</Notice>
as |T|>
<T.Title>Warning!</T.Title>
<T.Description>
This service has been deregistered and no longer exists in the catalog.
</T.Description>
</Hds::Toast>
{{else if (eq loader.error.status '403')}}
<Notice {{notification sticky=true}} class='notification-update' @type='error' as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
You no longer have access to this service
</p>
</notice.Body>
</Notice>
<Hds::Toast
@color='critical'
{{notification sticky=true}}
as |T|>
<T.Title>Error!</T.Title>
<T.Description>
You no longer have access to this service.
</T.Description>
</Hds::Toast>
{{else}}
<Notice {{notification sticky=true}} class='notification-update' @type='error' as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
An error was returned whilst loading this data, refresh to try again.
</p>
</notice.Body>
</Notice>
<Hds::Toast
@color='critical'
{{notification sticky=true}}
as |T|>
<T.Title>Warning!</T.Title>
<T.Description>
An error was returned whilst loading this data, refresh to try again.
</T.Description>
</Hds::Toast>
{{/if}}
</BlockSlot>

View File

@ -22,56 +22,32 @@ as |route|>
<BlockSlot @name="disconnected" as |after|>
{{#if (eq loader.error.status "404")}}
<Notice
<Hds::Toast
@color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
This service has been deregistered and no longer exists in the catalog.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>This service has been deregistered and no longer exists in the catalog.</T.Description>
</Hds::Toast>
{{else if (eq loader.error.status "403")}}
<Notice
<Hds::Toast
@color='critical'
{{notification
sticky=true
}}
class="notification-update"
@type="error"
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
You no longer have access to this service
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Error!</T.Title>
<T.Description>You no longer have access to this service.</T.Description>
</Hds::Toast>
{{else}}
<Notice
<Hds::Toast
@color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
An error was returned whilst loading this data, refresh to try again.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>An error was returned whilst loading this data, refresh to try again.</T.Description>
</Hds::Toast>
{{/if}}
</BlockSlot>

View File

@ -24,56 +24,29 @@ as |item|}}
<BlockSlot @name="disconnected" as |after|>
{{#if (eq loader.error.status "404")}}
<Notice
<Hds::Toast @color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
This service has been deregistered and no longer exists in the catalog.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>This service has been deregistered and no longer exists in the catalog.</T.Description>
</Hds::Toast>
{{else if (eq loader.error.status "403")}}
<Notice
<Hds::Toast @color='critical'
{{notification
sticky=true
}}
class="notification-update"
@type="error"
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
You no longer have access to this service
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Error!</T.Title>
<T.Description>You no longer have access to this service.</T.Description>
</Hds::Toast>
{{else}}
<Notice
<Hds::Toast @color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
An error was returned whilst loading this data, refresh to try again.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>An error was returned whilst loading this data, refresh to try again.</T.Description>
</Hds::Toast>
{{/if}}
</BlockSlot>

View File

@ -24,56 +24,32 @@ as |item|}}
<BlockSlot @name="disconnected" as |after|>
{{#if (eq loader.error.status "404")}}
<Notice
<Hds::Toast
@color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
This service has been deregistered and no longer exists in the catalog.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>This service has been deregistered and no longer exists in the catalog.</T.Description>
</Hds::Toast>
{{else if (eq loader.error.status "403")}}
<Notice
<Hds::Toast
@color='critical'
{{notification
sticky=true
}}
class="notification-update"
@type="error"
as |notice|>
<notice.Header>
<strong>Error!</strong>
</notice.Header>
<notice.Body>
<p>
You no longer have access to this service
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Error!</T.Title>
<T.Description>You no longer have access to this service.</T.Description>
</Hds::Toast>
{{else}}
<Notice
<Hds::Toast
@color='warning'
{{notification
sticky=true
}}
class="notification-update"
@type="warning"
as |notice|>
<notice.Header>
<strong>Warning!</strong>
</notice.Header>
<notice.Body>
<p>
An error was returned whilst loading this data, refresh to try again.
</p>
</notice.Body>
</Notice>
}} as |T|>
<T.Title>Warning!</T.Title>
<T.Description>An error was returned whilst loading this data, refresh to try again.</T.Description>
</Hds::Toast>
{{/if}}
</BlockSlot>

View File

@ -41,8 +41,8 @@ Feature: dc / acls / policies / as many / add existing: Add existing policy
Name: Policy 2
---
Then the url should be /datacenter/acls/[Model]s
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
-------------
| Model |

View File

@ -39,8 +39,8 @@ Feature: dc / acls / policies / as many / add new: Add new policy
Name: New-Policy
---
Then the url should be /datacenter/acls/[Model]s
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
-------------
| Model |
@ -62,8 +62,8 @@ Feature: dc / acls / policies / as many / add new: Add new policy
- ServiceName: New-Service-Identity
---
Then the url should be /datacenter/acls/[Model]s
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
-------------
| Model |
@ -86,8 +86,8 @@ Feature: dc / acls / policies / as many / add new: Add new policy
Datacenter: datacenter
---
Then the url should be /datacenter/acls/[Model]s
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
-------------
| Model |

View File

@ -24,8 +24,8 @@ Feature: dc / acls / policies / create
Description: [Description]
---
Then the url should be /datacenter/acls/policies
And "[data-notification]" has the "notification-create" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
---------------------------
| Description |
@ -46,5 +46,5 @@ Feature: dc / acls / policies / create
- Namespace
---
Then the url should be /datacenter/acls/policies
And "[data-notification]" has the "notification-create" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -15,8 +15,8 @@ Feature: dc / acls / policies / delete: Policy Delete
And I click delete on the policies
And I click confirmDelete on the policies
Then a DELETE request was made to "/v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter&ns=@!namespace"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Deleting a policy model from the policies listing page errors
Given the url "/v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter&ns=@namespace" responds with a 500 status
And 1 policy model from yaml
@ -30,8 +30,8 @@ Feature: dc / acls / policies / delete: Policy Delete
And I click actions on the policies
And I click delete on the policies
And I click confirmDelete on the policies
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
Scenario: Deleting a policy from the policy detail page
When I visit the policy page for yaml
---
@ -41,8 +41,8 @@ Feature: dc / acls / policies / delete: Policy Delete
And I click delete
And I click confirmDelete on the deleteModal
Then a DELETE request was made to "/v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter&ns=@!namespace"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
# FIXME
# Scenario: Deleting a policy from the policy detail page errors
# Given the url "/v1/acl/policy/1981f51d-301a-497b-89a0-05112ef02b4b?dc=datacenter&ns=@namespace" responds with a 500 status

View File

@ -37,8 +37,8 @@ Feature: dc / acls / policies / update: ACL Policy Update
---
Then the url should be /datacenter/acls/policies
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
------------------------------------------------------------------------------
| Name | Rules | Description |
@ -50,8 +50,8 @@ Feature: dc / acls / policies / update: ACL Policy Update
Given the url "/v1/acl/policy/policy-id" responds with a 500 status
And I submit
Then the url should be /datacenter/acls/policies/policy-id
Then "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
@notNamespaceable
Scenario: Updating a simple ACL policy when Namespaces are disabled does not send Namespace
@ -65,5 +65,5 @@ Feature: dc / acls / policies / update: ACL Policy Update
- Namespace
---
Then the url should be /datacenter/acls/policies
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -46,5 +46,5 @@ Feature: dc / acls / roles / as many / add existing: Add existing
Name: Role 2
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -46,8 +46,8 @@ Feature: dc / acls / roles / as-many / add-new: Add new
ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Add Role that has an existing Policy
And I click "#new-role .ember-power-select-trigger"
And I click ".ember-power-select-option:first-child"
@ -71,8 +71,8 @@ Feature: dc / acls / roles / as-many / add-new: Add new
ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Add Role and add a new Policy
And I click roles.form.policies.create
Then I fill in the roles.form.policies.form with yaml
@ -111,8 +111,8 @@ Feature: dc / acls / roles / as-many / add-new: Add new
ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Add Role and add a new Service Identity
And I click roles.form.policies.create
Then I fill in the roles.form.policies.form with yaml
@ -141,8 +141,8 @@ Feature: dc / acls / roles / as-many / add-new: Add new
ID: ee52203d-989f-4f7a-ab5a-2bef004164ca-1
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
@ignore:
Scenario: Click the cancel form
Then ok

View File

@ -24,8 +24,8 @@ Feature: dc / acls / roles / create
Description: [Description]
---
Then the url should be /datacenter/acls/roles
And "[data-notification]" has the "notification-create" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
---------------------------
| Description |
@ -45,6 +45,5 @@ Feature: dc / acls / roles / create
- Namespace
---
Then the url should be /datacenter/acls/roles
And "[data-notification]" has the "notification-create" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -29,8 +29,8 @@ Feature: dc / acls / roles / update: ACL Role Update
Description: [Description]
---
Then the url should be /datacenter/acls/roles
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
------------------------------------------
| Name | Description |
@ -42,8 +42,8 @@ Feature: dc / acls / roles / update: ACL Role Update
Given the url "/v1/acl/role/role-id" responds with a 500 status
And I submit
Then the url should be /datacenter/acls/roles/role-id
Then "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
@notNamespaceable
Scenario: Updating a simple ACL role when Namespaces are disabled does not send Namespace
@ -57,5 +57,5 @@ Feature: dc / acls / roles / update: ACL Role Update
- Namespace
---
Then the url should be /datacenter/acls/roles
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -16,8 +16,8 @@ Feature: dc / acls / tokens / clone: Cloning an ACL token
And I click actions on the tokens
And I click clone on the tokens
Then a PUT request was made to "/v1/acl/token/token/clone?dc=datacenter&ns=@!namespace"
Then "[data-notification]" has the "notification-clone" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Using an ACL token from the detail page
When I visit the token page for yaml
---
@ -26,5 +26,5 @@ Feature: dc / acls / tokens / clone: Cloning an ACL token
---
And I click clone
Then the url should be /datacenter/acls/tokens
Then "[data-notification]" has the "notification-clone" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -21,8 +21,8 @@ Feature: dc / acls / tokens / create
Description: [Description]
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-create" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
---------------------------
| Description |
@ -41,5 +41,5 @@ Feature: dc / acls / tokens / create
- Namespace
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-create" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -25,8 +25,8 @@ Feature: dc / acls / tokens / own-no-delete: Your current token has no delete bu
And I click actions on the tokens
And I click use on the tokens
And I click confirmUse on the tokens
Then "[data-notification]" has the "notification-use" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Then I have settings like yaml
---
consul:token: "{\"AccessorID\":\"token\",\"SecretID\":\"ee52203d-989f-4f7a-ab5a-2bef004164ca\",\"Namespace\":\"@namespace\",\"Partition\":\"default\"}"

View File

@ -26,8 +26,8 @@ Feature: dc / acls / tokens / update: ACL Token Update
Description: [Description]
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
---------------------------
| Description |
@ -38,8 +38,8 @@ Feature: dc / acls / tokens / update: ACL Token Update
Given the url "/v1/acl/token/key" responds with a 500 status
And I submit
Then the url should be /datacenter/acls/tokens/key
Then "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
@notNamespaceable
Scenario: Updating a simple ACL token when Namespaces are disabled does not send Namespace
@ -53,5 +53,5 @@ Feature: dc / acls / tokens / update: ACL Token Update
- Namespace
---
Then the url should be /datacenter/acls/tokens
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -24,8 +24,8 @@ Feature: dc / acls / tokens / use: Using an ACL token
And I click actions on the tokens
And I click use on the tokens
And I click confirmUse on the tokens
Then "[data-notification]" has the "notification-use" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Then I have settings like yaml
---
consul:token: "{\"AccessorID\":\"token\",\"SecretID\":\"ee52203d-989f-4f7a-ab5a-2bef004164ca\",\"Namespace\":\"@namespace\",\"Partition\":\"default\"}"
@ -40,8 +40,8 @@ Feature: dc / acls / tokens / use: Using an ACL token
---
And I click use
And I click confirmUse
Then "[data-notification]" has the "notification-use" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Then I have settings like yaml
---
consul:token: "{\"AccessorID\":\"token\",\"SecretID\":\"ee52203d-989f-4f7a-ab5a-2bef004164ca\",\"Namespace\":\"@namespace\",\"Partition\":\"default\"}"

View File

@ -59,8 +59,8 @@ Feature: dc / intentions / create: Intention Create
---
Then the url should be /datacenter/intentions
And the title should be "Intentions - Consul"
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
@notNamespaceable
Scenario: with namespaces disabled
Given 1 datacenter model with the value "datacenter"
@ -101,5 +101,5 @@ Feature: dc / intentions / create: Intention Create
---
Then the url should be /datacenter/intentions
And the title should be "Intentions - Consul"
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -23,8 +23,8 @@ Feature: dc / intentions / deleting: Deleting items with confirmations, success
And I click delete on the intentionList.intentions
And I click confirmInlineDelete on the intentionList.intentions
Then a DELETE request was made to "/v1/connect/intentions/exact?source=default%2Fdefault%2Fname&destination=default%2Fdefault%2Fdestination&dc=datacenter"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Deleting an intention from the intention detail page
When I visit the intention page for yaml
---
@ -34,8 +34,8 @@ Feature: dc / intentions / deleting: Deleting items with confirmations, success
And I click delete
And I click confirmDelete
Then a DELETE request was made to "/v1/connect/intentions/exact?source=default%2Fdefault%2Fname&destination=default%2Fdefault%2Fdestination&dc=datacenter"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Deleting an intention from the intention detail page and getting an error
When I visit the intention page for yaml
---
@ -45,8 +45,8 @@ Feature: dc / intentions / deleting: Deleting items with confirmations, success
Given the url "/v1/connect/intentions/exact?source=default%2Fdefault%2Fname&destination=default%2Fdefault%2Fdestination&dc=datacenter" responds with a 500 status
And I click delete
And I click confirmDelete
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
Scenario: Deleting an intention from the intention detail page and getting an error due to a duplicate intention
When I visit the intention page for yaml
---
@ -60,6 +60,5 @@ Feature: dc / intentions / deleting: Deleting items with confirmations, success
---
And I click delete
And I click confirmDelete
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And I see the text "Intention exists" in "[data-notification] strong"
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class

View File

@ -33,8 +33,8 @@ Feature: dc / intentions / update: Intention Update
---
Then the url should be /datacenter/intentions
And the title should be "Intentions - Consul"
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
------------------------------
| Description | Action |
@ -44,6 +44,6 @@ Feature: dc / intentions / update: Intention Update
Given the url "/v1/connect/intentions/exact?source=default%2Fdefault%2Fweb&destination=default%2Fdefault%2Fdb&dc=datacenter" responds with a 500 status
And I submit
Then the url should be /datacenter/intentions/intention-id
Then "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class

View File

@ -16,8 +16,8 @@ Feature: dc / kvs / create
And I submit
Then the url should be /datacenter/kv
Then a PUT request was made to "/v1/kv/key-value?dc=datacenter&ns=@namespace"
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Creating a folder
Given 1 datacenter model with the value "datacenter"
When I visit the kv page for yaml
@ -33,8 +33,8 @@ Feature: dc / kvs / create
And I submit
Then the url should be /datacenter/kv
Then a PUT request was made to "/v1/kv/key-value/?dc=datacenter&ns=@namespace"
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Clicking create from within a folder
Given 1 datacenter model with the value "datacenter"
And 1 kv model from yaml

View File

@ -15,8 +15,8 @@ Feature: dc / kvs / deleting: Deleting items with confirmations, success and err
And I click delete on the kvs
And I click confirmInlineDelete on the kvs
Then a DELETE request was made to "/v1/kv/key-name?dc=datacenter&ns=@!namespace"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Deleting an kv from the kv detail page
When I visit the kv page for yaml
---
@ -26,8 +26,8 @@ Feature: dc / kvs / deleting: Deleting items with confirmations, success and err
And I click delete
And I click confirmDelete
Then a DELETE request was made to "/v1/kv/key-name?dc=datacenter&ns=@!namespace"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Deleting an kv from the kv detail page and getting an error
When I visit the kv page for yaml
---
@ -37,6 +37,6 @@ Feature: dc / kvs / deleting: Deleting items with confirmations, success and err
Given the url "/v1/kv/key-name?dc=datacenter&ns=@!namespace" responds with a 500 status
And I click delete
And I click confirmDelete
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class

View File

@ -21,12 +21,12 @@ Feature: dc / kvs / sessions / invalidate: Invalidate Lock Sessions
And I click confirmDelete on the session
Then a PUT request was made to "/v1/session/destroy/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=datacenter&ns=@!namespace"
Then the url should be /datacenter/kv/key/edit
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Invalidating a lock session and receiving an error
Given the url "/v1/session/destroy/ee52203d-989f-4f7a-ab5a-2bef004164ca?dc=datacenter&ns=@namespace" responds with a 500 status
And I click delete on the session
And I click confirmDelete on the session
Then the url should be /datacenter/kv/key/edit
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class

View File

@ -23,8 +23,8 @@ Feature: dc / kvs / update: KV Update
---
And I submit
Then a PUT request was made to "/v1/kv/[EncodedName]?dc=datacenter&ns=@!namespace&flags=12" with the body "[Value]"
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
---------------------------------------------------------
| Name | EncodedName | Value |
@ -56,8 +56,8 @@ Feature: dc / kvs / update: KV Update
Then a PUT request was made to "/v1/kv/key?dc=datacenter&ns=@!namespace&flags=12" with the body " "
Then the url should be /datacenter/kv
And the title should be "Key / Value - Consul"
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Update to a key change value to ''
And 1 kv model from yaml
---
@ -79,8 +79,8 @@ Feature: dc / kvs / update: KV Update
And I submit
Then a PUT request was made to "/v1/kv/key?dc=datacenter&ns=@!namespace&flags=12" with no body
Then the url should be /datacenter/kv
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Update to a key when the value is empty
And 1 kv model from yaml
---
@ -97,8 +97,8 @@ Feature: dc / kvs / update: KV Update
And I submit
Then a PUT request was made to "/v1/kv/key?dc=datacenter&ns=@!namespace&flags=12" with no body
Then the url should be /datacenter/kv
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: There was an error saving the key
When I visit the kv page for yaml
---
@ -110,8 +110,8 @@ Feature: dc / kvs / update: KV Update
Given the url "/v1/kv/key" responds with a 500 status
And I submit
Then the url should be /datacenter/kv/key/edit
Then "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
@ignore
Scenario: KV's with spaces are saved correctly
Then ok

View File

@ -27,12 +27,12 @@ Feature: dc / nodes / sessions / invalidate: Invalidate Lock Sessions
And I click confirmDelete on the sessions
Then a PUT request was made to "/v1/session/destroy/7bbbd8bb-fff3-4292-b6e3-cfedd788546a?dc=dc1&ns=@!namespace"
Then the url should be /dc1/nodes/node-0/lock-sessions
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Invalidating a lock session and receiving an error
Given the url "/v1/session/destroy/7bbbd8bb-fff3-4292-b6e3-cfedd788546a?dc=dc1&ns=@namespace" responds with a 500 status
And I click delete on the sessions
And I click confirmDelete on the sessions
Then the url should be /dc1/nodes/node-0/lock-sessions
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class

View File

@ -19,8 +19,8 @@ Feature: dc / nspaces / delete: Deleting items with confirmations, success and e
And I click delete on the [Listing]
And I click confirmDelete on the [Listing]
Then a [Method] request was made to "[URL]"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
--------------------------------------------------------------------------------------------------------
| Edit | Listing | Method | URL | Data |
@ -35,8 +35,8 @@ Feature: dc / nspaces / delete: Deleting items with confirmations, success and e
And I click delete
And I click confirmDelete
Then a DELETE request was made to "/v1/namespace/a-namespace?dc=datacenter"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Deleting a [Model] from the [Model] detail page with error
When I visit the [Model] page for yaml
---
@ -46,8 +46,8 @@ Feature: dc / nspaces / delete: Deleting items with confirmations, success and e
Given the url "[URL]" responds with a 500 status
And I click delete
And I click confirmDelete
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
Where:
-------------------------------------------------------------------------------------------
| Model | Method | URL | Slug |

View File

@ -28,8 +28,8 @@ Feature: dc / nspaces / update: Nspace Update
Description: [Description]
---
Then the url should be /datacenter/namespaces
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
---------------------------
| Description |
@ -40,5 +40,5 @@ Feature: dc / nspaces / update: Nspace Update
Given the url "/v1/namespace/namespace?dc=datacenter" responds with a 500 status
And I submit
Then the url should be /datacenter/namespaces/namespace
Then "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class

View File

@ -16,8 +16,8 @@ Feature: dc / peers / delete: Deleting items with confirmations, success and err
And I click delete on the peers
And I click confirmDelete on the peers
Then a DELETE request was made to "/v1/peering/peer-name"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: Deleting a peer from the peer listing page with error
Given 1 peer model from yaml
---
@ -32,8 +32,8 @@ Feature: dc / peers / delete: Deleting items with confirmations, success and err
And I click actions on the peers
And I click delete on the peers
And I click confirmDelete on the peers
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
Scenario: A Peer currently deleting cannot be deleted
Given 1 peer model from yaml
---

View File

@ -26,6 +26,6 @@ Feature: dc / peers / establish: Peer Establish Peering
PeerName: new-peer
PeeringToken: an-encoded-token
---
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
And the url should be /dc-1/peers/new-peer/imported-services

View File

@ -299,6 +299,7 @@ Feature: dc / services / show: Show Service
# authorization requests are not blocking so we just wait until the next
# service blocking query responds
Then pause until I see the text "no longer have access" in "[data-notification]"
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
And I see status on the error like "403"

View File

@ -62,8 +62,8 @@ Feature: dc / services / intentions / create: Intention Create per Service
Action: deny
---
Then the url should be /datacenter/services/db/intentions
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
@notNamespaceable
Scenario: with namespaces disabled
Given 1 datacenter model with the value "datacenter"
@ -104,5 +104,5 @@ Feature: dc / services / intentions / create: Intention Create per Service
Action: deny
---
Then the url should be /datacenter/services/db/intentions
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -50,5 +50,5 @@ Feature: dc / services / show / intentions / index: Intentions per service
And I click delete on the intentionList.intentions component
And I click confirmInlineDelete on the intentionList.intentions
Then a DELETE request was made to "/v1/connect/intentions/exact?source=default%2Fdefault%2Fname&destination=default%2Fdefault%2Fdestination&dc=dc1"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -36,7 +36,8 @@ Feature: dc / services / show / topology / intentions
---
When I click ".consul-topology-metrics [data-test-action]"
And I click ".consul-topology-metrics [data-test-confirm]"
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Scenario: There was an error saving the intention
Given the url "/v1/connect/intentions/exact?source=default%2Fweb&destination=default%2Fdb&dc=datacenter" responds with a 500 status
When I visit the service page for yaml
@ -46,4 +47,5 @@ Feature: dc / services / show / topology / intentions
---
When I click ".consul-topology-metrics [data-test-action]"
And I click ".consul-topology-metrics [data-test-confirm]"
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class

View File

@ -18,8 +18,8 @@ Feature: deleting: Deleting items with confirmations, success and error notifica
And I click delete on the [Listing]
And I click confirmDelete on the [Listing]
Then a [Method] request was made to "[URL]"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Edit | Listing | Method | URL | Data |
@ -34,8 +34,8 @@ Feature: deleting: Deleting items with confirmations, success and error notifica
And I click delete
And I click confirmDelete
Then a [Method] request was made to "[URL]"
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class
Where:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
| Model | Method | URL | Slug |
@ -50,8 +50,8 @@ Feature: deleting: Deleting items with confirmations, success and error notifica
Given the url "[URL]" responds with a 500 status
And I click delete
And I click confirmDelete
And "[data-notification]" has the "notification-delete" class
And "[data-notification]" has the "error" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-critical" class
Where:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
| Model | Method | URL | Slug |

View File

@ -48,5 +48,5 @@ Feature: login
And I click ".okta-oidc-provider"
Then a POST request was made to "/v1/acl/oidc/auth-url?dc=dc-1&ns=@!namespace&partition=partition"
And a POST request was made to "/v1/acl/oidc/callback?dc=dc-1&ns=@!namespace&partition=partition"
And "[data-notification]" has the "notification-authorize" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class

View File

@ -18,6 +18,6 @@ Feature: settings / update: Update Settings
consul:token: ''
---
And the url should be /settings
And "[data-notification]" has the "notification-update" class
And "[data-notification]" has the "success" class
And "[data-notification]" has the "hds-toast" class
And "[data-notification]" has the "hds-alert--color-success" class