diff --git a/ui/app/templates/components/alphabet-edit.hbs b/ui/app/components/alphabet-edit.hbs
similarity index 100%
rename from ui/app/templates/components/alphabet-edit.hbs
rename to ui/app/components/alphabet-edit.hbs
diff --git a/ui/app/components/alphabet-edit.js b/ui/app/components/alphabet-edit.js
index a0c0bda47f..435a814ae3 100644
--- a/ui/app/components/alphabet-edit.js
+++ b/ui/app/components/alphabet-edit.js
@@ -5,4 +5,4 @@
import TransformBase from './transform-edit-base';
-export default TransformBase.extend({});
+export default class AlphabetEdit extends TransformBase {}
diff --git a/ui/app/templates/components/license-info.hbs b/ui/app/components/license-info.hbs
similarity index 100%
rename from ui/app/templates/components/license-info.hbs
rename to ui/app/components/license-info.hbs
diff --git a/ui/app/templates/components/logo-edition.hbs b/ui/app/components/logo-edition.hbs
similarity index 100%
rename from ui/app/templates/components/logo-edition.hbs
rename to ui/app/components/logo-edition.hbs
diff --git a/ui/app/components/logo-edition.js b/ui/app/components/logo-edition.js
index 3092e2a040..3b28e173b3 100644
--- a/ui/app/components/logo-edition.js
+++ b/ui/app/components/logo-edition.js
@@ -6,7 +6,15 @@
import { inject as service } from '@ember/service';
import Component from '@ember/component';
-export default Component.extend({
- tagName: '',
- version: service(),
-});
+/**
+ * @module LogoEdition
+ * LogoEdition shows the Vault logo with information about enterprise if applicable.
+ *
+ * @example
+ * ```js
+ *
+ */
+
+export default class LogoEdition extends Component {
+ @service version;
+}
diff --git a/ui/app/templates/components/not-found.hbs b/ui/app/components/not-found.hbs
similarity index 83%
rename from ui/app/templates/components/not-found.hbs
rename to ui/app/components/not-found.hbs
index c28c4f0922..a0b12ce134 100644
--- a/ui/app/templates/components/not-found.hbs
+++ b/ui/app/components/not-found.hbs
@@ -12,7 +12,7 @@
-
Sorry, we were unable to find any content at {{or this.model.path this.path}}.
+
Sorry, we were unable to find any content at {{or @model.path this.path}}.
Double check the url or
go back home.
diff --git a/ui/app/components/not-found.js b/ui/app/components/not-found.js
index 7826733b4d..5abec960c3 100644
--- a/ui/app/components/not-found.js
+++ b/ui/app/components/not-found.js
@@ -4,14 +4,23 @@
*/
import { inject as service } from '@ember/service';
-import { alias } from '@ember/object/computed';
-import Component from '@ember/component';
+import Component from '@glimmer/component';
-export default Component.extend({
- // public
- model: null,
+/**
+ * @module NotFound
+ * NotFound components are used to show a message that the route was not found.
+ *
+ * @example
+ * ```js
+ *
+ * ```
+ * @param {object} model - routes model passed into the component.
+ */
- tagName: '',
- router: service(),
- path: alias('router.currentURL'),
-});
+export default class NotFound extends Component {
+ @service router;
+
+ get path() {
+ return this.router.currentURL;
+ }
+}
diff --git a/ui/app/models/transform/alphabet.js b/ui/app/models/transform/alphabet.js
index 9f1a569fd5..429fa02754 100644
--- a/ui/app/models/transform/alphabet.js
+++ b/ui/app/models/transform/alphabet.js
@@ -4,32 +4,41 @@
*/
import Model, { attr } from '@ember-data/model';
-import { computed } from '@ember/object';
import lazyCapabilities, { apiPath } from 'vault/macros/lazy-capabilities';
import { expandAttributeMeta } from 'vault/utils/field-to-attrs';
-export default Model.extend({
- idPrefix: 'alphabet/',
- idForNav: computed('id', 'idPrefix', function () {
+export default class Alphabet extends Model {
+ idPrefix = 'alphabet/';
+
+ get idForNav() {
const modelId = this.id || '';
return `${this.idPrefix}${modelId}`;
- }),
+ }
- name: attr('string', {
+ @attr('string', {
readOnly: true,
subText: 'The alphabet name. Keep in mind that spaces are not allowed and this cannot be edited later.',
- }),
- alphabet: attr('string', {
+ })
+ name;
+
+ @attr('string', {
label: 'Alphabet',
subText:
- 'Provide the set of valid UTF-8 characters contained within both the input and transformed value. Read more.',
- }),
+ 'Provide the set of valid UTF-8 characters contained within both the input and transformed value.',
+ docLink: '/vault/api-docs/secret/transform#create-update-alphabet',
+ })
+ alphabet;
- attrs: computed(function () {
+ get attrs() {
const keys = ['name', 'alphabet'];
return expandAttributeMeta(this, keys);
- }),
+ }
- backend: attr('string', { readOnly: true }),
- updatePath: lazyCapabilities(apiPath`${'backend'}/alphabet/${'id'}`, 'backend', 'id'),
-});
+ @attr('string', {
+ readOnly: true,
+ })
+ backend;
+
+ @lazyCapabilities(apiPath`${'backend'}/alphabet/${'id'}`, 'backend', 'id')
+ updatePath;
+}
diff --git a/ui/app/templates/components/block-error.hbs b/ui/app/templates/components/block-error.hbs
deleted file mode 100644
index 680a49e4c6..0000000000
--- a/ui/app/templates/components/block-error.hbs
+++ /dev/null
@@ -1,8 +0,0 @@
-{{!
- Copyright (c) HashiCorp, Inc.
- SPDX-License-Identifier: BUSL-1.1
-~}}
-
-
- {{yield}}
-
\ No newline at end of file
diff --git a/ui/app/transforms/array.js b/ui/app/transforms/array.js
index 919084396a..aeaa5ab4a8 100644
--- a/ui/app/transforms/array.js
+++ b/ui/app/transforms/array.js
@@ -10,19 +10,19 @@ import { isArray, A } from '@ember/array';
DS.attr('array')
*/
-export default Transform.extend({
+export default class ArrayTransform extends Transform {
deserialize(value) {
if (isArray(value)) {
return A(value);
} else {
return A();
}
- },
+ }
serialize(value) {
if (isArray(value)) {
return A(value);
} else {
return A();
}
- },
-});
+ }
+}
diff --git a/ui/app/transforms/object.js b/ui/app/transforms/object.js
index 7bf64876c2..31f0669072 100644
--- a/ui/app/transforms/object.js
+++ b/ui/app/transforms/object.js
@@ -8,19 +8,19 @@ import { typeOf } from '@ember/utils';
/*
DS.attr('object')
*/
-export default Transform.extend({
- deserialize: function (value) {
+export default class ObjectTransform extends Transform {
+ deserialize(value) {
if (typeOf(value) !== 'object') {
return {};
} else {
return value;
}
- },
- serialize: function (value) {
+ }
+ serialize(value) {
if (typeOf(value) !== 'object') {
return {};
} else {
return value;
}
- },
-});
+ }
+}