HDFS-12477. Ozone: Some minor text improvement in SCM web UI. Contributed by Elek Marton.

This commit is contained in:
Weiwei Yang 2017-09-23 22:30:17 +08:00 committed by Owen O'Malley
parent 0313bdf886
commit 1c354e51ac
3 changed files with 17 additions and 3 deletions

View File

@ -18,7 +18,7 @@
<table class="table table-bordered table-striped" class="col-md-6">
<tbody>
<tr ng-repeat="typestat in $ctrl.overview.jmx.NodeCount">
<tr ng-repeat="typestat in $ctrl.overview.jmx.NodeCount | orderBy:'key':false:$ctrl.nodeOrder">
<td>{{typestat.key}}</td>
<td>{{typestat.value}}</td>
</tr>
@ -41,7 +41,7 @@
<td>{{$ctrl.blockmanagermetrics.OpenContainersNo}}</td>
</tr>
<tr>
<td>Node Manager: Minimum chill mode nodes)</td>
<td>Node Manager: Minimum chill mode nodes</td>
<td>{{$ctrl.nodemanagermetrics.MinimumChillModeNodes}}</td>
</tr>
<tr>

View File

@ -35,6 +35,19 @@
ctrl.nodemanagermetrics = result.data.beans[0];
});
var statusSortOrder = {
"HEALTHY": "a",
"STALE": "b",
"DEAD": "c",
"UNKNOWN": "z",
"DECOMMISSIONING": "x",
"DECOMMISSIONED": "y"
};
ctrl.nodeOrder = function (v1, v2) {
//status with non defined sort order will be "undefined"
return ("" + statusSortOrder[v1.value]).localeCompare("" + statusSortOrder[v2.value])
}
}
});

View File

@ -19,7 +19,8 @@
"use strict";
var isIgnoredJmxKeys = function (key) {
return key == 'name' || key == 'modelerType' || key.match(/tag.*/);
return key == 'name' || key == 'modelerType' || key == "$$hashKey" ||
key.match(/tag.*/);
};
angular.module('ozone', ['nvd3'])
angular.module('ozone').component('overview', {