From 9f830b1e530ae90ed496bac609e3bc5426c6ac00 Mon Sep 17 00:00:00 2001 From: Noelle Daley Date: Tue, 28 Apr 2020 14:52:52 -0700 Subject: [PATCH] Replication Primary Dashboard: handle errors (#8845) * use h3 instead of code elements * use correct property names for StateDisplay * WIP * remove todo * move cluster states into a map; make status menu icon match cluster state * show error in state card using the same state map in the cluster model * whitespace * move cluster-states into a helper and update usage * use circle success icon for stream-wals because that is the ideal state * more refactoring of cluster state display * use new cluster-states helper * whitespace * use clusterStates helper in replication secondary card * remove extra import * add default values for when state isn't recognized * make sure that state exists before getting state details from clusterStates helper * be more strict when state cannot be found * use brace expansion to fix linting error * add tests for error states * fix text wrapping issue on secondary cards; make titles match mocks * use unknown if metric isn't foudn * remove extra border on selectable card when there is an error * use outline square in status menu for error --- ui/lib/core/addon/components/replication-dashboard.js | 1 - .../integration/components/replication-primary-card-test.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/lib/core/addon/components/replication-dashboard.js b/ui/lib/core/addon/components/replication-dashboard.js index c293a7befc36..089d0da64fc9 100644 --- a/ui/lib/core/addon/components/replication-dashboard.js +++ b/ui/lib/core/addon/components/replication-dashboard.js @@ -8,7 +8,6 @@ export default Component.extend({ data: null, replicationDetails: null, isSecondary: null, - dr: null, isSyncing: computed('replicationDetails', 'isSecondary', function() { const { state } = this.replicationDetails; const isSecondary = this.isSecondary; diff --git a/ui/tests/integration/components/replication-primary-card-test.js b/ui/tests/integration/components/replication-primary-card-test.js index 2345657b90ae..ac6115b9e1c7 100644 --- a/ui/tests/integration/components/replication-primary-card-test.js +++ b/ui/tests/integration/components/replication-primary-card-test.js @@ -6,7 +6,7 @@ import { CLUSTER_STATES } from 'core/helpers/cluster-states'; import hbs from 'htmlbars-inline-precompile'; const resolver = engineResolverFor('replication'); -module('Integration | Component | replication-primary-card', function(hooks) { +module('Integration | Enterprise | Component | replication-primary-card', function(hooks) { setupRenderingTest(hooks, { resolver }); test('it renders', async function(assert) {