You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ma...@apache.org on 2014/05/30 09:17:15 UTC
git commit: Do not show instance range when there is only one in group
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 <da...@dmclaughlin.com>
Authored: Fri May 30 00:16:46 2014 -0700
Committer: Suman Karumuri <sk...@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,