diff --git a/ui-v2/app/templates/dc/acls/-notifications.hbs b/ui-v2/app/components/consul/acl/notifications/index.hbs similarity index 60% rename from ui-v2/app/templates/dc/acls/-notifications.hbs rename to ui-v2/app/components/consul/acl/notifications/index.hbs index 1b577c6ef..a82fd4ba6 100644 --- a/ui-v2/app/templates/dc/acls/-notifications.hbs +++ b/ui-v2/app/components/consul/acl/notifications/index.hbs @@ -1,32 +1,31 @@ -{{#if (eq type 'create')}} - {{#if (eq status 'success') }} +{{#if (eq @type 'create')}} + {{#if (eq @status 'success') }} Your ACL token has been added. {{else}} There was an error adding your ACL token. {{/if}} -{{else if (eq type 'update') }} - {{#if (eq status 'success') }} +{{else if (eq @type 'update') }} + {{#if (eq @status 'success') }} Your ACL token has been saved. {{else}} There was an error saving your ACL token. {{/if}} -{{ else if (eq type 'delete')}} - {{#if (eq status 'success') }} +{{ else if (eq @type 'delete')}} + {{#if (eq @status 'success') }} Your ACL token was deleted. {{else}} There was an error deleting your ACL token. {{/if}} -{{ else if (eq type 'use')}} - {{#if (eq status 'success') }} +{{ else if (eq @type 'use')}} + {{#if (eq @status 'success') }} Now using new ACL token. {{else}} There was an error using that ACL token. {{/if}} -{{ else if (eq type 'clone')}} - {{#if (eq status 'success') }} +{{ else if (eq @type 'clone')}} + {{#if (eq @status 'success') }} Your ACL token was cloned. {{else}} There was an error cloning your ACL token. {{/if}} {{/if}} - diff --git a/ui-v2/app/components/consul/lock-session/notifications/index.hbs b/ui-v2/app/components/consul/lock-session/notifications/index.hbs new file mode 100644 index 000000000..52b97172c --- /dev/null +++ b/ui-v2/app/components/consul/lock-session/notifications/index.hbs @@ -0,0 +1,7 @@ +{{#if (eq @type 'delete')}} + {{#if (eq @status 'success') }} + The session was invalidated. + {{else}} + There was an error invalidating the session. + {{/if}} +{{/if}} \ No newline at end of file diff --git a/ui-v2/app/templates/dc/nspaces/-notifications.hbs b/ui-v2/app/components/consul/nspace/notifications/index.hbs similarity index 65% rename from ui-v2/app/templates/dc/nspaces/-notifications.hbs rename to ui-v2/app/components/consul/nspace/notifications/index.hbs index 498750c3d..e5ae1deeb 100644 --- a/ui-v2/app/templates/dc/nspaces/-notifications.hbs +++ b/ui-v2/app/components/consul/nspace/notifications/index.hbs @@ -1,25 +1,24 @@ -{{#if (eq type 'create')}} - {{#if (eq status 'success') }} +{{#if (eq @type 'create')}} + {{#if (eq @status 'success') }} Your namespace has been added. {{else}} There was an error adding your namespace. {{/if}} -{{else if (eq type 'update') }} - {{#if (eq status 'success') }} +{{else if (eq @type 'update') }} + {{#if (eq @status 'success') }} Your namespace has been saved. {{else}} There was an error saving your namespace. {{/if}} -{{ else if (eq type 'delete')}} - {{#if (eq status 'success') }} +{{ else if (eq @type 'delete')}} + {{#if (eq @status 'success') }} Your namespace has been marked for deletion. {{else}} There was an error deleting your namespace. {{/if}} {{/if}} -{{#let error.errors.firstObject as |error|}} +{{#let @error.errors.firstObject as |error|}} {{#if error.detail }}
{{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}} {{/if}} {{/let}} - diff --git a/ui-v2/app/templates/dc/acls/policies/-notifications.hbs b/ui-v2/app/components/consul/policy/notifications/index.hbs similarity index 63% rename from ui-v2/app/templates/dc/acls/policies/-notifications.hbs rename to ui-v2/app/components/consul/policy/notifications/index.hbs index 64ae640e7..308096c94 100644 --- a/ui-v2/app/templates/dc/acls/policies/-notifications.hbs +++ b/ui-v2/app/components/consul/policy/notifications/index.hbs @@ -1,25 +1,24 @@ -{{#if (eq type 'create')}} - {{#if (eq status 'success') }} +{{#if (eq @type 'create')}} + {{#if (eq @status 'success') }} Your policy has been added. {{else}} There was an error adding your policy. {{/if}} -{{else if (eq type 'update') }} - {{#if (eq status 'success') }} +{{else if (eq @type 'update') }} + {{#if (eq @status 'success') }} Your policy has been saved. {{else}} There was an error saving your policy. {{/if}} -{{ else if (eq type 'delete')}} - {{#if (eq status 'success') }} +{{ else if (eq @type 'delete')}} + {{#if (eq @status 'success') }} Your policy was deleted. {{else}} There was an error deleting your policy. {{/if}} {{/if}} -{{#let error.errors.firstObject as |error|}} +{{#let @error.errors.firstObject as |error|}} {{#if error.detail }}
{{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}} {{/if}} {{/let}} - diff --git a/ui-v2/app/templates/dc/acls/roles/-notifications.hbs b/ui-v2/app/components/consul/role/notifications/index.hbs similarity index 63% rename from ui-v2/app/templates/dc/acls/roles/-notifications.hbs rename to ui-v2/app/components/consul/role/notifications/index.hbs index 15f44721f..1f2ad9ba7 100644 --- a/ui-v2/app/templates/dc/acls/roles/-notifications.hbs +++ b/ui-v2/app/components/consul/role/notifications/index.hbs @@ -1,25 +1,24 @@ -{{#if (eq type 'create')}} - {{#if (eq status 'success') }} +{{#if (eq @type 'create')}} + {{#if (eq @status 'success') }} Your role has been added. {{else}} There was an error adding your role. {{/if}} -{{else if (eq type 'update') }} - {{#if (eq status 'success') }} +{{else if (eq @type 'update') }} + {{#if (eq @status 'success') }} Your role has been saved. {{else}} There was an error saving your role. {{/if}} -{{ else if (eq type 'delete')}} - {{#if (eq status 'success') }} +{{ else if (eq @type 'delete')}} + {{#if (eq @status 'success') }} Your role was deleted. {{else}} There was an error deleting your role. {{/if}} {{/if}} -{{#let error.errors.firstObject as |error|}} +{{#let @error.errors.firstObject as |error|}} {{#if error.detail }}
{{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}} {{/if}} {{/let}} - diff --git a/ui-v2/app/templates/dc/services/-notifications.hbs b/ui-v2/app/components/consul/service/notifications/index.hbs similarity index 62% rename from ui-v2/app/templates/dc/services/-notifications.hbs rename to ui-v2/app/components/consul/service/notifications/index.hbs index 9dee0a3ec..85679bb99 100644 --- a/ui-v2/app/templates/dc/services/-notifications.hbs +++ b/ui-v2/app/components/consul/service/notifications/index.hbs @@ -1,7 +1,6 @@ -{{#if (eq type 'update')}} - {{#if (eq status 'warning') }} +{{#if (eq @type 'update')}} + {{#if (eq @status 'warning') }} This service has been deregistered and no longer exists in the catalog. {{else}} {{/if}} {{/if}} - diff --git a/ui-v2/app/templates/dc/acls/tokens/-notifications.hbs b/ui-v2/app/components/consul/token/notifications/index.hbs similarity index 56% rename from ui-v2/app/templates/dc/acls/tokens/-notifications.hbs rename to ui-v2/app/components/consul/token/notifications/index.hbs index 34a59cbaf..521f5ac36 100644 --- a/ui-v2/app/templates/dc/acls/tokens/-notifications.hbs +++ b/ui-v2/app/components/consul/token/notifications/index.hbs @@ -1,37 +1,36 @@ -{{#if (eq type 'create')}} - {{#if (eq status 'success') }} +{{#if (eq @type 'create')}} + {{#if (eq @status 'success') }} The token has been added. {{else}} There was an error adding the token. {{/if}} -{{else if (eq type 'update') }} - {{#if (eq status 'success') }} +{{else if (eq @type 'update') }} + {{#if (eq @status 'success') }} The token has been saved. {{else}} There was an error saving the token. {{/if}} -{{ else if (eq type 'delete')}} - {{#if (eq status 'success') }} +{{ else if (eq @type 'delete')}} + {{#if (eq @status 'success') }} The token was deleted. {{else}} There was an error deleting the token. {{/if}} -{{ else if (eq type 'clone')}} - {{#if (eq status 'success') }} - The token has been cloned as {{truncate subject.AccessorID 8 false}} +{{ else if (eq @type 'clone')}} + {{#if (eq @status 'success') }} + The token has been cloned as {{truncate @item.AccessorID 8 false}} {{else}} There was an error cloning the token. {{/if}} -{{ else if (eq type 'use')}} - {{#if (eq status 'success') }} +{{ else if (eq @type 'use')}} + {{#if (eq @status 'success') }} You are now using the new ACL token {{else}} There was an error using that ACL token. {{/if}} {{/if}} -{{#let error.errors.firstObject as |error|}} +{{#let @error.errors.firstObject as |error|}} {{#if error.detail }}
{{concat '(' (if error.status (concat error.status ': ')) error.detail ')'}} {{/if}} {{/let}} - diff --git a/ui-v2/app/templates/dc/acls/edit.hbs b/ui-v2/app/templates/dc/acls/edit.hbs index 2e9370103..b10cd7285 100644 --- a/ui-v2/app/templates/dc/acls/edit.hbs +++ b/ui-v2/app/templates/dc/acls/edit.hbs @@ -1,7 +1,11 @@ - - {{partial 'dc/acls/notifications'}} - + + +
  1. All Tokens
  2. diff --git a/ui-v2/app/templates/dc/acls/index.hbs b/ui-v2/app/templates/dc/acls/index.hbs index ddd7e96df..59c9b192e 100644 --- a/ui-v2/app/templates/dc/acls/index.hbs +++ b/ui-v2/app/templates/dc/acls/index.hbs @@ -8,8 +8,12 @@ as |filter| }} - - {{partial 'dc/acls/notifications'}} + +

    diff --git a/ui-v2/app/templates/dc/acls/policies/edit.hbs b/ui-v2/app/templates/dc/acls/policies/edit.hbs index 5184a111b..c09685958 100644 --- a/ui-v2/app/templates/dc/acls/policies/edit.hbs +++ b/ui-v2/app/templates/dc/acls/policies/edit.hbs @@ -12,7 +12,12 @@ @enabled={{isEnabled}} > - {{partial 'dc/acls/policies/notifications'}} +
      diff --git a/ui-v2/app/templates/dc/acls/policies/index.hbs b/ui-v2/app/templates/dc/acls/policies/index.hbs index 49813c0b1..c7821f9bc 100644 --- a/ui-v2/app/templates/dc/acls/policies/index.hbs +++ b/ui-v2/app/templates/dc/acls/policies/index.hbs @@ -12,8 +12,13 @@ @authorized={{isAuthorized}} @enabled={{isEnabled}} > - - {{partial 'dc/acls/policies/notifications'}} + +

      diff --git a/ui-v2/app/templates/dc/acls/roles/edit.hbs b/ui-v2/app/templates/dc/acls/roles/edit.hbs index 6047cf4a6..a17f12500 100644 --- a/ui-v2/app/templates/dc/acls/roles/edit.hbs +++ b/ui-v2/app/templates/dc/acls/roles/edit.hbs @@ -12,7 +12,12 @@ @enabled={{isEnabled}} > - {{partial 'dc/acls/roles/notifications'}} +
        diff --git a/ui-v2/app/templates/dc/acls/roles/index.hbs b/ui-v2/app/templates/dc/acls/roles/index.hbs index 46d0a1698..70101bf67 100644 --- a/ui-v2/app/templates/dc/acls/roles/index.hbs +++ b/ui-v2/app/templates/dc/acls/roles/index.hbs @@ -9,8 +9,13 @@ @authorized={{isAuthorized}} @enabled={{isEnabled}} > - - {{partial 'dc/acls/roles/notifications'}} + +

        diff --git a/ui-v2/app/templates/dc/acls/tokens/edit.hbs b/ui-v2/app/templates/dc/acls/tokens/edit.hbs index 408d3c2e2..09e5f1a95 100644 --- a/ui-v2/app/templates/dc/acls/tokens/edit.hbs +++ b/ui-v2/app/templates/dc/acls/tokens/edit.hbs @@ -12,7 +12,12 @@ @enabled={{isEnabled}} > - {{partial 'dc/acls/tokens/notifications'}} +
          diff --git a/ui-v2/app/templates/dc/acls/tokens/index.hbs b/ui-v2/app/templates/dc/acls/tokens/index.hbs index 8a251e451..8a9b6e162 100644 --- a/ui-v2/app/templates/dc/acls/tokens/index.hbs +++ b/ui-v2/app/templates/dc/acls/tokens/index.hbs @@ -12,8 +12,13 @@ @authorized={{isAuthorized}} @enabled={{isEnabled}} > - - {{partial 'dc/acls/tokens/notifications'}} + +

          diff --git a/ui-v2/app/templates/dc/nodes/-notifications.hbs b/ui-v2/app/templates/dc/nodes/-notifications.hbs deleted file mode 100644 index cbc36249f..000000000 --- a/ui-v2/app/templates/dc/nodes/-notifications.hbs +++ /dev/null @@ -1,12 +0,0 @@ -{{#if (eq type 'delete')}} - {{#if (eq status 'success') }} - The session was invalidated. - {{else}} - There was an error invalidating the session. - {{/if}} -{{else if (eq type 'update')}} - {{#if (eq status 'warning') }} - This node no longer exists in the catalog. - {{else}} - {{/if}} -{{/if}} diff --git a/ui-v2/app/templates/dc/nodes/show.hbs b/ui-v2/app/templates/dc/nodes/show.hbs index 146f84c44..5f12fbc79 100644 --- a/ui-v2/app/templates/dc/nodes/show.hbs +++ b/ui-v2/app/templates/dc/nodes/show.hbs @@ -31,8 +31,10 @@ - {{!TODO: Move sessions to its own folder within nodes }} - {{partial 'dc/nodes/notifications'}} +
            diff --git a/ui-v2/app/templates/dc/nspaces/edit.hbs b/ui-v2/app/templates/dc/nspaces/edit.hbs index d19f889a7..72bdd234d 100644 --- a/ui-v2/app/templates/dc/nspaces/edit.hbs +++ b/ui-v2/app/templates/dc/nspaces/edit.hbs @@ -5,7 +5,11 @@ {{/if}} - {{partial 'dc/nspaces/notifications'}} +
              diff --git a/ui-v2/app/templates/dc/nspaces/index.hbs b/ui-v2/app/templates/dc/nspaces/index.hbs index 4f4bd4277..cd3523bf3 100644 --- a/ui-v2/app/templates/dc/nspaces/index.hbs +++ b/ui-v2/app/templates/dc/nspaces/index.hbs @@ -2,8 +2,12 @@ {{#let (or sortBy "Name:asc") as |sort|}} - - {{partial 'dc/nspaces/notifications'}} + +

              diff --git a/ui-v2/app/templates/dc/services/index.hbs b/ui-v2/app/templates/dc/services/index.hbs index 19d044b9a..b18eca890 100644 --- a/ui-v2/app/templates/dc/services/index.hbs +++ b/ui-v2/app/templates/dc/services/index.hbs @@ -8,7 +8,10 @@ {{#let (or sortBy "Name:asc") as |sort|}} - {{partial 'dc/services/notifications'}} +

              diff --git a/ui-v2/app/templates/dc/services/instance.hbs b/ui-v2/app/templates/dc/services/instance.hbs index cd9a1ac93..aaa34c746 100644 --- a/ui-v2/app/templates/dc/services/instance.hbs +++ b/ui-v2/app/templates/dc/services/instance.hbs @@ -4,7 +4,10 @@ - {{partial 'dc/services/notifications'}} +
                diff --git a/ui-v2/app/templates/dc/services/show.hbs b/ui-v2/app/templates/dc/services/show.hbs index 7692eaa0b..e3c11aa32 100644 --- a/ui-v2/app/templates/dc/services/show.hbs +++ b/ui-v2/app/templates/dc/services/show.hbs @@ -7,7 +7,10 @@ {{title item.Service.Service}} - {{partial 'dc/services/notifications'}} +