diff --git a/desktop/src/app/components/node/browse/filter/node-advanced-filter.component.ts b/desktop/src/app/components/node/browse/filter/node-advanced-filter.component.ts index bce8bf955d..7d0b1bf994 100644 --- a/desktop/src/app/components/node/browse/filter/node-advanced-filter.component.ts +++ b/desktop/src/app/components/node/browse/filter/node-advanced-filter.component.ts @@ -20,6 +20,7 @@ export class NodeAdvancedFilterComponent { NodeState.idle, NodeState.running, NodeState.creating, NodeState.leavingPool, NodeState.rebooting, NodeState.reimaging, NodeState.starting, NodeState.startTaskFailed, NodeState.unknown, NodeState.unusable, NodeState.offline, NodeState.waitingForStartTask, + NodeState.upgradingos ]), }); diff --git a/desktop/src/app/components/pool/graphs/heatmap/nodes-heatmap.component.ts b/desktop/src/app/components/pool/graphs/heatmap/nodes-heatmap.component.ts index 2339bfb210..07ba716f41 100644 --- a/desktop/src/app/components/pool/graphs/heatmap/nodes-heatmap.component.ts +++ b/desktop/src/app/components/pool/graphs/heatmap/nodes-heatmap.component.ts @@ -60,6 +60,7 @@ const stateTree: StateTree = [ { state: NodeState.rebooting, color: "#ffcc5c" }, { state: NodeState.reimaging, color: "#ffc95c" }, { state: NodeState.leavingPool, color: "#ff755c" }, + { state: NodeState.upgradingos, color: "#e1d3e4" }, ], }, { category: "error", diff --git a/desktop/src/app/components/pool/graphs/heatmap/state-counter.spec.ts b/desktop/src/app/components/pool/graphs/heatmap/state-counter.spec.ts index bd475579db..4f815e9850 100644 --- a/desktop/src/app/components/pool/graphs/heatmap/state-counter.spec.ts +++ b/desktop/src/app/components/pool/graphs/heatmap/state-counter.spec.ts @@ -35,15 +35,17 @@ describe("Statecounter", () => { expect(counter.get(NodeState.offline).getValue()).toBe(1); expect(counter.get(NodeState.leavingPool).getValue()).toBe(0); expect(counter.get(NodeState.rebooting).getValue()).toBe(0); + expect(counter.get(NodeState.upgradingos).getValue()).toBe(0); }); it("should update the count when updating the nodes", () => { nodes.shift(); nodes.push(Fixtures.node.create({ state: NodeState.rebooting })); nodes.push(Fixtures.node.create({ state: NodeState.running })); + nodes.push(Fixtures.node.create({ state: NodeState.upgradingos })); const pool2 = new Pool({ id: "pool-2", vmSize: "standard_a2", - targetDedicatedNodes: 10, + targetDedicatedNodes: 11, }); counter.updateCount(List(nodes), pool2); @@ -54,5 +56,6 @@ describe("Statecounter", () => { expect(counter.get(NodeState.offline).getValue()).toBe(1); expect(counter.get(NodeState.leavingPool).getValue()).toBe(0); expect(counter.get(NodeState.rebooting).getValue()).toBe(1); + expect(counter.get(NodeState.upgradingos).getValue()).toBe(1); }); }); diff --git a/desktop/src/app/models/azure-batch/node/node.ts b/desktop/src/app/models/azure-batch/node/node.ts index 007367b883..299d550028 100644 --- a/desktop/src/app/models/azure-batch/node/node.ts +++ b/desktop/src/app/models/azure-batch/node/node.ts @@ -97,6 +97,7 @@ export enum NodeState { unknown = "unknown", unusable = "unusable", preempted = "preempted", + upgradingos = "upgradingos", } export enum NodeSchedulingState { diff --git a/desktop/src/app/utils/node-utils.ts b/desktop/src/app/utils/node-utils.ts index 3d8e2e964d..758ede3657 100644 --- a/desktop/src/app/utils/node-utils.ts +++ b/desktop/src/app/utils/node-utils.ts @@ -6,7 +6,8 @@ export class NodeUtils { if (category === "error") { return [NodeState.startTaskFailed, NodeState.unusable, NodeState.unknown]; } else if (category === "transition") { - return [NodeState.creating, NodeState.starting, NodeState.rebooting, NodeState.reimaging, NodeState.leavingPool]; + return [NodeState.creating, NodeState.starting, NodeState.rebooting, + NodeState.reimaging, NodeState.leavingPool, NodeState.upgradingos]; } else if (category === "running") { return [NodeState.running25, NodeState.running50, NodeState.running75, NodeState.running99, NodeState.running100]; }