diff --git a/ui/app/styles/components/selectable-card-container.scss b/ui/app/styles/components/selectable-card-container.scss
index 0c98498ba..8422993bc 100644
--- a/ui/app/styles/components/selectable-card-container.scss
+++ b/ui/app/styles/components/selectable-card-container.scss
@@ -38,6 +38,10 @@
.selectable-card-container.has-grid.has-two-col-grid {
grid-template-columns: 2fr 2fr;
grid-template-rows: none;
+
+ @include until($mobile) {
+ grid-template-columns: 1fr;
+ }
}
.selectable-card-container.has-grid.has-three-col-grid {
grid-template-columns: 1fr 1fr 1fr;
diff --git a/ui/lib/pki/addon/components/page/pki-configuration-details.hbs b/ui/lib/pki/addon/components/page/pki-configuration-details.hbs
index 21f970ea7..0616f4e77 100644
--- a/ui/lib/pki/addon/components/page/pki-configuration-details.hbs
+++ b/ui/lib/pki/addon/components/page/pki-configuration-details.hbs
@@ -1,55 +1,65 @@
-
-
- {{#if @canDeleteAllIssuers}}
-
+
+ {{/if}}
+
+ Tidy
+
+
+ Edit configuration
+
+
+
-{{#if (not (eq @urls 403))}}
-
- Global URLs
-
-
-
-{{/if}}
+ {{#if (not (eq @urls 403))}}
+
+ Global URLs
+
+
+
+ {{/if}}
-{{#if (not (eq @crl 403))}}
-
- Certificate Revocation List (CRL)
-
-
-
+ {{#if (not (eq @crl 403))}}
+
+ Certificate Revocation List (CRL)
+
+
+
-
- Online Certificate Status Protocol (OCSP)
-
-
-
+
+ Online Certificate Status Protocol (OCSP)
+
+
+
+ {{/if}}
+{{else}}
+
+
+
+ Configure
+
+
+
{{/if}}
Mount Configuration
diff --git a/ui/lib/pki/addon/templates/configuration/index.hbs b/ui/lib/pki/addon/templates/configuration/index.hbs
index af7857a29..caf4689e4 100644
--- a/ui/lib/pki/addon/templates/configuration/index.hbs
+++ b/ui/lib/pki/addon/templates/configuration/index.hbs
@@ -9,19 +9,11 @@
@isEngine={{true}}
/>
-{{#if this.model.hasConfig}}
-
-{{else}}
-
-
-
- Configure PKI
-
-
-{{/if}}
\ No newline at end of file
+
\ No newline at end of file
diff --git a/ui/lib/pki/addon/templates/roles/index.hbs b/ui/lib/pki/addon/templates/roles/index.hbs
index 68aa546b9..0972ecf69 100644
--- a/ui/lib/pki/addon/templates/roles/index.hbs
+++ b/ui/lib/pki/addon/templates/roles/index.hbs
@@ -8,15 +8,16 @@
}}
@isEngine={{true}}
/>
-
-
-
- Create role
-
-
-
{{#if this.model.hasConfig}}
+
+
+
+ Create role
+
+
+
+
{{#if this.model.roles.length}}
{{#each this.model.roles as |pkiRole|}}
@@ -65,6 +66,7 @@
{{/if}}
{{else}}
+
Configure PKI
diff --git a/ui/tests/acceptance/pki/pki-configuration-test.js b/ui/tests/acceptance/pki/pki-configuration-test.js
index 0ce57b82a..67f47d7a6 100644
--- a/ui/tests/acceptance/pki/pki-configuration-test.js
+++ b/ui/tests/acceptance/pki/pki-configuration-test.js
@@ -43,7 +43,7 @@ module('Acceptance | pki configuration test', function (hooks) {
test('it shows the delete all issuers modal', async function (assert) {
await authPage.login(this.pkiAdminToken);
await visit(`/vault/secrets/${this.mountPath}/pki/configuration`);
- await click(SELECTORS.emptyStateLink);
+ await click(SELECTORS.configuration.configureButton);
assert.strictEqual(currentURL(), `/vault/secrets/${this.mountPath}/pki/configuration/create`);
await isSettled();
await click(SELECTORS.configuration.generateRootOption);
@@ -69,7 +69,7 @@ module('Acceptance | pki configuration test', function (hooks) {
test('it shows the correct empty state message if certificates exists after delete all issuers', async function (assert) {
await authPage.login(this.pkiAdminToken);
await visit(`/vault/secrets/${this.mountPath}/pki/configuration`);
- await click(SELECTORS.emptyStateLink);
+ await click(SELECTORS.configuration.configureButton);
assert.strictEqual(currentURL(), `/vault/secrets/${this.mountPath}/pki/configuration/create`);
await click(SELECTORS.configuration.generateRootOption);
await fillIn(SELECTORS.configuration.typeField, 'exported');
@@ -128,7 +128,7 @@ module('Acceptance | pki configuration test', function (hooks) {
test('it shows the correct empty state message if roles and certificates exists after delete all issuers', async function (assert) {
await authPage.login(this.pkiAdminToken);
await visit(`/vault/secrets/${this.mountPath}/pki/configuration`);
- await click(SELECTORS.emptyStateLink);
+ await click(SELECTORS.configuration.configureButton);
assert.strictEqual(currentURL(), `/vault/secrets/${this.mountPath}/pki/configuration/create`);
await click(SELECTORS.configuration.generateRootOption);
await fillIn(SELECTORS.configuration.typeField, 'exported');
diff --git a/ui/tests/helpers/pki/pki-configure-create.js b/ui/tests/helpers/pki/pki-configure-create.js
index 97e9ad705..374ffddec 100644
--- a/ui/tests/helpers/pki/pki-configure-create.js
+++ b/ui/tests/helpers/pki/pki-configure-create.js
@@ -14,6 +14,7 @@ export const SELECTORS = {
cancelButton: '[data-test-pki-config-cancel]',
saveButton: '[data-test-pki-config-save]',
doneButton: '[data-test-done]',
+ configureButton: '[data-test-configure-pki-button]',
// pki-generate-root
...GENERATE_ROOT,
generateRootOption: '[data-test-pki-config-option="generate-root"]',
diff --git a/ui/tests/integration/components/pki/page/pki-configuration-details-test.js b/ui/tests/integration/components/pki/page/pki-configuration-details-test.js
index 21c407f36..9a6bf8931 100644
--- a/ui/tests/integration/components/pki/page/pki-configuration-details-test.js
+++ b/ui/tests/integration/components/pki/page/pki-configuration-details-test.js
@@ -44,7 +44,7 @@ module('Integration | Component | Page::PkiConfigurationDetails', function (hook
test('shows the correct information on global urls section', async function (assert) {
await render(
- hbs`,`,
+ hbs`,`,
{ owner: this.engine }
);
@@ -56,7 +56,7 @@ module('Integration | Component | Page::PkiConfigurationDetails', function (hook
.hasText('example.com', 'issuing certificate value renders');
this.urls.issuingCertificates = null;
await render(
- hbs`,`,
+ hbs`,`,
{ owner: this.engine }
);
assert
@@ -72,7 +72,7 @@ module('Integration | Component | Page::PkiConfigurationDetails', function (hook
test('shows the correct information on crl section', async function (assert) {
await render(
- hbs`,`,
+ hbs`,`,
{ owner: this.engine }
);
@@ -84,7 +84,7 @@ module('Integration | Component | Page::PkiConfigurationDetails', function (hook
.hasText('Off', 'auto-rebuild value renders off if auto rebuild is false');
this.crl.autoRebuild = true;
await render(
- hbs`,`,
+ hbs`,`,
{ owner: this.engine }
);
assert
@@ -100,7 +100,36 @@ module('Integration | Component | Page::PkiConfigurationDetails', function (hook
test('shows the correct information on mount configuration section', async function (assert) {
await render(
- hbs`,`,
+ hbs`,`,
+ { owner: this.engine }
+ );
+
+ assert.dom(SELECTORS.engineTypeLabel).hasText('Secret engine type', 'engine type row label renders');
+ assert.dom(SELECTORS.engineTypeRowVal).hasText('pki', 'engine type row value renders');
+ assert.dom(SELECTORS.pathLabel).hasText('Path', 'path row label renders');
+ assert.dom(SELECTORS.pathRowVal).hasText('/pki-test', 'path row value renders');
+ assert.dom(SELECTORS.accessorLabel).hasText('Accessor', 'accessor row label renders');
+ assert.dom(SELECTORS.accessorRowVal).hasText('pki_33345b0d', 'accessor row value renders');
+ assert.dom(SELECTORS.localLabel).hasText('Local', 'local row label renders');
+ assert.dom(SELECTORS.localRowVal).hasText('No', 'local row value renders');
+ assert.dom(SELECTORS.sealWrapLabel).hasText('Seal wrap', 'seal wrap row label renders');
+ assert
+ .dom(SELECTORS.sealWrapRowVal)
+ .hasText('Yes', 'seal wrap row value renders Yes if sealWrap is true');
+ assert.dom(SELECTORS.maxLeaseTtlLabel).hasText('Max lease TTL', 'max lease label renders');
+ assert.dom(SELECTORS.maxLeaseTtlRowVal).hasText('400h', 'max lease value renders');
+ assert
+ .dom(SELECTORS.allowedManagedKeysLabel)
+ .hasText('Allowed managed keys', 'allowed managed keys label renders');
+ assert.dom(SELECTORS.allowedManagedKeysRowVal).hasText('Yes', 'allowed managed keys value renders');
+ });
+
+ test('shows mount configuration when hasConfig is false', async function (assert) {
+ this.urls = 403;
+ this.crl = 403;
+
+ await render(
+ hbs`,`,
{ owner: this.engine }
);