Skip to content

Commit

Permalink
show dynamic state glyph (#8747)
Browse files Browse the repository at this point in the history
* show dynamic state glyph

* show state glyph after state

* move LearnLink into core addon

* make ReplicationDocLink component

* prevent double lines at the bottom of the dashboard
  • Loading branch information
Noelle Daley committed Apr 20, 2020
1 parent 7f992f3 commit e477dc9
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 18 deletions.
9 changes: 5 additions & 4 deletions ui/app/styles/components/replication-dashboard.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
.replication-dashboard {
.documentation-link {
float: right;
}

.selectable-card {
line-height: normal;

Expand Down Expand Up @@ -66,4 +62,9 @@
}
}
}

// prevent double lines at the bottom of the dashboard
&.box {
padding-bottom: 0;
}
}
8 changes: 8 additions & 0 deletions ui/app/styles/components/replication-doc-link.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.documentation-link {
margin: $spacing-s 0 $spacing-l 0;
float: right;

.doc-link {
font-weight: normal;
}
}
1 change: 1 addition & 0 deletions ui/app/styles/core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
@import './components/radial-progress';
@import './components/raft-join';
@import './components/replication-dashboard';
@import './components/replication-doc-link';
@import './components/replication-primary-card';
@import './components/replication-summary';
@import './components/role-item';
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions ui/lib/core/addon/components/replication-doc-link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Component from '@ember/component';
import layout from '../templates/components/replication-doc-link';

export default Component.extend({
layout,
});
16 changes: 4 additions & 12 deletions ui/lib/core/addon/templates/components/replication-dashboard.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,15 @@
{{/if}}

<div class="selectable-card-container has-top-margin-xl">
{{yield (hash
{{yield (hash
card=(component componentToRender data=data)
)}}
</div>
{{yield (hash

{{yield (hash
isSyncing=isSyncing
rows=(component 'replication-table-rows' data=data)
)}}

<div class="documentation-link">
<p class="has-text-grey">We have additional timeseries telemetry that can be found
<LearnLink
@path="/vault/operations/monitor-replication#key-monitoring-metrics"
> in our documentation</LearnLink>
.
</p>
</div>

<ReplicationDocLink />
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="documentation-link">
<p class="has-text-grey">We have additional timeseries telemetry that can be found
<LearnLink @path="/vault/operations/monitor-replication#key-monitoring-metrics"> in our documentation</LearnLink>
.
</p>
</div>
1 change: 1 addition & 0 deletions ui/lib/core/app/components/learn-link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'core/components/learn-link';
1 change: 1 addition & 0 deletions ui/lib/core/app/components/replication-doc-link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'core/components/replication-doc-link';
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Component from '@ember/component';
* ```
* @param {string} [title=null] - The title to be displayed on the top left corner of the card.
* @param {string} [description=null] - Helper text to describe the metric on the card.
* @param {object} [glyph=null] - The glyph to display beside the metric.
* @param {string} metric=null - The main metric to highlight on the card.
*/

Expand All @@ -22,4 +23,5 @@ export default Component.extend({
title: null,
description: null,
metric: null,
glyph: null,
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
{{description}}
</span>
<h3 class="title is-3">
{{!-- TODO make this dynamic --}}
<Icon @glyph="check-circle-outline" class="has-text-success" />
{{metric}}
{{#if glyph}}
<Icon @glyph={{glyph}} class="has-text-success" />
{{/if}}
</h3>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@
<ReplicationPrimaryCard
@title='State'
@description='Updated every ten seconds.'
@glyph={{get cluster (concat replicationMode 'StateGlyph')}}
@metric={{replicationAttrs.state}}/>
<ReplicationPrimaryCard
@title='Last WAL entry'
Expand All @@ -357,6 +358,7 @@
<KnownSecondariesCard @cluster={{cluster}} @replicationAttrs={{replicationAttrs}} />
</div>
<ReplicationTableRows @data={{replicationAttrs}}/>
<ReplicationDocLink />
</div>
{{/if}}
{{/if}}

0 comments on commit e477dc9

Please sign in to comment.