open-nomad/ui/app/models/node-pool.js
Jai 7103ce1957
ui: create node pool model (#17301)
Co-authored-by: Phil Renaud <phil@riotindustries.com>
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-06-22 13:11:44 -04:00

28 lines
758 B
JavaScript

/**
* 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');
}
}