Browse Source

AMBARI-6120 Don't load hosts with config groups and tag for host config page. (ababiichuk)

aBabiichuk 11 năm trước cách đây
mục cha
commit
05638be171

+ 2 - 3
ambari-web/app/controllers/main/service/info/configs.js

@@ -245,8 +245,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
       sender: this,
       data: {
         serviceName: this.get('content.serviceName'),
-        serviceConfigsDef: this.get('serviceConfigs').findProperty('serviceName', this.get('content.serviceName')),
-        urlParams: ',hosts'
+        serviceConfigsDef: this.get('serviceConfigs').findProperty('serviceName', this.get('content.serviceName'))
       },
       success: 'loadServiceTagsSuccess'
     });
@@ -257,7 +256,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
     var serviceName = this.get('content.serviceName');
     console.debug("loadServiceConfigs(): data=", data);
     // Create default configuration group
-    var defaultConfigGroupHosts = data.hosts.mapProperty('Hosts.host_name');
+    var defaultConfigGroupHosts = App.cache['HostsList'];
     var selectedConfigGroup;
     var siteToTagMap = {};
     serviceConfigsDef.sites.forEach(function(siteName){

+ 2 - 1
ambari-web/app/mappers/hosts_mapper.js

@@ -68,8 +68,9 @@ App.hostsMapper = App.QuickDataMapper.create({
       var hostsWithFullInfo = [];
       var hostIds = {};
       var components = [];
-
+      App.cache['HostsList'] = [];
       json.items.forEach(function (item) {
+        App.cache['HostsList'].push(item.Hosts.host_name);
         item.host_components = item.host_components || [];
         item.host_components.forEach(function (host_component) {
           host_component.id = host_component.HostRoles.component_name + "_" + item.Hosts.host_name;

+ 1 - 1
ambari-web/app/mappers/server_data_mapper.js

@@ -23,7 +23,7 @@ var App = require('app');
  * App.cache contains shared data, used for syncronizing incoming server data among mappers
  */
 App.cache = {
-  'Hosts': {},
+  'HostsList': [],
   'previousHostStatuses': {},
   'previousComponentStatuses': {},
   'previousComponentPassiveStates': {},