From 1c354e51ac6faad9828c071ef152bc0e02cd07d6 Mon Sep 17 00:00:00 2001 From: Weiwei Yang Date: Sat, 23 Sep 2017 22:30:17 +0800 Subject: [PATCH] HDFS-12477. Ozone: Some minor text improvement in SCM web UI. Contributed by Elek Marton. --- .../src/main/webapps/scm/scm-overview.html | 4 ++-- .../hadoop-hdfs/src/main/webapps/scm/scm.js | 13 +++++++++++++ .../hadoop-hdfs/src/main/webapps/static/ozone.js | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/scm/scm-overview.html b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/scm/scm-overview.html index 1c5b976a89..9342c30bd6 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/scm/scm-overview.html +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/scm/scm-overview.html @@ -18,7 +18,7 @@

Node counts

- + @@ -41,7 +41,7 @@

Status

- + diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/scm/scm.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/scm/scm.js index 1802fd83b6..c88fe9775c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/scm/scm.js +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/scm/scm.js @@ -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]) + } + } }); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/ozone.js b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/ozone.js index bf30c24141..f0d4011456 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/ozone.js +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/ozone.js @@ -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', {
{{typestat.key}} {{typestat.value}}
{{$ctrl.blockmanagermetrics.OpenContainersNo}}
Node Manager: Minimum chill mode nodes)Node Manager: Minimum chill mode nodes {{$ctrl.nodemanagermetrics.MinimumChillModeNodes}}