Filter total alloc count by only scheduled allocs
This commit is contained in:
parent
d9ac6a63c6
commit
ba8675ae87
|
@ -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
|
||||
|
|
|
@ -128,8 +128,7 @@
|
|||
<p class="metric">{{this.model.nodes.length}} <span class="metric-label">Clients</span></p>
|
||||
</div>
|
||||
<div class="dashboard-metric column">
|
||||
{{! TODO: make sure that this is only the scheduled allocations }}
|
||||
<p class="metric">{{this.model.allocations.length}} <span class="metric-label">Allocations</span></p>
|
||||
<p class="metric">{{this.scheduledAllocations.length}} <span class="metric-label">Allocations</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboard-metric with-divider">
|
||||
|
|
Loading…
Reference in New Issue