diff --git a/ui/app/controllers/topology.js b/ui/app/controllers/topology.js index b676c01c6..f2056ee4d 100644 --- a/ui/app/controllers/topology.js +++ b/ui/app/controllers/topology.js @@ -5,10 +5,16 @@ import { reduceToLargestUnit } from 'nomad-ui/helpers/format-bytes'; @classic export default class TopologyControllers extends Controller { + @computed('model.nodes.@each.datacenter') get datacenters() { return Array.from(new Set(this.model.nodes.mapBy('datacenter'))).compact(); } + @computed('model.allocations.@each.isScheduled') + get scheduledAllocations() { + return this.model.allocations.filterBy('isScheduled'); + } + @computed('model.nodes.@each.resources') get totalMemory() { const mibs = this.model.nodes diff --git a/ui/app/templates/topology.hbs b/ui/app/templates/topology.hbs index f94f20e23..e7e618f3a 100644 --- a/ui/app/templates/topology.hbs +++ b/ui/app/templates/topology.hbs @@ -128,8 +128,7 @@
{{this.model.nodes.length}} Clients
{{this.model.allocations.length}} Allocations
+{{this.scheduledAllocations.length}} Allocations