-
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
Merged
andaley
merged 14 commits into
ui/replication-status-discoverability
from
ui/replication/refactor-dashboard-components
Apr 29, 2020
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
b423f52
use ReplicationDashboard component
andaley 2032f31
move syncing and alert banners into dashboard component
andaley a0a1f78
only show primary cluster addr if dashboard is for a secondary
andaley bdd7152
use ReplicationPage and Dashboard
andaley a105151
move isSecondary to page component
andaley f3dd354
remove duplication
andaley b83bf51
remove dead code
andaley 3d26f40
refactored table rows
andaley ef77a4d
make sure dashboards update data when we are switching between mclust…
andaley f0a503f
clarified replicationMode and clusterMode
andaley 99c75b5
remove extra margin
andaley ed04742
get rid of data
andaley 618d2d5
remove syncProgress
andaley 9963af9
remove Enterprise filter from tests so component tests are run
andaley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 37 additions & 14 deletions
51
ui/lib/core/addon/templates/components/replication-dashboard.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
41 changes: 14 additions & 27 deletions
41
ui/lib/core/addon/templates/components/replication-table-rows.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,14 @@ | ||
{{#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> | ||
|
||
{{#if syncProgress}} | ||
{{!-- ARG TODO: need to test this --}} | ||
{{info-table-row | ||
label="Sync progress" | ||
value=(concat syncProgress.progress '/' syncProgress.total)}} | ||
{{/if}} | ||
{{/unless}} | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💙