Pārlūkot izejas kodu

AMBARI-6057. Enable Security wizard: Deploy step hangs if partial set of services are installed. (jaimin)

Jaimin Jetly 11 gadi atpakaļ
vecāks
revīzija
645544a998

+ 3 - 1
ambari-web/app/controllers/main/admin/security/add/step4.js

@@ -256,7 +256,9 @@ App.MainAdminSecurityAddStep4Controller = App.MainAdminSecurityProgressControlle
       var index = parseInt(_express.match(/\[([\d]*)(?=\])/)[1]);
       var globalConfig = this.get('globalProperties').findProperty('name', templateName[index]);
 
-      value = (globalConfig) ? value.replace(_express, globalConfig.value) : null;
+      if (!!value) {
+        value = (globalConfig) ? value.replace(_express, globalConfig.value) : null;
+      }
     }, this);
     return value;
   },

+ 8 - 0
ambari-web/test/controllers/main/admin/security/add/step4_test.js

@@ -498,6 +498,14 @@ describe('App.MainAdminSecurityAddStep4Controller', function () {
           expression: '<[0]>'
         },
         result: 'value1'
+      },
+      {
+        title: 'First property not in global configs',
+        arguments: {
+          templateName: ['config2','config1'],
+          expression: '<[0]>@<[1]>'
+        },
+        result: null
       }
     ];
 

+ 0 - 1
ambari-web/test/mappers/status_mapper_test.js

@@ -20,7 +20,6 @@ var Ember = require('ember');
 var App = require('app');
 
 require('mappers/server_data_mapper');
-require('mappers/status_mapper');
 
 describe('App.statusMapper', function () {