1 parent
8ad4e93ff7
commit
1cb3b708a2
17 files changed
+741
-16
No files matched your search
@@ -22,7 +22,7 @@ export default class ObjectTransform extends Transform {
|
||||
*/
|
||||
serialize(deserialized) {
|
||||
if (!deserialized) {
|
||||
return null;
|
||||
return {};
|
||||
}
|
||||
return deserialized;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: MPL-2.0
|
||||
*/
|
||||
|
||||
import ApplicationSerializer from './application';
|
||||
|
||||
export default ApplicationSerializer.extend({
|
||||
modelName: 'policy',
|
||||
});
|
||||
@@ -24,12 +24,14 @@ export default class extends Helper {
|
||||
*/
|
||||
|
||||
compute([days]) {
|
||||
const remainder = days % 365;
|
||||
if (remainder === 0) {
|
||||
const numberOfYears = days / 365;
|
||||
return this.intl.t('titles.year', { numberOfYears });
|
||||
} else {
|
||||
return this.intl.t('titles.days', { days });
|
||||
if (days > 0) {
|
||||
const remainder = days % 365;
|
||||
if (remainder === 0) {
|
||||
const numberOfYears = days / 365;
|
||||
return this.intl.t('titles.year', { numberOfYears });
|
||||
} else {
|
||||
return this.intl.t('titles.days', { days });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -925,6 +925,7 @@ policy:
|
||||
delete_after: Delete After
|
||||
do_not_delete: Do not delete
|
||||
forever: Forever
|
||||
days: days
|
||||
actions:
|
||||
delete: Delete Storage Policy
|
||||
messages:
|
||||
@@ -932,3 +933,24 @@ policy:
|
||||
title: No storage policies yet
|
||||
description: Storage policies define how long to store recordings before they are automatically deleted. We recommend checking your data retention policies for compliance requirements.
|
||||
link: Create a new storage policy
|
||||
form:
|
||||
retention_policy:
|
||||
label: Retention Policy
|
||||
help: Specifies how long a recording must be stored.
|
||||
deletion_policy:
|
||||
label: Deletion Policy
|
||||
help: Specifies when to delete a recording
|
||||
overridable:
|
||||
label: Allow orgs to override
|
||||
retention_policy_options:
|
||||
forever:
|
||||
label: Forever
|
||||
custom:
|
||||
label: Custom
|
||||
do_not_protect:
|
||||
label: Do not protect, allow deletion any time
|
||||
deletion_policy_options:
|
||||
do_not_delete:
|
||||
label: Do not delete
|
||||
custom:
|
||||
label: Custom
|
||||
Reference in new issue
Block a user