Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ui/rep design updates #9169

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion ui/lib/core/addon/components/replication-table-rows.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ import layout from '../templates/components/replication-table-rows';
/>
* ```
* @param {Object} replicationDetails=null - An Ember data object pulled from the Ember Model. It contains details specific to the whether the replication is dr or performance.
* @param {String} clusterMode=null - The cluster mode (e.g. primary or secondary) passed through to a table component.
* @param {String} clusterMode=null - The cluster mode (e.g. primary or secondary) passed through to a table component.
*/

export default Component.extend({
layout,
classNames: ['replication-table-rows'],
replicationDetails: null,
clusterMode: null,
secondaryId: computed('replicationDetails.{secondaryId}', function() {
return this.replicationDetails.secondaryId;
}),
primaryClusterAddr: computed('replcationDetails.{primaryClusterAddr}', function() {
return this.replicationDetails.primaryClusterAddr;
}),
merkleRoot: computed('replicationDetails.{merkleRoot}', function() {
return this.replicationDetails.merkleRoot || 'unknown';
}),
Expand Down
3 changes: 0 additions & 3 deletions ui/lib/core/addon/templates/components/replication-header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
<span class="tag is-light has-text-grey-dark" data-test-mode>
{{if isSecondary 'secondary' 'primary'}}
</span>
<span class="tag is-light has-text-grey-dark" data-test-secondaryId>
{{secondaryId}}
</span>
</h1>
</p.levelLeft>
</PageHeader>
Expand Down
10 changes: 10 additions & 0 deletions ui/lib/core/addon/templates/components/replication-table-rows.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<div class="has-top-margin-xl has-bottom-margin-s"
data-test-table-rows>
{{#if (eq clusterMode 'secondary')}}
{{info-table-row
label='secondary_id'
helperText="The ID of the secondary activation token used to enable replication."
value=secondaryId}}
{{/if}}
{{info-table-row
label='primary_cluster_addr'
helperText='The configuration of the cluster. This was set when replication was enabled.'
value=primaryClusterAddr}}
{{info-table-row
label="Merkle root index"
helperText="A snapshot in time of the merkle tree's root hash. Changes on every update to storage."
Expand Down
13 changes: 0 additions & 13 deletions ui/lib/replication/addon/templates/mode.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,6 @@
<span class="tag is-light has-text-grey-dark" data-test-replication-mode-display=true>
{{model.replicationAttrs.modeForHeader}}
</span>
{{#if model.replicationAttrs.secondaryId}}
<span class="tag is-light has-text-grey-dark">
<code>
{{model.replicationAttrs.secondaryId}}
</code>
</span>
{{else}}
<span class="tag is-light has-text-grey-dark">
<code>
{{model.replicationAttrs.clusterIdDisplay}}
</code>
</span>
{{/if}}
</h1>
</p.levelLeft>
</PageHeader>
Expand Down