diff --git a/ui/app/adapters/job.js b/ui/app/adapters/job.js index a052e5c8d..bb18b2719 100644 --- a/ui/app/adapters/job.js +++ b/ui/app/adapters/job.js @@ -2,9 +2,9 @@ import WatchableNamespaceIDs from './watchable-namespace-ids'; import addToPath from 'nomad-ui/utils/add-to-path'; export default class JobAdapter extends WatchableNamespaceIDs { - relationshipFallbackLinks = Object.freeze({ + relationshipFallbackLinks = { summary: '/summary', - }); + }; fetchRawDefinition(job) { const url = this.urlForFindRecord(job.get('id'), 'job'); diff --git a/ui/app/adapters/plugin.js b/ui/app/adapters/plugin.js index ff304dbdf..80096f31b 100644 --- a/ui/app/adapters/plugin.js +++ b/ui/app/adapters/plugin.js @@ -1,7 +1,7 @@ import Watchable from './watchable'; export default class PluginAdapter extends Watchable { - queryParamsToAttrs = Object.freeze({ + queryParamsToAttrs = { type: 'type', - }); + }; } diff --git a/ui/app/adapters/volume.js b/ui/app/adapters/volume.js index fbc665b32..594f929a1 100644 --- a/ui/app/adapters/volume.js +++ b/ui/app/adapters/volume.js @@ -1,8 +1,8 @@ import WatchableNamespaceIDs from './watchable-namespace-ids'; export default class VolumeAdapter extends WatchableNamespaceIDs { - queryParamsToAttrs = Object.freeze({ + queryParamsToAttrs = { type: 'type', plugin_id: 'plugin.id', - }); + }; } diff --git a/ui/app/components/exec/task-group-parent.js b/ui/app/components/exec/task-group-parent.js index f56b7ecb1..8537d9f01 100644 --- a/ui/app/components/exec/task-group-parent.js +++ b/ui/app/components/exec/task-group-parent.js @@ -63,7 +63,7 @@ export default class TaskGroupParent extends Component { return this.taskGroup.tasks.filter(task => activeTaskStateNames.includes(task.name)); } - taskSorting = Object.freeze(['name']); + taskSorting = ['name']; @sort('tasksWithRunningStates', 'taskSorting') sortedTasks; clickedOpen = false; diff --git a/ui/app/components/page-size-select.js b/ui/app/components/page-size-select.js index 3c6c3f0b3..2151c4c58 100644 --- a/ui/app/components/page-size-select.js +++ b/ui/app/components/page-size-select.js @@ -5,7 +5,7 @@ export default class PageSizeSelect extends Component { @service userSettings; tagName = ''; - pageSizeOptions = Object.freeze([10, 25, 50]); + pageSizeOptions = [10, 25, 50]; onChange() {} } diff --git a/ui/app/controllers/exec.js b/ui/app/controllers/exec.js index d648753fc..9e2691527 100644 --- a/ui/app/controllers/exec.js +++ b/ui/app/controllers/exec.js @@ -32,7 +32,7 @@ export default class ExecController extends Controller { @mapBy('pendingAndRunningAllocations', 'taskGroup') pendingAndRunningTaskGroups; @uniq('pendingAndRunningTaskGroups') uniquePendingAndRunningTaskGroups; - taskGroupSorting = Object.freeze(['name']); + taskGroupSorting = ['name']; @sort('uniquePendingAndRunningTaskGroups', 'taskGroupSorting') sortedTaskGroups; setUpTerminal(Terminal) { diff --git a/ui/app/routes/clients.js b/ui/app/routes/clients.js index 404023e75..c0c85460e 100644 --- a/ui/app/routes/clients.js +++ b/ui/app/routes/clients.js @@ -10,12 +10,12 @@ export default class ClientsRoute extends Route.extend(WithForbiddenState) { @service store; @service system; - breadcrumbs = Object.freeze([ + breadcrumbs = [ { label: 'Clients', args: ['clients.index'], }, - ]); + ]; beforeModel() { return this.get('system.leader'); diff --git a/ui/app/routes/csi/plugins.js b/ui/app/routes/csi/plugins.js index d6e6fefad..0ddd99f36 100644 --- a/ui/app/routes/csi/plugins.js +++ b/ui/app/routes/csi/plugins.js @@ -6,12 +6,12 @@ import notifyForbidden from 'nomad-ui/utils/notify-forbidden'; export default class PluginsRoute extends Route.extend(WithForbiddenState) { @service store; - breadcrumbs = Object.freeze([ + breadcrumbs = [ { label: 'Storage', args: ['csi.index'], }, - ]); + ]; model() { return this.store.query('plugin', { type: 'csi' }).catch(notifyForbidden(this)); diff --git a/ui/app/routes/csi/volumes.js b/ui/app/routes/csi/volumes.js index 84548d8ca..14d0ada01 100644 --- a/ui/app/routes/csi/volumes.js +++ b/ui/app/routes/csi/volumes.js @@ -9,12 +9,12 @@ export default class VolumesRoute extends Route.extend(WithForbiddenState) { @service system; @service store; - breadcrumbs = Object.freeze([ + breadcrumbs = [ { label: 'Storage', args: ['csi.index'], }, - ]); + ]; queryParams = { volumeNamespace: { diff --git a/ui/app/routes/jobs.js b/ui/app/routes/jobs.js index e84f2efe7..8ba64a9e2 100644 --- a/ui/app/routes/jobs.js +++ b/ui/app/routes/jobs.js @@ -10,12 +10,12 @@ export default class JobsRoute extends Route.extend(WithForbiddenState) { @service store; @service system; - breadcrumbs = Object.freeze([ + breadcrumbs = [ { label: 'Jobs', args: ['jobs.index'], }, - ]); + ]; queryParams = { jobNamespace: { diff --git a/ui/app/routes/jobs/run.js b/ui/app/routes/jobs/run.js index 417bbff97..c7a9de74f 100644 --- a/ui/app/routes/jobs/run.js +++ b/ui/app/routes/jobs/run.js @@ -8,12 +8,12 @@ export default class RunRoute extends Route { @service store; @service system; - breadcrumbs = Object.freeze([ + breadcrumbs = [ { label: 'Run', args: ['jobs.run'], }, - ]); + ]; beforeModel() { if (this.can.cannot('run job')) { diff --git a/ui/app/routes/servers.js b/ui/app/routes/servers.js index c48de5411..5976dfaff 100644 --- a/ui/app/routes/servers.js +++ b/ui/app/routes/servers.js @@ -10,12 +10,12 @@ export default class ServersRoute extends Route.extend(WithForbiddenState) { @service store; @service system; - breadcrumbs = Object.freeze([ + breadcrumbs = [ { label: 'Servers', args: ['servers.index'], }, - ]); + ]; beforeModel() { return this.get('system.leader'); diff --git a/ui/app/serializers/volume.js b/ui/app/serializers/volume.js index f570eb19d..2b6e055f1 100644 --- a/ui/app/serializers/volume.js +++ b/ui/app/serializers/volume.js @@ -6,7 +6,7 @@ export default class VolumeSerializer extends ApplicationSerializer { externalId: 'ExternalID', }; - embeddedRelationships = Object.freeze(['writeAllocations', 'readAllocations']); + embeddedRelationships = ['writeAllocations', 'readAllocations']; // Volumes treat Allocations as embedded records. Ember has an // EmbeddedRecords mixin, but it assumes an application is using