Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reference to stored license #15513

Merged
merged 4 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/15513.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
ui: Remove stored license references
```
5 changes: 0 additions & 5 deletions ui/app/serializers/license.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 1 addition & 12 deletions ui/app/templates/components/license-info.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,7 @@
to
{{date-format @expirationTime "MMM dd, yyyy hh:mm:ss a"}}
</InfoTableRow>
<InfoTableRow @label="License state" @value={{if @autoloaded "Autoloaded" "Stored"}} data-test-detail-row>
{{#if @autoloaded}}
Autoloaded
{{else}}
Stored
<Icon @name="alert-triangle-fill" class="has-text-highlight" />
<span class="is-size-8">
Stored licenses will be deprecated in a future version of Vault. We recommend autoloading your license. Read more
<a href="https://www.vaultproject.io/docs/enterprise/license" rel="noreferrer noopener" target="_blank">here</a>.
</span>
{{/if}}
</InfoTableRow>
<InfoTableRow @label="License state" @value={{"Autoloaded"}} data-test-detail-row />
</div>
</section>

Expand Down
7 changes: 0 additions & 7 deletions ui/mirage/handlers/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
25 changes: 0 additions & 25 deletions ui/tests/integration/components/license-info-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`<LicenseInfo
@licenseId={{this.licenseId}}
@expirationTime={{this.expirationTime}}
@startTime={{this.startTime}}
@features={{this.features}}
@autoloaded={{false}}
/>`
);
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');
Expand Down