mirror of https://github.com/rancher/ui.git
27 lines
653 B
JavaScript
27 lines
653 B
JavaScript
import Component from '@ember/component';
|
|
import { computed } from '@ember/object'
|
|
import layout from './template';
|
|
import C from 'ui/utils/constants';
|
|
|
|
export default Component.extend({
|
|
layout,
|
|
tagName: 'TR',
|
|
rule: null,
|
|
editing: true,
|
|
operatorChoices: C.SCHED_NODE_SELECTOR_OPERATOR,
|
|
|
|
actions: {
|
|
removeRule() {
|
|
this.sendAction('remove', this.get('rule'));
|
|
},
|
|
},
|
|
|
|
isJustLabel: computed('rule.operator', function() {
|
|
return ['Exists','DoesNotExist'].includes(this.get('rule.operator'));
|
|
}),
|
|
|
|
isMultiple: computed('rule.operator', function() {
|
|
return ['In','NotIn'].includes(this.get('rule.operator'));
|
|
}),
|
|
})
|