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 @@ +
+
+ Driver Status +
+
+ {{#list-accordion source=sortedDrivers key="name" as |a|}} + {{#a.head buttonLabel="details" isExpandable=a.item.detected}} +
+
+ {{a.item.name}} +
+
+ {{#if a.item.detected}} + + + {{if a.item.healthy "Healthy" "Unhealthy"}} + + {{/if}} +
+
+ + Detected + {{if a.item.detected "Yes" "No"}} + + + + Last Updated + {{moment-from-now a.item.updateTime interval=1000}} + + +
+
+ {{/a.head}} + {{#a.body}} +

{{a.item.healthDescription}}

+
+
+ {{capitalize a.item.name}} Attributes +
+ {{#if a.item.attributes.attributesStructured}} +
+ {{attributes-table + attributes=a.item.attributes.attributesStructured + class="attributes-table"}} +
+ {{else}} +
+
+

No Driver Attributes

+
+
+ {{/if}} +
+ {{/a.body}} + {{/list-accordion}} +
+
+
Attributes