github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/ui/app/controllers/servers/server.js (about) 1 import Controller from '@ember/controller'; 2 import { computed } from '@ember/object'; 3 4 export default Controller.extend({ 5 activeTab: 'tags', 6 7 sortedTags: computed('model.tags', function() { 8 const tags = this.get('model.tags') || {}; 9 return Object.keys(tags) 10 .map(name => ({ 11 name, 12 value: tags[name], 13 })) 14 .sortBy('name'); 15 }), 16 17 actions: { 18 setTab(tab) { 19 this.set('activeTab', tab); 20 }, 21 }, 22 });