vault/ui/lib/replication/addon/components/replication-summary.hbs
Matthew Irish 970975cfa4
[UI] - Colocated components in addons (#31413)
* core: run colocated components codemod

* kmip: run colocated components codemod

* replication: run colocated components codemod

* core: remove manual setting of templates with setComponentTemplate

* run prettier
2025-08-04 08:02:27 -07:00

41 lines
1.5 KiB
Handlebars
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
{{#if (eq this.attrsForCurrentMode.mode "initializing")}}
The cluster is initializing replication. This may take some time.
{{else}}
<p>{{this.cluster.replicationModeStatus.cluster_id}}</p>
<div class="replication">
<ReplicationPage @model={{this.cluster}} as |Page|>
<Page.dashboard
@data={{this.cluster}}
@componentToRender={{if
(eq this.attrsForCurrentMode.mode "secondary")
"replication-secondary-card"
"replication-primary-card"
}}
as |Dashboard|
>
{{#if (eq this.attrsForCurrentMode.mode "secondary")}}
<Dashboard.card @title="Status" />
<Dashboard.card @title="Primary cluster" />
{{else}}
<Dashboard.card
@title="State"
@description="The clusters current operating state."
@glyph={{get (cluster-states this.attrsForCurrentMode.state) "glyph"}}
@metric={{this.attrsForCurrentMode.state}}
/>
<Dashboard.card
@title="Last WAL entry"
@description="Index of last Write Ahead Logs entry written on local storage. Updates every ten seconds."
@metric={{format-number this.attrsForCurrentMode.lastWAL}}
/>
<Dashboard.secondaryCard @cluster={{this.cluster}} @replicationAttrs={{this.attrsForCurrentMode}} />
{{/if}}
</Page.dashboard>
</ReplicationPage>
</div>
{{/if}}