incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-3396 UI optimization: modify parameters of service mapper request. (atkach)
Date Tue, 01 Oct 2013 09:11:48 GMT
Updated Branches:
  refs/heads/trunk 9d45df2f7 -> 62b1902eb


AMBARI-3396 UI optimization: modify parameters of service mapper request. (atkach)


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

Branch: refs/heads/trunk
Commit: 62b1902eb2362d9672c7e25fe94bb81c90487311
Parents: 9d45df2
Author: atkach <andrey91.07@gmail.com>
Authored: Tue Oct 1 12:11:41 2013 +0300
Committer: atkach <andrey91.07@gmail.com>
Committed: Tue Oct 1 12:11:41 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/global/update_controller.js | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/62b1902e/ambari-web/app/controllers/global/update_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/update_controller.js b/ambari-web/app/controllers/global/update_controller.js
index 425a24b..9fc1471 100644
--- a/ambari-web/app/controllers/global/update_controller.js
+++ b/ambari-web/app/controllers/global/update_controller.js
@@ -81,6 +81,7 @@ App.UpdateController = Em.Controller.extend({
     self.set('isUpdated', false);
 
     var conditionalFields = [];
+    var initialFields = ['components/host_components/HostRoles/state'];
     var services = [
         {
             name: 'FLUME',
@@ -96,11 +97,15 @@ App.UpdateController = Em.Controller.extend({
             conditionalFields.push("components/host_components/metrics/" + service.urlParam);
         }
     });
+    if(App.supports.hostOverrides) {
+      conditionalFields.push('components/host_components/HostRoles/actual_configs');
+    }
     var conditionalFieldsString = conditionalFields.length > 0 ? ',' + conditionalFields.join(',')
: '';
+    var initialFieldsString = initialFields.length > 0 ? ',' + initialFields.join(',')
: '';
     var methodStartTs = new Date().getTime();
     var testUrl = App.get('isHadoop2Stack') ? '/data/dashboard/HDP2/services.json':'/data/dashboard/services.json';
 
-    var realUrl = '/services?fields=components/ServiceComponentInfo,components/host_components,components/host_components/HostRoles,'
+
+    var realUrl = '/services?fields=' +
       'components/host_components/metrics/jvm/memHeapUsedM,' +
       'components/host_components/metrics/jvm/memHeapCommittedM,' +
       'components/host_components/metrics/mapred/jobtracker/trackers_decommissioned,' +
@@ -121,9 +126,10 @@ App.UpdateController = Em.Controller.extend({
       'components/host_components/metrics/dfs/namenode/TotalFiles,' +
       'components/host_components/metrics/dfs/namenode/UpgradeFinalized,' +
       'components/host_components/metrics/dfs/namenode/Safemode,' +
-      'components/host_components/metrics/runtime/StartTime';
+      'components/host_components/metrics/runtime/StartTime' +
+      conditionalFieldsString;
 
-    var servicesUrl = isInitialLoad ? this.getUrl(testUrl, realUrl + conditionalFieldsString)
: this.getUrl(testUrl, realUrl + conditionalFieldsString);
+    var servicesUrl = isInitialLoad ? this.getUrl(testUrl, realUrl + initialFieldsString)
: this.getUrl(testUrl, realUrl);
     var callback = callback || function (jqXHR, textStatus) {
       self.set('isUpdated', true);
     };


Mime
View raw message