From 7a5a63d0e320d377676070b125b1cdb32b55b851 Mon Sep 17 00:00:00 2001 From: Arnav Palnitkar Date: Fri, 20 May 2022 09:33:50 -0700 Subject: [PATCH] Remove reference to stored license (#15513) * Remove reference to stored license - Stored license was deprecated in 1.8 and from 1.11 all licenses will be auto loaded. * Added changelog * Remove test for stored license * Add defensive check in serializer --- changelog/15513.txt | 3 +++ ui/app/serializers/license.js | 5 ---- ui/app/templates/components/license-info.hbs | 13 +--------- ui/mirage/handlers/base.js | 7 ------ .../components/license-info-test.js | 25 ------------------- 5 files changed, 4 insertions(+), 49 deletions(-) create mode 100644 changelog/15513.txt diff --git a/changelog/15513.txt b/changelog/15513.txt new file mode 100644 index 000000000..a3d8a33d4 --- /dev/null +++ b/changelog/15513.txt @@ -0,0 +1,3 @@ +```release-note:improvement +ui: Remove stored license references +``` \ No newline at end of file diff --git a/ui/app/serializers/license.js b/ui/app/serializers/license.js index 0e9f13b8f..189ab03b4 100644 --- a/ui/app/serializers/license.js +++ b/ui/app/serializers/license.js @@ -8,11 +8,6 @@ export default ApplicationSerializer.extend({ ...transformedPayload, ...payload.data.autoloaded, }; - } else if (payload.data.stored) { - transformedPayload = { - ...transformedPayload, - ...payload.data.stored, - }; } transformedPayload.id = transformedPayload.license_id; return this._super(store, primaryModelClass, transformedPayload, id, requestType); diff --git a/ui/app/templates/components/license-info.hbs b/ui/app/templates/components/license-info.hbs index 8da6b026e..87924a758 100644 --- a/ui/app/templates/components/license-info.hbs +++ b/ui/app/templates/components/license-info.hbs @@ -13,18 +13,7 @@ to {{date-format @expirationTime "MMM dd, yyyy hh:mm:ss a"}} - - {{#if @autoloaded}} - Autoloaded - {{else}} - Stored - - - Stored licenses will be deprecated in a future version of Vault. We recommend autoloading your license. Read more - here. - - {{/if}} - + diff --git a/ui/mirage/handlers/base.js b/ui/mirage/handlers/base.js index 2cde82919..98810f600 100644 --- a/ui/mirage/handlers/base.js +++ b/ui/mirage/handlers/base.js @@ -35,13 +35,6 @@ export default function (server) { return { data: { autoloading_used: false, - stored: { - expiration_time: EXPIRY_DATE, - features: ['DR Replication', 'Namespaces', 'Lease Count Quotas', 'Automated Snapshots'], - license_id: '0eca7ef8-ebc0-f875-315e-3cc94a7870cf', - performance_standby_count: 0, - start_time: '2020-04-28T00:00:00Z', - }, persisted_autoload: { expiration_time: EXPIRY_DATE, features: ['DR Replication', 'Namespaces', 'Lease Count Quotas', 'Automated Snapshots'], diff --git a/ui/tests/integration/components/license-info-test.js b/ui/tests/integration/components/license-info-test.js index 4d618866c..0f5ac7640 100644 --- a/ui/tests/integration/components/license-info-test.js +++ b/ui/tests/integration/components/license-info-test.js @@ -49,31 +49,6 @@ module('Integration | Component | license info', function (hooks) { assert.equal(row.rowValue, 'Autoloaded', 'Shows autoloaded status'); }); - test('it renders properly for stored license', async function (assert) { - const now = Date.now(); - this.set('licenseId', 'test'); - this.set('expirationTime', addMinutes(now, 30)); - this.set('autoloaded', false); - this.set('startTime', now); - this.set('features', ['HSM', 'Namespaces']); - await render( - hbs`` - ); - let row = component.detailRows.filterBy('rowName', 'License state')[0]; - assert.ok( - row.rowValue.includes( - 'Stored licenses will be deprecated in a future version of Vault. We recommend autoloading your license.' - ), - 'Stored license includes recommendation to autoload' - ); - }); - test('it renders Performance Standby as inactive if count is 0', async function (assert) { const now = Date.now(); this.set('licenseId', 'temporary');