mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
Update topo viz code to use new alloc/node resources pattern
This commit is contained in:
@@ -63,10 +63,10 @@ export default class TopoViz extends Component {
|
||||
node,
|
||||
jobId,
|
||||
groupKey: JSON.stringify([jobId, allocation.taskGroupName]),
|
||||
memory: allocation.resources.memory,
|
||||
cpu: allocation.resources.cpu,
|
||||
memoryPercent: allocation.resources.memory / node.memory,
|
||||
cpuPercent: allocation.resources.cpu / node.cpu,
|
||||
memory: allocation.allocatedResources.memory,
|
||||
cpu: allocation.allocatedResources.cpu,
|
||||
memoryPercent: allocation.allocatedResources.memory / node.memory,
|
||||
cpuPercent: allocation.allocatedResources.cpu / node.cpu,
|
||||
isSelected: false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ export default class TopologyRoute extends Route.extend(WithForbiddenState) {
|
||||
|
||||
model() {
|
||||
return RSVP.hash({
|
||||
allocations: this.store.findAll('allocation'),
|
||||
jobs: this.store.findAll('job'),
|
||||
nodes: this.store.findAll('node'),
|
||||
allocations: this.store.query('allocation', { resources: true }),
|
||||
nodes: this.store.query('node', { resources: true }),
|
||||
}).catch(notifyForbidden(this));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user