Explorar o código

AMBARI-14957 Paging not working properly when filtering with alerts and hostname. (atkach)

Andrii Tkach %!s(int64=9) %!d(string=hai) anos
pai
achega
f734aec99b
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      ambari-web/app/controllers/global/update_controller.js

+ 5 - 3
ambari-web/app/controllers/global/update_controller.js

@@ -118,6 +118,8 @@ App.UpdateController = Em.Controller.extend({
     var params = '';
 
     queryParams.forEach(function (param) {
+      var customKey = param.key;
+
       switch (param.type) {
         case 'EQUAL':
           params += param.key + '=' + param.value;
@@ -138,10 +140,10 @@ App.UpdateController = Em.Controller.extend({
           params += 'sortBy=' + param.key + '.' + param.value;
           break;
         case 'CUSTOM':
-          param.value.forEach(function(item, index){
-            param.key = param.key.replace('{' + index + '}', item);
+          param.value.forEach(function (item, index) {
+            customKey = customKey.replace('{' + index + '}', item);
           }, this);
-          params += param.key;
+          params += customKey;
           break;
       }
       params += '&';