diff --git a/ui/app/controllers/clients/client.js b/ui/app/controllers/clients/client.js index 6e2000116..26dfc9b64 100644 --- a/ui/app/controllers/clients/client.js +++ b/ui/app/controllers/clients/client.js @@ -30,6 +30,10 @@ export default Controller.extend(Sortable, Searchable, { .reverse(); }), + sortedDrivers: computed('model.drivers.@each.name', function() { + return this.get('model.drivers').sortBy('name'); + }), + actions: { gotoAllocation(allocation) { this.transitionToRoute('allocations.allocation', allocation); diff --git a/ui/app/models/node-driver.js b/ui/app/models/node-driver.js index c656d5281..d412867e7 100644 --- a/ui/app/models/node-driver.js +++ b/ui/app/models/node-driver.js @@ -1,4 +1,5 @@ import Fragment from 'ember-data-model-fragments/fragment'; +import { computed } from '@ember/object'; import attr from 'ember-data/attr'; import { fragmentOwner } from 'ember-data-model-fragments/attributes'; import { fragment } from 'ember-data-model-fragments/attributes'; @@ -12,4 +13,8 @@ export default Fragment.extend({ healthy: attr('boolean', { defaultValue: false }), healthDescription: attr('string'), updateTime: attr('date'), + + healthClass: computed('healthy', function() { + return this.get('healthy') ? 'running' : 'failed'; + }), }); diff --git a/ui/app/templates/clients/client.hbs b/ui/app/templates/clients/client.hbs index 5a9ee7f78..79a18e34c 100644 --- a/ui/app/templates/clients/client.hbs +++ b/ui/app/templates/clients/client.hbs @@ -121,6 +121,64 @@ +