YARN-6386. Show decommissioning nodes in new YARN UI. Contributed by Elek Marton.

This commit is contained in:
Sunil G 2017-08-29 16:51:14 +05:30
parent 312b1fd9da
commit 7ddc7aa26e
4 changed files with 26 additions and 20 deletions

View File

@ -39,6 +39,7 @@ export default DS.Model.extend({
totalNodes: DS.attr('number'), totalNodes: DS.attr('number'),
lostNodes: DS.attr('number'), lostNodes: DS.attr('number'),
unhealthyNodes: DS.attr('number'), unhealthyNodes: DS.attr('number'),
decommissioningNodes: DS.attr('number'),
decommissionedNodes: DS.attr('number'), decommissionedNodes: DS.attr('number'),
rebootedNodes: DS.attr('number'), rebootedNodes: DS.attr('number'),
activeNodes: DS.attr('number'), activeNodes: DS.attr('number'),
@ -86,12 +87,16 @@ export default DS.Model.extend({
label: "Unhealthy", label: "Unhealthy",
value: this.get("unhealthyNodes") value: this.get("unhealthyNodes")
}); });
arr.push({
label: "Decommissioning",
value: this.get("decommissioningNodes")
});
arr.push({ arr.push({
label: "Decomissioned", label: "Decomissioned",
value: this.get("decommissionedNodes") value: this.get("decommissionedNodes")
}); });
return arr; return arr;
}.property("activeNodes", "unhealthyNodes", "decommissionedNodes"), }.property("activeNodes", "unhealthyNodes", "decommissioningNodes", "decommissionedNodes"),
getMemoryDataForDonutChart: function() { getMemoryDataForDonutChart: function() {
var type = "MB"; var type = "MB";

View File

@ -53,7 +53,7 @@ export default DS.Model.extend({
nodeStateStyle: function() { nodeStateStyle: function() {
var style = "default"; var style = "default";
var nodeState = this.get("state"); var nodeState = this.get("state");
if (nodeState === "REBOOTED") { if (nodeState === "REBOOTED" || nodeState === "DECOMMISSIONING") {
style = "warning"; style = "warning";
} else if (nodeState === "UNHEALTHY" || nodeState === "DECOMMISSIONED" || } else if (nodeState === "UNHEALTHY" || nodeState === "DECOMMISSIONED" ||
nodeState === "LOST" || nodeState === "SHUTDOWN") { nodeState === "LOST" || nodeState === "SHUTDOWN") {

View File

@ -86,22 +86,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-lg-4 container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
Node Managers
</div>
<div class="container-fluid" id="nodes-donut-chart">
{{donut-chart data=model.clusterMetrics.firstObject.getNodesDataForDonutChart
showLabels=true
parentId="nodes-donut-chart"
ratio=0.6
maxHeight=350
colorTargets="good error warn"}}
</div>
</div>
</div>
</div> </div>
<hr> <hr>
@ -142,6 +126,23 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row">
<div class="col-lg-6 container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
Node Managers
</div>
<div class="container-fluid" id="nodes-donut-chart">
{{donut-chart data=model.clusterMetrics.firstObject.getNodesDataForDonutChart
showLabels=true
parentId="nodes-donut-chart"
ratio=0.6
maxHeight=350
colorTargets="good error warn"}}
</div>
</div>
</div>
</div>
</div> </div>
{{/if}} {{/if}}

View File

@ -47,7 +47,7 @@
<div class="col-md-10 container-fluid"> <div class="col-md-10 container-fluid">
{{#if model.clusterMetrics}} {{#if model.clusterMetrics}}
<div class="row"> <div class="row">
<div class="col-lg-5 container-fluid"> <div class="col-lg-6 container-fluid">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading"> <div class="panel-heading">
Node Managers Node Managers