aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject git commit: Do not show instance range when there is only one in group
Date Fri, 30 May 2014 07:17:15 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master d2fe3bc2f -> fd14fed46


Do not show instance range when there is only one in group

Testing Done:
Tested locally.

Bugs closed: AURORA-455

Reviewed at https://reviews.apache.org/r/21791/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/fd14fed4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/fd14fed4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/fd14fed4

Branch: refs/heads/master
Commit: fd14fed465adaf6dff018681545bbb2cbf8f6fb1
Parents: d2fe3bc
Author: David McLaughlin <david@dmclaughlin.com>
Authored: Fri May 30 00:16:46 2014 -0700
Committer: Suman Karumuri <skarumuri@twitter.com>
Committed: Fri May 30 00:16:46 2014 -0700

----------------------------------------------------------------------
 .../org/apache/aurora/scheduler/http/ui/js/controllers.js      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/fd14fed4/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
index f86c210..556df0c 100644
--- a/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
+++ b/src/main/resources/org/apache/aurora/scheduler/http/ui/js/controllers.js
@@ -310,8 +310,12 @@
           var count = (summary.range.end - summary.range.start) + 1;
           var percentage = (count / total) * 100;
 
+          var label = (summary.range.start === summary.range.end) ?
+            summary.range.start :
+            summary.range.start + '-' + summary.range.end;
+
           return {
-            label: summary.range.start + '-' + summary.range.end,
+            label: label,
             value: count,
             percentage: percentage,
             summary: summary,


Mime
View raw message