-
- {{#if backend.icon}}
-
-
-
-
-
-
- {{or backend.engineType backend.path}}
-
-
-
- {{/if}}
- {{#if backend.path}}
- {{#if backend.isSupportedBackend}}
-
- {{backend.path}}
-
- {{else}}
-
{{backend.path}}
+ {{#if this.filteredSecretsEngines}}
+
+ <:body as |B|>
+ {{#each this.firstFiveSecretsEngines as |backend|}}
+
+
+
+
+ {{#if backend.icon}}
+
+
+
+
+
+
+ {{or backend.engineType backend.path}}
+
+
+
{{/if}}
+ {{#if backend.path}}
+ {{#if backend.isSupportedBackend}}
+
+ {{backend.path}}
+
+ {{else}}
+
{{backend.path}}
+ {{/if}}
+ {{/if}}
+
+ {{#if backend.accessor}}
+
+ {{backend.accessor}}
+
+ {{/if}}
+ {{#if backend.description}}
+
+ {{backend.description}}
+
{{/if}}
- {{#if backend.accessor}}
-
- {{backend.accessor}}
-
+ {{#if backend.isSupportedBackend}}
+
+ View
+
{{/if}}
- {{#if backend.description}}
-
- {{backend.description}}
-
- {{/if}}
-
- {{#if backend.isSupportedBackend}}
-
- View
-
- {{/if}}
-
-
- {{/each}}
-
-
+
+
+ {{/each}}
+
+
- {{#if (gt this.filteredSecretsEngines.length 5)}}
-
- Showing 5 out of
- {{this.filteredSecretsEngines.length}}
- secret engines. Navigate to
- details
- to view more.
-
+ {{#if (gt this.filteredSecretsEngines.length 5)}}
+
+ Showing 5 out of
+ {{this.filteredSecretsEngines.length}}
+ secret engines. Navigate to
+ details
+ to view more.
+
+ {{/if}}
+
+ {{else}}
+
+
+ Enable a secret engine
+
+
{{/if}}
\ No newline at end of file
diff --git a/ui/tests/helpers/components/dashboard/dashboard-selectors.js b/ui/tests/helpers/components/dashboard/dashboard-selectors.js
index 2d9e738cb9..582f18418e 100644
--- a/ui/tests/helpers/components/dashboard/dashboard-selectors.js
+++ b/ui/tests/helpers/components/dashboard/dashboard-selectors.js
@@ -1,3 +1,4 @@
export const SELECTORS = {
cardName: (name) => `[data-test-card="${name}"]`,
+ emptyState: (name) => `[data-test-empty-state="${name}"]`,
};
diff --git a/ui/tests/integration/components/dashboard/overview-test.js b/ui/tests/integration/components/dashboard/overview-test.js
index 4e526c5b1d..97f415d984 100644
--- a/ui/tests/integration/components/dashboard/overview-test.js
+++ b/ui/tests/integration/components/dashboard/overview-test.js
@@ -25,6 +25,7 @@ module('Integration | Component | dashboard/overview', function (hooks) {
performance: {
clusterId: 'abc-1',
state: 'running',
+ isPrimary: true,
},
};
this.store.pushPayload('secret-engine', {
@@ -61,6 +62,29 @@ module('Integration | Component | dashboard/overview', function (hooks) {
this.refreshModel = () => {};
});
+ test('it should show dashboard empty states', async function (assert) {
+ this.version = this.owner.lookup('service:version');
+ this.version.version = '1.13.1';
+ this.isRootNamespace = true;
+ await render(
+ hbs`
+
+ `
+ );
+ assert.dom('[data-test-dashboard-version-header]').exists();
+ assert.dom(SELECTORS.cardName('secrets-engines')).exists();
+ assert.dom(SELECTORS.emptyState('secrets-engines')).exists();
+ assert.dom(SELECTORS.cardName('learn-more')).exists();
+ assert.dom(SELECTORS.cardName('quick-actions')).exists();
+ assert.dom(SELECTORS.emptyState('quick-actions')).exists();
+ assert.dom(SELECTORS.cardName('configuration-details')).doesNotExist();
+ assert.dom(SELECTORS.cardName('replication')).doesNotExist();
+ assert.dom(SELECTORS.cardName('client-count')).doesNotExist();
+ });
+
test('it should hide client count and replication card on community', async function (assert) {
this.version = this.owner.lookup('service:version');
this.version.version = '1.13.1';
@@ -135,6 +159,7 @@ module('Integration | Component | dashboard/overview', function (hooks) {
);
assert.dom('[data-test-dashboard-version-header]').exists();
+ assert.dom('[data-test-badge-namespace]').exists();
assert.dom(SELECTORS.cardName('secrets-engines')).exists();
assert.dom(SELECTORS.cardName('learn-more')).exists();
assert.dom(SELECTORS.cardName('quick-actions')).exists();
@@ -166,6 +191,7 @@ module('Integration | Component | dashboard/overview', function (hooks) {
);
assert.dom('[data-test-dashboard-version-header]').exists();
+ assert.dom('[data-test-badge-namespace]').exists();
assert.dom(SELECTORS.cardName('secrets-engines')).exists();
assert.dom(SELECTORS.cardName('learn-more')).exists();
assert.dom(SELECTORS.cardName('quick-actions')).exists();