diff --git a/ui/.eslintrc.js b/ui/.eslintrc.js index 5a0e65e68b0..87f25659a8f 100644 --- a/ui/.eslintrc.js +++ b/ui/.eslintrc.js @@ -33,6 +33,8 @@ module.exports = { checkLoops: false, }, ], + 'ember/classic-decorator-hooks': 'error', + 'ember/classic-decorator-no-classic-methods': 'error', }, overrides: [ // node files diff --git a/ui/app/abilities/client.js b/ui/app/abilities/client.js index e8a94df3410..350200dc81a 100644 --- a/ui/app/abilities/client.js +++ b/ui/app/abilities/client.js @@ -1,7 +1,9 @@ import AbstractAbility from './abstract'; import { computed, get } from '@ember/object'; import { or } from '@ember/object/computed'; +import classic from 'ember-classic-decorator'; +@classic export default class Client extends AbstractAbility { // Map abilities to policy options (which are coarse for nodes) // instead of specific behaviors. diff --git a/ui/app/adapters/watchable-namespace-ids.js b/ui/app/adapters/watchable-namespace-ids.js index 24eeffe15bd..65471283ebe 100644 --- a/ui/app/adapters/watchable-namespace-ids.js +++ b/ui/app/adapters/watchable-namespace-ids.js @@ -1,6 +1,8 @@ import { inject as service } from '@ember/service'; import Watchable from './watchable'; +import classic from 'ember-classic-decorator'; +@classic export default class WatchableNamespaceIDs extends Watchable { @service system; diff --git a/ui/app/models/node.js b/ui/app/models/node.js index 2e69d56aa7f..86c0a84e0a4 100644 --- a/ui/app/models/node.js +++ b/ui/app/models/node.js @@ -7,7 +7,9 @@ import { fragment, fragmentArray } from 'ember-data-model-fragments/attributes'; import RSVP from 'rsvp'; import shortUUIDProperty from '../utils/properties/short-uuid'; import ipParts from '../utils/ip-parts'; +import classic from 'ember-classic-decorator'; +@classic export default class Node extends Model { // Available from list response @attr('string') name; diff --git a/ui/app/routes/csi/volumes/volume.js b/ui/app/routes/csi/volumes/volume.js index 77c2d2d99dc..62523ff764c 100644 --- a/ui/app/routes/csi/volumes/volume.js +++ b/ui/app/routes/csi/volumes/volume.js @@ -5,7 +5,9 @@ import notifyError from 'nomad-ui/utils/notify-error'; import { qpBuilder } from 'nomad-ui/utils/classes/query-params'; import { watchRecord } from 'nomad-ui/utils/properties/watch'; import WithWatchers from 'nomad-ui/mixins/with-watchers'; +import classic from 'ember-classic-decorator'; +@classic export default class VolumeRoute extends Route.extend(WithWatchers) { @service store; @service system; diff --git a/ui/app/routes/jobs/job.js b/ui/app/routes/jobs/job.js index 1cf7d438e87..6b79e338ad8 100644 --- a/ui/app/routes/jobs/job.js +++ b/ui/app/routes/jobs/job.js @@ -3,7 +3,9 @@ import Route from '@ember/routing/route'; import RSVP from 'rsvp'; import notifyError from 'nomad-ui/utils/notify-error'; import { jobCrumbs } from 'nomad-ui/utils/breadcrumb-utils'; +import classic from 'ember-classic-decorator'; +@classic export default class JobRoute extends Route { @service store; @service token; diff --git a/ui/app/serializers/allocation.js b/ui/app/serializers/allocation.js index 7095d786a13..77b8132aa86 100644 --- a/ui/app/serializers/allocation.js +++ b/ui/app/serializers/allocation.js @@ -1,6 +1,7 @@ import { inject as service } from '@ember/service'; import { get } from '@ember/object'; import ApplicationSerializer from './application'; +import classic from 'ember-classic-decorator'; const taskGroupFromJob = (job, taskGroupName) => { const taskGroups = job && job.TaskGroups; @@ -8,6 +9,7 @@ const taskGroupFromJob = (job, taskGroupName) => { return taskGroup ? taskGroup : null; }; +@classic export default class AllocationSerializer extends ApplicationSerializer { @service system; diff --git a/ui/app/serializers/evaluation.js b/ui/app/serializers/evaluation.js index b4575ba2e36..e72a6eb474f 100644 --- a/ui/app/serializers/evaluation.js +++ b/ui/app/serializers/evaluation.js @@ -2,7 +2,9 @@ import { inject as service } from '@ember/service'; import { get } from '@ember/object'; import { assign } from '@ember/polyfills'; import ApplicationSerializer from './application'; +import classic from 'ember-classic-decorator'; +@classic export default class Evaluation extends ApplicationSerializer { @service system;