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-11808 Ambari Metrics: time switcher doesn't work. (atkach)
Date Tue, 09 Jun 2015 11:59:31 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 289f4887c -> a7c5edb35


AMBARI-11808 Ambari Metrics: time switcher doesn't work. (atkach)


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

Branch: refs/heads/trunk
Commit: a7c5edb3567964d5e228f6b582bb6e11d18a0f97
Parents: 289f488
Author: Andrii Tkach <atkach@hortonworks.com>
Authored: Tue Jun 9 13:42:46 2015 +0300
Committer: Andrii Tkach <atkach@hortonworks.com>
Committed: Tue Jun 9 13:42:46 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/views/common/chart/linear_time.js      |  4 +++-
 .../info/metrics/ambari_metrics/regionserver_base.js  | 14 +++++---------
 ambari-web/app/views/main/service/info/summary.js     |  4 +++-
 .../controllers/main/service/info/summary_test.js     |  8 --------
 4 files changed, 11 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a7c5edb3/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 05a33a4..fc360d4 100644
--- a/ambari-web/app/views/common/chart/linear_time.js
+++ b/ambari-web/app/views/common/chart/linear_time.js
@@ -805,7 +805,6 @@ App.ChartLinearTimeView = Ember.View.extend({
       reloadGraphByTime: function(index) {
         this.set('currentTimeIndex', index);
         self.set('currentTimeIndex', index);
-        self.loadData();
       },
       currentTimeIndex: self.get('currentTimeIndex'),
       currentTimeState: function() {
@@ -817,6 +816,9 @@ App.ChartLinearTimeView = Ember.View.extend({
       self.set('isPopupReady', false);
     });
   },
+  reloadGraphByTime: function () {
+    this.loadData();
+  }.observes('timeUnitSeconds'),
   timeStates: [
     {name: Em.I18n.t('graphs.timeRange.hour'), seconds: 3600},
     {name: Em.I18n.t('graphs.timeRange.twoHours'), seconds: 7200},

http://git-wip-us.apache.org/repos/asf/ambari/blob/a7c5edb3/ambari-web/app/views/main/service/info/metrics/ambari_metrics/regionserver_base.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/metrics/ambari_metrics/regionserver_base.js
b/ambari-web/app/views/main/service/info/metrics/ambari_metrics/regionserver_base.js
index 2d15f11..b28bd28 100644
--- a/ambari-web/app/views/main/service/info/metrics/ambari_metrics/regionserver_base.js
+++ b/ambari-web/app/views/main/service/info/metrics/ambari_metrics/regionserver_base.js
@@ -36,15 +36,11 @@ App.ChartServiceMetricsAMS_RegionServerBaseView = App.ChartLinearTimeView.extend
       for (var name in jsonData.metrics.hbase.regionserver) {
         var displayName,
             seriesData = jsonData.metrics.hbase.regionserver[name];
-        switch (name) {
-          case this.regionServerName:
-            displayName = this.displayName;
-            break;
-          default:
-            break;
-        }
-        if (seriesData) {
-          seriesArray.push(this.transformData(seriesData, displayName));
+        if (name === this.get('regionServerName')) {
+          displayName = this.get('displayName');
+          if (seriesData) {
+            seriesArray.push(this.transformData(seriesData, displayName));
+          }
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a7c5edb3/ambari-web/app/views/main/service/info/summary.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js
index 800dd90..83e503f 100644
--- a/ambari-web/app/views/main/service/info/summary.js
+++ b/ambari-web/app/views/main/service/info/summary.js
@@ -320,7 +320,9 @@ App.MainServiceInfoSummaryView = Em.View.extend(App.UserPref, {
       if (graphNames) {
         graphNames.forEach(function(graphName) {
           graphObjects.push(App["ChartServiceMetrics" + graphName].extend({
-            currentTimeIndex : index
+            setCurrentTimeIndex: function () {
+              this.set('currentTimeIndex', this.get('parentView.currentTimeRangeIndex'));
+            }.observes('parentView.currentTimeRangeIndex')
           }));
         });
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a7c5edb3/ambari-web/test/controllers/main/service/info/summary_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/info/summary_test.js b/ambari-web/test/controllers/main/service/info/summary_test.js
index a15979f..a250d33 100644
--- a/ambari-web/test/controllers/main/service/info/summary_test.js
+++ b/ambari-web/test/controllers/main/service/info/summary_test.js
@@ -201,7 +201,6 @@ describe('App.MainServiceInfoSummaryController', function () {
       it(item.title, function () {
         controller.set('isPreviousRangerConfigsCallFailed', item.isPreviousRangerConfigsCallFailed);
         controller.get('rangerPlugins').findProperty('serviceName', 'HDFS').tag = item.hdfsTag;
-        controller.get('rangerPlugins').findProperty('serviceName', 'HIVE').tag = item.hiveTag;
         controller.get('rangerPlugins').findProperty('serviceName', 'HBASE').tag = item.hbaseTag;
         controller.getRangerPluginsStatus(data);
         expect(App.ajax.send.calledOnce).to.equal(item.ajaxRequestSent);
@@ -224,12 +223,6 @@ describe('App.MainServiceInfoSummaryController', function () {
             }
           },
           {
-            'type': 'ranger-hive-plugin-properties',
-            'properties': {
-              'ranger-hive-plugin-enabled': 'No'
-            }
-          },
-          {
             'type': 'ranger-hbase-plugin-properties',
             'properties': {
               'ranger-hbase-plugin-enabled': ''
@@ -239,7 +232,6 @@ describe('App.MainServiceInfoSummaryController', function () {
       });
       expect(controller.get('isPreviousRangerConfigsCallFailed')).to.be.false;
       expect(controller.get('rangerPlugins').findProperty('serviceName', 'HDFS').status).to.equal(Em.I18n.t('alerts.table.state.enabled'));
-      expect(controller.get('rangerPlugins').findProperty('serviceName', 'HIVE').status).to.equal(Em.I18n.t('alerts.table.state.disabled'));
       expect(controller.get('rangerPlugins').findProperty('serviceName', 'HBASE').status).to.equal(Em.I18n.t('common.unknown'));
     });
   });


Mime
View raw message