#121 show and honor node allocatable

This commit is contained in:
Henning Jacobs
2017-02-12 14:11:33 +01:00
parent ba1443def5
commit ea27747666
4 changed files with 21 additions and 7 deletions

View File

@@ -21,9 +21,14 @@ export default class Node extends PIXI.Graphics {
for (const key of Object.keys(this.node.status.capacity)) {
resources[key] = {
'capacity': parseResource(this.node.status.capacity[key]),
'reserved': 0,
'requested': 0,
'used': 0
}
const allocatable = this.node.status.allocatable[key]
if (allocatable) {
resources[key]['reserved'] = resources[key]['capacity'] - parseResource(allocatable)
}
}
if (this.node.usage) {
for (const key of Object.keys(this.node.usage)) {