github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/ui/app/components/job-page/abstract.js (about) 1 import Component from '@ember/component'; 2 import { inject as service } from '@ember/service'; 3 import { action } from '@ember/object'; 4 import classic from 'ember-classic-decorator'; 5 6 @classic 7 export default class Abstract extends Component { 8 @service system; 9 10 job = null; 11 12 // Provide a value that is bound to a query param 13 sortProperty = null; 14 sortDescending = null; 15 16 // Provide actions that require routing 17 gotoTaskGroup() {} 18 gotoJob() {} 19 20 // Set to a { title, description } to surface an error 21 errorMessage = null; 22 23 @action 24 clearErrorMessage() { 25 this.set('errorMessage', null); 26 } 27 28 @action 29 handleError(errorObject) { 30 this.set('errorMessage', errorObject); 31 } 32 }