mirror of https://github.com/hashicorp/consul
14 lines
305 B
JavaScript
14 lines
305 B
JavaScript
|
import Component from '@ember/component';
|
||
|
|
||
|
export default Component.extend({
|
||
|
tagName: '',
|
||
|
actions: {
|
||
|
createNewLabel: function(template, term) {
|
||
|
return template.replace(/{{term}}/g, term);
|
||
|
},
|
||
|
isUnique: function(items, term) {
|
||
|
return !items.findBy('Name', term);
|
||
|
},
|
||
|
},
|
||
|
});
|