open-nomad/ui/app/models/resources.js
Buck Doyle b9f462fdc1
ui: Add optional memory max to task details ribbon (#10459)
This is the first step in #10268. If a maximum is not specified, the
task group sum uses the memory number instead. The maximum is only
shown when it’s higher than the memory sum.
2021-04-28 15:38:14 -05:00

14 lines
478 B
JavaScript

import { attr } from '@ember-data/model';
import Fragment from 'ember-data-model-fragments/fragment';
import { fragmentArray } from 'ember-data-model-fragments/attributes';
export default class Resources extends Fragment {
@attr('number') cpu;
@attr('number') memory;
@attr('number') memoryMax;
@attr('number') disk;
@attr('number') iops;
@fragmentArray('network', { defaultValue: () => [] }) networks;
@fragmentArray('port', { defaultValue: () => [] }) ports;
}