ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject ambari git commit: AMBARI-14552 Sometimes "Disk Usage" widget has not actual measurement scale. (atkach)
Date Tue, 05 Jan 2016 16:50:07 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 e67bc39e4 -> 45646d2d6


AMBARI-14552 Sometimes "Disk Usage" widget has not actual measurement scale. (atkach)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/45646d2d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/45646d2d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/45646d2d

Branch: refs/heads/branch-2.2
Commit: 45646d2d626f2acb42fd9b5d7d19b5a523dfff35
Parents: e67bc39
Author: Andrii Tkach <atkach@hortonworks.com>
Authored: Tue Jan 5 16:04:25 2016 +0200
Committer: Andrii Tkach <atkach@hortonworks.com>
Committed: Tue Jan 5 18:49:35 2016 +0200

----------------------------------------------------------------------
 ambari-web/app/views/common/chart/linear_time.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/45646d2d/ambari-web/app/views/common/chart/linear_time.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/chart/linear_time.js b/ambari-web/app/views/common/chart/linear_time.js
index efea946..4fbbef9 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -202,12 +202,15 @@ App.ChartLinearTimeView = Ember.View.extend(App.ExportMetricsMixin,
{
       for (var name in data) {
         var currentData = data[name];
         if (currentData) {
+          if (Array.isArray(currentData)) {
+            currentData = currentData.slice(0);
+          }
           var factor = template.factor,
             displayName = template.displayName ? template.displayName(name) : name;
           if (!Em.isNone(factor)) {
             var dataLength = currentData.length;
             for (var i = dataLength; i--;) {
-              currentData[i][0] *= factor;
+              currentData[i] = [currentData[i][0] * factor, currentData[i][1]];
             }
           }
           dataArray.push({


Mime
View raw message