diff --git a/.changelog/16412.txt b/.changelog/16412.txt new file mode 100644 index 0000000000..9b405be61e --- /dev/null +++ b/.changelog/16412.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Update alerts to Hds::Alert component +``` diff --git a/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs b/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs index 8cf81c45e2..132749f8b0 100644 --- a/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs +++ b/ui/packages/consul-lock-sessions/app/components/consul/lock-session/notifications/index.hbs @@ -34,14 +34,12 @@ {{/if}} {{else if (eq @type 'kv')}} - - -

- Warning. This KV has a lock session. You can edit KV's with lock sessions, but we recommend doing so with care, or not doing so at all. It may negatively impact the active node it's associated with. See below for more details on the Lock Session and see our documentation for more information. -

-
-
+ + Warning + This KV has a lock session. You can edit KV's with lock sessions, but we recommend doing so with care, or not doing so at all. It may negatively impact the active node it's associated with. See below for more details on the Lock Session. + + {{/if}} diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs index de818b1b5f..039875eb46 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs @@ -13,14 +13,10 @@ - - -

- Error
- {{fsm.state.context.error.message}} -

-
-
+ + Error + {{fsm.state.context.error.message}} +
{{yield (hash diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/initiate/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/initiate/index.hbs index f7daf88cf4..ecdc2b8b8c 100644 --- a/ui/packages/consul-peerings/app/components/consul/peer/form/initiate/index.hbs +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/initiate/index.hbs @@ -14,14 +14,10 @@ as |writer| > - - -

- Error
- {{error.message}} -

-
-
+ + Error + {{error.message}} +
{{#let (unique-id) as |id|}} diff --git a/ui/packages/consul-ui/app/components/auth-form/index.hbs b/ui/packages/consul-ui/app/components/auth-form/index.hbs index 3d6e14c54e..561f3ce33a 100644 --- a/ui/packages/consul-ui/app/components/auth-form/index.hbs +++ b/ui/packages/consul-ui/app/components/auth-form/index.hbs @@ -37,40 +37,52 @@ {{/if}} {{#if this.error.status}} - - -

- {{#if this.value.Name}} - {{#if (eq this.error.status '403')}} - Consul login failed
- We received a token from your OIDC provider but could not log in to Consul - with it. - {{else if (eq this.error.status '401')}} - Could not log in to provider
- The OIDC provider has rejected this access token. Please have an - administrator check your auth method configuration. - {{else if (eq this.error.status '499')}} - SSO log in window closed
- The OIDC provider window was closed. Please try again. - {{else}} - Error
- {{this.error.detail}} - {{/if}} + + + {{#if this.value.Name}} + {{#if (eq this.error.status '403')}} + Consul login failed + {{else if (eq this.error.status '401')}} + Could not log in to provider + {{else if (eq this.error.status '499')}} + SSO log in window closed {{else}} - {{#if (eq this.error.status '403')}} - Invalid token
- The token entered does not exist. Please enter a valid token to log in. - {{else if (eq this.error.status '404')}} - No providers
- No SSO providers are configured for that Partition. - {{else}} - Error
- {{this.error.detail}} - {{/if}} + Error {{/if}} -

-
-
+ {{else}} + {{#if (eq this.error.status '403')}} + Invalid token + {{else if (eq this.error.status '404')}} + No providers + {{else}} + Error + {{/if}} + {{/if}} + + + {{#if this.value.Name}} + {{#if (eq this.error.status '403')}} + We received a token from your OIDC provider but could not log in to Consul + with it. + {{else if (eq this.error.status '401')}} + The OIDC provider has rejected this access token. Please have an + administrator check your auth method configuration. + {{else if (eq this.error.status '499')}} + The OIDC provider window was closed. Please try again. + {{else}} + {{this.error.detail}} + {{/if}} + {{else}} + {{#if (eq this.error.status '403')}} + The token entered does not exist. Please enter a valid token to log in. + {{else if (eq this.error.status '404')}} + No SSO providers are configured for that Partition. + {{else}} + {{this.error.detail}} + {{/if}} + {{/if}} + + {{/if}}
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 9334293a5c..cfd3b4db47 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 @@ -133,20 +133,10 @@ as |item readonly|}} {{#if api.isCreate}} {{#if (and (can 'use partitions') (not (can 'choose partitions' dc=@dc)))}} - - -

- Cross-partition communication not supported -

-
- -

- Cross-partition communication is not supported outside of the primary datacenter. You will only be able to select namespaces for source and destination services. -

-
-
+ + Cross-partition communication not supported + Cross-partition communication is not supported outside of the primary datacenter. You will only be able to select namespaces for source and destination services. + {{/if}} {{#if this.isManagedByCRDs}} @@ -213,29 +203,14 @@ as |item readonly|}} {{else}} {{#if item.IsManagedByCRD}} - - -

- Intention Custom Resource -

-
- -

- This Intention is view only because it is managed through an Intention Custom Resource in your Kubernetes cluster. -

-
- - - -
+ + Intention Custom Resource + This Intention is view only because it is managed through an Intention Custom Resource in your Kubernetes cluster. + + {{/if}} - -

- Intention Custom Resource -

-
- -

- Some of your intentions are being managed through an Intention Custom Resource in your Kubernetes cluster. Those managed intentions will be view only in the UI. Any intentions created in the UI will work but will not be synced to the Custom Resource Definition (CRD) datastore. -

-
- -

- -

-
- \ No newline at end of file + + Intention Custom Resource + Some of your intentions are being managed through an Intention Custom Resource in your Kubernetes cluster. Those managed intentions will be view only in the UI. Any intentions created in the UI will work but will not be synced to the Custom Resource Definition (CRD) datastore. + + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/intention/notice/permissions/index.hbs b/ui/packages/consul-ui/app/components/consul/intention/notice/permissions/index.hbs index 33d8233bfe..8afe559e35 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/notice/permissions/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/intention/notice/permissions/index.hbs @@ -1,21 +1,10 @@ - - -

- {{t "components.consul.intention.notice.permissions.body"}} -

-
- -

- -

-
-
- + + {{t "components.consul.intention.notice.permissions.body"}} + + \ No newline at end of file diff --git a/ui/packages/consul-ui/app/components/consul/node/agentless-notice/index.hbs b/ui/packages/consul-ui/app/components/consul/node/agentless-notice/index.hbs index 069dff276a..92ac0ce145 100644 --- a/ui/packages/consul-ui/app/components/consul/node/agentless-notice/index.hbs +++ b/ui/packages/consul-ui/app/components/consul/node/agentless-notice/index.hbs @@ -1,29 +1,20 @@ {{#if isVisible}} - - -

- {{t 'routes.dc.nodes.index.agentless.notice.header'}} -

+ + + {{t 'routes.dc.nodes.index.agentless.notice.header'}} -
- -

- {{t 'routes.dc.nodes.index.agentless.notice.body'}} -

-
- - - -
+ + {{t 'routes.dc.nodes.index.agentless.notice.body'}} + + {{/if}} diff --git a/ui/packages/consul-ui/app/components/consul/node/agentless-notice/index.scss b/ui/packages/consul-ui/app/components/consul/node/agentless-notice/index.scss index fc4b21ac93..a77be5a232 100644 --- a/ui/packages/consul-ui/app/components/consul/node/agentless-notice/index.scss +++ b/ui/packages/consul-ui/app/components/consul/node/agentless-notice/index.scss @@ -1,4 +1,4 @@ -.agentless-node-notice header { +.agentless-node-notice .hds-alert__title { display: flex; justify-content: space-between; } diff --git a/ui/packages/consul-ui/app/templates/dc/acls/policies/edit.hbs b/ui/packages/consul-ui/app/templates/dc/acls/policies/edit.hbs index 63cc8ea667..4a4d6df8fe 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/policies/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/policies/edit.hbs @@ -71,19 +71,14 @@ as |dc partition nspace id item create|}} {{/if}} {{#if (eq (policy/typeof item) 'policy-management')}} - - -

Management

-
- -

- This global-management token is built into Consul's policy system. You can apply this special policy to tokens for full access. This policy is not editable or removeable, but can be ignored by not applying it to any tokens. Learn more in our documentation. -

-
-
+ + Management + This global-management token is built into Consul's policy system. You can apply this special policy to tokens for full access. This policy is not editable or removeable, but can be ignored by not applying it to any tokens. + +
Name
diff --git a/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs b/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs index f525ce2d39..583a097618 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/tokens/edit.hbs @@ -96,18 +96,14 @@ as |dc partition nspace item create|}} {{#if (token/is-legacy item)}} - - -

Update

-
- -

- We have upgraded our ACL system by allowing you to create reusable policies which you can then apply to tokens. Don't worry, even though this token was written in the old style, it is still valid. However, we do recommend upgrading your old tokens to the new style. Learn how in our documentation. -

-
-
+ + Update + We have upgraded our ACL system by allowing you to create reusable policies which you can then apply to tokens. Don't worry, even though this token was written in the old style, it is still valid. However, we do recommend upgrading your old tokens to the new style. + + {{/if}} {{#if (not create) }}
diff --git a/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs b/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs index 25c1b4a9d8..34a5bdfe3a 100644 --- a/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs +++ b/ui/packages/consul-ui/app/templates/dc/acls/tokens/index.hbs @@ -80,16 +80,14 @@ as |route|> {{#if (token/is-legacy items)}} - - -

Update

-
- -

We have upgraded our ACL System to allow the creation of reusable policies that can be applied to tokens. Read more about the changes and how to upgrade legacy tokens in our documentation.

-
-
+ + Update + We have upgraded our ACL System to allow the creation of reusable policies that can be applied to tokens. Read more about the changes and how to upgrade legacy tokens. + + {{/if}} {{#if (can 'create kvs')}} - {{#if (not-eq parent.Key '/') }} + {{#if (and parent.Key (not-eq parent.Key '/')) }} {{/if}} {{#let (find-by "Type" "serf" items) as |serf|}} {{#if (and serf (eq serf.Status "critical"))}} - - -

- {{t "routes.dc.nodes.show.healthchecks.critical-serf-notice.header"}} -

-
- - {{t - "routes.dc.nodes.show.healthchecks.critical-serf-notice.body" - htmlSafe=true - }} - -
+ + {{t "routes.dc.nodes.show.healthchecks.critical-serf-notice.header"}} + {{t "routes.dc.nodes.show.healthchecks.critical-serf-notice.body"}} + {{/if}} {{/let}} - -

- {{t 'routes.dc.services.instance.healthchecks.critical-serf-notice.header'}} -

-
- - {{t - 'routes.dc.services.instance.healthchecks.critical-serf-notice.body' - htmlSafe=true - }} - - + + {{t 'routes.dc.services.instance.healthchecks.critical-serf-notice.header'}} + {{t + 'routes.dc.services.instance.healthchecks.critical-serf-notice.body' + htmlSafe=true + }} + {{/if}} {{/let}} {{! TODO: Looks like we can get this straight from item.Proxy.Mode }} {{! the less we need `proxy` and `meta` the better }} {{#if (eq meta.ServiceProxy.Mode 'transparent')}} - - -

- {{t "routes.dc.services.instance.upstreams.tproxy-mode.header"}} -

-
- - {{t "routes.dc.services.instance.upstreams.tproxy-mode.body" - htmlSafe=true - }} - - -

- -

-
-
+ + {{t "routes.dc.services.instance.upstreams.tproxy-mode.header"}} + + {{t "routes.dc.services.instance.upstreams.tproxy-mode.body"}} + + + {{/if}} - - -

- {{compute (fn route.t 'notice.${prop}.header' - (hash - prop=prop - ) - )}} -

-
+ + + {{compute (fn route.t 'notice.${prop}.header' + (hash + prop=prop + )) + }} + {{#if disclosure.expanded}} - -

- {{compute (fn route.t 'notice.${prop}.body' - (hash - prop=prop - ) - )}} -

-
+ + {{compute (fn route.t 'notice.${prop}.body' + (hash + prop=prop + )) + }} + {{/if}} - {{#let - (compute (fn route.t 'notice.${prop}.footer' - (hash - route_intentions=(href-to 'dc.services.show.intentions') - prop=prop - htmlSafe=true - ) - )) - as |footer|}} - {{#if (and disclosure.expanded (not-eq prop 'filtered-by-acls'))}} - - {{footer}} - + {{#if (and disclosure.expanded (not-eq prop 'filtered-by-acls'))}} + {{#if (includes prop (array 'wildcard-intention' 'default-allow' 'no-intentions'))}} + + {{else}} + {{/if}} - {{/let}} -
+ {{/if}} + {{/if}} {{/each-in}} diff --git a/ui/packages/consul-ui/app/templates/settings.hbs b/ui/packages/consul-ui/app/templates/settings.hbs index 4493bb936e..ef86beab79 100644 --- a/ui/packages/consul-ui/app/templates/settings.hbs +++ b/ui/packages/consul-ui/app/templates/settings.hbs @@ -26,18 +26,10 @@ as |item|}}
- - -

Local Storage

-
- -

- These settings are immediately saved to local storage and persisted through browser usage. -

-
-
+ + Local Storage + These settings are immediately saved to local storage and persisted through browser usage. +
{{#if (not (env 'CONSUL_UI_DISABLE_REALTIME'))}} diff --git a/ui/packages/consul-ui/translations/routes/en-us.yaml b/ui/packages/consul-ui/translations/routes/en-us.yaml index 33d618ac4a..fd2d797c92 100644 --- a/ui/packages/consul-ui/translations/routes/en-us.yaml +++ b/ui/packages/consul-ui/translations/routes/en-us.yaml @@ -245,17 +245,11 @@ dc:

critical-serf-notice: header: Failing serf check - body: | -

- This instance has a failing serf node check. The health statuses shown on this page are the statuses as they were known before the node became unreachable. -

+ body: This instance has a failing serf node check. The health statuses shown on this page are the statuses as they were known before the node became unreachable. upstreams: tproxy-mode: header: Transparent proxy mode - body: | -

- The upstreams listed on this page have been defined in a proxy registration. There may be more upstreams, though, as "transparent" mode is enabled on this proxy. -

+ body: The upstreams listed on this page have been defined in a proxy registration. There may be more upstreams, though, as "transparent" mode is enabled on this proxy. footer: link: "/connect/transparent-proxy" text: Read the documentation @@ -278,45 +272,39 @@ dc: default-allow: header: Restrict which services can connect body: Your current ACL settings allow all services to connect to each other. Either create a deny intention between all services, or set your default ACL policy to deny to improve your security posture and make this topology view reflect the actual upstreams and downstreams of this service. - footer: | -

- Create a wildcard deny Intention -

+ footer: + link-text: Create a wildcard deny Intention + icon: plus wildcard-intention: header: Restrict which services can connect body: There is currently a wildcard Intention that allows all services to connect to each other. Change the action of that Intention to deny to improve your security posture and have this topology view reflect the actual upstreams and downstreams of this service. - footer: | -

- Edit wildcard intentions -

+ footer: + link-text: Edit wildcard intentions + icon: edit not-defined-intention: header: Add upstream to allow traffic body: An Intention was defined that allows traffic between services, but those services are unable to communicate. Define an explicit upstream in the service definition or enable transparent proxy to fix this. - footer: | -

- Learn how to add upstreams -

+ footer: + link: '{CONSUL_DOCS_URL}/connect/registration/service-registration#upstreams' + link-text: Learn how to add upstreams no-dependencies: header: No dependencies body: The service you are viewing currently has no dependencies. You will only see metrics for the current service until dependencies are added. - footer: | -

- Read the documentation -

+ footer: + link: '{CONSUL_DOCS_URL}/connect/registration/service-registration#upstream-configuration-reference' + link-text: Read the documentation acls-disabled: header: Restrict which services can connect body: Your current ACL settings allow all services to connect to each other. Either create a deny intention between all services, or enable ACLs and set your default ACL policy to deny to improve your security posture and make this topology view reflect the actual upstreams and downstreams of this service. - footer: | -

- Read the documentation -

+ footer: + link: '{ CONSUL_DOCS_URL }/security/acl/acl-system#configuring-acls' + link-text: Read the documentation no-intentions: header: Add Intention to allow traffic body: There is an upstream registered for this service, but that upstream cannot receive traffic without creating an allow intention. - footer: | -

- Edit Intentions -

+ footer: + link-text: Edit Intentions + icon: edit intentions: index: empty: