mirror of https://github.com/rancher/ui.git
22 lines
606 B
JavaScript
22 lines
606 B
JavaScript
import Ember from 'ember';
|
|
import Resource from 'ember-api-store/models/resource';
|
|
import C from 'ui/utils/constants';
|
|
import { formatSi } from 'ui/utils/util';
|
|
|
|
export default Resource.extend({
|
|
isSystem: function() {
|
|
if ( this.get('system') ) {
|
|
return true;
|
|
}
|
|
|
|
let labels = this.get('labels');
|
|
return labels && !!labels[C.LABEL.SYSTEM_TYPE];
|
|
}.property('system','labels'),
|
|
|
|
memoryReservationBlurb: Ember.computed('memoryReservation', function() {
|
|
if ( this.get('memoryReservation') ) {
|
|
return formatSi(this.get('memoryReservation'), 1024, 'iB', 'B');
|
|
}
|
|
}),
|
|
});
|