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 Mon, 07 Oct 2013 10:02:21 GMT
Updated Branches:
  refs/heads/trunk 0a80b3f25 -> 94a17ec4a


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/94a17ec4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/94a17ec4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/94a17ec4

Branch: refs/heads/trunk
Commit: 94a17ec4a6fff6c3390784e03b8612bfd543bd56
Parents: 0a80b3f
Author: atkach <andrey91.07@gmail.com>
Authored: Mon Oct 7 13:02:15 2013 +0300
Committer: atkach <andrey91.07@gmail.com>
Committed: Mon Oct 7 13:02:15 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/94a17ec4/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..713cade 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/ServiceComponentInfo,' +
       '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