-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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/replication/refactor dashboard components #8878
Changes from 12 commits
b423f52
2032f31
a0a1f78
bdd7152
a105151
f3dd354
b83bf51
3d26f40
ef77a4d
f0a503f
99c75b5
ed04742
618d2d5
9963af9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,46 @@ | ||
<div class="replication-dashboard box is-sideless is-fullwidth is-marginless"> | ||
<h2 class="has-text-weight-semibold is-size-4 has-bottom-margin-xs">Primary Cluster</h2> | ||
<p class="has-text-grey is-size-8">If you set a primary_cluster_addr when enabling replication, it will appear here.</p> | ||
{{#if isSecondary}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. something to revisit in another PR, but I kind of remember there being a spacing issue here when this conditional was not true, e.g. !isSecondary. |
||
<h2 class="has-text-weight-semibold is-size-4 has-bottom-margin-xs"> | ||
Primary Cluster | ||
</h2> | ||
<p class="has-text-grey is-size-8"> | ||
If you set a primary_cluster_addr when enabling replication, it will appear here. | ||
</p> | ||
{{#if replicationDetails.primaryClusterAddr}} | ||
<code>{{replicationDetails.primaryClusterAddr}}</code> | ||
{{else}} | ||
<code>no known primary cluster address</code> | ||
{{/if}} | ||
{{/if}} | ||
|
||
{{#if data.dr.primaryClusterAddr}} | ||
<code>{{data.dr.primaryClusterAddr}}</code> | ||
{{else}} | ||
<code>no known primary cluster address</code> | ||
{{!-- TODO check for actual reindexing status --}} | ||
{{#if isReindexing}} | ||
<AlertBanner | ||
@title="Re-indexing in progress: Scanning" | ||
@type="info" | ||
@secondIconType="loading" | ||
@message="This can cause a delay depending on the size of the data store. You can use Vault during this time."/> | ||
{{/if}} | ||
|
||
<div class="selectable-card-container has-top-margin-xl"> | ||
{{yield (hash | ||
card=(component componentToRender data=data dr=dr) | ||
{{yield (hash | ||
card=(component componentToRender replicationDetails=replicationDetails) | ||
)}} | ||
</div> | ||
|
||
{{yield (hash | ||
isSyncing=isSyncing | ||
rows=(component 'replication-table-rows' data=data) | ||
)}} | ||
{{#if (not isSecondary)}} | ||
{{yield (hash secondaryCard=(component 'known-secondaries-card'))}} | ||
{{/if}} | ||
|
||
</div> | ||
{{#if isSyncing}} | ||
<AlertBanner | ||
@title="Syncing in progress" | ||
@type="info" | ||
@secondIconType="loading" | ||
@message="The cluster is syncing. This happens when the secondary is too far behind the primary to use the normal stream-wals state for catching up." | ||
@class="has-top-margin-xl" /> | ||
{{/if}} | ||
<ReplicationTableRows | ||
@replicationDetails={{replicationDetails}} | ||
@clusterMode={{clusterMode}} /> | ||
<ReplicationDocLink /> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<div class="replication-page"> | ||
{{yield (hash | ||
header=(component 'replication-header' data=model title=mode) | ||
{{yield (hash | ||
header=(component 'replication-header' data=model title=replicationMode isSecondary=isSecondary) | ||
toggle=(component 'replication-toggle') | ||
dashboard=(component 'replication-dashboard' data=model dr=dr) | ||
dashboard=(component 'replication-dashboard' data=model isSecondary=isSecondary replicationDetails=replicationDetails clusterMode=clusterMode) | ||
isDisabled=isDisabled | ||
message=message | ||
)}} | ||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
{{#unless data}} | ||
<EmptyState | ||
@title="Data not available" | ||
/> | ||
{{else}} | ||
<div class="has-top-margin-xl has-bottom-margin-s" | ||
data-test-table-rows> | ||
{{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." | ||
value=merkleRoot}} | ||
{{info-table-row | ||
label="Mode" | ||
value=mode}} | ||
{{info-table-row | ||
label="Replication set" | ||
helperText="The ID for the group of clusters communicating for this replication mode" | ||
value=clusterId}} | ||
</div> | ||
<div class="has-top-margin-xl has-bottom-margin-s" | ||
data-test-table-rows> | ||
{{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." | ||
value=merkleRoot}} | ||
{{info-table-row | ||
label="Mode" | ||
value=clusterMode}} | ||
{{info-table-row | ||
label="Replication set" | ||
helperText="The ID for the group of clusters communicating for this replication mode" | ||
value=clusterId}} | ||
</div> | ||
|
||
{{#if syncProgress}} | ||
{{!-- ARG TODO: need to test this --}} | ||
{{info-table-row | ||
label="Sync progress" | ||
value=(concat syncProgress.progress '/' syncProgress.total)}} | ||
{{/if}} | ||
{{/unless}} | ||
{{#if syncProgress}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this chuck can be deleted. |
||
{{!-- ARG TODO: need to test this --}} | ||
{{info-table-row | ||
label="Sync progress" | ||
value=(concat syncProgress.progress '/' syncProgress.total)}} | ||
{{/if}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💙