Remove superfluous uses of Object.freeze
This is no longer needed! https://guides.emberjs.com/release/upgrading/current-edition/native-classes/#toc_properties-and-fields
This commit is contained in:
parent
a4be011141
commit
c1cc51a057
|
@ -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');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Watchable from './watchable';
|
||||
|
||||
export default class PluginAdapter extends Watchable {
|
||||
queryParamsToAttrs = Object.freeze({
|
||||
queryParamsToAttrs = {
|
||||
type: 'type',
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -5,7 +5,7 @@ export default class PageSizeSelect extends Component {
|
|||
@service userSettings;
|
||||
|
||||
tagName = '';
|
||||
pageSizeOptions = Object.freeze([10, 25, 50]);
|
||||
pageSizeOptions = [10, 25, 50];
|
||||
|
||||
onChange() {}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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')) {
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue