open-nomad/ui/app/models/node-pool.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
758 B
JavaScript
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Model from '@ember-data/model';
import { attr } from '@ember-data/model';
import { computed } from '@ember/object';
import classic from 'ember-classic-decorator';
@classic
export default class NodePool extends Model {
@attr('string') name;
@attr('string') description;
@attr() meta;
@attr() schedulerConfiguration;
@computed('schedulerConfiguration.SchedulerAlgorithm')
get schedulerAlgorithm() {
return this.get('schedulerConfiguration.SchedulerAlgorithm');
}
@computed('schedulerConfiguration.MemoryOversubscriptionEnabled')
get memoryOversubscriptionEnabled() {
return this.get('schedulerConfiguration.MemoryOversubscriptionEnabled');
}
}