open-vault/ui/app/helpers/is-version.js
Matthew Irish d509588cd2
Ember update (#5386)
Ember update - update ember-cli, ember-data, and ember to 3.4 series
2018-09-25 11:28:26 -05:00

19 lines
552 B
JavaScript

import { inject as service } from '@ember/service';
import { assert } from '@ember/debug';
import Helper from '@ember/component/helper';
import { observer } from '@ember/object';
export default Helper.extend({
version: service(),
onFeaturesChange: observer('version.version', function() {
this.recompute();
}),
compute([sku]) {
if (sku !== 'OSS' && sku !== 'Enterprise') {
assert(`${sku} is not one of the available values for Vault versions.`, false);
return false;
}
return this.get(`version.is${sku}`);
},
});