+{{/if}}
\ No newline at end of file
diff --git a/ui/app/components/role-edit.js b/ui/app/components/role-edit.js
index 2ed008b339..3c222836d1 100644
--- a/ui/app/components/role-edit.js
+++ b/ui/app/components/role-edit.js
@@ -41,7 +41,7 @@ export default Component.extend(FocusOnInsertMixin, {
}
},
- waitForKeyUp: task(function*() {
+ waitForKeyUp: task(function* () {
while (true) {
let event = yield waitForEvent(document.body, 'keyup');
this.onEscape(event);
diff --git a/ui/app/components/secret-create-or-update.js b/ui/app/components/secret-create-or-update.js
index 310996389b..05f97327ec 100644
--- a/ui/app/components/secret-create-or-update.js
+++ b/ui/app/components/secret-create-or-update.js
@@ -28,9 +28,8 @@ import ControlGroupError from 'vault/lib/control-group-error';
import Ember from 'ember';
import keys from 'vault/lib/keycodes';
-import { action } from '@ember/object';
+import { action, set } from '@ember/object';
import { inject as service } from '@ember/service';
-import { set } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { isBlank, isNone } from '@ember/utils';
@@ -66,7 +65,7 @@ export default class SecretCreateOrUpdate extends Component {
let adapter = this.store.adapterFor('secret-v2');
let type = { modelName: 'secret-v2' };
let query = { backend: this.args.model.backend };
- adapter.query(this.store, type, query).then(result => {
+ adapter.query(this.store, type, query).then((result) => {
this.secretPaths = result.data.keys;
});
}
@@ -143,7 +142,7 @@ export default class SecretCreateOrUpdate extends Component {
.then(() => {
this.saveComplete(successCallback, key);
})
- .catch(e => {
+ .catch((e) => {
// when mode is not create the metadata error is handled in secret-edit-metadata
if (this.args.mode === 'create') {
this.error = e.errors.join(' ');
@@ -155,7 +154,7 @@ export default class SecretCreateOrUpdate extends Component {
}
}
})
- .catch(error => {
+ .catch((error) => {
if (error instanceof ControlGroupError) {
let errorMessage = this.controlGroup.logFromError(error);
this.error = errorMessage.content;
@@ -188,7 +187,7 @@ export default class SecretCreateOrUpdate extends Component {
return false;
}
- @(task(function*(name, value) {
+ @(task(function* (name, value) {
this.checkValidation(name, value);
while (true) {
let event = yield waitForEvent(document.body, 'keyup');
diff --git a/ui/app/components/secret-delete-menu.js b/ui/app/components/secret-delete-menu.js
index f5c5634289..cc9ae6bf9f 100644
--- a/ui/app/components/secret-delete-menu.js
+++ b/ui/app/components/secret-delete-menu.js
@@ -1,3 +1,4 @@
+/* eslint ember/no-computed-properties-in-native-classes: 'warn' */
import Ember from 'ember';
import { inject as service } from '@ember/service';
import Component from '@glimmer/component';
@@ -6,7 +7,7 @@ import { action } from '@ember/object';
import { alias } from '@ember/object/computed';
import { maybeQueryRecord } from 'vault/macros/maybe-query-record';
-const getErrorMessage = errors => {
+const getErrorMessage = (errors) => {
let errorMessage = errors?.join('. ') || 'Something went wrong. Check the Vault logs for more information.';
return errorMessage;
};
@@ -19,7 +20,7 @@ export default class SecretDeleteMenu extends Component {
@maybeQueryRecord(
'capabilities',
- context => {
+ (context) => {
if (!context.args || !context.args.modelForData || !context.args.modelForData.id) return;
let [backend, id] = JSON.parse(context.args.modelForData.id);
return {
@@ -33,7 +34,7 @@ export default class SecretDeleteMenu extends Component {
@maybeQueryRecord(
'capabilities',
- context => {
+ (context) => {
if (!context.args || !context.args.modelForData || !context.args.modelForData.id) return;
let [backend, id] = JSON.parse(context.args.modelForData.id);
return {
@@ -47,7 +48,7 @@ export default class SecretDeleteMenu extends Component {
@maybeQueryRecord(
'capabilities',
- context => {
+ (context) => {
if (!context.args.model || !context.args.model.engine || !context.args.model.id) return;
let backend = context.args.model.engine.id;
let id = context.args.model.id;
@@ -64,7 +65,7 @@ export default class SecretDeleteMenu extends Component {
@maybeQueryRecord(
'capabilities',
- context => {
+ (context) => {
if (!context.args.model || context.args.mode === 'create') {
return;
}
@@ -85,7 +86,7 @@ export default class SecretDeleteMenu extends Component {
@maybeQueryRecord(
'capabilities',
- context => {
+ (context) => {
if (!context.args.model || context.args.mode === 'create') {
return;
}
@@ -136,7 +137,7 @@ export default class SecretDeleteMenu extends Component {
return this.store
.adapterFor('secret-v2-version')
.v2DeleteOperation(this.store, this.args.modelForData.id, deleteType, currentVersionForNoReadMetadata)
- .then(resp => {
+ .then((resp) => {
if (Ember.testing) {
this.showDeleteModal = false;
// we don't want a refresh otherwise test loop will rerun in a loop
diff --git a/ui/app/components/secret-edit-metadata.js b/ui/app/components/secret-edit-metadata.js
index e62e1e9243..88b09dfb20 100644
--- a/ui/app/components/secret-edit-metadata.js
+++ b/ui/app/components/secret-edit-metadata.js
@@ -16,9 +16,8 @@
*/
import Component from '@glimmer/component';
-import { action } from '@ember/object';
+import { action, set } from '@ember/object';
import { inject as service } from '@ember/service';
-import { set } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class SecretEditMetadata extends Component {
diff --git a/ui/app/components/secret-edit-toolbar.js b/ui/app/components/secret-edit-toolbar.js
index 09e2433f16..f2bfb44c54 100644
--- a/ui/app/components/secret-edit-toolbar.js
+++ b/ui/app/components/secret-edit-toolbar.js
@@ -36,7 +36,7 @@
* @param {object} wrappedData - when copy the data it's the token of the secret returned.
* @param {object} editActions - actions passed from parent to child
*/
-
+/* eslint ember/no-computed-properties-in-native-classes: 'warn' */
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { not } from '@ember/object/computed';
@@ -75,7 +75,7 @@ export default class SecretEditToolbar extends Component {
this.store
.adapterFor('secret-v2-version')
.queryRecord(this.args.modelForData.id, { wrapTTL: 1800 })
- .then(resp => {
+ .then((resp) => {
this.wrappedData = resp.wrap_info.token;
this.flashMessages.success('Secret Successfully Wrapped!');
})
@@ -93,7 +93,7 @@ export default class SecretEditToolbar extends Component {
id: this.args.modelForData.id,
wrapTTL: 1800,
})
- .then(resp => {
+ .then((resp) => {
this.wrappedData = resp.wrap_info.token;
this.flashMessages.success('Secret Successfully Wrapped!');
})
diff --git a/ui/app/components/secret-edit.js b/ui/app/components/secret-edit.js
index 5a7affadc1..5e968a7158 100644
--- a/ui/app/components/secret-edit.js
+++ b/ui/app/components/secret-edit.js
@@ -73,7 +73,7 @@ export default Component.extend(FocusOnInsertMixin, WithNavToNearestAncestor, {
checkSecretCapabilities: maybeQueryRecord(
'capabilities',
- context => {
+ (context) => {
if (!context.model || context.mode === 'create') {
return;
}
@@ -94,7 +94,7 @@ export default Component.extend(FocusOnInsertMixin, WithNavToNearestAncestor, {
checkMetadataCapabilities: maybeQueryRecord(
'capabilities',
- context => {
+ (context) => {
if (!context.model || !context.isV2) {
return;
}
@@ -117,38 +117,43 @@ export default Component.extend(FocusOnInsertMixin, WithNavToNearestAncestor, {
buttonDisabled: or('requestInFlight', 'model.isFolder', 'model.flagsIsInvalid'),
- modelForData: computed('isV2', 'model', function() {
+ modelForData: computed('isV2', 'model', function () {
let { model } = this;
if (!model) return null;
return this.isV2 ? model.belongsTo('selectedVersion').value() : model;
}),
- basicModeDisabled: computed('secretDataIsAdvanced', 'showAdvancedMode', function() {
+ basicModeDisabled: computed('secretDataIsAdvanced', 'showAdvancedMode', function () {
return this.secretDataIsAdvanced || this.showAdvancedMode === false;
}),
- secretDataAsJSON: computed('secretData', 'secretData.[]', function() {
+ secretDataAsJSON: computed('secretData', 'secretData.[]', function () {
return this.secretData.toJSON();
}),
- secretDataIsAdvanced: computed('secretData', 'secretData.[]', function() {
+ secretDataIsAdvanced: computed('secretData', 'secretData.[]', function () {
return this.secretData.isAdvanced();
}),
showAdvancedMode: or('secretDataIsAdvanced', 'preferAdvancedEdit'),
- isWriteWithoutRead: computed('model.failedServerRead', 'modelForData.failedServerRead', 'isV2', function() {
- if (!this.model) return;
- // if the version couldn't be read from the server
- if (this.isV2 && this.modelForData.failedServerRead) {
- return true;
+ isWriteWithoutRead: computed(
+ 'model.failedServerRead',
+ 'modelForData.failedServerRead',
+ 'isV2',
+ function () {
+ if (!this.model) return;
+ // if the version couldn't be read from the server
+ if (this.isV2 && this.modelForData.failedServerRead) {
+ return true;
+ }
+ // if the model couldn't be read from the server
+ if (!this.isV2 && this.model.failedServerRead) {
+ return true;
+ }
+ return false;
}
- // if the model couldn't be read from the server
- if (!this.isV2 && this.model.failedServerRead) {
- return true;
- }
- return false;
- }),
+ ),
actions: {
refresh() {
diff --git a/ui/app/components/secret-link.js b/ui/app/components/secret-link.js
index fd400d293b..d3b05afaca 100644
--- a/ui/app/components/secret-link.js
+++ b/ui/app/components/secret-link.js
@@ -30,7 +30,7 @@ export default Component.extend({
queryParams: null,
ariaLabel: null,
- linkParams: computed('mode', 'secret', 'queryParams', function() {
+ linkParams: computed('mode', 'secret', 'queryParams', function () {
let data = { mode: this.mode, secret: this.secret, queryParams: this.queryParams };
return linkParams(data);
}),
diff --git a/ui/app/components/secret-list-header-tab.js b/ui/app/components/secret-list-header-tab.js
index 3627a25052..a6cf273962 100644
--- a/ui/app/components/secret-list-header-tab.js
+++ b/ui/app/components/secret-list-header-tab.js
@@ -36,10 +36,10 @@ export default class SecretListHeaderTab extends Component {
async fetchCapabilities() {
let capabilitiesArray = ['canList', 'canCreate', 'canUpdate'];
- let checkCapabilities = function(object) {
+ let checkCapabilities = function (object) {
let array = [];
// we only want to look at the canList, canCreate and canUpdate on the capabilities record
- capabilitiesArray.forEach(item => {
+ capabilitiesArray.forEach((item) => {
// object is sometimes null
if (object) {
array.push(object[item]);
@@ -47,7 +47,7 @@ export default class SecretListHeaderTab extends Component {
});
return array;
};
- let checker = arr => arr.every(item => !item); // same things as listing every item as !item && !item, etc.
+ let checker = (arr) => arr.every((item) => !item); // same things as listing every item as !item && !item, etc.
// For now only check capabilities for the Database Secrets Engine
if (this.args.displayName === 'Database') {
let peekRecordRoles = this.store.peekRecord('capabilities', 'database/roles/');
diff --git a/ui/app/components/secret-list/database-list-item.js b/ui/app/components/secret-list/database-list-item.js
index 410f186522..76663617cf 100644
--- a/ui/app/components/secret-list/database-list-item.js
+++ b/ui/app/components/secret-list/database-list-item.js
@@ -41,7 +41,7 @@ export default class DatabaseListItem extends Component {
.then(() => {
this.flashMessages.success(`Success: ${id} connection was reset`);
})
- .catch(e => {
+ .catch((e) => {
this.flashMessages.danger(e.errors);
});
}
@@ -54,7 +54,7 @@ export default class DatabaseListItem extends Component {
.then(() => {
this.flashMessages.success(`Success: ${id} connection was rotated`);
})
- .catch(e => {
+ .catch((e) => {
this.flashMessages.danger(e.errors);
});
}
diff --git a/ui/app/components/secret-list/transform-list-item.js b/ui/app/components/secret-list/transform-list-item.js
index 9df9fddd11..f9c3e0ff84 100644
--- a/ui/app/components/secret-list/transform-list-item.js
+++ b/ui/app/components/secret-list/transform-list-item.js
@@ -20,7 +20,7 @@ export default Component.extend({
itemPath: '',
itemType: '',
- isBuiltin: computed('item', 'itemType', function() {
+ isBuiltin: computed('item', 'itemType', function () {
const item = this.item;
if (this.itemType === 'alphabet' || this.itemType === 'template') {
return item.get('id').startsWith('builtin/');
diff --git a/ui/app/components/selectable-card.js b/ui/app/components/selectable-card.js
index aa94a97045..d1f6edc8fc 100644
--- a/ui/app/components/selectable-card.js
+++ b/ui/app/components/selectable-card.js
@@ -24,7 +24,7 @@ export default Component.extend({
actionText: '',
gridContainer: false,
tagName: '', // do not wrap component with div
- formattedCardTitle: computed('total', function() {
+ formattedCardTitle: computed('total', function () {
const { cardTitle, total } = this;
if (cardTitle === 'Tokens') {
diff --git a/ui/app/components/shamir-progress.js b/ui/app/components/shamir-progress.js
index 817ada1ba0..c4f5cb6b8b 100644
--- a/ui/app/components/shamir-progress.js
+++ b/ui/app/components/shamir-progress.js
@@ -5,7 +5,7 @@ export default Component.extend({
threshold: null,
progress: null,
classNames: ['shamir-progress'],
- progressDecimal: computed('threshold', 'progress', function() {
+ progressDecimal: computed('threshold', 'progress', function () {
const { threshold, progress } = this;
if (threshold && progress) {
return progress / threshold;
diff --git a/ui/app/components/splash-page.js b/ui/app/components/splash-page.js
index 578f8894cf..a8966ae67d 100644
--- a/ui/app/components/splash-page.js
+++ b/ui/app/components/splash-page.js
@@ -8,7 +8,7 @@ export default Component.extend({
store: service(),
tagName: '',
- activeCluster: computed('auth.activeCluster', function() {
+ activeCluster: computed('auth.activeCluster', function () {
return this.store.peekRecord('cluster', this.auth.activeCluster);
}),
});
diff --git a/ui/app/components/status-menu.js b/ui/app/components/status-menu.js
index 8aa4e182e3..cf80c6970b 100644
--- a/ui/app/components/status-menu.js
+++ b/ui/app/components/status-menu.js
@@ -10,7 +10,7 @@ export default Component.extend({
media: service(),
type: 'cluster',
itemTag: null,
- glyphName: computed('type', function() {
+ glyphName: computed('type', function () {
return {
cluster: 'circle-dot',
user: 'user',
diff --git a/ui/app/components/text-file.js b/ui/app/components/text-file.js
index 0f82d11cb7..e94b692994 100644
--- a/ui/app/components/text-file.js
+++ b/ui/app/components/text-file.js
@@ -1,6 +1,5 @@
import Component from '@glimmer/component';
-import { set } from '@ember/object';
-import { action } from '@ember/object';
+import { set, action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
import { guidFor } from '@ember/object/internals';
diff --git a/ui/app/components/tool-actions-form.js b/ui/app/components/tool-actions-form.js
index f57fc1bf46..0bfd6171f0 100644
--- a/ui/app/components/tool-actions-form.js
+++ b/ui/app/components/tool-actions-form.js
@@ -4,11 +4,12 @@ import { inject as service } from '@ember/service';
import Component from '@ember/component';
import { setProperties, computed, set } from '@ember/object';
import { addSeconds, parseISO } from 'date-fns';
+import { A } from '@ember/array';
const DEFAULTS = {
token: null,
rewrap_token: null,
- errors: [],
+ errors: A(),
wrap_info: null,
creation_time: null,
creation_ttl: null,
@@ -62,7 +63,7 @@ export default Component.extend(DEFAULTS, {
dataIsEmpty: match('data', new RegExp(DEFAULTS.data)),
- expirationDate: computed('creation_time', 'creation_ttl', function() {
+ expirationDate: computed('creation_time', 'creation_ttl', function () {
const { creation_time, creation_ttl } = this;
if (!(creation_time && creation_ttl)) {
return null;
@@ -127,7 +128,10 @@ export default Component.extend(DEFAULTS, {
this.store
.adapterFor('tools')
.toolAction(action, data, { wrapTTL })
- .then(resp => this.handleSuccess(resp, action), (...errArgs) => this.handleError(...errArgs));
+ .then(
+ (resp) => this.handleSuccess(resp, action),
+ (...errArgs) => this.handleError(...errArgs)
+ );
},
onClear() {
diff --git a/ui/app/components/toolbar-secret-link.js b/ui/app/components/toolbar-secret-link.js
index 08318b86f6..e1c6347dc0 100644
--- a/ui/app/components/toolbar-secret-link.js
+++ b/ui/app/components/toolbar-secret-link.js
@@ -21,7 +21,7 @@ import OuterHTML from './outer-html';
import { computed } from '@ember/object';
export default OuterHTML.extend({
- glyph: computed('type', function() {
+ glyph: computed('type', function () {
if (this.type == 'add') {
return 'plus';
} else {
diff --git a/ui/app/components/transform-edit-base.js b/ui/app/components/transform-edit-base.js
index 694925c66e..252b8ac3e0 100644
--- a/ui/app/components/transform-edit-base.js
+++ b/ui/app/components/transform-edit-base.js
@@ -71,7 +71,7 @@ export default Component.extend(FocusOnInsertMixin, {
.then(() => {
successCallback(model);
})
- .catch(e => {
+ .catch((e) => {
model.set('displayErrors', e.errors);
throw e;
});
diff --git a/ui/app/components/transform-role-edit.js b/ui/app/components/transform-role-edit.js
index 45d70e80d9..aff09afe33 100644
--- a/ui/app/components/transform-role-edit.js
+++ b/ui/app/components/transform-role-edit.js
@@ -11,13 +11,13 @@ export default TransformBase.extend({
handleUpdateTransformations(updateTransformations, roleId, type = 'update') {
if (!updateTransformations) return;
const backend = this.model.backend;
- const promises = updateTransformations.map(transform => {
+ const promises = updateTransformations.map((transform) => {
return this.store
.queryRecord('transform', {
backend,
id: transform.id,
})
- .then(function(transformation) {
+ .then(function (transformation) {
let roles = transformation.allowed_roles;
if (transform.action === 'ADD') {
roles = addToList(roles, roleId);
@@ -30,17 +30,17 @@ export default TransformBase.extend({
allowed_roles: roles,
});
- return transformation.save().catch(e => {
+ return transformation.save().catch((e) => {
return { errorStatus: e.httpStatus, ...transform };
});
});
});
- Promise.all(promises).then(res => {
- let hasError = res.find(r => !!r.errorStatus);
+ Promise.all(promises).then((res) => {
+ let hasError = res.find((r) => !!r.errorStatus);
if (hasError) {
- let errorAdding = res.find(r => r.errorStatus === 403 && r.action === 'ADD');
- let errorRemoving = res.find(r => r.errorStatus === 403 && r.action === 'REMOVE');
+ let errorAdding = res.find((r) => r.errorStatus === 403 && r.action === 'ADD');
+ let errorRemoving = res.find((r) => r.errorStatus === 403 && r.action === 'REMOVE');
let message =
'The edits to this role were successful, but allowed_roles for its transformations was not edited due to a lack of permissions.';
@@ -72,7 +72,7 @@ export default TransformBase.extend({
if (!this.initialTransformations) {
this.handleUpdateTransformations(
- newModelTransformations.map(t => ({
+ newModelTransformations.map((t) => ({
id: t,
action: 'ADD',
})),
@@ -83,7 +83,7 @@ export default TransformBase.extend({
}
const updateTransformations = [...newModelTransformations, ...this.initialTransformations]
- .map(t => {
+ .map((t) => {
if (this.initialTransformations.indexOf(t) < 0) {
return {
id: t,
@@ -98,7 +98,7 @@ export default TransformBase.extend({
}
return null;
})
- .filter(t => !!t);
+ .filter((t) => !!t);
this.handleUpdateTransformations(updateTransformations, roleId);
});
},
@@ -106,7 +106,7 @@ export default TransformBase.extend({
delete() {
const roleId = this.model?.id;
const roleTransformations = this.model?.transformations || [];
- const updateTransformations = roleTransformations.map(t => ({
+ const updateTransformations = roleTransformations.map((t) => ({
id: t,
action: 'REMOVE',
}));
diff --git a/ui/app/components/transform-show-transformation.js b/ui/app/components/transform-show-transformation.js
index 836ae3d194..a00970c994 100644
--- a/ui/app/components/transform-show-transformation.js
+++ b/ui/app/components/transform-show-transformation.js
@@ -2,13 +2,13 @@ import TransformBase from './transform-edit-base';
import { computed } from '@ember/object';
export default TransformBase.extend({
- cliCommand: computed('model.{allowed_roles,type,tweak_source}', function() {
+ cliCommand: computed('model.{allowed_roles,type,tweak_source}', function () {
if (!this.model) {
return;
}
let { type, allowed_roles, tweak_source, name } = this.model;
- let wildCardRole = allowed_roles.find(role => role.includes('*'));
+ let wildCardRole = allowed_roles.find((role) => role.includes('*'));
// values to be returned
let role = '';
diff --git a/ui/app/components/transformation-edit.js b/ui/app/components/transformation-edit.js
index 269c251cbf..a8bb726b89 100644
--- a/ui/app/components/transformation-edit.js
+++ b/ui/app/components/transformation-edit.js
@@ -15,7 +15,7 @@ export default TransformBase.extend({
backend,
id: role.id,
})
- .then(roleStore => {
+ .then((roleStore) => {
let transformations = roleStore.transformations;
if (role.action === 'ADD') {
transformations = addToList(transformations, transformationId);
@@ -26,14 +26,14 @@ export default TransformBase.extend({
backend,
transformations,
});
- return roleStore.save().catch(e => {
+ return roleStore.save().catch((e) => {
return {
errorStatus: e.httpStatus,
...role,
};
});
})
- .catch(e => {
+ .catch((e) => {
if (e.httpStatus !== 403 && role.action === 'ADD') {
// If role doesn't yet exist, create it with this transformation attached
var newRole = this.store.createRecord('transform/role', {
@@ -42,7 +42,7 @@ export default TransformBase.extend({
transformations: [transformationId],
backend,
});
- return newRole.save().catch(e => {
+ return newRole.save().catch((e) => {
return {
errorStatus: e.httpStatus,
...role,
@@ -61,15 +61,15 @@ export default TransformBase.extend({
handleUpdateRoles(updateRoles, transformationId) {
if (!updateRoles) return;
const backend = this.model.backend;
- const promises = updateRoles.map(r => this.updateOrCreateRole(r, transformationId, backend));
+ const promises = updateRoles.map((r) => this.updateOrCreateRole(r, transformationId, backend));
- Promise.all(promises).then(results => {
- let hasError = results.find(role => !!role.errorStatus);
+ Promise.all(promises).then((results) => {
+ let hasError = results.find((role) => !!role.errorStatus);
if (hasError) {
let message =
'The edits to this transformation were successful, but transformations for its roles was not edited due to a lack of permissions.';
- if (results.find(e => !!e.errorStatus && e.errorStatus !== 403)) {
+ if (results.find((e) => !!e.errorStatus && e.errorStatus !== 403)) {
// if the errors weren't all due to permissions show generic message
// eg. trying to update a role with empty array as transformations
message = `You've edited the allowed_roles for this transformation. However, the corresponding edits to some roles' transformations were not made`;
@@ -99,8 +99,8 @@ export default TransformBase.extend({
const initialRoles = this.initialRoles || [];
const updateRoles = [...newModelRoles, ...initialRoles]
- .filter(r => !this.isWildcard(r)) // CBS TODO: expand wildcards into included roles instead
- .map(role => {
+ .filter((r) => !this.isWildcard(r)) // CBS TODO: expand wildcards into included roles instead
+ .map((role) => {
if (initialRoles.indexOf(role) < 0) {
return {
id: role,
@@ -115,7 +115,7 @@ export default TransformBase.extend({
}
return null;
})
- .filter(r => !!r);
+ .filter((r) => !!r);
this.handleUpdateRoles(updateRoles, transformationId);
});
},
diff --git a/ui/app/components/transit-edit.js b/ui/app/components/transit-edit.js
index c854a20957..a317dacdc1 100644
--- a/ui/app/components/transit-edit.js
+++ b/ui/app/components/transit-edit.js
@@ -27,7 +27,7 @@ export default Component.extend(FocusOnInsertMixin, {
}
},
- waitForKeyUp: task(function*() {
+ waitForKeyUp: task(function* () {
while (true) {
let event = yield waitForEvent(document.body, 'keyup');
this.onEscape(event);
diff --git a/ui/app/components/transit-key-actions.js b/ui/app/components/transit-key-actions.js
index 6872e5390a..1fd3894923 100644
--- a/ui/app/components/transit-key-actions.js
+++ b/ui/app/components/transit-key-actions.js
@@ -92,7 +92,7 @@ export default Component.extend(TRANSIT_PARAMS, {
});
},
- keyIsRSA: computed('key.type', function() {
+ keyIsRSA: computed('key.type', function () {
let type = this.key.type;
return type === 'rsa-2048' || type === 'rsa-3072' || type === 'rsa-4096';
}),
@@ -134,7 +134,7 @@ export default Component.extend(TRANSIT_PARAMS, {
}
if (paramsToKeep) {
- paramsToKeep.forEach(param => delete params[param]);
+ paramsToKeep.forEach((param) => delete params[param]);
}
//resets params still left in the object to defaults
this.clearErrors();
@@ -170,8 +170,10 @@ export default Component.extend(TRANSIT_PARAMS, {
if (options.wrapTTL) {
props = assign({}, props, { wrappedToken: resp.wrap_info.token });
}
- this.toggleProperty('isModalActive');
- this.setProperties(props);
+ if (!this.isDestroyed && !this.isDestroying) {
+ this.toggleProperty('isModalActive');
+ this.setProperties(props);
+ }
if (action === 'rotate') {
this.onRefresh();
}
@@ -204,7 +206,7 @@ export default Component.extend(TRANSIT_PARAMS, {
clearParams(params) {
const arr = Array.isArray(params) ? params : [params];
- arr.forEach(param => this.set(param, null));
+ arr.forEach((param) => this.set(param, null));
},
toggleModal(successMessage) {
@@ -235,7 +237,7 @@ export default Component.extend(TRANSIT_PARAMS, {
.adapterFor('transit-key')
.keyAction(action, { backend, id, payload }, options)
.then(
- resp => this.handleSuccess(resp, options, action),
+ (resp) => this.handleSuccess(resp, options, action),
(...errArgs) => this.handleError(...errArgs)
);
},
diff --git a/ui/app/components/wizard-content.js b/ui/app/components/wizard-content.js
index a257e4dd31..98ec13b33b 100644
--- a/ui/app/components/wizard-content.js
+++ b/ui/app/components/wizard-content.js
@@ -18,7 +18,7 @@ export default Component.extend({
'tutorialComponent',
'tutorialState',
'wizard.{featureComponent,featureMachineHistory}',
- function() {
+ function () {
if (!this.tutorialComponent) return;
return (
this.tutorialComponent.includes('active') &&
@@ -29,35 +29,40 @@ export default Component.extend({
),
featureMachineHistory: alias('wizard.featureMachineHistory'),
totalFeatures: reads('wizard.featureList.length'),
- completedFeatures: computed('wizard.currentMachine', function() {
+ completedFeatures: computed('wizard.currentMachine', function () {
return this.wizard.getCompletedFeatures();
}),
- currentFeatureProgress: computed('currentMachine', 'featureMachineHistory.[]', 'tutorialState', function() {
- if (this.tutorialState.includes('active.feature')) {
- let totalSteps = FEATURE_MACHINE_STEPS[this.currentMachine];
- if (this.currentMachine === 'secrets') {
- if (this.featureMachineHistory.includes('secret')) {
- totalSteps = totalSteps['secret']['secret'];
- }
- if (this.featureMachineHistory.includes('list')) {
- totalSteps = totalSteps['secret']['list'];
- }
- if (this.featureMachineHistory.includes('encryption')) {
- totalSteps = totalSteps['encryption'];
- }
- if (this.featureMachineHistory.includes('role') || typeof totalSteps === 'object') {
- totalSteps = totalSteps['role'];
+ currentFeatureProgress: computed(
+ 'currentMachine',
+ 'featureMachineHistory.[]',
+ 'tutorialState',
+ function () {
+ if (this.tutorialState.includes('active.feature')) {
+ let totalSteps = FEATURE_MACHINE_STEPS[this.currentMachine];
+ if (this.currentMachine === 'secrets') {
+ if (this.featureMachineHistory.includes('secret')) {
+ totalSteps = totalSteps['secret']['secret'];
+ }
+ if (this.featureMachineHistory.includes('list')) {
+ totalSteps = totalSteps['secret']['list'];
+ }
+ if (this.featureMachineHistory.includes('encryption')) {
+ totalSteps = totalSteps['encryption'];
+ }
+ if (this.featureMachineHistory.includes('role') || typeof totalSteps === 'object') {
+ totalSteps = totalSteps['role'];
+ }
}
+ return {
+ percentage: (this.featureMachineHistory.length / totalSteps) * 100,
+ feature: this.currentMachine,
+ text: `Step ${this.featureMachineHistory.length} of ${totalSteps}`,
+ };
}
- return {
- percentage: (this.featureMachineHistory.length / totalSteps) * 100,
- feature: this.currentMachine,
- text: `Step ${this.featureMachineHistory.length} of ${totalSteps}`,
- };
+ return null;
}
- return null;
- }),
- currentTutorialProgress: computed('tutorialState', function() {
+ ),
+ currentTutorialProgress: computed('tutorialState', function () {
if (this.tutorialState.includes('init.active')) {
let currentStepName = this.tutorialState.split('.')[2];
let currentStepNumber = INIT_STEPS.indexOf(currentStepName) + 1;
@@ -75,7 +80,7 @@ export default Component.extend({
'currentMachine',
'currentTutorialProgress.percentage',
'wizard.featureList',
- function() {
+ function () {
let bar = [];
if (this.currentTutorialProgress) {
bar.push({
@@ -85,10 +90,10 @@ export default Component.extend({
});
} else {
if (this.currentFeatureProgress) {
- this.completedFeatures.forEach(feature => {
+ this.completedFeatures.forEach((feature) => {
bar.push({ style: htmlSafe('width:100%;'), completed: true, feature: feature, showIcon: true });
});
- this.wizard.featureList.forEach(feature => {
+ this.wizard.featureList.forEach((feature) => {
if (feature === this.currentMachine) {
bar.push({
style: htmlSafe(`width:${this.currentFeatureProgress.percentage}%;`),
diff --git a/ui/app/components/wizard/features-selection.js b/ui/app/components/wizard/features-selection.js
index acd16cd0f2..4f7a528faa 100644
--- a/ui/app/components/wizard/features-selection.js
+++ b/ui/app/components/wizard/features-selection.js
@@ -17,7 +17,7 @@ export default Component.extend({
maybeHideFeatures() {
let features = this.allFeatures;
- features.forEach(feat => {
+ features.forEach((feat) => {
feat.disabled = this.doesNotHavePermission(feat.requiredPermissions);
});
@@ -34,12 +34,12 @@ export default Component.extend({
// 'example/path': ['capability'],
// 'second/example/path': ['update', 'sudo'],
// }
- return !Object.keys(requiredPermissions).every(path => {
+ return !Object.keys(requiredPermissions).every((path) => {
return this.permissions.hasPermission(path, requiredPermissions[path]);
});
},
- estimatedTime: computed('selectedFeatures', function() {
+ estimatedTime: computed('selectedFeatures', function () {
let time = 0;
for (let feature of Object.keys(FEATURE_MACHINE_TIME)) {
if (this.selectedFeatures.includes(feature)) {
@@ -48,8 +48,8 @@ export default Component.extend({
}
return time;
}),
- selectProgress: computed('selectedFeatures', function() {
- let bar = this.selectedFeatures.map(feature => {
+ selectProgress: computed('selectedFeatures', function () {
+ let bar = this.selectedFeatures.map((feature) => {
return { style: htmlSafe('width:0%;'), completed: false, showIcon: true, feature: feature };
});
if (bar.length === 0) {
@@ -57,7 +57,7 @@ export default Component.extend({
}
return bar;
}),
- allFeatures: computed(function() {
+ allFeatures: computed(function () {
return [
{
key: 'secrets',
@@ -129,7 +129,7 @@ export default Component.extend({
showReplication: or('version.hasPerfReplication', 'version.hasDRReplication'),
- selectedFeatures: computed('allFeatures.@each.selected', function() {
+ selectedFeatures: computed('allFeatures.@each.selected', function () {
return this.allFeatures.filterBy('selected').mapBy('key');
}),
diff --git a/ui/app/components/wizard/mounts-wizard.js b/ui/app/components/wizard/mounts-wizard.js
index 657ade04e1..8e76528aa5 100644
--- a/ui/app/components/wizard/mounts-wizard.js
+++ b/ui/app/components/wizard/mounts-wizard.js
@@ -17,33 +17,33 @@ export default Component.extend({
mountSubtype: alias('wizard.componentState'),
fullNextStep: alias('wizard.nextStep'),
nextFeature: alias('wizard.nextFeature'),
- nextStep: computed('fullNextStep', function() {
+ nextStep: computed('fullNextStep', function () {
return this.fullNextStep.split('.').lastObject;
}),
needsConnection: equal('mountSubtype', 'database'),
needsEncryption: equal('mountSubtype', 'transit'),
stepComponent: alias('wizard.stepComponent'),
- detailsComponent: computed('currentMachine', 'mountSubtype', function() {
+ detailsComponent: computed('currentMachine', 'mountSubtype', function () {
let suffix = this.currentMachine === 'secrets' ? 'engine' : 'method';
return this.mountSubtype ? `wizard/${this.mountSubtype}-${suffix}` : null;
}),
- isSupported: computed('currentMachine', 'mountSubtype', function() {
+ isSupported: computed('currentMachine', 'mountSubtype', function () {
if (this.currentMachine === 'secrets') {
return supportedSecrets.includes(this.mountSubtype);
} else {
return supportedAuth.includes(this.mountSubtype);
}
}),
- mountName: computed('currentMachine', 'mountSubtype', function() {
+ mountName: computed('currentMachine', 'mountSubtype', function () {
if (this.currentMachine === 'secrets') {
- var secret = engines().find(engine => {
+ var secret = engines().find((engine) => {
return engine.type === this.mountSubtype;
});
if (secret) {
return secret.displayName;
}
} else {
- var auth = methods().find(method => {
+ var auth = methods().find((method) => {
return method.type === this.mountSubtype;
});
if (auth) {
@@ -52,7 +52,7 @@ export default Component.extend({
}
return null;
}),
- actionText: computed('mountSubtype', function() {
+ actionText: computed('mountSubtype', function () {
switch (this.mountSubtype) {
case 'aws':
return 'Generate credential';
diff --git a/ui/app/components/wrap-ttl.js b/ui/app/components/wrap-ttl.js
index 1b6a625c16..19b5afb74a 100644
--- a/ui/app/components/wrap-ttl.js
+++ b/ui/app/components/wrap-ttl.js
@@ -10,7 +10,7 @@ export default Component.extend({
ttl: '30m',
- wrapTTL: computed('wrapResponse', 'ttl', function() {
+ wrapTTL: computed('wrapResponse', 'ttl', function () {
const { wrapResponse, ttl } = this;
return wrapResponse ? ttl : null;
}),
diff --git a/ui/app/controllers/application.js b/ui/app/controllers/application.js
index c800ccf482..22643644c6 100644
--- a/ui/app/controllers/application.js
+++ b/ui/app/controllers/application.js
@@ -7,11 +7,11 @@ export default Controller.extend({
env: config.environment,
auth: service(),
store: service(),
- activeCluster: computed('auth.activeCluster', function() {
+ activeCluster: computed('auth.activeCluster', function () {
let id = this.auth.activeCluster;
return id ? this.store.peekRecord('cluster', id) : null;
}),
- activeClusterName: computed('activeCluster', function() {
+ activeClusterName: computed('activeCluster', function () {
const activeCluster = this.activeCluster;
return activeCluster ? activeCluster.get('name') : null;
}),
diff --git a/ui/app/controllers/vault.js b/ui/app/controllers/vault.js
index 4189d0b207..827eace50f 100644
--- a/ui/app/controllers/vault.js
+++ b/ui/app/controllers/vault.js
@@ -15,11 +15,11 @@ export default Controller.extend({
env: config.environment,
auth: service(),
store: service(),
- activeCluster: computed('auth.activeCluster', function() {
+ activeCluster: computed('auth.activeCluster', function () {
let id = this.auth.activeCluster;
return id ? this.store.peekRecord('cluster', id) : null;
}),
- activeClusterName: computed('activeCluster', function() {
+ activeClusterName: computed('activeCluster', function () {
const activeCluster = this.activeCluster;
return activeCluster ? activeCluster.get('name') : null;
}),
diff --git a/ui/app/controllers/vault/cluster.js b/ui/app/controllers/vault/cluster.js
index fd3d32463b..8528655e82 100644
--- a/ui/app/controllers/vault/cluster.js
+++ b/ui/app/controllers/vault/cluster.js
@@ -25,17 +25,17 @@ export default Controller.extend({
namespaceQueryParam: '',
- onQPChange: observer('namespaceQueryParam', function() {
+ onQPChange: observer('namespaceQueryParam', function () {
this.namespaceService.setNamespace(this.namespaceQueryParam);
}),
consoleOpen: alias('console.isOpen'),
- activeCluster: computed('auth.activeCluster', function() {
+ activeCluster: computed('auth.activeCluster', function () {
return this.store.peekRecord('cluster', this.auth.activeCluster);
}),
- activeClusterName: computed('activeCluster', function() {
+ activeClusterName: computed('activeCluster', function () {
const activeCluster = this.activeCluster;
return activeCluster ? activeCluster.get('name') : null;
}),
@@ -45,7 +45,7 @@ export default Controller.extend({
'activeClusterName',
'auth.currentToken',
'activeCluster.{dr.isSecondary,needsInit,sealed}',
- function() {
+ function () {
if (this.activeCluster.dr?.isSecondary || this.activeCluster.needsInit || this.activeCluster.sealed) {
return false;
}
diff --git a/ui/app/controllers/vault/cluster/access/identity/create.js b/ui/app/controllers/vault/cluster/access/identity/create.js
index 0c6a1a89ca..704c262949 100644
--- a/ui/app/controllers/vault/cluster/access/identity/create.js
+++ b/ui/app/controllers/vault/cluster/access/identity/create.js
@@ -4,7 +4,7 @@ import { task } from 'ember-concurrency';
export default Controller.extend({
showRoute: 'vault.cluster.access.identity.show',
showTab: 'details',
- navAfterSave: task(function*({ saveType, model }) {
+ navAfterSave: task(function* ({ saveType, model }) {
let isDelete = saveType === 'delete';
let type = model.get('identityType');
let listRoutes = {
diff --git a/ui/app/controllers/vault/cluster/access/identity/index.js b/ui/app/controllers/vault/cluster/access/identity/index.js
index 155d3b1622..bd00ce7c60 100644
--- a/ui/app/controllers/vault/cluster/access/identity/index.js
+++ b/ui/app/controllers/vault/cluster/access/identity/index.js
@@ -15,7 +15,7 @@ export default Controller.extend(ListController, {
this.send('reload');
this.flashMessages.success(`Successfully deleted ${type}: ${id}`);
})
- .catch(e => {
+ .catch((e) => {
this.flashMessages.success(
`There was a problem deleting ${type}: ${id} - ${e.errors.join(' ') || e.message}`
);
@@ -33,7 +33,7 @@ export default Controller.extend(ListController, {
.then(() => {
this.flashMessages.success(`Successfully ${action[0]} ${type}: ${id}`);
})
- .catch(e => {
+ .catch((e) => {
this.flashMessages.success(
`There was a problem ${action[1]} ${type}: ${id} - ${e.errors.join(' ') || e.message}`
);
diff --git a/ui/app/controllers/vault/cluster/access/leases/list.js b/ui/app/controllers/vault/cluster/access/leases/list.js
index 80232bb523..5fa6c5cbb7 100644
--- a/ui/app/controllers/vault/cluster/access/leases/list.js
+++ b/ui/app/controllers/vault/cluster/access/leases/list.js
@@ -9,7 +9,7 @@ export default Controller.extend(ListController, {
store: service(),
clusterController: controller('vault.cluster'),
- backendCrumb: computed('clusterController.model.name', function() {
+ backendCrumb: computed('clusterController.model.name', function () {
return {
label: 'leases',
text: 'leases',
@@ -20,11 +20,11 @@ export default Controller.extend(ListController, {
isLoading: false,
- filterIsFolder: computed('filter', function() {
+ filterIsFolder: computed('filter', function () {
return !!utils.keyIsFolder(this.filter);
}),
- emptyTitle: computed('baseKey.id', 'filter', 'filterIsFolder', function() {
+ emptyTitle: computed('baseKey.id', 'filter', 'filterIsFolder', function () {
let id = this.baseKey.id;
let filter = this.filter;
if (id === '') {
@@ -51,7 +51,7 @@ export default Controller.extend(ListController, {
this.flashMessages.success(`All of the leases under ${prefix} will be revoked.`);
});
})
- .catch(e => {
+ .catch((e) => {
const errString = e.errors.join('.');
this.flashMessages.danger(
`There was an error attempting to revoke the prefix: ${prefix}. ${errString}.`
diff --git a/ui/app/controllers/vault/cluster/access/leases/show.js b/ui/app/controllers/vault/cluster/access/leases/show.js
index 45ab19adce..5ce78487c6 100644
--- a/ui/app/controllers/vault/cluster/access/leases/show.js
+++ b/ui/app/controllers/vault/cluster/access/leases/show.js
@@ -6,7 +6,7 @@ import Controller, { inject as controller } from '@ember/controller';
export default Controller.extend({
clusterController: controller('vault.cluster'),
- backendCrumb: computed('clusterController.model.name', function() {
+ backendCrumb: computed('clusterController.model.name', function () {
return {
label: 'leases',
text: 'leases',
@@ -36,7 +36,7 @@ export default Controller.extend({
flash.success(`The lease ${model.id} was successfully renewed.`);
});
})
- .catch(e => {
+ .catch((e) => {
const errString = e.errors.join('.');
flash.danger(`There was an error renewing the lease: ${errString}`);
});
diff --git a/ui/app/controllers/vault/cluster/access/methods.js b/ui/app/controllers/vault/cluster/access/methods.js
index 15d47023fc..222874afc8 100644
--- a/ui/app/controllers/vault/cluster/access/methods.js
+++ b/ui/app/controllers/vault/cluster/access/methods.js
@@ -11,7 +11,7 @@ export default Controller.extend({
pageFilter: null,
filter: null,
- disableMethod: task(function*(method) {
+ disableMethod: task(function* (method) {
const { type, path } = method;
try {
yield method.destroyRecord();
diff --git a/ui/app/controllers/vault/cluster/auth.js b/ui/app/controllers/vault/cluster/auth.js
index 7bd0726c0b..103fff8275 100644
--- a/ui/app/controllers/vault/cluster/auth.js
+++ b/ui/app/controllers/vault/cluster/auth.js
@@ -26,7 +26,7 @@ export default Controller.extend({
return '';
},
- updateManagedNamespace: task(function*(value) {
+ updateManagedNamespace: task(function* (value) {
// debounce
yield timeout(500);
// TODO: Move this to shared fn
@@ -35,7 +35,7 @@ export default Controller.extend({
this.set('namespaceQueryParam', newNamespace);
}).restartable(),
- updateNamespace: task(function*(value) {
+ updateNamespace: task(function* (value) {
// debounce
yield timeout(500);
this.namespaceService.setNamespace(value, true);
diff --git a/ui/app/controllers/vault/cluster/init.js b/ui/app/controllers/vault/cluster/init.js
index 41f2dee36b..6f5d488bbe 100644
--- a/ui/app/controllers/vault/cluster/init.js
+++ b/ui/app/controllers/vault/cluster/init.js
@@ -35,7 +35,7 @@ export default Controller.extend(DEFAULTS, {
}
},
- keyFilename: computed('model.name', function() {
+ keyFilename: computed('model.name', function () {
return `vault-cluster-${this.model.name}`;
}),
@@ -78,7 +78,10 @@ export default Controller.extend(DEFAULTS, {
store
.adapterFor('cluster')
.initCluster(data)
- .then(resp => this.initSuccess(resp), (...errArgs) => this.initError(...errArgs));
+ .then(
+ (resp) => this.initSuccess(resp),
+ (...errArgs) => this.initError(...errArgs)
+ );
},
setKeys(data) {
diff --git a/ui/app/controllers/vault/cluster/policies/index.js b/ui/app/controllers/vault/cluster/policies/index.js
index f7060a76b7..c079e39bc2 100644
--- a/ui/app/controllers/vault/cluster/policies/index.js
+++ b/ui/app/controllers/vault/cluster/policies/index.js
@@ -20,13 +20,13 @@ export default Controller.extend({
// set via the route `loading` action
isLoading: false,
- filterMatchesKey: computed('filter', 'model', 'model.[]', function() {
+ filterMatchesKey: computed('filter', 'model', 'model.[]', function () {
var filter = this.filter;
var content = this.model;
return !!(content && content.length && content.findBy('id', filter));
}),
- firstPartialMatch: computed('filter', 'model', 'model.[]', 'filterMatchesKey', function() {
+ firstPartialMatch: computed('filter', 'model', 'model.[]', 'filterMatchesKey', function () {
var filter = this.filter;
var content = this.model;
if (!content) {
@@ -36,16 +36,16 @@ export default Controller.extend({
var re = new RegExp('^' + filter);
return filterMatchesKey
? null
- : content.find(function(key) {
+ : content.find(function (key) {
return re.test(key.get('id'));
});
}),
actions: {
- setFilter: function(val) {
+ setFilter: function (val) {
this.set('filter', val);
},
- setFilterFocus: function(bool) {
+ setFilterFocus: function (bool) {
this.set('filterFocused', bool);
},
deletePolicy(model) {
@@ -62,7 +62,7 @@ export default Controller.extend({
this.wizard.transitionFeatureMachine('delete', 'CONTINUE', policyType);
}
})
- .catch(e => {
+ .catch((e) => {
let errors = e.errors ? e.errors.join('') : e.message;
flash.danger(
`There was an error deleting the ${policyType.toUpperCase()} policy "${name}": ${errors}.`
diff --git a/ui/app/controllers/vault/cluster/secrets/backend/actions.js b/ui/app/controllers/vault/cluster/secrets/backend/actions.js
index 17f11291f3..b272f7ca48 100644
--- a/ui/app/controllers/vault/cluster/secrets/backend/actions.js
+++ b/ui/app/controllers/vault/cluster/secrets/backend/actions.js
@@ -7,7 +7,7 @@ export default Controller.extend(BackendCrumbMixin, {
},
actions: {
- refresh: function() {
+ refresh: function () {
// closure actions don't bubble to routes,
// so we have to manually bubble here
this.send('refreshModel');
diff --git a/ui/app/controllers/vault/cluster/secrets/backend/configuration.js b/ui/app/controllers/vault/cluster/secrets/backend/configuration.js
index 2f27f26bcc..84f7cdeac4 100644
--- a/ui/app/controllers/vault/cluster/secrets/backend/configuration.js
+++ b/ui/app/controllers/vault/cluster/secrets/backend/configuration.js
@@ -2,7 +2,7 @@ import { computed } from '@ember/object';
import Controller from '@ember/controller';
export default Controller.extend({
- isConfigurable: computed('model.type', function() {
+ isConfigurable: computed('model.type', function () {
const configurableEngines = ['aws', 'ssh', 'pki'];
return configurableEngines.includes(this.model.type);
}),
diff --git a/ui/app/controllers/vault/cluster/secrets/backend/create.js b/ui/app/controllers/vault/cluster/secrets/backend/create.js
index 0cb8fd2ab1..5002b9b30d 100644
--- a/ui/app/controllers/vault/cluster/secrets/backend/create.js
+++ b/ui/app/controllers/vault/cluster/secrets/backend/create.js
@@ -9,7 +9,7 @@ export default Controller.extend(BackendCrumbMixin, {
itemType: '',
actions: {
- refresh: function() {
+ refresh: function () {
this.send('refreshModel');
},
toggleAdvancedEdit(bool) {
diff --git a/ui/app/controllers/vault/cluster/secrets/backend/edit.js b/ui/app/controllers/vault/cluster/secrets/backend/edit.js
index cd99bfbe73..f7eb5bd848 100644
--- a/ui/app/controllers/vault/cluster/secrets/backend/edit.js
+++ b/ui/app/controllers/vault/cluster/secrets/backend/edit.js
@@ -9,7 +9,7 @@ export default Controller.extend(BackendCrumbMixin, {
this.set('version', '');
},
actions: {
- refresh: function() {
+ refresh: function () {
// closure actions don't bubble to routes,
// so we have to manually bubble here
this.send('refreshModel');
diff --git a/ui/app/controllers/vault/cluster/secrets/backend/list.js b/ui/app/controllers/vault/cluster/secrets/backend/list.js
index 77261d4960..a48f1edaf5 100644
--- a/ui/app/controllers/vault/cluster/secrets/backend/list.js
+++ b/ui/app/controllers/vault/cluster/secrets/backend/list.js
@@ -13,7 +13,7 @@ export default Controller.extend(ListController, BackendCrumbMixin, WithNavToNea
tab: '',
- filterIsFolder: computed('filter', function() {
+ filterIsFolder: computed('filter', function () {
return !!utils.keyIsFolder(this.filter);
}),
@@ -29,7 +29,7 @@ export default Controller.extend(ListController, BackendCrumbMixin, WithNavToNea
this.set('loading-' + item.id, true);
backend
.saveZeroAddressConfig()
- .catch(e => {
+ .catch((e) => {
item.set('zeroAddress', false);
this.flashMessages.danger(e.message);
})
diff --git a/ui/app/controllers/vault/cluster/secrets/backend/show.js b/ui/app/controllers/vault/cluster/secrets/backend/show.js
index 6f7ab2c06a..b96ff32dc3 100644
--- a/ui/app/controllers/vault/cluster/secrets/backend/show.js
+++ b/ui/app/controllers/vault/cluster/secrets/backend/show.js
@@ -13,7 +13,7 @@ export default Controller.extend(BackendCrumbMixin, {
this.set('type', '');
},
actions: {
- refresh: function() {
+ refresh: function () {
// closure actions don't bubble to routes,
// so we have to manually bubble here
this.send('refreshModel');
diff --git a/ui/app/controllers/vault/cluster/secrets/backends.js b/ui/app/controllers/vault/cluster/secrets/backends.js
index 474cabdba1..d3daf50134 100644
--- a/ui/app/controllers/vault/cluster/secrets/backends.js
+++ b/ui/app/controllers/vault/cluster/secrets/backends.js
@@ -8,9 +8,9 @@ const LINKED_BACKENDS = supportedSecretBackends();
export default Controller.extend({
displayableBackends: filterBy('model', 'shouldIncludeInList'),
- supportedBackends: computed('displayableBackends', 'displayableBackends.[]', function() {
+ supportedBackends: computed('displayableBackends', 'displayableBackends.[]', function () {
return (this.displayableBackends || [])
- .filter(backend => LINKED_BACKENDS.includes(backend.get('engineType')))
+ .filter((backend) => LINKED_BACKENDS.includes(backend.get('engineType')))
.sortBy('id');
}),
@@ -19,15 +19,12 @@ export default Controller.extend({
'displayableBackends.[]',
'supportedBackends',
'supportedBackends.[]',
- function() {
- return (this.displayableBackends || [])
- .slice()
- .removeObjects(this.supportedBackends)
- .sortBy('id');
+ function () {
+ return (this.displayableBackends || []).slice().removeObjects(this.supportedBackends).sortBy('id');
}
),
- disableEngine: task(function*(engine) {
+ disableEngine: task(function* (engine) {
const { engineType, path } = engine;
try {
yield engine.destroyRecord();
diff --git a/ui/app/controllers/vault/cluster/settings/auth/enable.js b/ui/app/controllers/vault/cluster/settings/auth/enable.js
index 9d3153678f..4d236128db 100644
--- a/ui/app/controllers/vault/cluster/settings/auth/enable.js
+++ b/ui/app/controllers/vault/cluster/settings/auth/enable.js
@@ -4,7 +4,7 @@ import Controller from '@ember/controller';
export default Controller.extend({
wizard: service(),
actions: {
- onMountSuccess: function(type, path) {
+ onMountSuccess: function (type, path) {
this.wizard.transitionFeatureMachine(this.wizard.featureState, 'CONTINUE', type);
let transition = this.transitionToRoute('vault.cluster.settings.auth.configure', path);
return transition.followRedirects();
diff --git a/ui/app/controllers/vault/cluster/settings/configure-secret-backend.js b/ui/app/controllers/vault/cluster/settings/configure-secret-backend.js
index 2e488fc6d8..9ce582a1d6 100644
--- a/ui/app/controllers/vault/cluster/settings/configure-secret-backend.js
+++ b/ui/app/controllers/vault/cluster/settings/configure-secret-backend.js
@@ -43,7 +43,7 @@ export default Controller.extend(CONFIG_ATTRS, {
save(method, data) {
this.set('loading', true);
- const hasData = Object.keys(data).some(key => {
+ const hasData = Object.keys(data).some((key) => {
return isPresent(data[key]);
});
if (!hasData) {
diff --git a/ui/app/controllers/vault/cluster/settings/mount-secret-backend.js b/ui/app/controllers/vault/cluster/settings/mount-secret-backend.js
index db37aa2cae..a2d7562337 100644
--- a/ui/app/controllers/vault/cluster/settings/mount-secret-backend.js
+++ b/ui/app/controllers/vault/cluster/settings/mount-secret-backend.js
@@ -7,7 +7,7 @@ const SUPPORTED_BACKENDS = supportedSecretBackends();
export default Controller.extend({
wizard: service(),
actions: {
- onMountSuccess: function(type, path) {
+ onMountSuccess: function (type, path) {
let transition;
if (SUPPORTED_BACKENDS.includes(type)) {
if (type === 'kmip') {
diff --git a/ui/app/helpers/filter-wildcard.js b/ui/app/helpers/filter-wildcard.js
index b7cf0c72b6..bb3f4ab15f 100644
--- a/ui/app/helpers/filter-wildcard.js
+++ b/ui/app/helpers/filter-wildcard.js
@@ -8,8 +8,8 @@ export function filterWildcard([string, array]) {
string = { id: string };
}
let stringId = string.id;
- const filterBy = stringId =>
- array.filter(item => new RegExp('^' + stringId.replace(/\*/g, '.*') + '$').test(item));
+ const filterBy = (stringId) =>
+ array.filter((item) => new RegExp('^' + stringId.replace(/\*/g, '.*') + '$').test(item));
return filterBy(stringId).length;
}
diff --git a/ui/app/helpers/has-permission.js b/ui/app/helpers/has-permission.js
index 091285dcd0..e528dfaaf1 100644
--- a/ui/app/helpers/has-permission.js
+++ b/ui/app/helpers/has-permission.js
@@ -9,7 +9,7 @@ export default Helper.extend({
'permissions.exactPaths',
'permissions.globPaths',
'permissions.canViewAll',
- function() {
+ function () {
this.recompute();
}
),
diff --git a/ui/app/helpers/is-after.js b/ui/app/helpers/is-after.js
index e6e21ee437..4916659d78 100644
--- a/ui/app/helpers/is-after.js
+++ b/ui/app/helpers/is-after.js
@@ -2,7 +2,7 @@ import DateBase from './-date-base';
import { isAfter } from 'date-fns';
export default DateBase.extend({
- compute: function([date1, date2]) {
+ compute: function ([date1, date2]) {
this._super(...arguments);
return isAfter(date1, date2);
diff --git a/ui/app/helpers/is-before.js b/ui/app/helpers/is-before.js
index 440f12c8dc..334c3c9626 100644
--- a/ui/app/helpers/is-before.js
+++ b/ui/app/helpers/is-before.js
@@ -2,7 +2,7 @@ import DateBase from './-date-base';
import { isBefore } from 'date-fns';
export default DateBase.extend({
- compute: function([date1, date2]) {
+ compute: function ([date1, date2]) {
this._super(...arguments);
return isBefore(date1, date2);
diff --git a/ui/app/helpers/is-wildcard-string.js b/ui/app/helpers/is-wildcard-string.js
index 8ba9752f41..f103574146 100644
--- a/ui/app/helpers/is-wildcard-string.js
+++ b/ui/app/helpers/is-wildcard-string.js
@@ -1,6 +1,6 @@
import { helper as buildHelper } from '@ember/component/helper';
-export function isWildcardString(string) {
+export function isWildcardString([string]) {
if (!string) {
return false;
}
diff --git a/ui/app/helpers/split-object.js b/ui/app/helpers/split-object.js
index 8da0401f1f..6a7cbfaa8f 100644
--- a/ui/app/helpers/split-object.js
+++ b/ui/app/helpers/split-object.js
@@ -19,7 +19,7 @@ export function splitObject(originalObject, array) {
let object2 = {};
// convert object to key's array
let keys = Object.keys(originalObject);
- keys.forEach(key => {
+ keys.forEach((key) => {
if (array.includes(key)) {
object1[key] = originalObject[key];
} else {
diff --git a/ui/app/helpers/tabs-for-auth-section.js b/ui/app/helpers/tabs-for-auth-section.js
index 7f08e0b414..8bd32885f5 100644
--- a/ui/app/helpers/tabs-for-auth-section.js
+++ b/ui/app/helpers/tabs-for-auth-section.js
@@ -87,12 +87,12 @@ export function tabsForAuthSection([model, sectionType = 'authSettings', paths])
}
if (paths || model.paths) {
if (model.paths) {
- paths = model.paths.paths.filter(path => path.navigation);
+ paths = model.paths.paths.filter((path) => path.navigation);
}
// TODO: we're unsure if we actually need compact here
// but are leaving it just in case OpenAPI ever returns an empty thing
- tabs = paths.compact().map(path => {
+ tabs = paths.compact().map((path) => {
return {
label: capitalize(pluralize(path.itemName)),
routeParams: ['vault.cluster.access.method.item.list', path.itemType],
diff --git a/ui/app/initializers/deprecation-filter.js b/ui/app/initializers/deprecation-filter.js
new file mode 100644
index 0000000000..a5c6fdb377
--- /dev/null
+++ b/ui/app/initializers/deprecation-filter.js
@@ -0,0 +1,15 @@
+import { registerDeprecationHandler } from '@ember/debug';
+
+// https://guides.emberjs.com/release/configuring-ember/handling-deprecations/#toc_filtering-deprecations
+export function initialize() {
+ registerDeprecationHandler((message, options, next) => {
+ // filter deprecations that are scheduled to be removed in a specific version
+ // when upgrading or addressing deprecation warnings be sure to update this or remove if not needed
+ if (options?.until !== '4.0.0') {
+ next(message, options);
+ }
+ return;
+ });
+}
+
+export default { initialize };
diff --git a/ui/app/initializers/disable-ember-inspector.js b/ui/app/initializers/disable-ember-inspector.js
index 7cb22c3bd7..739e10b7ca 100644
--- a/ui/app/initializers/disable-ember-inspector.js
+++ b/ui/app/initializers/disable-ember-inspector.js
@@ -2,7 +2,7 @@ import config from '../config/environment';
export default {
name: 'ember-inspect-disable',
- initialize: function() {
+ initialize: function () {
if (config.environment === 'production') {
// disables ember inspector
window.NO_EMBER_DEBUG = true;
diff --git a/ui/app/initializers/enable-engines.js b/ui/app/initializers/enable-engines.js
index 858f36b06d..1c4408db73 100644
--- a/ui/app/initializers/enable-engines.js
+++ b/ui/app/initializers/enable-engines.js
@@ -3,7 +3,7 @@ import config from '../config/environment';
export function initialize(/* application */) {
// attach mount hooks to the environment config
// context will be the router DSL
- config.addRootMounts = function() {
+ config.addRootMounts = function () {
this.mount('replication');
};
}
diff --git a/ui/app/lib/arg-tokenizer.js b/ui/app/lib/arg-tokenizer.js
new file mode 100644
index 0000000000..4a36d0c6f9
--- /dev/null
+++ b/ui/app/lib/arg-tokenizer.js
@@ -0,0 +1,40 @@
+// taken from https://github.com/yargs/yargs-parser/blob/v13.1.0/lib/tokenize-arg-string.js to get around import issue
+// take an un-split argv string and tokenize it.
+export default function (argString) {
+ if (Array.isArray(argString)) return argString;
+
+ argString = argString.trim();
+
+ var i = 0;
+ var prevC = null;
+ var c = null;
+ var opening = null;
+ var args = [];
+
+ for (var ii = 0; ii < argString.length; ii++) {
+ prevC = c;
+ c = argString.charAt(ii);
+
+ // split on spaces unless we're in quotes.
+ if (c === ' ' && !opening) {
+ if (!(prevC === ' ')) {
+ i++;
+ }
+ continue;
+ }
+
+ // don't split the string if we're in matching
+ // opening or closing single and double quotes.
+ if (c === opening) {
+ if (!args[i]) args[i] = '';
+ opening = null;
+ } else if ((c === "'" || c === '"') && !opening) {
+ opening = c;
+ }
+
+ if (!args[i]) args[i] = '';
+ args[i] += c;
+ }
+
+ return args;
+}
diff --git a/ui/app/lib/console-helpers.js b/ui/app/lib/console-helpers.js
index 139fff99e4..4fdbf38ebd 100644
--- a/ui/app/lib/console-helpers.js
+++ b/ui/app/lib/console-helpers.js
@@ -1,5 +1,5 @@
import keys from 'vault/lib/keycodes';
-import argTokenizer from 'yargs-parser/lib/tokenize-arg-string.js';
+import argTokenizer from './arg-tokenizer';
import { parse } from 'shell-quote';
const supportedCommands = ['read', 'write', 'list', 'delete'];
@@ -56,7 +56,7 @@ export function parseCommand(command, shouldThrow) {
let flags = [];
let data = [];
- rest.forEach(arg => {
+ rest.forEach((arg) => {
if (arg.startsWith('-')) {
flags.push(arg);
} else {
@@ -66,7 +66,7 @@ export function parseCommand(command, shouldThrow) {
.split(/=(.+)/)
// if there were quotes, there's an empty string as the last member in the array that we don't want,
// so filter it out
- .filter(str => str !== '')
+ .filter((str) => str !== '')
// glue the data back together
.join('=');
data.push(strippedArg);
diff --git a/ui/app/lib/kv-object.js b/ui/app/lib/kv-object.js
index 27207ee640..9e44eb2b55 100644
--- a/ui/app/lib/kv-object.js
+++ b/ui/app/lib/kv-object.js
@@ -7,7 +7,7 @@ export default ArrayProxy.extend({
if (json && typeOf(json) !== 'object') {
throw new Error('Vault expects data to be formatted as an JSON object.');
}
- let contents = Object.keys(json || []).map(key => {
+ let contents = Object.keys(json || []).map((key) => {
let obj = {
name: key,
value: json[key],
@@ -49,6 +49,6 @@ export default ArrayProxy.extend({
},
isAdvanced() {
- return this.any(item => typeof item.value !== 'string');
+ return this.any((item) => typeof item.value !== 'string');
},
});
diff --git a/ui/app/lib/path-to-tree.js b/ui/app/lib/path-to-tree.js
index 05423c4dfd..aac81b1fdb 100644
--- a/ui/app/lib/path-to-tree.js
+++ b/ui/app/lib/path-to-tree.js
@@ -20,7 +20,7 @@ const DOT_REPLACEMENT = '☃';
// },
// foo1: null,
// }
-export default function(paths) {
+export default function (paths) {
// first sort the list by length, then alphanumeric
let list = paths.slice(0).sort((a, b) => b.length - a.length || b.localeCompare(a));
// then reduce to an array
@@ -29,7 +29,7 @@ export default function(paths) {
// so if we have "foo/bar/baz", both "foo" and "foo/bar"
// won't be included in the list
let tree = list.reduce((accumulator, ns) => {
- let nsWithPrefix = accumulator.find(path => path.startsWith(ns));
+ let nsWithPrefix = accumulator.find((path) => path.startsWith(ns));
// we need to make sure it's a match for the full path part
let isFullMatch = nsWithPrefix && nsWithPrefix.charAt(ns.length) === '/';
if (!isFullMatch) {
@@ -44,7 +44,7 @@ export default function(paths) {
// we'll replace the dots in the paths, then expand the path
// to a nested object that we can then query with Ember.get
return deepmerge.all(
- tree.map(p => {
+ tree.map((p) => {
p = p.replace(/\.+/g, DOT_REPLACEMENT);
return unflatten({ [p]: null }, { delimiter: '/', object: true });
})
diff --git a/ui/app/lib/token-storage.js b/ui/app/lib/token-storage.js
index 69ee4deb7d..a50a5a1c34 100644
--- a/ui/app/lib/token-storage.js
+++ b/ui/app/lib/token-storage.js
@@ -1,7 +1,7 @@
import localStorageWrapper from './local-storage';
import memoryStorage from './memory-storage';
-export default function(type) {
+export default function (type) {
if (type === 'memory') {
return memoryStorage;
}
diff --git a/ui/app/machines/secrets-machine.js b/ui/app/machines/secrets-machine.js
index e50f405f5e..4a40da87b2 100644
--- a/ui/app/machines/secrets-machine.js
+++ b/ui/app/machines/secrets-machine.js
@@ -27,8 +27,8 @@ export default {
],
on: {
CONTINUE: {
- details: { cond: type => supportedBackends.includes(type) },
- list: { cond: type => !supportedBackends.includes(type) },
+ details: { cond: (type) => supportedBackends.includes(type) },
+ list: { cond: (type) => !supportedBackends.includes(type) },
},
},
},
@@ -40,16 +40,16 @@ export default {
on: {
CONTINUE: {
connection: {
- cond: type => type === 'database',
+ cond: (type) => type === 'database',
},
role: {
- cond: type => ['pki', 'aws', 'ssh'].includes(type),
+ cond: (type) => ['pki', 'aws', 'ssh'].includes(type),
},
secret: {
- cond: type => ['kv'].includes(type),
+ cond: (type) => ['kv'].includes(type),
},
encryption: {
- cond: type => type === 'transit',
+ cond: (type) => type === 'transit',
},
},
},
@@ -134,19 +134,19 @@ export default {
on: {
REPEAT: {
connection: {
- cond: type => type === 'database',
+ cond: (type) => type === 'database',
actions: [{ type: 'routeTransition', params: ['vault.cluster.secrets.backend.create-root'] }],
},
role: {
- cond: type => ['pki', 'aws', 'ssh'].includes(type),
+ cond: (type) => ['pki', 'aws', 'ssh'].includes(type),
actions: [{ type: 'routeTransition', params: ['vault.cluster.secrets.backend.create-root'] }],
},
secret: {
- cond: type => ['kv'].includes(type),
+ cond: (type) => ['kv'].includes(type),
actions: [{ type: 'routeTransition', params: ['vault.cluster.secrets.backend.create-root'] }],
},
encryption: {
- cond: type => type === 'transit',
+ cond: (type) => type === 'transit',
actions: [{ type: 'routeTransition', params: ['vault.cluster.secrets.backend.create-root'] }],
},
},
diff --git a/ui/app/macros/identity-capabilities.js b/ui/app/macros/identity-capabilities.js
index f36eb29052..91bb68d67b 100644
--- a/ui/app/macros/identity-capabilities.js
+++ b/ui/app/macros/identity-capabilities.js
@@ -1,5 +1,5 @@
import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
-export default function() {
+export default function () {
return lazyCapabilities(apiPath`identity/${'identityType'}/id/${'id'}`, 'id', 'identityType');
}
diff --git a/ui/app/macros/lazy-capabilities.js b/ui/app/macros/lazy-capabilities.js
index a20fb88ea1..5a4bf376dc 100644
--- a/ui/app/macros/lazy-capabilities.js
+++ b/ui/app/macros/lazy-capabilities.js
@@ -14,7 +14,7 @@
import { maybeQueryRecord } from 'vault/macros/maybe-query-record';
export function apiPath(strings, ...keys) {
- return function(data) {
+ return function (data) {
let dict = data || {};
let result = [strings[0]];
keys.forEach((key, i) => {
@@ -24,11 +24,11 @@ export function apiPath(strings, ...keys) {
};
}
-export default function() {
+export default function () {
let [templateFn, ...keys] = arguments;
return maybeQueryRecord(
'capabilities',
- context => {
+ (context) => {
// pull all context attrs
let contextObject = context.getProperties(...keys);
// remove empty ones
diff --git a/ui/app/mixins/backend-crumb.js b/ui/app/mixins/backend-crumb.js
index f1dfc42eac..1f82d2d721 100644
--- a/ui/app/mixins/backend-crumb.js
+++ b/ui/app/mixins/backend-crumb.js
@@ -2,7 +2,7 @@ import { computed } from '@ember/object';
import Mixin from '@ember/object/mixin';
export default Mixin.create({
- backendCrumb: computed('backend', function() {
+ backendCrumb: computed('backend', function () {
const backend = this.backend;
if (backend === undefined) {
diff --git a/ui/app/mixins/focus-on-insert.js b/ui/app/mixins/focus-on-insert.js
index 0743de5763..5b989ed526 100644
--- a/ui/app/mixins/focus-on-insert.js
+++ b/ui/app/mixins/focus-on-insert.js
@@ -10,7 +10,7 @@ export default Mixin.create({
// uses Ember.on so that we don't have to worry about calling _super if
// didInsertElement is overridden
- focusOnInsert: on('didInsertElement', function() {
+ focusOnInsert: on('didInsertElement', function () {
schedule('afterRender', this, 'focusOnInsertFocus');
}),
diff --git a/ui/app/mixins/key-mixin.js b/ui/app/mixins/key-mixin.js
index c32601fba3..9a88470db5 100644
--- a/ui/app/mixins/key-mixin.js
+++ b/ui/app/mixins/key-mixin.js
@@ -10,7 +10,7 @@ export default Mixin.create({
initialParentKey: null,
- isCreating: computed('initialParentKey', function() {
+ isCreating: computed('initialParentKey', function () {
return this.initialParentKey != null;
}),
@@ -20,29 +20,29 @@ export default Mixin.create({
// rather than using defineProperty for all of these,
// we're just going to hardcode the known keys for the path ('id' and 'path')
- isFolder: computed('id', 'path', function() {
+ isFolder: computed('id', 'path', function () {
return utils.keyIsFolder(this.pathVal());
}),
- keyParts: computed('id', 'path', function() {
+ keyParts: computed('id', 'path', function () {
return utils.keyPartsForKey(this.pathVal());
}),
parentKey: computed('id', 'path', 'isCreating', {
- get: function() {
+ get: function () {
return this.isCreating ? this.initialParentKey : utils.parentKeyForKey(this.pathVal());
},
- set: function(_, value) {
+ set: function (_, value) {
return value;
},
}),
keyWithoutParent: computed('id', 'path', 'parentKey', {
- get: function() {
+ get: function () {
var key = this.pathVal();
return key ? key.replace(this.parentKey, '') : null;
},
- set: function(_, value) {
+ set: function (_, value) {
if (value && value.trim()) {
this.set(this.pathAttr, this.parentKey + value);
} else {
diff --git a/ui/app/mixins/model-boundary-route.js b/ui/app/mixins/model-boundary-route.js
index 9166d1bf1f..6461ef9fa4 100644
--- a/ui/app/mixins/model-boundary-route.js
+++ b/ui/app/mixins/model-boundary-route.js
@@ -19,7 +19,7 @@ export default Mixin.create({
modelType: null,
modelTypes: null,
- verifyProps: on('init', function() {
+ verifyProps: on('init', function () {
var modelType = this.modelType;
var modelTypes = this.modelTypes;
warn(
@@ -37,7 +37,7 @@ export default Mixin.create({
);
}),
- clearModelCache: on('deactivate', function() {
+ clearModelCache: on('deactivate', function () {
var modelType = this.modelType;
var modelTypes = this.modelTypes;
@@ -55,7 +55,7 @@ export default Mixin.create({
this.store.unloadAll(modelType);
}
if (modelTypes) {
- modelTypes.forEach(type => {
+ modelTypes.forEach((type) => {
this.store.unloadAll(type);
});
}
diff --git a/ui/app/mixins/policy-edit-controller.js b/ui/app/mixins/policy-edit-controller.js
index 1bc31e5737..85fefea652 100644
--- a/ui/app/mixins/policy-edit-controller.js
+++ b/ui/app/mixins/policy-edit-controller.js
@@ -15,7 +15,7 @@ export default Mixin.create({
flash.success(`${policyType.toUpperCase()} policy "${name}" was successfully deleted.`);
return this.transitionToRoute('vault.cluster.policies', policyType);
})
- .catch(e => {
+ .catch((e) => {
let errors = e.errors ? e.errors.join('') : e.message;
flash.danger(
`There was an error deleting the ${policyType.toUpperCase()} policy "${name}": ${errors}.`
@@ -29,7 +29,7 @@ export default Mixin.create({
let name = model.get('name');
model
.save()
- .then(m => {
+ .then((m) => {
flash.success(`${policyType.toUpperCase()} policy "${name}" was successfully saved.`);
if (this.wizard.featureState === 'create') {
this.wizard.transitionFeatureMachine('create', 'CONTINUE', policyType);
diff --git a/ui/app/mixins/unload-model-route.js b/ui/app/mixins/unload-model-route.js
index fb4ecdb039..ce5c370191 100644
--- a/ui/app/mixins/unload-model-route.js
+++ b/ui/app/mixins/unload-model-route.js
@@ -9,7 +9,8 @@ export default Mixin.create({
let { modelPath } = this;
/* eslint-disable-next-line ember/no-controller-access-in-routes */
let model = this.controller.get(modelPath);
- if (!model || !model.unloadRecord) {
+ // error is thrown when you attempt to unload a record that is inFlight (isSaving)
+ if (!model || !model.unloadRecord || model.isSaving) {
return;
}
removeRecord(this.store, model);
diff --git a/ui/app/mixins/with-nav-to-nearest-ancestor.js b/ui/app/mixins/with-nav-to-nearest-ancestor.js
index ce1a38c499..9ecb518881 100644
--- a/ui/app/mixins/with-nav-to-nearest-ancestor.js
+++ b/ui/app/mixins/with-nav-to-nearest-ancestor.js
@@ -12,7 +12,7 @@ import { task } from 'ember-concurrency';
// and we're catching any 404s, the loop continues until the transtion succeeds, or exhausts
// the ancestors array and transitions to the root
export default Mixin.create({
- navToNearestAncestor: task(function*(key) {
+ navToNearestAncestor: task(function* (key) {
let ancestors = utils.ancestorKeysForKey(key);
let errored = false;
let nearest = ancestors.pop();
diff --git a/ui/app/models/auth-config.js b/ui/app/models/auth-config.js
index 90819e70f7..49c5763164 100644
--- a/ui/app/models/auth-config.js
+++ b/ui/app/models/auth-config.js
@@ -2,7 +2,7 @@ import Model, { belongsTo } from '@ember-data/model';
export default Model.extend({
backend: belongsTo('auth-method', { inverse: 'authConfigs', readOnly: true, async: false }),
- getHelpUrl: function(backend) {
+ getHelpUrl: function (backend) {
return `/v1/auth/${backend}/config?help=1`;
},
});
diff --git a/ui/app/models/auth-config/aws/client.js b/ui/app/models/auth-config/aws/client.js
index ebcc4e5073..37b73167c6 100644
--- a/ui/app/models/auth-config/aws/client.js
+++ b/ui/app/models/auth-config/aws/client.js
@@ -19,7 +19,7 @@ export default AuthConfig.extend({
label: 'IAM Server ID Header Value',
}),
- fieldGroups: computed(function() {
+ fieldGroups: computed(function () {
const groups = [
{ default: ['accessKey', 'secretKey'] },
{ 'AWS Options': ['endpoint', 'iamEndpoint', 'stsEndpoint', 'iamServerIdHeaderValue'] },
diff --git a/ui/app/models/auth-config/aws/tidy.js b/ui/app/models/auth-config/aws/tidy.js
index 5643ec7f3b..c395901aef 100644
--- a/ui/app/models/auth-config/aws/tidy.js
+++ b/ui/app/models/auth-config/aws/tidy.js
@@ -13,7 +13,7 @@ export default AuthConfig.extend({
defaultValue: false,
}),
- attrs: computed(function() {
+ attrs: computed(function () {
return expandAttributeMeta(this, ['safetyBuffer', 'disablePeriodicTidy']);
}),
});
diff --git a/ui/app/models/auth-config/azure.js b/ui/app/models/auth-config/azure.js
index cfab610135..72f5b2678c 100644
--- a/ui/app/models/auth-config/azure.js
+++ b/ui/app/models/auth-config/azure.js
@@ -24,7 +24,7 @@ export default AuthConfig.extend({
googleCertsEndpoint: attr('string'),
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [
{ default: ['tenantId', 'resource'] },
{
diff --git a/ui/app/models/auth-config/gcp.js b/ui/app/models/auth-config/gcp.js
index d931ac4de3..c1fb0b18bc 100644
--- a/ui/app/models/auth-config/gcp.js
+++ b/ui/app/models/auth-config/gcp.js
@@ -13,7 +13,7 @@ export default AuthConfig.extend({
googleCertsEndpoint: attr('string'),
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [
{ default: ['credentials'] },
{
diff --git a/ui/app/models/auth-config/github.js b/ui/app/models/auth-config/github.js
index 436c050c56..5dc48cd06a 100644
--- a/ui/app/models/auth-config/github.js
+++ b/ui/app/models/auth-config/github.js
@@ -11,7 +11,7 @@ export default AuthConfig.extend({
label: 'Base URL',
}),
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [
{ default: ['organization'] },
{
diff --git a/ui/app/models/auth-config/jwt.js b/ui/app/models/auth-config/jwt.js
index 7eecbb26ee..6926c6b108 100644
--- a/ui/app/models/auth-config/jwt.js
+++ b/ui/app/models/auth-config/jwt.js
@@ -36,7 +36,7 @@ export default AuthConfig.extend({
boundIssuer: attr('string', {
helpText: 'The value against which to match the iss claim in a JWT',
}),
- fieldGroups: computed('constructor.modelName', 'newFields', function() {
+ fieldGroups: computed('constructor.modelName', 'newFields', function () {
let type = this.constructor.modelName.split('/')[1].toUpperCase();
let groups = [
{
diff --git a/ui/app/models/auth-config/kubernetes.js b/ui/app/models/auth-config/kubernetes.js
index 8afaa6c119..e9312c4163 100644
--- a/ui/app/models/auth-config/kubernetes.js
+++ b/ui/app/models/auth-config/kubernetes.js
@@ -26,7 +26,7 @@ export default AuthConfig.extend({
editType: 'stringArray',
}),
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [
{
default: ['kubernetesHost', 'kubernetesCaCert'],
diff --git a/ui/app/models/auth-config/ldap.js b/ui/app/models/auth-config/ldap.js
index 1f220be1ba..a7b68774a3 100644
--- a/ui/app/models/auth-config/ldap.js
+++ b/ui/app/models/auth-config/ldap.js
@@ -11,7 +11,7 @@ export default AuthConfig.extend({
label: 'Certificate',
editType: 'file',
}),
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [
{
default: ['url'],
diff --git a/ui/app/models/auth-config/okta.js b/ui/app/models/auth-config/okta.js
index d87073d8af..a8024e83a6 100644
--- a/ui/app/models/auth-config/okta.js
+++ b/ui/app/models/auth-config/okta.js
@@ -23,7 +23,7 @@ export default AuthConfig.extend({
"Useful if using Vault's built-in MFA mechanisms. Will also cause certain other statuses to be ignored, such as PASSWORD_EXPIRED",
}),
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [
{
default: ['orgName'],
diff --git a/ui/app/models/auth-config/radius.js b/ui/app/models/auth-config/radius.js
index d4c2b93376..db098c9652 100644
--- a/ui/app/models/auth-config/radius.js
+++ b/ui/app/models/auth-config/radius.js
@@ -9,7 +9,7 @@ export default AuthConfig.extend({
host: attr('string'),
secret: attr('string'),
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [
{
default: ['host', 'secret'],
diff --git a/ui/app/models/auth-method.js b/ui/app/models/auth-method.js
index 2214a75958..de82302c85 100644
--- a/ui/app/models/auth-method.js
+++ b/ui/app/models/auth-method.js
@@ -24,7 +24,7 @@ let ModelExport = Model.extend(Validations, {
type: attr('string'),
// namespaces introduced types with a `ns_` prefix for built-in engines
// so we need to strip that to normalize the type
- methodType: computed('type', function() {
+ methodType: computed('type', function () {
return this.type.replace(/^ns_/, '');
}),
description: attr('string', {
@@ -42,14 +42,14 @@ let ModelExport = Model.extend(Validations, {
// used when the `auth` prefix is important,
// currently only when setting perf mount filtering
- apiPath: computed('path', function() {
+ apiPath: computed('path', function () {
return `auth/${this.path}`;
}),
- localDisplay: computed('local', function() {
+ localDisplay: computed('local', function () {
return this.local ? 'local' : 'replicated';
}),
- tuneAttrs: computed('path', function() {
+ tuneAttrs: computed('path', function () {
let { methodType } = this;
let tuneAttrs;
// token_type should not be tuneable for the token auth method
@@ -74,7 +74,7 @@ let ModelExport = Model.extend(Validations, {
urlType: 'updateRecord',
}),
- formFields: computed(function() {
+ formFields: computed(function () {
return [
'type',
'path',
@@ -86,7 +86,7 @@ let ModelExport = Model.extend(Validations, {
];
}),
- formFieldGroups: computed(function() {
+ formFieldGroups: computed(function () {
return [
{ default: ['path'] },
{
@@ -101,11 +101,11 @@ let ModelExport = Model.extend(Validations, {
];
}),
- attrs: computed('formFields', function() {
+ attrs: computed('formFields', function () {
return expandAttributeMeta(this, this.formFields);
}),
- fieldGroups: computed('formFieldGroups', function() {
+ fieldGroups: computed('formFieldGroups', function () {
return fieldToAttrs(this, this.formFieldGroups);
}),
canDisable: alias('deletePath.canDelete'),
@@ -114,7 +114,7 @@ let ModelExport = Model.extend(Validations, {
export default attachCapabilities(ModelExport, {
deletePath: apiPath`sys/auth/${'id'}`,
- configPath: function(context) {
+ configPath: function (context) {
if (context.type === 'aws') {
return apiPath`auth/${'id'}/config/client`;
} else {
diff --git a/ui/app/models/aws-credential.js b/ui/app/models/aws-credential.js
index 8ce389aa48..2b8b64f85d 100644
--- a/ui/app/models/aws-credential.js
+++ b/ui/app/models/aws-credential.js
@@ -51,7 +51,7 @@ export default Model.extend({
secretKey: attr('string'),
securityToken: attr('string'),
- attrs: computed('credentialType', 'accessKey', 'securityToken', function() {
+ attrs: computed('credentialType', 'accessKey', 'securityToken', function () {
let type = this.credentialType;
let fieldsForType = {
iam_user: ['credentialType'],
@@ -64,7 +64,7 @@ export default Model.extend({
return expandAttributeMeta(this, fieldsForType[type].slice(0));
}),
- toCreds: computed('accessKey', 'secretKey', 'securityToken', 'leaseId', function() {
+ toCreds: computed('accessKey', 'secretKey', 'securityToken', 'leaseId', function () {
const props = {
accessKey: this.accessKey,
secretKey: this.secretKey,
diff --git a/ui/app/models/capabilities.js b/ui/app/models/capabilities.js
index 0a755febca..920eebf931 100644
--- a/ui/app/models/capabilities.js
+++ b/ui/app/models/capabilities.js
@@ -18,8 +18,8 @@ const SUDO_PATH_PREFIXES = ['sys/leases/revoke-prefix', 'sys/leases/revoke-force
export { SUDO_PATHS, SUDO_PATH_PREFIXES };
-const computedCapability = function(capability) {
- return computed('path', 'capabilities', 'capabilities.[]', function() {
+const computedCapability = function (capability) {
+ return computed('path', 'capabilities', 'capabilities.[]', function () {
const capabilities = this.capabilities;
const path = this.path;
if (!capabilities) {
@@ -32,7 +32,7 @@ const computedCapability = function(capability) {
return false;
}
// if the path is sudo protected, they'll need sudo + the appropriate capability
- if (SUDO_PATHS.includes(path) || SUDO_PATH_PREFIXES.find(item => path.startsWith(item))) {
+ if (SUDO_PATHS.includes(path) || SUDO_PATH_PREFIXES.find((item) => path.startsWith(item))) {
return capabilities.includes('sudo') && capabilities.includes(capability);
}
return capabilities.includes(capability);
diff --git a/ui/app/models/clients/config.js b/ui/app/models/clients/config.js
index 58de312938..919c0f2cf1 100644
--- a/ui/app/models/clients/config.js
+++ b/ui/app/models/clients/config.js
@@ -23,7 +23,7 @@ const M = Model.extend({
'Enable or disable client tracking. Keep in mind that disabling tracking will delete the data for the current month.',
}),
- configAttrs: computed(function() {
+ configAttrs: computed(function () {
let keys = ['enabled', 'defaultReportMonths', 'retentionMonths'];
return expandAttributeMeta(this, keys);
}),
diff --git a/ui/app/models/cluster.js b/ui/app/models/cluster.js
index a7799583fc..07e259a284 100644
--- a/ui/app/models/cluster.js
+++ b/ui/app/models/cluster.js
@@ -18,19 +18,19 @@ export default Model.extend({
licenseExpiry: alias('license.expiry_time'),
licenseState: alias('license.state'),
- needsInit: computed('nodes', 'nodes.@each.initialized', function() {
+ needsInit: computed('nodes', 'nodes.@each.initialized', function () {
// needs init if no nodes are initialized
return this.nodes.isEvery('initialized', false);
}),
- unsealed: computed('nodes', 'nodes.{[],@each.sealed}', function() {
+ unsealed: computed('nodes', 'nodes.{[],@each.sealed}', function () {
// unsealed if there's at least one unsealed node
return !!this.nodes.findBy('sealed', false);
}),
sealed: not('unsealed'),
- leaderNode: computed('nodes', 'nodes.[]', function() {
+ leaderNode: computed('nodes', 'nodes.[]', function () {
const nodes = this.nodes;
if (nodes.get('length') === 1) {
return nodes.get('firstObject');
@@ -59,15 +59,15 @@ export default Model.extend({
rm: service('replication-mode'),
drMode: alias('dr.mode'),
replicationMode: alias('rm.mode'),
- replicationModeForDisplay: computed('replicationMode', function() {
+ replicationModeForDisplay: computed('replicationMode', function () {
return this.replicationMode === 'dr' ? 'Disaster Recovery' : 'Performance';
}),
- replicationIsInitializing: computed('dr.mode', 'performance.mode', function() {
+ replicationIsInitializing: computed('dr.mode', 'performance.mode', function () {
// a mode of null only happens when a cluster is being initialized
// otherwise the mode will be 'disabled', 'primary', 'secondary'
return !this.dr.mode || !this.performance.mode;
}),
- replicationAttrs: computed('dr.mode', 'performance.mode', 'replicationMode', function() {
+ replicationAttrs: computed('dr.mode', 'performance.mode', 'replicationMode', function () {
const replicationMode = this.replicationMode;
return replicationMode ? get(this, replicationMode) : null;
}),
diff --git a/ui/app/models/control-group-config.js b/ui/app/models/control-group-config.js
index c598f16886..a2dcf507f8 100644
--- a/ui/app/models/control-group-config.js
+++ b/ui/app/models/control-group-config.js
@@ -6,7 +6,7 @@ import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
export default Model.extend({
- fields: computed(function() {
+ fields: computed(function () {
return expandAttributeMeta(this, ['maxTtl']);
}),
diff --git a/ui/app/models/database/connection.js b/ui/app/models/database/connection.js
index 83f66d0293..d1fc762909 100644
--- a/ui/app/models/database/connection.js
+++ b/ui/app/models/database/connection.js
@@ -11,14 +11,14 @@ import { AVAILABLE_PLUGIN_TYPES } from '../../utils/database-helpers';
* @param {*} key item by which to group the fields. If item has no group it will be under "default"
* @returns array of objects where the key is default or the name of the option group, and the value is an array of attr names
*/
-const fieldsToGroups = function(arr, key = 'subgroup') {
+const fieldsToGroups = function (arr, key = 'subgroup') {
const fieldGroups = [];
- const byGroup = arr.reduce(function(rv, x) {
+ const byGroup = arr.reduce(function (rv, x) {
(rv[x[key]] = rv[x[key]] || []).push(x);
return rv;
}, {});
- Object.keys(byGroup).forEach(key => {
- const attrsArray = byGroup[key].map(obj => obj.attr);
+ Object.keys(byGroup).forEach((key) => {
+ const attrsArray = byGroup[key].map((obj) => obj.attr);
const group = key === 'undefined' ? 'default' : key;
fieldGroups.push({ [group]: attrsArray });
});
@@ -144,47 +144,47 @@ export default Model.extend({
defaultShown: 'Default',
}),
- isAvailablePlugin: computed('plugin_name', function() {
- return !!AVAILABLE_PLUGIN_TYPES.find(a => a.value === this.plugin_name);
+ isAvailablePlugin: computed('plugin_name', function () {
+ return !!AVAILABLE_PLUGIN_TYPES.find((a) => a.value === this.plugin_name);
}),
- showAttrs: computed('plugin_name', function() {
- const fields = AVAILABLE_PLUGIN_TYPES.find(a => a.value === this.plugin_name)
- .fields.filter(f => f.show !== false)
- .map(f => f.attr);
+ showAttrs: computed('plugin_name', function () {
+ const fields = AVAILABLE_PLUGIN_TYPES.find((a) => a.value === this.plugin_name)
+ .fields.filter((f) => f.show !== false)
+ .map((f) => f.attr);
fields.push('allowed_roles');
return expandAttributeMeta(this, fields);
}),
- fieldAttrs: computed('plugin_name', function() {
+ fieldAttrs: computed('plugin_name', function () {
// for both create and edit fields
let fields = ['plugin_name', 'name', 'connection_url', 'verify_connection', 'password_policy'];
if (this.plugin_name) {
- fields = AVAILABLE_PLUGIN_TYPES.find(a => a.value === this.plugin_name)
- .fields.filter(f => !f.group)
- .map(field => field.attr);
+ fields = AVAILABLE_PLUGIN_TYPES.find((a) => a.value === this.plugin_name)
+ .fields.filter((f) => !f.group)
+ .map((field) => field.attr);
}
return expandAttributeMeta(this, fields);
}),
- pluginFieldGroups: computed('plugin_name', function() {
+ pluginFieldGroups: computed('plugin_name', function () {
if (!this.plugin_name) {
return null;
}
- let pluginFields = AVAILABLE_PLUGIN_TYPES.find(a => a.value === this.plugin_name).fields.filter(
- f => f.group === 'pluginConfig'
+ let pluginFields = AVAILABLE_PLUGIN_TYPES.find((a) => a.value === this.plugin_name).fields.filter(
+ (f) => f.group === 'pluginConfig'
);
let groups = fieldsToGroups(pluginFields, 'subgroup');
return fieldToAttrs(this, groups);
}),
- statementFields: computed('plugin_name', function() {
+ statementFields: computed('plugin_name', function () {
if (!this.plugin_name) {
return expandAttributeMeta(this, ['root_rotation_statements']);
}
- let fields = AVAILABLE_PLUGIN_TYPES.find(a => a.value === this.plugin_name)
- .fields.filter(f => f.group === 'statements')
- .map(field => field.attr);
+ let fields = AVAILABLE_PLUGIN_TYPES.find((a) => a.value === this.plugin_name)
+ .fields.filter((f) => f.group === 'statements')
+ .map((field) => field.attr);
return expandAttributeMeta(this, fields);
}),
diff --git a/ui/app/models/database/role.js b/ui/app/models/database/role.js
index 2f9e11a2a9..3454270287 100644
--- a/ui/app/models/database/role.js
+++ b/ui/app/models/database/role.js
@@ -95,7 +95,7 @@ export default Model.extend({
return expandAttributeMeta(this, fields);
},
- roleSettingAttrs: computed(function() {
+ roleSettingAttrs: computed(function () {
// logic for which get displayed is on DatabaseRoleSettingForm
let allRoleSettingFields = [
'ttl',
diff --git a/ui/app/models/identity/_base.js b/ui/app/models/identity/_base.js
index 5ca18495e4..2016b99d93 100644
--- a/ui/app/models/identity/_base.js
+++ b/ui/app/models/identity/_base.js
@@ -4,15 +4,15 @@ import { computed } from '@ember/object';
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
export default Model.extend({
- formFields: computed(function() {
+ formFields: computed(function () {
return assert('formFields should be overridden', false);
}),
- fields: computed('formFields', 'formFields.[]', function() {
+ fields: computed('formFields', 'formFields.[]', function () {
return expandAttributeMeta(this, this.formFields);
}),
- identityType: computed('constructor.modelName', function() {
+ identityType: computed('constructor.modelName', function () {
let modelType = this.constructor.modelName.split('/')[1];
return modelType;
}),
diff --git a/ui/app/models/identity/entity-alias.js b/ui/app/models/identity/entity-alias.js
index efb8bc5d17..db2d5d966d 100644
--- a/ui/app/models/identity/entity-alias.js
+++ b/ui/app/models/identity/entity-alias.js
@@ -6,7 +6,7 @@ import identityCapabilities from 'vault/macros/identity-capabilities';
export default IdentityModel.extend({
parentType: 'entity',
- formFields: computed(function() {
+ formFields: computed(function () {
return ['name', 'mountAccessor'];
}),
entity: belongsTo('identity/entity', { readOnly: true, async: false }),
diff --git a/ui/app/models/identity/entity-merge.js b/ui/app/models/identity/entity-merge.js
index 0a0e986af4..cc69676693 100644
--- a/ui/app/models/identity/entity-merge.js
+++ b/ui/app/models/identity/entity-merge.js
@@ -3,7 +3,7 @@ import { computed } from '@ember/object';
import IdentityModel from './_base';
export default IdentityModel.extend({
- formFields: computed(function() {
+ formFields: computed(function () {
return ['toEntityId', 'fromEntityIds', 'force'];
}),
toEntityId: attr('string', {
diff --git a/ui/app/models/identity/entity.js b/ui/app/models/identity/entity.js
index c3b3256035..7cc686ff61 100644
--- a/ui/app/models/identity/entity.js
+++ b/ui/app/models/identity/entity.js
@@ -6,7 +6,7 @@ import apiPath from 'vault/utils/api-path';
import attachCapabilities from 'vault/lib/attach-capabilities';
let Model = IdentityModel.extend({
- formFields: computed(function() {
+ formFields: computed(function () {
return ['name', 'disabled', 'policies', 'metadata'];
}),
name: attr('string'),
diff --git a/ui/app/models/identity/group-alias.js b/ui/app/models/identity/group-alias.js
index f73a977167..fa8c6c3a03 100644
--- a/ui/app/models/identity/group-alias.js
+++ b/ui/app/models/identity/group-alias.js
@@ -6,7 +6,7 @@ import identityCapabilities from 'vault/macros/identity-capabilities';
export default IdentityModel.extend({
parentType: 'group',
- formFields: computed(function() {
+ formFields: computed(function () {
return ['name', 'mountAccessor'];
}),
group: belongsTo('identity/group', { readOnly: true, async: false }),
diff --git a/ui/app/models/identity/group.js b/ui/app/models/identity/group.js
index 31a0b69329..9a35f04e7a 100644
--- a/ui/app/models/identity/group.js
+++ b/ui/app/models/identity/group.js
@@ -6,7 +6,7 @@ import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
import identityCapabilities from 'vault/macros/identity-capabilities';
export default IdentityModel.extend({
- formFields: computed('type', function() {
+ formFields: computed('type', function () {
let fields = ['name', 'type', 'policies', 'metadata'];
if (this.type === 'internal') {
return fields.concat(['memberGroupIds', 'memberEntityIds']);
@@ -62,7 +62,7 @@ export default IdentityModel.extend({
'memberEntityIds.[]',
'memberGroupIds',
'memberGroupIds.[]',
- function() {
+ function () {
let { memberEntityIds, memberGroupIds } = this;
let numEntities = (memberEntityIds && memberEntityIds.length) || 0;
let numGroups = (memberGroupIds && memberGroupIds.length) || 0;
@@ -76,7 +76,7 @@ export default IdentityModel.extend({
canEdit: alias('updatePath.canUpdate'),
aliasPath: lazyCapabilities(apiPath`identity/group-alias`),
- canAddAlias: computed('aliasPath.canCreate', 'type', 'alias', function() {
+ canAddAlias: computed('aliasPath.canCreate', 'type', 'alias', function () {
let type = this.type;
let alias = this.alias;
// internal groups can't have aliases, and external groups can only have one
diff --git a/ui/app/models/kmip/config.js b/ui/app/models/kmip/config.js
index 0ccb77153f..67b1cd3b56 100644
--- a/ui/app/models/kmip/config.js
+++ b/ui/app/models/kmip/config.js
@@ -10,7 +10,7 @@ export default Model.extend({
return `/v1/${path}/config?help=1`;
},
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [{ default: ['listenAddrs', 'connectionTimeout'] }];
groups = combineFieldGroups(groups, this.newFields, []);
diff --git a/ui/app/models/kmip/credential.js b/ui/app/models/kmip/credential.js
index e5923aa378..58b11212b5 100644
--- a/ui/app/models/kmip/credential.js
+++ b/ui/app/models/kmip/credential.js
@@ -19,7 +19,7 @@ const ModelExport = Model.extend({
defaultValue: 'pem',
label: 'Certificate format',
}),
- fieldGroups: computed(function() {
+ fieldGroups: computed(function () {
const groups = [
{
default: ['format'],
diff --git a/ui/app/models/kmip/role.js b/ui/app/models/kmip/role.js
index c1317c5dd7..9141a4c4dc 100644
--- a/ui/app/models/kmip/role.js
+++ b/ui/app/models/kmip/role.js
@@ -5,19 +5,19 @@ import apiPath from 'vault/utils/api-path';
import attachCapabilities from 'vault/lib/attach-capabilities';
export const COMPUTEDS = {
- operationFields: computed('newFields', function() {
- return this.newFields.filter(key => key.startsWith('operation'));
+ operationFields: computed('newFields', function () {
+ return this.newFields.filter((key) => key.startsWith('operation'));
}),
- operationFieldsWithoutSpecial: computed('operationFields', function() {
+ operationFieldsWithoutSpecial: computed('operationFields', function () {
return this.operationFields.slice().removeObjects(['operationAll', 'operationNone']);
}),
- tlsFields: computed(function() {
+ tlsFields: computed(function () {
return ['tlsClientKeyBits', 'tlsClientKeyType', 'tlsClientTtl'];
}),
- nonOperationFields: computed('newFields', 'operationFields', 'tlsFields', function() {
+ nonOperationFields: computed('newFields', 'operationFields', 'tlsFields', function () {
let excludeFields = ['role'].concat(this.operationFields, this.tlsFields);
return this.newFields.slice().removeObjects(excludeFields);
}),
@@ -31,7 +31,7 @@ const ModelExport = Model.extend(COMPUTEDS, {
getHelpUrl(path) {
return `/v1/${path}/scope/example/role/example?help=1`;
},
- fieldGroups: computed('fields', 'nonOperationFields.length', 'tlsFields', function() {
+ fieldGroups: computed('fields', 'nonOperationFields.length', 'tlsFields', function () {
const groups = [{ TLS: this.tlsFields }];
if (this.nonOperationFields.length) {
groups.unshift({ default: this.nonOperationFields });
@@ -40,7 +40,7 @@ const ModelExport = Model.extend(COMPUTEDS, {
return ret;
}),
- operationFormFields: computed('operationFieldsWithoutSpecial', function() {
+ operationFormFields: computed('operationFieldsWithoutSpecial', function () {
let objects = [
'operationCreate',
'operationActivate',
@@ -66,10 +66,10 @@ const ModelExport = Model.extend(COMPUTEDS, {
}
return fieldToAttrs(this, groups);
}),
- tlsFormFields: computed('tlsFields', function() {
+ tlsFormFields: computed('tlsFields', function () {
return expandAttributeMeta(this, this.tlsFields);
}),
- fields: computed('nonOperationFields', function() {
+ fields: computed('nonOperationFields', function () {
return expandAttributeMeta(this, this.nonOperationFields);
}),
});
diff --git a/ui/app/models/kmip/scope.js b/ui/app/models/kmip/scope.js
index cccf0f5f9b..b673b850ba 100644
--- a/ui/app/models/kmip/scope.js
+++ b/ui/app/models/kmip/scope.js
@@ -8,7 +8,7 @@ import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
let ModelExport = Model.extend({
name: attr('string'),
backend: attr({ readOnly: true }),
- attrs: computed(function() {
+ attrs: computed(function () {
return expandAttributeMeta(this, ['name']);
}),
});
diff --git a/ui/app/models/namespace.js b/ui/app/models/namespace.js
index 894c9879b4..3dfc915c61 100644
--- a/ui/app/models/namespace.js
+++ b/ui/app/models/namespace.js
@@ -7,13 +7,13 @@ export default Model.extend({
validationAttr: 'pathIsValid',
invalidMessage: 'You have entered and invalid path please only include letters, numbers, -, ., and _.',
}),
- pathIsValid: computed('path', function() {
+ pathIsValid: computed('path', function () {
return this.path && this.path.match(/^[\w\d-.]+$/g);
}),
description: attr('string', {
editType: 'textarea',
}),
- fields: computed(function() {
+ fields: computed(function () {
return expandAttributeMeta(this, ['path']);
}),
});
diff --git a/ui/app/models/path-filter-config.js b/ui/app/models/path-filter-config.js
index 569fa162c4..e306fac766 100644
--- a/ui/app/models/path-filter-config.js
+++ b/ui/app/models/path-filter-config.js
@@ -3,7 +3,7 @@ import Model, { attr } from '@ember-data/model';
export default Model.extend({
mode: attr('string'),
paths: attr('array', {
- defaultValue: function() {
+ defaultValue: function () {
return [];
},
}),
diff --git a/ui/app/models/pki-ca-certificate-sign.js b/ui/app/models/pki-ca-certificate-sign.js
index 7bcc44b376..2f9ac17229 100644
--- a/ui/app/models/pki-ca-certificate-sign.js
+++ b/ui/app/models/pki-ca-certificate-sign.js
@@ -42,7 +42,7 @@ export default Certificate.extend({
editType: 'stringArray',
}),
- fieldGroups: computed('useCsrValues', function() {
+ fieldGroups: computed('useCsrValues', function () {
const options = [
{
Options: [
diff --git a/ui/app/models/pki-ca-certificate.js b/ui/app/models/pki-ca-certificate.js
index c81a10f890..153978a688 100644
--- a/ui/app/models/pki-ca-certificate.js
+++ b/ui/app/models/pki-ca-certificate.js
@@ -5,7 +5,7 @@ import Certificate from './pki-certificate';
import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
export default Certificate.extend({
- DISPLAY_FIELDS: computed(function() {
+ DISPLAY_FIELDS: computed(function () {
return [
'csr',
'certificate',
@@ -100,7 +100,7 @@ export default Certificate.extend({
label: 'Province/State',
}),
- fieldDefinition: computed('caType', 'uploadPemBundle', function() {
+ fieldDefinition: computed('caType', 'uploadPemBundle', function () {
const type = this.caType;
const isUpload = this.uploadPemBundle;
let groups = [{ default: ['caType', 'uploadPemBundle'] }];
diff --git a/ui/app/models/pki-certificate-sign.js b/ui/app/models/pki-certificate-sign.js
index 9e64e4dde3..556fe6e94b 100644
--- a/ui/app/models/pki-certificate-sign.js
+++ b/ui/app/models/pki-certificate-sign.js
@@ -15,7 +15,7 @@ export default Certificate.extend({
editType: 'textarea',
}),
- fieldGroups: computed('newFields', 'signVerbatim', function() {
+ fieldGroups: computed('newFields', 'signVerbatim', function () {
const options = { Options: ['altNames', 'ipSans', 'ttl', 'excludeCnFromSans', 'otherSans'] };
let groups = [
{
diff --git a/ui/app/models/pki-certificate.js b/ui/app/models/pki-certificate.js
index 6b657f17ad..92cd6d4f18 100644
--- a/ui/app/models/pki-certificate.js
+++ b/ui/app/models/pki-certificate.js
@@ -10,7 +10,7 @@ export default Model.extend({
idForNav: attr('string', {
readOnly: true,
}),
- DISPLAY_FIELDS: computed(function() {
+ DISPLAY_FIELDS: computed(function () {
return [
'certificate',
'commonName',
@@ -83,7 +83,7 @@ export default Model.extend({
return fieldToAttrs(this, fieldGroups);
},
- fieldDefinition: computed(function() {
+ fieldDefinition: computed(function () {
const groups = [
{ default: ['commonName', 'format'] },
{ Options: ['altNames', 'ipSans', 'ttl', 'excludeCnFromSans', 'otherSans'] },
@@ -91,11 +91,11 @@ export default Model.extend({
return groups;
}),
- fieldGroups: computed('fieldDefinition', function() {
+ fieldGroups: computed('fieldDefinition', function () {
return this.fieldsToAttrs(this.fieldDefinition);
}),
- attrs: computed('DISPLAY_FIELDS', 'certificate', 'csr', function() {
+ attrs: computed('DISPLAY_FIELDS', 'certificate', 'csr', function () {
let keys = this.certificate || this.csr ? this.DISPLAY_FIELDS.slice(0) : [];
return expandAttributeMeta(this, keys);
}),
@@ -108,7 +108,7 @@ export default Model.extend({
'privateKeyType',
'revocationTime',
'serialNumber',
- function() {
+ function () {
const props = {
certificate: this.certificate,
issuingCa: this.issuingCa,
diff --git a/ui/app/models/pki-config.js b/ui/app/models/pki-config.js
index 574c01076b..9d8a88cefb 100644
--- a/ui/app/models/pki-config.js
+++ b/ui/app/models/pki-config.js
@@ -12,7 +12,7 @@ export default Model.extend({
},
//urls
- urlsAttrs: computed(function() {
+ urlsAttrs: computed(function () {
let keys = ['issuingCertificates', 'crlDistributionPoints', 'ocspServers'];
return this.attrList(keys);
}),
@@ -29,7 +29,7 @@ export default Model.extend({
}),
//tidy
- tidyAttrs: computed(function() {
+ tidyAttrs: computed(function () {
let keys = ['tidyCertStore', 'tidyRevocationList', 'safetyBuffer'];
return this.attrList(keys);
}),
@@ -46,7 +46,7 @@ export default Model.extend({
editType: 'ttl',
}),
- crlAttrs: computed(function() {
+ crlAttrs: computed(function () {
let keys = ['expiry'];
return this.attrList(keys);
}),
diff --git a/ui/app/models/policy.js b/ui/app/models/policy.js
index 93e07ba0ac..1cb15a30f2 100644
--- a/ui/app/models/policy.js
+++ b/ui/app/models/policy.js
@@ -6,7 +6,7 @@ import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
export default Model.extend({
name: attr('string'),
policy: attr('string'),
- policyType: computed('constructor.modelName', function() {
+ policyType: computed('constructor.modelName', function () {
return this.constructor.modelName.split('/')[1];
}),
@@ -14,7 +14,7 @@ export default Model.extend({
canDelete: alias('updatePath.canDelete'),
canEdit: alias('updatePath.canUpdate'),
canRead: alias('updatePath.canRead'),
- format: computed('policy', function() {
+ format: computed('policy', function () {
let policy = this.policy;
let isJSON;
try {
diff --git a/ui/app/models/policy/egp.js b/ui/app/models/policy/egp.js
index d21afb9315..255bd66a73 100644
--- a/ui/app/models/policy/egp.js
+++ b/ui/app/models/policy/egp.js
@@ -8,7 +8,7 @@ export default PolicyModel.extend({
paths: attr({
editType: 'stringArray',
}),
- additionalAttrs: computed(function() {
+ additionalAttrs: computed(function () {
return expandAttributeMeta(this, ['enforcementLevel', 'paths']);
}),
});
diff --git a/ui/app/models/policy/rgp.js b/ui/app/models/policy/rgp.js
index e4f3bc62a9..9fb9303233 100644
--- a/ui/app/models/policy/rgp.js
+++ b/ui/app/models/policy/rgp.js
@@ -10,7 +10,7 @@ export default PolicyModel.extend({
defaultValue: 'hard-mandatory',
}),
- additionalAttrs: computed(function() {
+ additionalAttrs: computed(function () {
return expandAttributeMeta(this, ['enforcementLevel']);
}),
});
diff --git a/ui/app/models/raft-join.js b/ui/app/models/raft-join.js
index 22e49a2e14..4fae1b94cd 100644
--- a/ui/app/models/raft-join.js
+++ b/ui/app/models/raft-join.js
@@ -31,7 +31,7 @@ export default Model.extend({
label: 'Leader Client Key',
editType: 'file',
}),
- fields: computed(function() {
+ fields: computed(function () {
return expandAttributeMeta(this, [
'leaderApiAddr',
'leaderCaCert',
diff --git a/ui/app/models/replication-attributes.js b/ui/app/models/replication-attributes.js
index 8e8e9de5c2..dd58f79967 100644
--- a/ui/app/models/replication-attributes.js
+++ b/ui/app/models/replication-attributes.js
@@ -5,7 +5,7 @@ import Fragment from 'ember-data-model-fragments/fragment';
export default Fragment.extend({
clusterId: attr('string'),
- clusterIdDisplay: computed('clusterId', 'mode', function() {
+ clusterIdDisplay: computed('clusterId', 'mode', function () {
const clusterId = this.clusterId;
return clusterId ? clusterId.split('-')[0] : null;
}),
@@ -23,13 +23,13 @@ export default Fragment.extend({
// secondary attrs
isSecondary: match('mode', /secondary/),
connection_state: attr('string'),
- modeForUrl: computed('isPrimary', 'isSecondary', 'mode', function() {
+ modeForUrl: computed('isPrimary', 'isSecondary', 'mode', function () {
const mode = this.mode;
return mode === 'bootstrapping'
? 'bootstrapping'
: (this.isSecondary && 'secondary') || (this.isPrimary && 'primary');
}),
- modeForHeader: computed('mode', function() {
+ modeForHeader: computed('mode', function () {
const mode = this.mode;
if (!mode) {
// mode will be false or undefined if it calls the status endpoint while still setting up the cluster
@@ -60,7 +60,7 @@ export default Fragment.extend({
};
},
- syncProgressPercent: computed('syncProgress', function() {
+ syncProgressPercent: computed('syncProgress', function () {
const syncProgress = this.syncProgress;
if (!syncProgress) {
return null;
@@ -70,7 +70,7 @@ export default Fragment.extend({
return Math.floor(100 * (progress / total));
}),
- modeDisplay: computed('mode', function() {
+ modeDisplay: computed('mode', function () {
const displays = {
disabled: 'Disabled',
unknown: 'Unknown',
diff --git a/ui/app/models/role-aws.js b/ui/app/models/role-aws.js
index 6e5c425d7e..af631ceb5b 100644
--- a/ui/app/models/role-aws.js
+++ b/ui/app/models/role-aws.js
@@ -52,7 +52,7 @@ export default Model.extend({
helpText:
'A policy is an object in AWS that, when associated with an identity or resource, defines their permissions.',
}),
- fields: computed('credentialType', function() {
+ fields: computed('credentialType', function () {
let credentialType = this.credentialType;
let keysForType = {
iam_user: ['name', 'credentialType', 'policyArns', 'policyDocument'],
diff --git a/ui/app/models/role-jwt.js b/ui/app/models/role-jwt.js
index 6e0a6cfe4b..9f26fa3fa6 100644
--- a/ui/app/models/role-jwt.js
+++ b/ui/app/models/role-jwt.js
@@ -18,13 +18,13 @@ export { DOMAIN_STRINGS, PROVIDER_WITH_LOGO };
export default Model.extend({
authUrl: attr('string'),
- providerName: computed('authUrl', function() {
+ providerName: computed('authUrl', function () {
let { hostname } = parseURL(this.authUrl);
- let firstMatch = Object.keys(DOMAIN_STRINGS).find(name => hostname.includes(name));
+ let firstMatch = Object.keys(DOMAIN_STRINGS).find((name) => hostname.includes(name));
return DOMAIN_STRINGS[firstMatch] || null;
}),
- providerButtonComponent: computed('providerName', function() {
+ providerButtonComponent: computed('providerName', function () {
let { providerName } = this;
return PROVIDER_WITH_LOGO.includes(providerName) ? `auth-button-${providerName.toLowerCase()}` : null;
}),
diff --git a/ui/app/models/role-pki.js b/ui/app/models/role-pki.js
index 219e37a39b..ccf5fd775c 100644
--- a/ui/app/models/role-pki.js
+++ b/ui/app/models/role-pki.js
@@ -15,7 +15,7 @@ export default Model.extend({
readOnly: true,
}),
useOpenAPI: true,
- getHelpUrl: function(backend) {
+ getHelpUrl: function (backend) {
return `/v1/${backend}/roles/example?help=1`;
},
updatePath: lazyCapabilities(apiPath`${'backend'}/roles/${'id'}`, 'backend', 'id'),
@@ -32,7 +32,7 @@ export default Model.extend({
signVerbatimPath: lazyCapabilities(apiPath`${'backend'}/sign-verbatim/${'id'}`, 'backend', 'id'),
canSignVerbatim: alias('signVerbatimPath.canUpdate'),
- fieldGroups: computed('newFields', function() {
+ fieldGroups: computed('newFields', function () {
let groups = [
{ default: ['name', 'keyType'] },
{
diff --git a/ui/app/models/role-ssh.js b/ui/app/models/role-ssh.js
index e33927a836..1f88fd5044 100644
--- a/ui/app/models/role-ssh.js
+++ b/ui/app/models/role-ssh.js
@@ -40,7 +40,7 @@ const CA_FIELDS = [
export default Model.extend({
useOpenAPI: true,
- getHelpUrl: function(backend) {
+ getHelpUrl: function (backend) {
return `/v1/${backend}/roles/example?help=1`;
},
zeroAddress: attr('boolean', {
@@ -117,13 +117,13 @@ export default Model.extend({
helpText: 'When supplied, this value specifies a custom format for the key id of a signed certificate',
}),
- showFields: computed('keyType', function() {
+ showFields: computed('keyType', function () {
const keyType = this.keyType;
let keys = keyType === 'ca' ? CA_FIELDS.slice(0) : OTP_FIELDS.slice(0);
return expandAttributeMeta(this, keys);
}),
- fieldGroups: computed('keyType', function() {
+ fieldGroups: computed('keyType', function () {
let numRequired = this.keyType === 'otp' ? 3 : 4;
let fields = this.keyType === 'otp' ? [...OTP_FIELDS] : [...CA_FIELDS];
let defaultFields = fields.splice(0, numRequired);
diff --git a/ui/app/models/secret-engine.js b/ui/app/models/secret-engine.js
index fc674bb6a2..323c0c8396 100644
--- a/ui/app/models/secret-engine.js
+++ b/ui/app/models/secret-engine.js
@@ -68,7 +68,7 @@ export default Model.extend(Validations, {
helperTextEnabled: 'Delete all new versions of this secret after',
}),
- modelTypeForKV: computed('engineType', 'options.version', function() {
+ modelTypeForKV: computed('engineType', 'options.version', function () {
let type = this.engineType;
let version = this.options?.version;
let modelType = 'secret';
@@ -80,7 +80,7 @@ export default Model.extend(Validations, {
isV2KV: computed.equal('modelTypeForKV', 'secret-v2'),
- formFields: computed('engineType', 'options.version', function() {
+ formFields: computed('engineType', 'options.version', function () {
let type = this.engineType;
let version = this.options?.version;
let fields = [
@@ -102,7 +102,7 @@ export default Model.extend(Validations, {
return fields;
}),
- formFieldGroups: computed('engineType', function() {
+ formFieldGroups: computed('engineType', function () {
let type = this.engineType;
let defaultGroup;
// KV has specific config options it adds on the enable engine. https://www.vaultproject.io/api/secret/kv/kv-v2#configure-the-kv-engine
@@ -142,25 +142,25 @@ export default Model.extend(Validations, {
return [defaultGroup, optionsGroup];
}),
- attrs: computed('formFields', function() {
+ attrs: computed('formFields', function () {
return expandAttributeMeta(this, this.formFields);
}),
- fieldGroups: computed('formFieldGroups', function() {
+ fieldGroups: computed('formFieldGroups', function () {
return fieldToAttrs(this, this.formFieldGroups);
}),
// namespaces introduced types with a `ns_` prefix for built-in engines
// so we need to strip that to normalize the type
- engineType: computed('type', function() {
+ engineType: computed('type', function () {
return (this.type || '').replace(/^ns_/, '');
}),
- shouldIncludeInList: computed('engineType', function() {
+ shouldIncludeInList: computed('engineType', function () {
return !LIST_EXCLUDED_BACKENDS.includes(this.engineType);
}),
- localDisplay: computed('local', function() {
+ localDisplay: computed('local', function () {
return this.local ? 'local' : 'replicated';
}),
diff --git a/ui/app/models/secret-v2.js b/ui/app/models/secret-v2.js
index c8f5e97ca9..f4db1443c1 100644
--- a/ui/app/models/secret-v2.js
+++ b/ui/app/models/secret-v2.js
@@ -54,7 +54,7 @@ export default Model.extend(KeyMixin, Validations, {
helperTextDisabled: 'A secret’s version must be manually deleted.',
helperTextEnabled: 'Delete all new versions of this secret after',
}),
- fields: computed(function() {
+ fields: computed(function () {
return expandAttributeMeta(this, ['customMetadata', 'maxVersions', 'casRequired', 'deleteVersionAfter']);
}),
secretDataPath: lazyCapabilities(apiPath`${'engineId'}/data/${'id'}`, 'engineId', 'id'),
diff --git a/ui/app/models/secret.js b/ui/app/models/secret.js
index fb37f14526..86c528b26f 100644
--- a/ui/app/models/secret.js
+++ b/ui/app/models/secret.js
@@ -12,20 +12,20 @@ export default Model.extend(KeyMixin, {
renewable: attr('boolean'),
secretData: attr('object'),
- secretKeyAndValue: computed('secretData', function() {
+ secretKeyAndValue: computed('secretData', function () {
const data = this.secretData;
- return Object.keys(data).map(key => {
+ return Object.keys(data).map((key) => {
return { key, value: data[key] };
});
}),
- dataAsJSONString: computed('secretData', function() {
+ dataAsJSONString: computed('secretData', function () {
return JSON.stringify(this.secretData, null, 2);
}),
- isAdvancedFormat: computed('secretData', function() {
+ isAdvancedFormat: computed('secretData', function () {
const data = this.secretData;
- return data && Object.keys(data).some(key => typeof data[key] !== 'string');
+ return data && Object.keys(data).some((key) => typeof data[key] !== 'string');
}),
helpText: attr('string'),
diff --git a/ui/app/models/ssh-otp-credential.js b/ui/app/models/ssh-otp-credential.js
index 9af3716b0a..6740e9a4c1 100644
--- a/ui/app/models/ssh-otp-credential.js
+++ b/ui/app/models/ssh-otp-credential.js
@@ -16,7 +16,7 @@ export default Model.extend({
key: attr('string'),
keyType: attr('string'),
port: attr('number'),
- attrs: computed('key', function() {
+ attrs: computed('key', function () {
let keys = this.key ? DISPLAY_FIELDS.slice(0) : CREATE_FIELDS.slice(0);
return expandAttributeMeta(this, keys);
}),
diff --git a/ui/app/models/ssh-sign.js b/ui/app/models/ssh-sign.js
index dc38ad3f81..8cd177bbf8 100644
--- a/ui/app/models/ssh-sign.js
+++ b/ui/app/models/ssh-sign.js
@@ -45,7 +45,7 @@ export default Model.extend({
serialNumber: attr('string'),
signedKey: attr('string'),
- attrs: computed('signedKey', function() {
+ attrs: computed('signedKey', function () {
let keys = this.signedKey ? DISPLAY_FIELDS.slice(0) : CREATE_FIELDS.slice(0);
return expandAttributeMeta(this, keys);
}),
diff --git a/ui/app/models/transform.js b/ui/app/models/transform.js
index 2e77cbbd8f..059a49d661 100644
--- a/ui/app/models/transform.js
+++ b/ui/app/models/transform.js
@@ -80,13 +80,13 @@ const ModelExport = Model.extend({
subText: 'Search for an existing role, type a new role to create it, or use a wildcard (*).',
wildcardLabel: 'role',
}),
- transformAttrs: computed('type', function() {
+ transformAttrs: computed('type', function () {
if (this.type === 'masking') {
return ['name', 'type', 'masking_character', 'template', 'allowed_roles'];
}
return ['name', 'type', 'tweak_source', 'template', 'allowed_roles'];
}),
- transformFieldAttrs: computed('transformAttrs', function() {
+ transformFieldAttrs: computed('transformAttrs', function () {
return expandAttributeMeta(this, this.transformAttrs);
}),
diff --git a/ui/app/models/transform/alphabet.js b/ui/app/models/transform/alphabet.js
index b3cf510226..1cff5bbae2 100644
--- a/ui/app/models/transform/alphabet.js
+++ b/ui/app/models/transform/alphabet.js
@@ -6,7 +6,7 @@ import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
const M = Model.extend({
idPrefix: 'alphabet/',
- idForNav: computed('id', 'idPrefix', function() {
+ idForNav: computed('id', 'idPrefix', function () {
let modelId = this.id || '';
return `${this.idPrefix}${modelId}`;
}),
@@ -22,7 +22,7 @@ const M = Model.extend({
'Provide the set of valid UTF-8 characters contained within both the input and transformed value. Read more.',
}),
- attrs: computed(function() {
+ attrs: computed(function () {
let keys = ['name', 'alphabet'];
return expandAttributeMeta(this, keys);
}),
diff --git a/ui/app/models/transform/role.js b/ui/app/models/transform/role.js
index c650b66853..61ff802f33 100644
--- a/ui/app/models/transform/role.js
+++ b/ui/app/models/transform/role.js
@@ -8,7 +8,7 @@ const ModelExport = Model.extend({
// used for getting appropriate options for backend
idPrefix: 'role/',
// the id prefixed with `role/` so we can use it as the *secret param for the secret show route
- idForNav: computed('id', 'idPrefix', function() {
+ idForNav: computed('id', 'idPrefix', function () {
let modelId = this.id || '';
return `${this.idPrefix}${modelId}`;
}),
@@ -30,7 +30,7 @@ const ModelExport = Model.extend({
subText: 'Select which transformations this role will have access to. It must already exist.',
}),
- attrs: computed('transformations', function() {
+ attrs: computed('transformations', function () {
let keys = ['name', 'transformations'];
return expandAttributeMeta(this, keys);
}),
diff --git a/ui/app/models/transform/template.js b/ui/app/models/transform/template.js
index 103589e87a..9d1af764e2 100644
--- a/ui/app/models/transform/template.js
+++ b/ui/app/models/transform/template.js
@@ -6,7 +6,7 @@ import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
const M = Model.extend({
idPrefix: 'template/',
- idForNav: computed('id', 'idPrefix', function() {
+ idForNav: computed('id', 'idPrefix', function () {
let modelId = this.id || '';
return `${this.idPrefix}${modelId}`;
}),
@@ -32,7 +32,7 @@ const M = Model.extend({
selectLimit: 1,
}),
- attrs: computed(function() {
+ attrs: computed(function () {
let keys = ['name', 'pattern', 'alphabet'];
return expandAttributeMeta(this, keys);
}),
diff --git a/ui/app/models/transit-key.js b/ui/app/models/transit-key.js
index 09c6f47de2..a89bf19258 100644
--- a/ui/app/models/transit-key.js
+++ b/ui/app/models/transit-key.js
@@ -89,24 +89,24 @@ export default Model.extend({
set(this, 'derived', val);
},
- supportedActions: computed('type', function() {
+ supportedActions: computed('type', function () {
return Object.keys(ACTION_VALUES)
- .filter(name => {
+ .filter((name) => {
const { isSupported } = ACTION_VALUES[name];
return typeof isSupported === 'boolean' || get(this, isSupported);
})
- .map(name => {
+ .map((name) => {
const { description, glyph } = ACTION_VALUES[name];
return { name, description, glyph };
});
}),
- canDelete: computed('deletionAllowed', 'lastLoadTS', function() {
+ canDelete: computed('deletionAllowed', 'lastLoadTS', function () {
const deleteAttrChanged = Boolean(this.changedAttributes().deletionAllowed);
return this.deletionAllowed && deleteAttrChanged === false;
}),
- keyVersions: computed('validKeyVersions', function() {
+ keyVersions: computed('validKeyVersions', function () {
let maxVersion = Math.max(...this.validKeyVersions);
let versions = [];
while (maxVersion > 0) {
@@ -121,18 +121,18 @@ export default Model.extend({
'keyVersions',
'latestVersion',
'minDecryptionVersion',
- function() {
+ function () {
const { keyVersions, minDecryptionVersion } = this;
return keyVersions
- .filter(version => {
+ .filter((version) => {
return version >= minDecryptionVersion;
})
.reverse();
}
),
- keysForEncryption: computed('minEncryptionVersion', 'latestVersion', function() {
+ keysForEncryption: computed('minEncryptionVersion', 'latestVersion', function () {
let { minEncryptionVersion, latestVersion } = this;
let minVersion = clamp(minEncryptionVersion - 1, 0, latestVersion);
let versions = [];
@@ -143,11 +143,11 @@ export default Model.extend({
return versions;
}),
- validKeyVersions: computed('keys', function() {
+ validKeyVersions: computed('keys', function () {
return Object.keys(this.keys);
}),
- exportKeyTypes: computed('exportable', 'supportsEncryption', 'supportsSigning', 'type', function() {
+ exportKeyTypes: computed('exportable', 'supportsEncryption', 'supportsSigning', 'type', function () {
let types = ['hmac'];
if (this.supportsSigning) {
types.unshift('signing');
diff --git a/ui/app/router.js b/ui/app/router.js
index c3f4c04c40..be9bfe8570 100644
--- a/ui/app/router.js
+++ b/ui/app/router.js
@@ -6,9 +6,9 @@ export default class Router extends EmberRouter {
rootURL = config.rootURL;
}
-Router.map(function() {
- this.route('vault', { path: '/' }, function() {
- this.route('cluster', { path: '/:cluster_name' }, function() {
+Router.map(function () {
+ this.route('vault', { path: '/' }, function () {
+ this.route('cluster', { path: '/:cluster_name' }, function () {
this.route('oidc-provider-ns', { path: '/*namespace/identity/oidc/provider/:provider_name/authorize' });
this.route('oidc-provider', { path: '/identity/oidc/provider/:provider_name/authorize' });
this.route('oidc-callback', { path: '/auth/*auth_path/oidc/callback' });
@@ -17,38 +17,38 @@ Router.map(function() {
this.route('logout');
this.mount('open-api-explorer', { path: '/api-explorer' });
this.route('license');
- this.route('clients', function() {
+ this.route('clients', function () {
this.route('index', { path: '/' });
this.route('edit');
});
this.route('storage', { path: '/storage/raft' });
this.route('storage-restore', { path: '/storage/raft/restore' });
- this.route('settings', function() {
+ this.route('settings', function () {
this.route('index', { path: '/' });
this.route('seal');
- this.route('auth', function() {
+ this.route('auth', function () {
this.route('index', { path: '/' });
this.route('enable');
- this.route('configure', { path: '/configure/:method' }, function() {
+ this.route('configure', { path: '/configure/:method' }, function () {
this.route('index', { path: '/' });
this.route('section', { path: '/:section_name' });
});
});
this.route('mount-secret-backend');
- this.route('configure-secret-backend', { path: '/secrets/configure/:backend' }, function() {
+ this.route('configure-secret-backend', { path: '/secrets/configure/:backend' }, function () {
this.route('index', { path: '/' });
this.route('section', { path: '/:section_name' });
});
});
this.route('unseal');
- this.route('tools', function() {
+ this.route('tools', function () {
this.route('tool', { path: '/:selected_action' });
});
- this.route('access', function() {
+ this.route('access', function () {
this.route('methods', { path: '/' });
- this.route('method', { path: '/:path' }, function() {
+ this.route('method', { path: '/:path' }, function () {
this.route('index', { path: '/' });
- this.route('item', { path: '/item/:item_type' }, function() {
+ this.route('item', { path: '/item/:item_type' }, function () {
this.route('list', { path: '/' });
this.route('create');
this.route('edit', { path: '/edit/:item_id' });
@@ -56,7 +56,7 @@ Router.map(function() {
});
this.route('section', { path: '/:section_name' });
});
- this.route('leases', function() {
+ this.route('leases', function () {
// lookup
this.route('index', { path: '/' });
// lookup prefix
@@ -67,13 +67,13 @@ Router.map(function() {
this.route('show', { path: '/show/*lease_id' });
});
// the outer identity route handles group and entity items
- this.route('identity', { path: '/identity/:item_type' }, function() {
+ this.route('identity', { path: '/identity/:item_type' }, function () {
this.route('index', { path: '/' });
this.route('create');
this.route('merge');
this.route('edit', { path: '/edit/:item_id' });
this.route('show', { path: '/:item_id/:section' });
- this.route('aliases', function() {
+ this.route('aliases', function () {
this.route('index', { path: '/' });
this.route('add', { path: '/add/:item_id' });
this.route('edit', { path: '/edit/:item_alias_id' });
@@ -83,14 +83,14 @@ Router.map(function() {
this.route('control-groups');
this.route('control-groups-configure', { path: '/control-groups/configure' });
this.route('control-group-accessor', { path: '/control-groups/:accessor' });
- this.route('namespaces', function() {
+ this.route('namespaces', function () {
this.route('index', { path: '/' });
this.route('create');
});
});
- this.route('secrets', function() {
+ this.route('secrets', function () {
this.route('backends', { path: '/' });
- this.route('backend', { path: '/:backend' }, function() {
+ this.route('backend', { path: '/:backend' }, function () {
this.mount('kmip');
this.route('index', { path: '/' });
this.route('configuration');
@@ -126,15 +126,15 @@ Router.map(function() {
this.route('overview');
});
});
- this.route('policies', { path: '/policies/:type' }, function() {
+ this.route('policies', { path: '/policies/:type' }, function () {
this.route('index', { path: '/' });
this.route('create');
});
- this.route('policy', { path: '/policy/:type' }, function() {
+ this.route('policy', { path: '/policy/:type' }, function () {
this.route('show', { path: '/:policy_name' });
this.route('edit', { path: '/:policy_name/edit' });
});
- this.route('replication-dr-promote', function() {
+ this.route('replication-dr-promote', function () {
this.route('details');
});
if (config.addRootMounts) {
diff --git a/ui/app/routes/loading.js b/ui/app/routes/loading.js
index 0e80d2a45a..7457ead32a 100644
--- a/ui/app/routes/loading.js
+++ b/ui/app/routes/loading.js
@@ -5,7 +5,7 @@ export default Route.extend({
router: service(),
init() {
this._super(...arguments);
- this.router.on('routeWillChange', transition => {
+ this.router.on('routeWillChange', (transition) => {
this.set('myTargetRouteName', transition.to.name);
});
},
diff --git a/ui/app/routes/vault.js b/ui/app/routes/vault.js
index 56b377066d..1748db61cd 100644
--- a/ui/app/routes/vault.js
+++ b/ui/app/routes/vault.js
@@ -23,7 +23,7 @@ export default Route.extend({
},
};
this.store.push(fixture);
- return new Promise(resolve => {
+ return new Promise((resolve) => {
later(() => {
resolve(this.store.peekAll('cluster'));
}, SPLASH_DELAY);
diff --git a/ui/app/routes/vault/cluster.js b/ui/app/routes/vault/cluster.js
index c9b1c150f4..8b7dddcf15 100644
--- a/ui/app/routes/vault/cluster.js
+++ b/ui/app/routes/vault/cluster.js
@@ -18,7 +18,7 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
auth: service(),
featureFlagService: service('featureFlag'),
currentCluster: service(),
- modelTypes: computed(function() {
+ modelTypes: computed(function () {
return ['node', 'secret', 'secret-engine'];
}),
@@ -69,7 +69,7 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
return this.store.findRecord('cluster', id);
},
- poll: task(function*() {
+ poll: task(function* () {
while (true) {
// when testing, the polling loop causes promises to never settle so acceptance tests hang
// to get around that, we just disable the poll in tests
@@ -121,7 +121,7 @@ export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
let controller = this.controllerFor('vault.cluster');
controller.set('currentlyLoading', true);
- transition.finally(function() {
+ transition.finally(function () {
controller.set('currentlyLoading', false);
});
},
diff --git a/ui/app/routes/vault/cluster/access.js b/ui/app/routes/vault/cluster/access.js
index 46c91a794b..e4b6db7a4c 100644
--- a/ui/app/routes/vault/cluster/access.js
+++ b/ui/app/routes/vault/cluster/access.js
@@ -4,7 +4,7 @@ import ClusterRoute from 'vault/mixins/cluster-route';
import ModelBoundaryRoute from 'vault/mixins/model-boundary-route';
export default Route.extend(ModelBoundaryRoute, ClusterRoute, {
- modelTypes: computed(function() {
+ modelTypes: computed(function () {
return ['capabilities', 'control-group', 'identity/group', 'identity/group-alias', 'identity/alias'];
}),
model() {
diff --git a/ui/app/routes/vault/cluster/access/control-groups-configure.js b/ui/app/routes/vault/cluster/access/control-groups-configure.js
index cd32f16906..d8b16670ea 100644
--- a/ui/app/routes/vault/cluster/access/control-groups-configure.js
+++ b/ui/app/routes/vault/cluster/access/control-groups-configure.js
@@ -14,7 +14,7 @@ export default Route.extend(UnloadModel, {
model() {
let type = 'control-group-config';
return this.version.hasFeature('Control Groups')
- ? this.store.findRecord(type, 'config').catch(e => {
+ ? this.store.findRecord(type, 'config').catch((e) => {
// if you haven't saved a config, the API 404s, so create one here to edit and return it
if (e.httpStatus === 404) {
return this.store.createRecord(type, {
diff --git a/ui/app/routes/vault/cluster/access/identity/aliases/index.js b/ui/app/routes/vault/cluster/access/identity/aliases/index.js
index b661ef1750..fc9a9bca3a 100644
--- a/ui/app/routes/vault/cluster/access/identity/aliases/index.js
+++ b/ui/app/routes/vault/cluster/access/identity/aliases/index.js
@@ -11,7 +11,7 @@ export default Route.extend(ListRoute, {
page: params.page,
pageFilter: params.pageFilter,
})
- .catch(err => {
+ .catch((err) => {
if (err.httpStatus === 404) {
return [];
} else {
diff --git a/ui/app/routes/vault/cluster/access/identity/index.js b/ui/app/routes/vault/cluster/access/identity/index.js
index cdd6faabd1..163b3c03ee 100644
--- a/ui/app/routes/vault/cluster/access/identity/index.js
+++ b/ui/app/routes/vault/cluster/access/identity/index.js
@@ -11,7 +11,7 @@ export default Route.extend(ListRoute, {
page: params.page,
pageFilter: params.pageFilter,
})
- .catch(err => {
+ .catch((err) => {
if (err.httpStatus === 404) {
return [];
} else {
diff --git a/ui/app/routes/vault/cluster/access/leases/list.js b/ui/app/routes/vault/cluster/access/leases/list.js
index 9d87856939..c1ad888f1c 100644
--- a/ui/app/routes/vault/cluster/access/leases/list.js
+++ b/ui/app/routes/vault/cluster/access/leases/list.js
@@ -25,11 +25,11 @@ export default Route.extend({
page: params.page,
pageFilter: params.pageFilter,
})
- .then(model => {
+ .then((model) => {
this.set('has404', false);
return model;
})
- .catch(err => {
+ .catch((err) => {
if (err.httpStatus === 404 && prefix === '') {
return [];
} else {
diff --git a/ui/app/routes/vault/cluster/access/method.js b/ui/app/routes/vault/cluster/access/method.js
index 0ebc0e9a45..3da9bc42a7 100644
--- a/ui/app/routes/vault/cluster/access/method.js
+++ b/ui/app/routes/vault/cluster/access/method.js
@@ -7,14 +7,14 @@ export default Route.extend({
pathHelp: service('path-help'),
model(params) {
const { path } = params;
- return this.store.findAll('auth-method').then(modelArray => {
+ return this.store.findAll('auth-method').then((modelArray) => {
const model = modelArray.findBy('id', path);
if (!model) {
const error = new AdapterError();
set(error, 'httpStatus', 404);
throw error;
}
- return this.pathHelp.getPaths(model.apiPath, path).then(paths => {
+ return this.pathHelp.getPaths(model.apiPath, path).then((paths) => {
model.set('paths', paths);
return model;
});
diff --git a/ui/app/routes/vault/cluster/access/method/index.js b/ui/app/routes/vault/cluster/access/method/index.js
index b97b96de37..356fdef7ba 100644
--- a/ui/app/routes/vault/cluster/access/method/index.js
+++ b/ui/app/routes/vault/cluster/access/method/index.js
@@ -3,7 +3,7 @@ import { tabsForAuthSection } from 'vault/helpers/tabs-for-auth-section';
export default Route.extend({
beforeModel() {
let { methodType, paths } = this.modelFor('vault.cluster.access.method');
- paths = paths ? paths.paths.filter(path => path.navigation === true) : null;
+ paths = paths ? paths.paths.filter((path) => path.navigation === true) : null;
const activeTab = tabsForAuthSection([methodType, 'authConfig', paths])[0].routeParams;
return this.transitionTo(...activeTab);
},
diff --git a/ui/app/routes/vault/cluster/access/method/item.js b/ui/app/routes/vault/cluster/access/method/item.js
index e3532fbd69..ee8b564562 100644
--- a/ui/app/routes/vault/cluster/access/method/item.js
+++ b/ui/app/routes/vault/cluster/access/method/item.js
@@ -24,11 +24,11 @@ export default Route.extend({
this._super(...arguments);
const { apiPath, authMethodPath, itemType } = this.getMethodAndModelInfo();
controller.set('itemType', itemType);
- this.pathHelp.getPaths(apiPath, authMethodPath, itemType).then(paths => {
- let navigationPaths = paths.paths.filter(path => path.navigation);
+ this.pathHelp.getPaths(apiPath, authMethodPath, itemType).then((paths) => {
+ let navigationPaths = paths.paths.filter((path) => path.navigation);
controller.set(
'paths',
- navigationPaths.filter(path => path.itemType.includes(itemType)).map(path => path.path)
+ navigationPaths.filter((path) => path.itemType.includes(itemType)).map((path) => path.path)
);
});
},
diff --git a/ui/app/routes/vault/cluster/access/method/item/list.js b/ui/app/routes/vault/cluster/access/method/item/list.js
index 2b7eb447db..0eda1f9f88 100644
--- a/ui/app/routes/vault/cluster/access/method/item/list.js
+++ b/ui/app/routes/vault/cluster/access/method/item/list.js
@@ -28,7 +28,7 @@ export default Route.extend(ListRoute, {
type: itemType,
id: authMethodPath,
})
- .catch(err => {
+ .catch((err) => {
if (err.httpStatus === 404) {
return [];
} else {
@@ -54,10 +54,10 @@ export default Route.extend(ListRoute, {
const { apiPath, authMethodPath, itemType, methodModel } = this.getMethodAndModelInfo();
controller.set('itemType', itemType);
controller.set('methodModel', methodModel);
- this.pathHelp.getPaths(apiPath, authMethodPath, itemType).then(paths => {
+ this.pathHelp.getPaths(apiPath, authMethodPath, itemType).then((paths) => {
controller.set(
'paths',
- paths.paths.filter(path => path.navigation && path.itemType.includes(itemType))
+ paths.paths.filter((path) => path.navigation && path.itemType.includes(itemType))
);
});
},
diff --git a/ui/app/routes/vault/cluster/access/method/section.js b/ui/app/routes/vault/cluster/access/method/section.js
index bab327bc48..c4953ab7f1 100644
--- a/ui/app/routes/vault/cluster/access/method/section.js
+++ b/ui/app/routes/vault/cluster/access/method/section.js
@@ -23,6 +23,9 @@ export default Route.extend({
this._super(...arguments);
controller.set('section', section);
let method = this.modelFor('vault.cluster.access.method');
- controller.set('paths', method.paths.paths.filter(path => path.navigation));
+ controller.set(
+ 'paths',
+ method.paths.paths.filter((path) => path.navigation)
+ );
},
});
diff --git a/ui/app/routes/vault/cluster/access/namespaces/index.js b/ui/app/routes/vault/cluster/access/namespaces/index.js
index f598997fa5..4822effa52 100644
--- a/ui/app/routes/vault/cluster/access/namespaces/index.js
+++ b/ui/app/routes/vault/cluster/access/namespaces/index.js
@@ -23,10 +23,10 @@ export default Route.extend(UnloadModel, {
responsePath: 'data.keys',
page: Number(params?.page) || 1,
})
- .then(model => {
+ .then((model) => {
return model;
})
- .catch(err => {
+ .catch((err) => {
if (err.httpStatus === 404) {
return [];
} else {
diff --git a/ui/app/routes/vault/cluster/clients/index.js b/ui/app/routes/vault/cluster/clients/index.js
index f830881389..37f18463c8 100644
--- a/ui/app/routes/vault/cluster/clients/index.js
+++ b/ui/app/routes/vault/cluster/clients/index.js
@@ -44,7 +44,7 @@ export default Route.extend(ClusterRoute, {
},
model(params) {
- let config = this.store.queryRecord('clients/config', {}).catch(e => {
+ let config = this.store.queryRecord('clients/config', {}).catch((e) => {
console.debug(e);
// swallowing error so activity can show if no config permissions
return {};
@@ -65,7 +65,7 @@ export default Route.extend(ClusterRoute, {
// eslint-disable-next-line ember/no-controller-access-in-routes
let controller = this.controllerFor('vault.cluster.clients.index');
controller.set('currentlyLoading', true);
- transition.promise.finally(function() {
+ transition.promise.finally(function () {
controller.set('currentlyLoading', false);
});
},
diff --git a/ui/app/routes/vault/cluster/logout.js b/ui/app/routes/vault/cluster/logout.js
index c46a34e3ca..85da83a993 100644
--- a/ui/app/routes/vault/cluster/logout.js
+++ b/ui/app/routes/vault/cluster/logout.js
@@ -12,7 +12,7 @@ export default Route.extend(ModelBoundaryRoute, {
permissions: service(),
namespaceService: service('namespace'),
- modelTypes: computed(function() {
+ modelTypes: computed(function () {
return ['secret', 'secret-engine'];
}),
diff --git a/ui/app/routes/vault/cluster/oidc-provider.js b/ui/app/routes/vault/cluster/oidc-provider.js
index 190b595929..cac5119961 100644
--- a/ui/app/routes/vault/cluster/oidc-provider.js
+++ b/ui/app/routes/vault/cluster/oidc-provider.js
@@ -74,7 +74,7 @@ export default class VaultClusterOidcProviderRoute extends Route {
_buildUrl(urlString, params) {
try {
let url = new URL(urlString);
- Object.keys(params).forEach(key => {
+ Object.keys(params).forEach((key) => {
if (params[key]) {
url.searchParams.append(key, params[key]);
}
diff --git a/ui/app/routes/vault/cluster/policies/index.js b/ui/app/routes/vault/cluster/policies/index.js
index 5f46e865f6..3d83435e2e 100644
--- a/ui/app/routes/vault/cluster/policies/index.js
+++ b/ui/app/routes/vault/cluster/policies/index.js
@@ -28,7 +28,7 @@ export default Route.extend(ClusterRoute, ListRoute, {
pageFilter: params.pageFilter,
responsePath: 'data.keys',
})
- .catch(err => {
+ .catch((err) => {
// acls will never be empty, but sentinel policies can be
if (err.httpStatus === 404 && this.policyType() !== 'acl') {
return [];
diff --git a/ui/app/routes/vault/cluster/secrets/backend.js b/ui/app/routes/vault/cluster/secrets/backend.js
index 1dafeda49a..28754e3c4b 100644
--- a/ui/app/routes/vault/cluster/secrets/backend.js
+++ b/ui/app/routes/vault/cluster/secrets/backend.js
@@ -11,7 +11,7 @@ export default Route.extend({
.query('secret-engine', {
path: backend,
})
- .then(model => {
+ .then((model) => {
if (model) {
return model.get('firstObject');
}
diff --git a/ui/app/routes/vault/cluster/secrets/backend/configuration.js b/ui/app/routes/vault/cluster/secrets/backend/configuration.js
index 2d7bcf32bb..50c547d32e 100644
--- a/ui/app/routes/vault/cluster/secrets/backend/configuration.js
+++ b/ui/app/routes/vault/cluster/secrets/backend/configuration.js
@@ -12,7 +12,7 @@ export default Route.extend({
if (backend.isV2KV) {
let canRead = await this.store
.findRecord('capabilities', `${backend.id}/config`)
- .then(response => response.canRead);
+ .then((response) => response.canRead);
// only set these config params if they can read the config endpoint.
if (canRead) {
// design wants specific default to show that can't be set in the model
diff --git a/ui/app/routes/vault/cluster/secrets/backend/create-root.js b/ui/app/routes/vault/cluster/secrets/backend/create-root.js
index 75c7a5140b..6dac9d9cdb 100644
--- a/ui/app/routes/vault/cluster/secrets/backend/create-root.js
+++ b/ui/app/routes/vault/cluster/secrets/backend/create-root.js
@@ -20,7 +20,7 @@ let secretModel = (store, backend, key) => {
return secret;
};
-const transformModel = queryParams => {
+const transformModel = (queryParams) => {
let modelType = 'transform';
if (!queryParams || !queryParams.itemType) return modelType;
diff --git a/ui/app/routes/vault/cluster/secrets/backend/credentials.js b/ui/app/routes/vault/cluster/secrets/backend/credentials.js
index ae38e71991..f5c0680710 100644
--- a/ui/app/routes/vault/cluster/secrets/backend/credentials.js
+++ b/ui/app/routes/vault/cluster/secrets/backend/credentials.js
@@ -24,7 +24,7 @@ export default Route.extend({
},
getDatabaseCredential(backend, secret, roleType = '') {
- return this.store.queryRecord('database/credential', { backend, secret, roleType }).catch(error => {
+ return this.store.queryRecord('database/credential', { backend, secret, roleType }).catch((error) => {
if (error instanceof ControlGroupError) {
throw error;
}
diff --git a/ui/app/routes/vault/cluster/secrets/backend/list.js b/ui/app/routes/vault/cluster/secrets/backend/list.js
index 4c657142d7..aa90b11730 100644
--- a/ui/app/routes/vault/cluster/secrets/backend/list.js
+++ b/ui/app/routes/vault/cluster/secrets/backend/list.js
@@ -104,11 +104,11 @@ export default Route.extend({
page: params.page || 1,
pageFilter: params.pageFilter,
})
- .then(model => {
+ .then((model) => {
this.set('has404', false);
return model;
})
- .catch(err => {
+ .catch((err) => {
// if we're at the root we don't want to throw
if (backendModel && err.httpStatus === 404 && secret === '') {
return [];
@@ -134,10 +134,10 @@ export default Route.extend({
// possible that there is no certificate for them in order to know,
// we fetch them specifically on the list page, and then unload the
// records if there is no `certificate` attribute on the resultant model
- ['ca', 'crl', 'ca_chain'].map(id => this.store.queryRecord('pki-certificate', { id, backend }))
+ ['ca', 'crl', 'ca_chain'].map((id) => this.store.queryRecord('pki-certificate', { id, backend }))
).then(
- results => {
- results.rejectBy('certificate').forEach(record => record.unloadRecord());
+ (results) => {
+ results.rejectBy('certificate').forEach((record) => record.unloadRecord());
return model;
},
() => {
diff --git a/ui/app/routes/vault/cluster/secrets/backend/metadata.js b/ui/app/routes/vault/cluster/secrets/backend/metadata.js
index e9f8623225..ea95f834b2 100644
--- a/ui/app/routes/vault/cluster/secrets/backend/metadata.js
+++ b/ui/app/routes/vault/cluster/secrets/backend/metadata.js
@@ -18,7 +18,7 @@ export default class MetadataShow extends Route {
backend: this.backend,
id: secret,
})
- .catch(error => {
+ .catch((error) => {
// there was an error likely in read metadata.
// still load the page and handle what you show by filtering for this property
if (error.httpStatus === 403) {
diff --git a/ui/app/routes/vault/cluster/secrets/backend/overview.js b/ui/app/routes/vault/cluster/secrets/backend/overview.js
index fb46f85d79..3952708d1a 100644
--- a/ui/app/routes/vault/cluster/secrets/backend/overview.js
+++ b/ui/app/routes/vault/cluster/secrets/backend/overview.js
@@ -64,7 +64,7 @@ export default Route.extend({
!model.connectionCapabilities.canCreate &&
!model.connectionCapabilities.canUpdate;
- let emptyStateMessage = function() {
+ let emptyStateMessage = function () {
if (noConnectionCapabilities) {
return 'You cannot yet generate credentials. Ask your administrator if you think you should have access.';
} else {
diff --git a/ui/app/routes/vault/cluster/secrets/backend/secret-edit.js b/ui/app/routes/vault/cluster/secrets/backend/secret-edit.js
index 03e544acdf..fb697b9449 100644
--- a/ui/app/routes/vault/cluster/secrets/backend/secret-edit.js
+++ b/ui/app/routes/vault/cluster/secrets/backend/secret-edit.js
@@ -283,10 +283,7 @@ export default Route.extend(UnloadModelRoute, {
capabilities: model.capabilities,
baseKey: { id: secret },
// mode will be 'show', 'edit', 'create'
- mode: this.routeName
- .split('.')
- .pop()
- .replace('-root', ''),
+ mode: this.routeName.split('.').pop().replace('-root', ''),
backend,
preferAdvancedEdit,
backendType,
@@ -322,7 +319,7 @@ export default Route.extend(UnloadModelRoute, {
// when you don't have read access on metadata we add currentVersion to the model
// this makes it look like you have unsaved changes and prompts a browser warning
// here we are specifically ignoring it.
- if (mode === 'edit' && (changedKeys.length && changedKeys[0] === 'currentVersion')) {
+ if (mode === 'edit' && changedKeys.length && changedKeys[0] === 'currentVersion') {
version && version.rollbackAttributes();
return true;
}
@@ -330,7 +327,7 @@ export default Route.extend(UnloadModelRoute, {
// it's going to dirty the model state, so we need to look for it
// and explicity ignore it here
if (
- (mode !== 'show' && (changedKeys.length && changedKeys[0] !== 'backend')) ||
+ (mode !== 'show' && changedKeys.length && changedKeys[0] !== 'backend') ||
(mode !== 'show' && version && Object.keys(version.changedAttributes()).length)
) {
if (
diff --git a/ui/app/routes/vault/cluster/secrets/backend/sign.js b/ui/app/routes/vault/cluster/secrets/backend/sign.js
index c187a089d1..ee2f1212a2 100644
--- a/ui/app/routes/vault/cluster/secrets/backend/sign.js
+++ b/ui/app/routes/vault/cluster/secrets/backend/sign.js
@@ -26,7 +26,7 @@ export default Route.extend(UnloadModel, {
if (backendModel.get('type') !== 'ssh') {
return this.transitionTo('vault.cluster.secrets.backend.list-root', backend);
}
- return this.store.queryRecord('capabilities', this.pathQuery(role, backend)).then(capabilities => {
+ return this.store.queryRecord('capabilities', this.pathQuery(role, backend)).then((capabilities) => {
if (!capabilities.get('canUpdate')) {
return this.transitionTo('vault.cluster.secrets.backend.list-root', backend);
}
diff --git a/ui/app/routes/vault/cluster/settings/auth/configure/section.js b/ui/app/routes/vault/cluster/settings/auth/configure/section.js
index 26d47d7ff8..f4495cd06d 100644
--- a/ui/app/routes/vault/cluster/settings/auth/configure/section.js
+++ b/ui/app/routes/vault/cluster/settings/auth/configure/section.js
@@ -63,14 +63,14 @@ export default Route.extend(UnloadModelRoute, {
}
return this.store
.findRecord(modelType, backend.id)
- .then(config => {
+ .then((config) => {
config.set('backend', backend);
return RSVP.hash({
model: config,
section,
});
})
- .catch(e => {
+ .catch((e) => {
let config;
// if you haven't saved a config, the API 404s, so create one here to edit and return it
if (e.httpStatus === 404) {
diff --git a/ui/app/routes/vault/cluster/settings/configure-secret-backend.js b/ui/app/routes/vault/cluster/settings/configure-secret-backend.js
index 22b85cc2a2..a1c3c27f3f 100644
--- a/ui/app/routes/vault/cluster/settings/configure-secret-backend.js
+++ b/ui/app/routes/vault/cluster/settings/configure-secret-backend.js
@@ -7,7 +7,7 @@ const CONFIGURABLE_BACKEND_TYPES = ['aws', 'ssh', 'pki'];
export default Route.extend({
model() {
const { backend } = this.paramsFor(this.routeName);
- return this.store.query('secret-engine', { path: backend }).then(modelList => {
+ return this.store.query('secret-engine', { path: backend }).then((modelList) => {
let model = modelList && modelList.get('firstObject');
if (!model || !CONFIGURABLE_BACKEND_TYPES.includes(model.get('type'))) {
const error = new AdapterError();
@@ -40,7 +40,10 @@ export default Route.extend({
backend: model.id,
type,
})
- .then(() => model, () => model);
+ .then(
+ () => model,
+ () => model
+ );
}
return model;
},
diff --git a/ui/app/routes/vault/cluster/settings/configure-secret-backend/section.js b/ui/app/routes/vault/cluster/settings/configure-secret-backend/section.js
index 007cea5f33..b4aa5da1a2 100644
--- a/ui/app/routes/vault/cluster/settings/configure-secret-backend/section.js
+++ b/ui/app/routes/vault/cluster/settings/configure-secret-backend/section.js
@@ -15,7 +15,7 @@ export default Route.extend({
backend: backendModel.id,
section: sectionName,
})
- .then(model => {
+ .then((model) => {
model.set('backendType', backendModel.get('type'));
model.set('section', sectionName);
return model;
diff --git a/ui/app/routes/vault/cluster/settings/index.js b/ui/app/routes/vault/cluster/settings/index.js
index cd1f30425e..5b6928fe61 100644
--- a/ui/app/routes/vault/cluster/settings/index.js
+++ b/ui/app/routes/vault/cluster/settings/index.js
@@ -1,7 +1,7 @@
import Route from '@ember/routing/route';
export default Route.extend({
- beforeModel: function(transition) {
+ beforeModel: function (transition) {
if (transition.targetName === this.routeName) {
transition.abort();
return this.replaceWith('vault.cluster.settings.mount-secret-backend');
diff --git a/ui/app/serializers/application.js b/ui/app/serializers/application.js
index 96f0bc2deb..ae257b9610 100644
--- a/ui/app/serializers/application.js
+++ b/ui/app/serializers/application.js
@@ -4,13 +4,13 @@ import { assign } from '@ember/polyfills';
import { decamelize } from '@ember/string';
export default JSONSerializer.extend({
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
normalizeItems(payload) {
if (payload.data && payload.data.keys && Array.isArray(payload.data.keys)) {
- let models = payload.data.keys.map(key => {
+ let models = payload.data.keys.map((key) => {
if (typeof key !== 'string') {
return key;
}
diff --git a/ui/app/serializers/auth-method.js b/ui/app/serializers/auth-method.js
index 3fd8aaf062..695c3f43a0 100644
--- a/ui/app/serializers/auth-method.js
+++ b/ui/app/serializers/auth-method.js
@@ -14,7 +14,7 @@ export default ApplicationSerializer.extend({
const isCreate = requestType === 'createRecord';
const backends = isCreate
? payload.data
- : Object.keys(payload.data).map(path => this.normalizeBackend(path, payload.data[path]));
+ : Object.keys(payload.data).map((path) => this.normalizeBackend(path, payload.data[path]));
return this._super(store, primaryModelClass, backends, id, requestType);
},
diff --git a/ui/app/serializers/cluster.js b/ui/app/serializers/cluster.js
index 83d5a3553f..d27c948831 100644
--- a/ui/app/serializers/cluster.js
+++ b/ui/app/serializers/cluster.js
@@ -3,7 +3,7 @@ import { assign } from '@ember/polyfills';
import { decamelize } from '@ember/string';
export default RESTSerializer.extend(EmbeddedRecordsMixin, {
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
diff --git a/ui/app/serializers/config.js b/ui/app/serializers/config.js
index e2fb2cc854..383d274b98 100644
--- a/ui/app/serializers/config.js
+++ b/ui/app/serializers/config.js
@@ -3,7 +3,7 @@ import { assign } from '@ember/polyfills';
import { decamelize } from '@ember/string';
export default RESTSerializer.extend({
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
diff --git a/ui/app/serializers/database/connection.js b/ui/app/serializers/database/connection.js
index 34d750b4b0..3a6b9ecaaf 100644
--- a/ui/app/serializers/database/connection.js
+++ b/ui/app/serializers/database/connection.js
@@ -16,7 +16,7 @@ export default RESTSerializer.extend({
normalizeSecrets(payload) {
if (payload.data.keys && Array.isArray(payload.data.keys)) {
- const connections = payload.data.keys.map(secret => ({ name: secret, backend: payload.backend }));
+ const connections = payload.data.keys.map((secret) => ({ name: secret, backend: payload.backend }));
return connections;
}
// Query single record response:
@@ -52,14 +52,14 @@ export default RESTSerializer.extend({
if (!data.plugin_name) {
return data;
}
- let pluginType = AVAILABLE_PLUGIN_TYPES.find(plugin => plugin.value === data.plugin_name);
+ let pluginType = AVAILABLE_PLUGIN_TYPES.find((plugin) => plugin.value === data.plugin_name);
if (!pluginType) {
return data;
}
- let pluginAttributes = pluginType.fields.map(fields => fields.attr).concat('backend');
+ let pluginAttributes = pluginType.fields.map((fields) => fields.attr).concat('backend');
// filter data to only allow plugin specific attrs
- let allowedAttributes = Object.keys(data).filter(dataAttrs => pluginAttributes.includes(dataAttrs));
+ let allowedAttributes = Object.keys(data).filter((dataAttrs) => pluginAttributes.includes(dataAttrs));
for (const key in data) {
if (!allowedAttributes.includes(key)) {
delete data[key];
diff --git a/ui/app/serializers/database/role.js b/ui/app/serializers/database/role.js
index d4f480a3b0..5b94fc2a79 100644
--- a/ui/app/serializers/database/role.js
+++ b/ui/app/serializers/database/role.js
@@ -5,7 +5,7 @@ export default RESTSerializer.extend({
normalizeSecrets(payload) {
if (payload.data.keys && Array.isArray(payload.data.keys)) {
- const roles = payload.data.keys.map(secret => {
+ const roles = payload.data.keys.map((secret) => {
let type = 'dynamic';
let path = 'roles';
if (payload.data.staticRoles.includes(secret)) {
diff --git a/ui/app/serializers/identity/_base.js b/ui/app/serializers/identity/_base.js
index 2a6546c9c8..c28231d69a 100644
--- a/ui/app/serializers/identity/_base.js
+++ b/ui/app/serializers/identity/_base.js
@@ -4,7 +4,7 @@ import ApplicationSerializer from '../application';
export default ApplicationSerializer.extend({
normalizeItems(payload) {
if (payload.data.keys && Array.isArray(payload.data.keys)) {
- return payload.data.keys.map(key => {
+ return payload.data.keys.map((key) => {
let model = payload.data.key_info[key];
model.id = key;
return model;
diff --git a/ui/app/serializers/lease.js b/ui/app/serializers/lease.js
index c0dc3bef43..c6c268b25f 100644
--- a/ui/app/serializers/lease.js
+++ b/ui/app/serializers/lease.js
@@ -2,13 +2,13 @@ import RESTSerializer from '@ember-data/serializer/rest';
import { decamelize } from '@ember/string';
export default RESTSerializer.extend({
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
normalizeAll(payload) {
if (payload.data.keys && Array.isArray(payload.data.keys)) {
- const records = payload.data.keys.map(record => {
+ const records = payload.data.keys.map((record) => {
const fullPath = payload.prefix ? payload.prefix + record : record;
return { id: fullPath };
});
diff --git a/ui/app/serializers/namespace.js b/ui/app/serializers/namespace.js
index 01ab5c1cc1..ced413aee1 100644
--- a/ui/app/serializers/namespace.js
+++ b/ui/app/serializers/namespace.js
@@ -3,7 +3,7 @@ import ApplicationSerializer from './application';
export default ApplicationSerializer.extend({
normalizeList(payload) {
const data = payload.data.keys
- ? payload.data.keys.map(key => ({
+ ? payload.data.keys.map((key) => ({
path: key,
// remove the trailing slash from the id
id: key.replace(/\/$/, ''),
diff --git a/ui/app/serializers/node.js b/ui/app/serializers/node.js
index a5d1048255..35be4ee906 100644
--- a/ui/app/serializers/node.js
+++ b/ui/app/serializers/node.js
@@ -3,7 +3,7 @@ import { assign } from '@ember/polyfills';
import { decamelize } from '@ember/string';
export default RESTSerializer.extend(EmbeddedRecordsMixin, {
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
@@ -28,7 +28,7 @@ export default RESTSerializer.extend(EmbeddedRecordsMixin, {
normalizeResponse(store, primaryModelClass, payload, id, requestType) {
const nodes = payload.nodes
- ? Object.keys(payload.nodes).map(name => this.nodeFromObject(name, payload))
+ ? Object.keys(payload.nodes).map((name) => this.nodeFromObject(name, payload))
: [assign(payload, { id: '1' })];
const transformedPayload = { nodes: nodes };
diff --git a/ui/app/serializers/path-filter-config.js b/ui/app/serializers/path-filter-config.js
index 0bd8673888..edf2d57782 100644
--- a/ui/app/serializers/path-filter-config.js
+++ b/ui/app/serializers/path-filter-config.js
@@ -2,7 +2,7 @@ import RESTSerializer from '@ember-data/serializer/rest';
import { decamelize } from '@ember/string';
export default RESTSerializer.extend({
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
diff --git a/ui/app/serializers/pki-certificate.js b/ui/app/serializers/pki-certificate.js
index 427f40a670..2ab0d307bd 100644
--- a/ui/app/serializers/pki-certificate.js
+++ b/ui/app/serializers/pki-certificate.js
@@ -5,7 +5,7 @@ import { decamelize } from '@ember/string';
import { parsePkiCert } from '../helpers/parse-pki-cert';
export default RESTSerializer.extend({
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
@@ -22,7 +22,7 @@ export default RESTSerializer.extend({
normalizeItems(payload) {
if (payload.data && payload.data.keys && Array.isArray(payload.data.keys)) {
- let ret = payload.data.keys.map(key => {
+ let ret = payload.data.keys.map((key) => {
let model = {
id_for_nav: `cert/${key}`,
id: key,
diff --git a/ui/app/serializers/pki-config.js b/ui/app/serializers/pki-config.js
index e2fb2cc854..383d274b98 100644
--- a/ui/app/serializers/pki-config.js
+++ b/ui/app/serializers/pki-config.js
@@ -3,7 +3,7 @@ import { assign } from '@ember/polyfills';
import { decamelize } from '@ember/string';
export default RESTSerializer.extend({
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
diff --git a/ui/app/serializers/policy.js b/ui/app/serializers/policy.js
index 9646bbb94d..10c5685d69 100644
--- a/ui/app/serializers/policy.js
+++ b/ui/app/serializers/policy.js
@@ -4,7 +4,7 @@ export default ApplicationSerializer.extend({
primaryKey: 'name',
normalizePolicies(payload) {
- const data = payload.data.keys ? payload.data.keys.map(name => ({ name })) : payload.data;
+ const data = payload.data.keys ? payload.data.keys.map((name) => ({ name })) : payload.data;
return data;
},
diff --git a/ui/app/serializers/replication-attributes.js b/ui/app/serializers/replication-attributes.js
index 511b892898..8a72a75874 100644
--- a/ui/app/serializers/replication-attributes.js
+++ b/ui/app/serializers/replication-attributes.js
@@ -2,7 +2,7 @@ import RESTSerializer from '@ember-data/serializer/rest';
import { decamelize } from '@ember/string';
export default RESTSerializer.extend({
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
});
diff --git a/ui/app/serializers/role-aws.js b/ui/app/serializers/role-aws.js
index 6a394c8c07..e479a61f86 100644
--- a/ui/app/serializers/role-aws.js
+++ b/ui/app/serializers/role-aws.js
@@ -2,7 +2,7 @@ import ApplicationSerializer from './application';
export default ApplicationSerializer.extend({
extractLazyPaginatedData(payload) {
let ret;
- ret = payload.data.keys.map(key => {
+ ret = payload.data.keys.map((key) => {
let model = {
id: key,
};
diff --git a/ui/app/serializers/role.js b/ui/app/serializers/role.js
index 38c1d5f520..27d9d3653b 100644
--- a/ui/app/serializers/role.js
+++ b/ui/app/serializers/role.js
@@ -5,13 +5,13 @@ export default ApplicationSerializer.extend({
let ret;
if (payload.zero_address_roles) {
- payload.zero_address_roles.forEach(role => {
+ payload.zero_address_roles.forEach((role) => {
// mutate key_info object to add zero_address info
payload.data.key_info[role].zero_address = true;
});
}
if (!payload.data.key_info) {
- return payload.data.keys.map(key => {
+ return payload.data.keys.map((key) => {
let model = {
id: key,
};
@@ -22,7 +22,7 @@ export default ApplicationSerializer.extend({
});
}
- ret = payload.data.keys.map(key => {
+ ret = payload.data.keys.map((key) => {
let model = {
id: key,
key_type: payload.data.key_info[key].key_type,
diff --git a/ui/app/serializers/secret-engine.js b/ui/app/serializers/secret-engine.js
index d474013244..e6100eb7ca 100644
--- a/ui/app/serializers/secret-engine.js
+++ b/ui/app/serializers/secret-engine.js
@@ -37,11 +37,11 @@ export default ApplicationSerializer.extend({
// this is terrible, I'm sorry
// TODO extract AWS and SSH config saving from the secret-engine model to simplify this
if (payload.data.secret) {
- backends = Object.keys(payload.data.secret).map(id =>
+ backends = Object.keys(payload.data.secret).map((id) =>
this.normalizeBackend(id, payload.data.secret[id])
);
} else if (!payload.data.path) {
- backends = Object.keys(payload.data).map(id => this.normalizeBackend(id, payload[id]));
+ backends = Object.keys(payload.data).map((id) => this.normalizeBackend(id, payload[id]));
} else {
backends = [this.normalizeBackend(payload.data.path, payload.data)];
}
diff --git a/ui/app/serializers/secret-v2.js b/ui/app/serializers/secret-v2.js
index 2639cbeb91..9af7b8905d 100644
--- a/ui/app/serializers/secret-v2.js
+++ b/ui/app/serializers/secret-v2.js
@@ -10,7 +10,7 @@ export default ApplicationSerializer.extend(EmbeddedRecordsMixin, {
if (payload.data.keys && Array.isArray(payload.data.keys)) {
// if we have data.keys, it's a list of ids, so we map over that
// and create objects with id's
- return payload.data.keys.map(secret => {
+ return payload.data.keys.map((secret) => {
// secrets don't have an id in the response, so we need to concat the full
// path of the secret here - the id in the payload is added
// in the adapter after making the request
@@ -30,7 +30,7 @@ export default ApplicationSerializer.extend(EmbeddedRecordsMixin, {
}
// transform versions to an array with composite IDs
if (payload.data.versions) {
- payload.data.versions = Object.keys(payload.data.versions).map(version => {
+ payload.data.versions = Object.keys(payload.data.versions).map((version) => {
let body = payload.data.versions[version];
body.version = version;
body.path = payload.id;
diff --git a/ui/app/serializers/secret.js b/ui/app/serializers/secret.js
index b352f7aea7..2a3a19dc8a 100644
--- a/ui/app/serializers/secret.js
+++ b/ui/app/serializers/secret.js
@@ -12,7 +12,7 @@ export default ApplicationSerializer.extend({
) {
// if we have data.keys, it's a list of ids, so we map over that
// and create objects with id's
- return payload.data.keys.map(secret => {
+ return payload.data.keys.map((secret) => {
// secrets don't have an id in the response, so we need to concat the full
// path of the secret here - the id in the payload is added
// in the adapter after making the request
diff --git a/ui/app/serializers/ssh.js b/ui/app/serializers/ssh.js
index 4e7c292093..eb69b6fd16 100644
--- a/ui/app/serializers/ssh.js
+++ b/ui/app/serializers/ssh.js
@@ -4,7 +4,7 @@ import { assign } from '@ember/polyfills';
import { decamelize } from '@ember/string';
export default RESTSerializer.extend({
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
diff --git a/ui/app/serializers/transform.js b/ui/app/serializers/transform.js
index 95017c57f7..e86c3a3ebf 100644
--- a/ui/app/serializers/transform.js
+++ b/ui/app/serializers/transform.js
@@ -19,7 +19,7 @@ export default ApplicationSerializer.extend({
extractLazyPaginatedData(payload) {
let ret;
- ret = payload.data.keys.map(key => {
+ ret = payload.data.keys.map((key) => {
let model = {
id: key,
};
diff --git a/ui/app/serializers/transform/alphabet.js b/ui/app/serializers/transform/alphabet.js
index 70052248a0..957917b6c2 100644
--- a/ui/app/serializers/transform/alphabet.js
+++ b/ui/app/serializers/transform/alphabet.js
@@ -8,7 +8,7 @@ export default ApplicationSerializer.extend({
extractLazyPaginatedData(payload) {
let ret;
- ret = payload.data.keys.map(key => {
+ ret = payload.data.keys.map((key) => {
let model = {
id: key,
};
diff --git a/ui/app/serializers/transform/role.js b/ui/app/serializers/transform/role.js
index 5e35ae6a2c..29fcb4b040 100644
--- a/ui/app/serializers/transform/role.js
+++ b/ui/app/serializers/transform/role.js
@@ -3,7 +3,7 @@ import ApplicationSerializer from '../application';
export default ApplicationSerializer.extend({
extractLazyPaginatedData(payload) {
let ret;
- ret = payload.data.keys.map(key => {
+ ret = payload.data.keys.map((key) => {
let model = {
id: key,
};
diff --git a/ui/app/serializers/transform/template.js b/ui/app/serializers/transform/template.js
index 18bb7bf280..7a4cf7e215 100644
--- a/ui/app/serializers/transform/template.js
+++ b/ui/app/serializers/transform/template.js
@@ -20,7 +20,7 @@ export default ApplicationSerializer.extend({
extractLazyPaginatedData(payload) {
let ret;
- ret = payload.data.keys.map(key => {
+ ret = payload.data.keys.map((key) => {
let model = {
id: key,
};
diff --git a/ui/app/serializers/transit-key.js b/ui/app/serializers/transit-key.js
index 9861a77b88..d044e69a7a 100644
--- a/ui/app/serializers/transit-key.js
+++ b/ui/app/serializers/transit-key.js
@@ -5,13 +5,13 @@ import { decamelize } from '@ember/string';
export default RESTSerializer.extend({
primaryKey: 'name',
- keyForAttribute: function(attr) {
+ keyForAttribute: function (attr) {
return decamelize(attr);
},
normalizeSecrets(payload) {
if (payload.data.keys && Array.isArray(payload.data.keys)) {
- const secrets = payload.data.keys.map(secret => ({ name: secret, backend: payload.backend }));
+ const secrets = payload.data.keys.map((secret) => ({ name: secret, backend: payload.backend }));
return secrets;
}
assign(payload, payload.data);
diff --git a/ui/app/services/auth.js b/ui/app/services/auth.js
index 005f0dbd51..b2a1a99ff8 100644
--- a/ui/app/services/auth.js
+++ b/ui/app/services/auth.js
@@ -33,7 +33,7 @@ export default Service.extend({
return getOwner(this).lookup('adapter:cluster');
},
- tokens: computed(function() {
+ tokens: computed(function () {
return this.getTokensFromStorage() || [];
}),
@@ -92,7 +92,7 @@ export default Service.extend({
return fetch(url, {
method: opts.method || 'GET',
headers: opts.headers || {},
- }).then(response => {
+ }).then((response) => {
if (response.status === 204) {
return resolve();
} else if (response.status >= 200 && response.status < 300) {
@@ -144,7 +144,7 @@ export default Service.extend({
let currentBackend = BACKENDS.findBy('type', backend);
let displayName;
if (isArray(currentBackend.displayNamePath)) {
- displayName = currentBackend.displayNamePath.map(name => get(resp, name)).join('/');
+ displayName = currentBackend.displayNamePath.map((name) => get(resp, name)).join('/');
} else {
displayName = get(resp, currentBackend.displayNamePath);
}
@@ -217,7 +217,7 @@ export default Service.extend({
return this.storage(token).removeItem(token);
},
- tokenExpirationDate: computed('currentTokenName', 'expirationCalcTS', function() {
+ tokenExpirationDate: computed('currentTokenName', 'expirationCalcTS', function () {
const tokenName = this.currentTokenName;
if (!tokenName) {
return;
@@ -232,7 +232,7 @@ export default Service.extend({
return expiration ? this.now() >= expiration : null;
},
- renewAfterEpoch: computed('currentTokenName', 'expirationCalcTS', function() {
+ renewAfterEpoch: computed('currentTokenName', 'expirationCalcTS', function () {
const tokenName = this.currentTokenName;
let { expirationCalcTS } = this;
const data = this.getTokenData(tokenName);
@@ -252,18 +252,18 @@ export default Service.extend({
}
this.isRenewing = true;
return this.renewCurrentToken().then(
- resp => {
+ (resp) => {
this.isRenewing = false;
return this.persistAuthData(tokenName, resp.data || resp.auth);
},
- e => {
+ (e) => {
this.isRenewing = false;
throw e;
}
);
},
- checkShouldRenew: task(function*() {
+ checkShouldRenew: task(function* () {
while (true) {
if (Ember.testing) {
return;
@@ -303,7 +303,7 @@ export default Service.extend({
getTokensFromStorage(filterFn) {
return this.storage()
.keys()
- .reject(key => {
+ .reject((key) => {
return key.indexOf(TOKEN_PREFIX) !== 0 || (filterFn && filterFn(key));
});
},
@@ -313,7 +313,7 @@ export default Service.extend({
return;
}
- this.getTokensFromStorage().forEach(key => {
+ this.getTokensFromStorage().forEach((key) => {
const data = this.getTokenData(key);
if (data && data.policies && data.policies.includes('root')) {
this.removeTokenData(key);
@@ -349,19 +349,19 @@ export default Service.extend({
},
// returns the key for the token to use
- currentTokenName: computed('activeCluster', 'tokens', 'tokens.[]', function() {
+ currentTokenName: computed('activeCluster', 'tokens', 'tokens.[]', function () {
const regex = new RegExp(this.activeCluster);
- return this.tokens.find(key => regex.test(key));
+ return this.tokens.find((key) => regex.test(key));
}),
- currentToken: computed('currentTokenName', function() {
+ currentToken: computed('currentTokenName', function () {
const name = this.currentTokenName;
const data = name && this.getTokenData(name);
// data.token is undefined so that's why it returns current token undefined
return name && data ? data.token : null;
}),
- authData: computed('currentTokenName', function() {
+ authData: computed('currentTokenName', function () {
const token = this.currentTokenName;
if (!token) {
return;
diff --git a/ui/app/services/console.js b/ui/app/services/console.js
index c6f237b74e..5880074d61 100644
--- a/ui/app/services/console.js
+++ b/ui/app/services/console.js
@@ -31,7 +31,7 @@ export default Service.extend({
return getOwner(this).lookup('adapter:console');
},
commandHistory: filterBy('log', 'type', 'command'),
- log: computed(function() {
+ log: computed(function () {
return [];
}),
commandIndex: null,
diff --git a/ui/app/services/control-group.js b/ui/app/services/control-group.js
index 8d3cec2b26..46a7e00c07 100644
--- a/ui/app/services/control-group.js
+++ b/ui/app/services/control-group.js
@@ -32,8 +32,8 @@ export default Service.extend({
keyFromAccessor(accessor) {
let keys = this.storage().keys() || [];
let returnKey = keys
- .filter(k => k.startsWith(CONTROL_GROUP_PREFIX))
- .find(key => key.replace(CONTROL_GROUP_PREFIX, '').startsWith(accessor));
+ .filter((k) => k.startsWith(CONTROL_GROUP_PREFIX))
+ .find((key) => key.replace(CONTROL_GROUP_PREFIX, '').startsWith(accessor));
return returnKey ? returnKey : null;
},
@@ -50,7 +50,7 @@ export default Service.extend({
deleteTokens() {
let keys = this.storage().keys() || [];
- keys.filter(k => k.startsWith(CONTROL_GROUP_PREFIX)).forEach(key => this.storage().removeItem(key));
+ keys.filter((k) => k.startsWith(CONTROL_GROUP_PREFIX)).forEach((key) => this.storage().removeItem(key));
},
wrapInfoForAccessor(accessor) {
@@ -99,7 +99,7 @@ export default Service.extend({
paramsFromTransition(transitionTo, params, queryParams) {
let returnedParams = params.slice();
let qps = queryParams;
- transitionTo.paramNames.map(name => {
+ transitionTo.paramNames.map((name) => {
let param = transitionTo.params[name];
if (param.length) {
// push on to the front of the array since were're started at the end
diff --git a/ui/app/services/csp-event.js b/ui/app/services/csp-event.js
index 62a0284c36..d2c0ba1883 100644
--- a/ui/app/services/csp-event.js
+++ b/ui/app/services/csp-event.js
@@ -5,11 +5,11 @@ import Service from '@ember/service';
import { task, waitForEvent } from 'ember-concurrency';
export default Service.extend({
- events: computed(function() {
+ events: computed(function () {
return [];
}),
- connectionViolations: computed('events.@each.violatedDirective', function() {
- return this.events.filter(e => e.violatedDirective.startsWith('connect-src'));
+ connectionViolations: computed('events.@each.violatedDirective', function () {
+ return this.events.filter((e) => e.violatedDirective.startsWith('connect-src'));
}),
attach() {
@@ -20,7 +20,7 @@ export default Service.extend({
this.monitor.cancelAll();
},
- monitor: task(function*() {
+ monitor: task(function* () {
this.events.clear();
while (true) {
diff --git a/ui/app/services/namespace.js b/ui/app/services/namespace.js
index 3b8d41189c..7a27d779c6 100644
--- a/ui/app/services/namespace.js
+++ b/ui/app/services/namespace.js
@@ -23,7 +23,7 @@ export default Service.extend({
this.set('path', path);
},
- findNamespacesForUser: task(function*() {
+ findNamespacesForUser: task(function* () {
// uses the adapter and the raw response here since
// models get wiped when switching namespaces and we
// want to keep track of these separately
@@ -40,7 +40,7 @@ export default Service.extend({
let keys = ns.data.keys || [];
this.set(
'accessibleNamespaces',
- keys.map(n => {
+ keys.map((n) => {
let fullNS = n;
// if the user's root isn't '', then we need to construct
// the paths so they connect to the user root to the list
diff --git a/ui/app/services/path-help.js b/ui/app/services/path-help.js
index 422bb28b0c..b81334e098 100644
--- a/ui/app/services/path-help.js
+++ b/ui/app/services/path-help.js
@@ -64,7 +64,7 @@ export default Service.extend({
// use paths to dynamically create our openapi help url
// if we have a brand new model
return this.getPaths(apiPath, backend, itemType)
- .then(pathInfo => {
+ .then((pathInfo) => {
const adapterFactory = owner.factoryFor(`adapter:${modelType}`);
// if we have an adapter already use that, otherwise create one
if (!adapterFactory) {
@@ -75,7 +75,7 @@ export default Service.extend({
let path, paths;
// if we have an item we want the create info for that itemType
paths = itemType ? this.filterPathsByItemType(pathInfo, itemType) : pathInfo.paths;
- const createPath = paths.find(path => path.operations.includes('post') && path.action !== 'Delete');
+ const createPath = paths.find((path) => path.operations.includes('post') && path.action !== 'Delete');
path = createPath.path;
path = path.includes('{') ? path.slice(0, path.indexOf('{') - 1) + '/example' : path;
if (!path) {
@@ -89,7 +89,7 @@ export default Service.extend({
newModel = newModel.extend({ paths: pathInfo });
return this.registerNewModelWithProps(helpUrl, backend, newModel, modelName);
})
- .catch(err => {
+ .catch((err) => {
// TODO: we should handle the error better here
console.error(err);
});
@@ -109,7 +109,7 @@ export default Service.extend({
itemType = displayAttrs.itemType;
let items = itemType.split(':');
itemName = items[items.length - 1];
- items = items.map(item => dasherize(singularize(item.toLowerCase())));
+ items = items.map((item) => dasherize(singularize(item.toLowerCase())));
itemType = items.join('~*');
}
@@ -148,7 +148,7 @@ export default Service.extend({
if (!itemType) {
return pathInfo.paths;
}
- return pathInfo.paths.filter(path => {
+ return pathInfo.paths.filter((path) => {
return itemType === path.itemType;
});
},
@@ -159,7 +159,7 @@ export default Service.extend({
? `Fetching relevant paths for ${backend} ${itemType} ${itemID} from ${apiPath}`
: `Fetching relevant paths for ${backend} ${itemType} from ${apiPath}`;
debug(debugString);
- return this.ajax(`/v1/${apiPath}?help=1`, backend).then(help => {
+ return this.ajax(`/v1/${apiPath}?help=1`, backend).then((help) => {
const pathInfo = help.openapi.paths;
let paths = Object.entries(pathInfo);
@@ -180,7 +180,7 @@ export default Service.extend({
// add name of thing you want
debug(`Fetching schema properties for ${backend} from ${helpUrl}`);
- return this.ajax(helpUrl, backend).then(help => {
+ return this.ajax(helpUrl, backend).then((help) => {
// paths is an array but it will have a single entry
// for the scope we're in
const path = Object.keys(help.openapi.paths)[0]; // do this or look at name
@@ -219,13 +219,13 @@ export default Service.extend({
// we need list and create paths to set the correct urls for actions
let paths = this.filterPathsByItemType(pathInfo, itemType);
let { apiPath } = pathInfo;
- const getPath = paths.find(path => path.operations.includes('get'));
+ const getPath = paths.find((path) => path.operations.includes('get'));
// the action might be "Generate" or something like that so we'll grab the first post endpoint if there
// isn't one with "Create"
// TODO: look into a more sophisticated way to determine the create endpoint
- const createPath = paths.find(path => path.action === 'Create' || path.operations.includes('post'));
- const deletePath = paths.find(path => path.operations.includes('delete'));
+ const createPath = paths.find((path) => path.action === 'Create' || path.operations.includes('post'));
+ const deletePath = paths.find((path) => path.operations.includes('delete'));
return generatedItemAdapter.extend({
urlForItem(id, isList, dynamicApiPath) {
@@ -274,7 +274,7 @@ export default Service.extend({
},
registerNewModelWithProps(helpUrl, backend, newModel, modelName) {
- return this.getProps(helpUrl, backend).then(props => {
+ return this.getProps(helpUrl, backend).then((props) => {
const { attrs, newFields } = combineAttributes(newModel.attributes, props);
let owner = getOwner(this);
newModel = newModel.extend(attrs, { newFields });
@@ -307,7 +307,7 @@ export default Service.extend({
default: [],
};
let fieldGroups = [];
- newModel.attributes.forEach(attr => {
+ newModel.attributes.forEach((attr) => {
// if the attr comes in with a fieldGroup from OpenAPI,
// add it to that group
if (attr.options.fieldGroup) {
diff --git a/ui/app/services/permissions.js b/ui/app/services/permissions.js
index aa67e2128c..eab830c40c 100644
--- a/ui/app/services/permissions.js
+++ b/ui/app/services/permissions.js
@@ -59,7 +59,7 @@ export default Service.extend({
auth: service(),
namespace: service(),
- getPaths: task(function*() {
+ getPaths: task(function* () {
if (this.paths) {
return;
}
@@ -93,11 +93,11 @@ export default Service.extend({
return this.hasPermission(API_PATHS[navItem][routeParams], capability);
}
- return Object.values(API_PATHS[navItem]).some(path => this.hasPermission(path));
+ return Object.values(API_PATHS[navItem]).some((path) => this.hasPermission(path));
},
navPathParams(navItem) {
- const path = Object.values(API_PATHS[navItem]).find(path => this.hasPermission(path));
+ const path = Object.values(API_PATHS[navItem]).find((path) => this.hasPermission(path));
if (['policies', 'tools'].includes(navItem)) {
return path.split('/').lastObject;
}
@@ -122,14 +122,15 @@ export default Service.extend({
}
return capabilities.every(
- capability => this.hasMatchingExactPath(path, capability) || this.hasMatchingGlobPath(path, capability)
+ (capability) =>
+ this.hasMatchingExactPath(path, capability) || this.hasMatchingGlobPath(path, capability)
);
},
hasMatchingExactPath(pathName, capability) {
const exactPaths = this.exactPaths;
if (exactPaths) {
- const prefix = Object.keys(exactPaths).find(path => path.startsWith(pathName));
+ const prefix = Object.keys(exactPaths).find((path) => path.startsWith(pathName));
const hasMatchingPath = prefix && !this.isDenied(exactPaths[prefix]);
if (prefix && capability) {
@@ -144,7 +145,7 @@ export default Service.extend({
hasMatchingGlobPath(pathName, capability) {
const globPaths = this.globPaths;
if (globPaths) {
- const matchingPath = Object.keys(globPaths).find(k => {
+ const matchingPath = Object.keys(globPaths).find((k) => {
return pathName.includes(k) || pathName.includes(k.replace(/\/$/, ''));
});
const hasMatchingPath =
diff --git a/ui/app/services/store.js b/ui/app/services/store.js
index acd5995b99..452679d9e8 100644
--- a/ui/app/services/store.js
+++ b/ui/app/services/store.js
@@ -29,7 +29,7 @@ export function keyForCache(query) {
export default Store.extend({
// this is a map of map that stores the caches
- lazyCaches: computed(function() {
+ lazyCaches: computed(function () {
return new Map();
}),
@@ -81,7 +81,7 @@ export default Store.extend({
}
return adapter
.query(this, { modelName }, query)
- .then(response => {
+ .then((response) => {
const serializer = this.serializerFor(modelName);
const datasetHelper = serializer.extractLazyPaginatedData;
const dataset = datasetHelper
@@ -91,7 +91,7 @@ export default Store.extend({
this.storeDataset(modelName, query, response, dataset);
return this.fetchPage(modelName, query);
})
- .catch(function(e) {
+ .catch(function (e) {
throw e;
});
},
@@ -99,7 +99,7 @@ export default Store.extend({
filterData(filter, dataset) {
let newData = dataset || [];
if (filter) {
- newData = dataset.filter(function(item) {
+ newData = dataset.filter(function (item) {
const id = item.id || item;
return id.toLowerCase().includes(filter.toLowerCase());
});
@@ -141,10 +141,10 @@ export default Store.extend({
// pushes records into the store and returns the result
fetchPage(modelName, query) {
const response = this.constructResponse(modelName, query);
- this.peekAll(modelName).forEach(record => {
+ this.peekAll(modelName).forEach((record) => {
record.unloadRecord();
});
- return new Promise(resolve => {
+ return new Promise((resolve) => {
schedule('destroy', () => {
this.push(
this.serializerFor(modelName).normalizeResponse(
diff --git a/ui/app/services/version.js b/ui/app/services/version.js
index 01dc5051ad..3d5f03e371 100644
--- a/ui/app/services/version.js
+++ b/ui/app/services/version.js
@@ -10,8 +10,8 @@ const hasFeatureMethod = (context, featureKey) => {
}
return features.includes(featureKey);
};
-const hasFeature = featureKey => {
- return computed('features', 'features.[]', function() {
+const hasFeature = (featureKey) => {
+ return computed('features', 'features.[]', function () {
return hasFeatureMethod(this, featureKey);
});
};
@@ -47,7 +47,7 @@ export default Service.extend({
this.set('_features', resp.features);
},
- getVersion: task(function*() {
+ getVersion: task(function* () {
if (this.version) {
return;
}
@@ -56,7 +56,7 @@ export default Service.extend({
return;
}),
- getFeatures: task(function*() {
+ getFeatures: task(function* () {
if (this.features?.length || this.isOSS) {
return;
}
@@ -69,10 +69,10 @@ export default Service.extend({
}
}).keepLatest(),
- fetchVersion: function() {
+ fetchVersion: function () {
return this.getVersion.perform();
},
- fetchFeatures: function() {
+ fetchFeatures: function () {
return this.getFeatures.perform();
},
});
diff --git a/ui/app/services/wizard.js b/ui/app/services/wizard.js
index 6d16a63a63..d1f272aa55 100644
--- a/ui/app/services/wizard.js
+++ b/ui/app/services/wizard.js
@@ -2,6 +2,7 @@ import { next } from '@ember/runloop';
import { typeOf } from '@ember/utils';
import Service, { inject as service } from '@ember/service';
import { Machine } from 'xstate';
+import { capitalize } from '@ember/string';
import getStorage from 'vault/lib/token-storage';
import { STORAGE_KEYS, DEFAULTS, MACHINES } from 'vault/helpers/wizard-constants';
@@ -38,7 +39,11 @@ export default Service.extend(DEFAULTS, {
this.set('componentState', this.getExtState(COMPONENT_STATE));
}
let stateNodes = TutorialMachine.getStateNodes(this.currentState);
- this.executeActions(stateNodes.reduce((acc, node) => acc.concat(node.onEntry), []), null, 'tutorial');
+ this.executeActions(
+ stateNodes.reduce((acc, node) => acc.concat(node.onEntry), []),
+ null,
+ 'tutorial'
+ );
if (this.storageHasKey(FEATURE_LIST)) {
this.set('featureList', this.getExtState(FEATURE_LIST));
@@ -57,7 +62,7 @@ export default Service.extend(DEFAULTS, {
clearFeatureData() {
let storage = this.storage();
// empty storage
- [FEATURE_LIST, FEATURE_STATE, FEATURE_STATE_HISTORY, COMPLETED_FEATURES].forEach(key =>
+ [FEATURE_LIST, FEATURE_STATE, FEATURE_STATE_HISTORY, COMPLETED_FEATURES].forEach((key) =>
storage.removeItem(key)
);
@@ -71,7 +76,7 @@ export default Service.extend(DEFAULTS, {
this.clearFeatureData();
let storage = this.storage();
// empty storage
- [TUTORIAL_STATE, COMPONENT_STATE, RESUME_URL, RESUME_ROUTE].forEach(key => storage.removeItem(key));
+ [TUTORIAL_STATE, COMPONENT_STATE, RESUME_URL, RESUME_ROUTE].forEach((key) => storage.removeItem(key));
// reset wizard state
this.setProperties(DEFAULTS);
// restart machines from blank state
@@ -283,7 +288,7 @@ export default Service.extend(DEFAULTS, {
return;
}
this.startFeature();
- let nextFeature = this.featureList.length > 1 ? this.featureList.objectAt(1).capitalize() : 'Finish';
+ let nextFeature = this.featureList.length > 1 ? capitalize(this.featureList.objectAt(1)) : 'Finish';
this.set('nextFeature', nextFeature);
let next;
if (this.currentMachine === 'secrets' && this.featureState === 'display') {
@@ -293,7 +298,11 @@ export default Service.extend(DEFAULTS, {
}
this.saveState('nextStep', next.value);
let stateNodes = FeatureMachine.getStateNodes(this.featureState);
- this.executeActions(stateNodes.reduce((acc, node) => acc.concat(node.onEntry), []), null, 'feature');
+ this.executeActions(
+ stateNodes.reduce((acc, node) => acc.concat(node.onEntry), []),
+ null,
+ 'feature'
+ );
},
startFeature() {
@@ -323,12 +332,7 @@ export default Service.extend(DEFAULTS, {
completed.push(done);
this.saveExtState(COMPLETED_FEATURES, completed);
} else {
- this.saveExtState(
- COMPLETED_FEATURES,
- this.getExtState(COMPLETED_FEATURES)
- .toArray()
- .addObject(done)
- );
+ this.saveExtState(COMPLETED_FEATURES, this.getExtState(COMPLETED_FEATURES).toArray().addObject(done));
}
this.saveExtState(FEATURE_LIST, features.length ? features : null);
diff --git a/ui/app/templates/application.hbs b/ui/app/templates/application.hbs
index b560c7189e..5ca395c18f 100644
--- a/ui/app/templates/application.hbs
+++ b/ui/app/templates/application.hbs
@@ -1,3 +1,3 @@
{{outlet}}
-
+
\ No newline at end of file
diff --git a/ui/app/templates/components/alert-popup.hbs b/ui/app/templates/components/alert-popup.hbs
index 389c1eeaa0..143e5a00cb 100644
--- a/ui/app/templates/components/alert-popup.hbs
+++ b/ui/app/templates/components/alert-popup.hbs
@@ -1,21 +1,20 @@
-
+
-
+
-
-
+
\ No newline at end of file
diff --git a/ui/app/templates/components/alphabet-edit.hbs b/ui/app/templates/components/alphabet-edit.hbs
index 918962e44f..67d4937f77 100644
--- a/ui/app/templates/components/alphabet-edit.hbs
+++ b/ui/app/templates/components/alphabet-edit.hbs
@@ -1,46 +1,42 @@
\ No newline at end of file
diff --git a/ui/app/templates/components/raft-storage-restore.hbs b/ui/app/templates/components/raft-storage-restore.hbs
index 66139766a2..efbe9ebaaf 100644
--- a/ui/app/templates/components/raft-storage-restore.hbs
+++ b/ui/app/templates/components/raft-storage-restore.hbs
@@ -23,16 +23,16 @@
{{#if this.isUploading}}
-
-
- Cancel upload
-
+
+ Cancel upload
+
{{else}}
@@ -40,24 +40,21 @@
@type="warning"
@title="This might take a while"
@message="Raft snapshots can be very large files. Uploading the snapshot may take some time."
- />
-
+ />
+
Force restore
- Bypass checks to ensure the AutoUnseal or Shamir keys are consistent with the snapshot data.
+ Bypass checks to ensure the AutoUnseal or Shamir keys are consistent with the snapshot data.
+
\ No newline at end of file
diff --git a/ui/app/templates/components/role-aws-edit.hbs b/ui/app/templates/components/role-aws-edit.hbs
index e6799c8931..9c42c2a0cd 100644
--- a/ui/app/templates/components/role-aws-edit.hbs
+++ b/ui/app/templates/components/role-aws-edit.hbs
@@ -1,47 +1,44 @@
-
+
- {{#if (eq mode "create")}}
+ {{#if (eq this.mode "create")}}
Create an AWS Role
- {{else if (eq mode 'edit')}}
- Edit AWS Role {{model.id}}
+ {{else if (eq this.mode "edit")}}
+ Edit AWS Role
+ {{this.model.id}}
{{else}}
- AWS Role {{model.id}}
+ AWS Role
+ {{this.model.id}}
{{/if}}
{{/if}}
- {{!-- must have UPDATE permissions to add secret metadata. Create only will not work --}}
- {{#if (and @isV2 @canUpdateSecretMetadata)}}
-
+ {{! must have UPDATE permissions to add secret metadata. Create only will not work }}
+ {{#if (and @isV2 @canUpdateSecretMetadata)}}
+
{{#if this.showMetadata}}
{{/if}}
- {{/if}}
+ {{/if}}
Save
@@ -145,7 +148,7 @@
{{/if}}
{{#if (eq @mode "edit")}}
-{{!-- no metadata option because metadata is version agnostic --}}
+ {{! no metadata option because metadata is version agnostic }}
All secret versions and metadata are permanently destroyed and cannot be read or recovered later.
@@ -121,13 +117,20 @@
>
Delete
-
+
Cancel
-{{/unless}}
+{{else if this.canDeleteSecretData}}
+
+ Delete
+
+
+{{/if}}
\ No newline at end of file
diff --git a/ui/app/templates/components/secret-edit-metadata.hbs b/ui/app/templates/components/secret-edit-metadata.hbs
index 24392d4ae3..b04c7cbcd4 100644
--- a/ui/app/templates/components/secret-edit-metadata.hbs
+++ b/ui/app/templates/components/secret-edit-metadata.hbs
@@ -1,13 +1,17 @@
-
+
- The options below are all version-agnostic; they apply to all versions of this secret. {{if (eq @mode 'create') 'After the secret is created, this can be edited in the Metadata tab.' ''}}
+ The options below are all version-agnostic; they apply to all versions of this secret.
+ {{if (eq @mode "create") "After the secret is created, this can be edited in the Metadata tab." ""}}
diff --git a/ui/app/templates/components/selectable-card.hbs b/ui/app/templates/components/selectable-card.hbs
index 9080e691c3..6f9272342d 100644
--- a/ui/app/templates/components/selectable-card.hbs
+++ b/ui/app/templates/components/selectable-card.hbs
@@ -1,39 +1,39 @@
-{{!-- conditional to check if SelectableCard is apart of a CSS Grid, if yes return grid item class --}}
-{{#if gridContainer}}
+{{! conditional to check if SelectableCard is apart of a CSS Grid, if yes return grid item class }}
+{{#if this.gridContainer}}
-{{/if}}
+{{/if}}
\ No newline at end of file
diff --git a/ui/app/templates/components/shamir-progress.hbs b/ui/app/templates/components/shamir-progress.hbs
index eb905fda8d..91b731cb88 100644
--- a/ui/app/templates/components/shamir-progress.hbs
+++ b/ui/app/templates/components/shamir-progress.hbs
@@ -1,10 +1,11 @@
\ No newline at end of file
diff --git a/ui/app/templates/components/splash-page.hbs b/ui/app/templates/components/splash-page.hbs
index 8c3dd1cd06..d6970a7425 100644
--- a/ui/app/templates/components/splash-page.hbs
+++ b/ui/app/templates/components/splash-page.hbs
@@ -5,9 +5,9 @@
-
\ No newline at end of file
diff --git a/ui/app/templates/components/tool-actions-form.hbs b/ui/app/templates/components/tool-actions-form.hbs
index e45e4f4457..aada57d35c 100644
--- a/ui/app/templates/components/tool-actions-form.hbs
+++ b/ui/app/templates/components/tool-actions-form.hbs
@@ -1,63 +1,63 @@
- {{#if (eq selectedAction 'hash')}}
+ {{#if (eq this.selectedAction "hash")}}
+ {{! template-lint-disable no-passed-in-event-handlers }}
- {{else if (eq selectedAction 'random')}}
+ {{! template-lint-enable no-passed-in-event-handlers }}
+ {{else if (eq this.selectedAction "random")}}
- {{else if (eq selectedAction 'rewrap')}}
+ {{else if (eq this.selectedAction "rewrap")}}
- {{else if (eq selectedAction 'unwrap')}}
+ {{else if (eq this.selectedAction "unwrap")}}
- {{else if (eq selectedAction 'lookup')}}
+ {{else if (eq this.selectedAction "lookup")}}
- {{else if (eq selectedAction 'wrap')}}
+ {{else if (eq this.selectedAction "wrap")}}
{{else}}
-
+
{{/if}}
-
+
\ No newline at end of file
diff --git a/ui/app/templates/components/tool-hash.hbs b/ui/app/templates/components/tool-hash.hbs
index b9ca925de3..bc37ef0d67 100644
--- a/ui/app/templates/components/tool-hash.hbs
+++ b/ui/app/templates/components/tool-hash.hbs
@@ -17,12 +17,17 @@
-
- Copy
+
+ Copy
-
+
Back
@@ -35,7 +40,7 @@
Input
-
+
@@ -45,11 +50,7 @@
Algorithm
-
-{{/if}}
+{{/if}}
\ No newline at end of file
diff --git a/ui/app/templates/components/tool-random.hbs b/ui/app/templates/components/tool-random.hbs
index b338d07803..492d5ad037 100644
--- a/ui/app/templates/components/tool-random.hbs
+++ b/ui/app/templates/components/tool-random.hbs
@@ -13,7 +13,12 @@
-
+
Copy
@@ -33,7 +38,7 @@
Number of bytes
-
+
@@ -42,12 +47,8 @@
-
- {{#each (array 'base64' 'hex') as |formatOption|}}
+
+ {{#each (array "base64" "hex") as |formatOption|}}
-{{/if}}
+{{/if}}
\ No newline at end of file
diff --git a/ui/app/templates/components/tool-rewrap.hbs b/ui/app/templates/components/tool-rewrap.hbs
index 61cf5f9b7c..88358324c3 100644
--- a/ui/app/templates/components/tool-rewrap.hbs
+++ b/ui/app/templates/components/tool-rewrap.hbs
@@ -11,13 +11,25 @@
Rewrapped token
-
+
-
+
Copy
@@ -34,7 +46,7 @@
Wrapping token
-
+
@@ -45,4 +57,4 @@
-{{/if}}
+{{/if}}
\ No newline at end of file
diff --git a/ui/app/templates/components/tool-unwrap.hbs b/ui/app/templates/components/tool-unwrap.hbs
index dc61f27b20..62aa362c66 100644
--- a/ui/app/templates/components/tool-unwrap.hbs
+++ b/ui/app/templates/components/tool-unwrap.hbs
@@ -10,20 +10,42 @@
-
- Data
+ {{! template-lint-configure no-nested-interactive "warn" }}
+
-{{/if}}
+{{/if}}
\ No newline at end of file
diff --git a/ui/app/templates/components/tool-wrap.hbs b/ui/app/templates/components/tool-wrap.hbs
index bf2400e956..1d378ed351 100644
--- a/ui/app/templates/components/tool-wrap.hbs
+++ b/ui/app/templates/components/tool-wrap.hbs
@@ -11,13 +11,25 @@
\ No newline at end of file
diff --git a/ui/app/templates/components/transform-edit-base.hbs b/ui/app/templates/components/transform-edit-base.hbs
deleted file mode 100644
index fb5c4b157d..0000000000
--- a/ui/app/templates/components/transform-edit-base.hbs
+++ /dev/null
@@ -1 +0,0 @@
-{{yield}}
\ No newline at end of file
diff --git a/ui/app/templates/components/transform-edit-form.hbs b/ui/app/templates/components/transform-edit-form.hbs
index e736a85476..b3718a52c3 100644
--- a/ui/app/templates/components/transform-edit-form.hbs
+++ b/ui/app/templates/components/transform-edit-form.hbs
@@ -1,10 +1,10 @@
- {{#if (eq mode 'create')}}
+ {{#if (eq this.mode "create")}}
Create transformation
- {{else if (eq mode 'edit')}}
+ {{else if (eq this.mode "edit")}}
Save
{{/if}}
-
+
Cancel
-
+
\ No newline at end of file
diff --git a/ui/app/templates/components/transform-role-edit.hbs b/ui/app/templates/components/transform-role-edit.hbs
index 056345fdb1..ba7ad6c619 100644
--- a/ui/app/templates/components/transform-role-edit.hbs
+++ b/ui/app/templates/components/transform-role-edit.hbs
@@ -1,24 +1,31 @@
-
+
- {{#if (eq mode "create") }}
+ {{#if (eq this.mode "create")}}
Create Role
- {{else if (eq mode "edit")}}
+ {{else if (eq this.mode "edit")}}
Edit Role
{{else}}
- Role {{model.id}}
+ Role
+ {{this.model.id}}
{{/if}}
-{{/if}}
+{{/if}}
\ No newline at end of file
diff --git a/ui/app/templates/components/transform-show-transformation.hbs b/ui/app/templates/components/transform-show-transformation.hbs
index 18f6d8df43..57d995a508 100644
--- a/ui/app/templates/components/transform-show-transformation.hbs
+++ b/ui/app/templates/components/transform-show-transformation.hbs
@@ -1,11 +1,28 @@
- {{#each model.transformFieldAttrs as |attr|}}
+ {{#each this.model.transformFieldAttrs as |attr|}}
{{#if (eq attr.type "object")}}
-
+
{{else if (eq attr.type "array")}}
-
+
{{else}}
-
+
{{/if}}
{{/each}}
- To test decoding capability of your transformation, use the encoded_value in the following command. It should return your original input.
+ To test decoding capability of your transformation, use the encoded_value in the following command. It should return
+ your original input.
-
+
+
\ No newline at end of file
diff --git a/ui/app/templates/components/transform-template-edit.hbs b/ui/app/templates/components/transform-template-edit.hbs
index 68bf4b2a4a..0df415d9b6 100644
--- a/ui/app/templates/components/transform-template-edit.hbs
+++ b/ui/app/templates/components/transform-template-edit.hbs
@@ -1,46 +1,42 @@
- Deleting the {{model.name}} transformation means that the underlying keys are lost and the data encoded by the transformation are unrecoverable and cannot be decoded.
+ Deleting the
+ {{this.model.name}}
+ transformation means that the underlying keys are lost and the data encoded by the transformation are unrecoverable and
+ cannot be decoded.
-
+
- You’re editing a transformation that is in use by at least one role. Editing it may mean that encode and decode operations stop working. Are you sure?
+ You’re editing a transformation that is in use by at least one role. Editing it may mean that encode and decode
+ operations stop working. Are you sure?
-
+
\ No newline at end of file
diff --git a/ui/app/templates/components/transit-edit.hbs b/ui/app/templates/components/transit-edit.hbs
index 802af3ab30..da9389d954 100644
--- a/ui/app/templates/components/transit-edit.hbs
+++ b/ui/app/templates/components/transit-edit.hbs
@@ -1,50 +1,54 @@
-
+
-
+
\ No newline at end of file
diff --git a/ui/app/templates/components/transit-form-edit.hbs b/ui/app/templates/components/transit-form-edit.hbs
index 3b478e5d0c..c6d5b1abb4 100644
--- a/ui/app/templates/components/transit-form-edit.hbs
+++ b/ui/app/templates/components/transit-form-edit.hbs
@@ -17,12 +17,12 @@
- Minimum decryption version
+ Minimum decryption version
{{#each @key.keyVersions as |version|}}
@@ -34,24 +34,25 @@
- The minimum decryption version required to reverse transformations performed with the encryption key. Results from lower key versions
- may be rewrapped with the new key version using the rewrap action.
+ The minimum decryption version required to reverse transformations performed with the encryption key. Results from
+ lower key versions may be rewrapped with the new key version using the
+ rewrap
+ action.
- Minimum encryption version
+ Minimum encryption version
- The minimum version of the key that can be used to encrypt plaintext, sign payloads, or generate HMACs.
- You will be able to specify which version of the key to use for each of these actions. The value specified here must be greater than or equal to that specified in the Minimum Decryption Version selection above.
+ The minimum version of the key that can be used to encrypt plaintext, sign payloads, or generate HMACs. You will be
+ able to specify which version of the key to use for each of these actions. The value specified here must be greater
+ than or equal to that specified in the
+ Minimum Decryption Version
+ selection above.
+
\ No newline at end of file
diff --git a/ui/app/templates/components/transit-form-show.hbs b/ui/app/templates/components/transit-form-show.hbs
index 89f53c49ac..d163c98ed4 100644
--- a/ui/app/templates/components/transit-form-show.hbs
+++ b/ui/app/templates/components/transit-form-show.hbs
@@ -1,53 +1,62 @@