Browse Source

AMBARI-1053. Dashboard page loads very slow due to hosts?fields=* API call. (Srimanth Gunturi via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/AMBARI-666@1419006 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 years ago
parent
commit
650f165c98

+ 3 - 0
AMBARI-666-CHANGES.txt

@@ -426,6 +426,9 @@ AMBARI-666 branch (unreleased changes)
   AMBARI-676. Seperate directory for ambari-server. (jitendra)
 
   IMPROVEMENTS
+  
+  AMBARI-1053. Dashboard page loads very slow due to hosts?fields=* API call
+  (Srimanth Gunturi via yusaku)
 
   AMBARI-1051. Dashboard page takes long time to load. (Srimanth Gunturi via
   yusaku)

+ 1 - 1
ambari-web/app/controllers/global/cluster_controller.js

@@ -313,7 +313,7 @@ App.ClusterController = Em.Controller.extend({
     }
 
     var clusterUrl = this.getUrl('/data/clusters/cluster.json', '?fields=Clusters');
-    var hostsUrl = this.getUrl('/data/hosts/hosts.json', '/hosts?fields=*');
+    var hostsUrl = this.getUrl('/data/hosts/hosts.json', '/hosts?fields=Hosts,host_components');
     var usersUrl = App.testMode ? '/data/users/users.json' : App.apiPrefix + '/users/?fields=*';
     var racksUrl = "/data/racks/racks.json";
 

+ 1 - 1
ambari-web/app/controllers/global/update_controller.js

@@ -60,7 +60,7 @@ App.UpdateController = Em.Controller.extend({
   },
 
   updateHost:function(){
-      var hostsUrl = this.getUrl('/data/hosts/hosts.json', '/hosts?fields=*');
+      var hostsUrl = this.getUrl('/data/hosts/hosts.json', '/hosts?fields=Hosts,host_components,metrics/cpu,metrics/disk,metrics/load,metrics/memory');
       App.HttpClient.get(hostsUrl, App.hostsMapper, {
         complete:function (jqXHR, textStatus) {}
       });