Pārlūkot izejas kodu

AMBARI-13224. "Retry" button is not work properly on "Enable Kerberos Wizard" at "Kerberize Cluster" step (akovalenko)

Aleksandr Kovalenko 10 gadi atpakaļ
vecāks
revīzija
49c10612c0

+ 25 - 26
ambari-web/app/controllers/main/admin/kerberos/step5_controller.js

@@ -162,31 +162,30 @@ App.KerberosWizardStep5Controller = App.KerberosProgressPageController.extend({
   }.property('status'),
 
   confirmProperties: function () {
-    var kdc_type = App.router.kerberosWizardController.content.serviceConfigProperties.findProperty('name','kdc_type').value,
-      filterObject = [
-        {
-          key: Em.I18n.t('admin.kerberos.wizard.step1.option.kdc'),
-          properties: ['kdc_type','kdc_host','realm','executable_search_paths']
-        },
-        {
-          key: Em.I18n.t('admin.kerberos.wizard.step1.option.ad'),
-          properties: ['kdc_type','kdc_host','realm','ldap_url','container_dn','executable_search_paths']
-        },
-        {
-          key: Em.I18n.t('admin.kerberos.wizard.step1.option.manual'),
-          properties: ['kdc_type','realm','executable_search_paths']
-        }
-      ],
-      kdcTypeProperties = filterObject.filter(function(item) {
-        return item.key === kdc_type;
-      }),
-      filterBy = kdcTypeProperties.length ? kdcTypeProperties[0].properties : [],
-      returnArray = App.router.kerberosWizardController.content.serviceConfigProperties.filter(function(item) {
-        return filterBy.contains(item.name);
-      }).map(function(item) {
-        item['label'] = Em.I18n.t('admin.kerberos.wizard.step5.'+item['name']+'.label');
-        return item;
-      });
-    return returnArray;
+    var kdc_type = App.router.get('kerberosWizardController.content.kerberosOption'),
+        filterObject = [
+          {
+            key: Em.I18n.t('admin.kerberos.wizard.step1.option.kdc'),
+            properties: ['kdc_type', 'kdc_host', 'realm', 'executable_search_paths']
+          },
+          {
+            key: Em.I18n.t('admin.kerberos.wizard.step1.option.ad'),
+            properties: ['kdc_type', 'kdc_host', 'realm', 'ldap_url', 'container_dn', 'executable_search_paths']
+          },
+          {
+            key: Em.I18n.t('admin.kerberos.wizard.step1.option.manual'),
+            properties: ['kdc_type', 'realm', 'executable_search_paths']
+          }
+        ],
+        kdcTypeProperties = filterObject.filter(function (item) {
+          return item.key === kdc_type;
+        }),
+        filterBy = kdcTypeProperties.length ? kdcTypeProperties[0].properties : [];
+    return App.router.kerberosWizardController.content.serviceConfigProperties.filter(function (item) {
+      return filterBy.contains(item.name);
+    }).map(function (item) {
+      item['label'] = Em.I18n.t('admin.kerberos.wizard.step5.' + item['name'] + '.label');
+      return item;
+    });
   }.property('App.router.kerberosWizardController.content.@each.serviceConfigProperties')
 });

+ 3 - 2
ambari-web/app/controllers/main/admin/kerberos/step7_controller.js

@@ -113,11 +113,12 @@ App.KerberosWizardStep7Controller = App.KerberosProgressPageController.extend({
 
   retry: function () {
     this.set('showRetry', false);
+    this.removeObserver('tasks.@each.status', this, 'onTaskStatusChange');
+    this.set('status', 'IN_PROGRESS');
     this.get('tasks').setEach('status', 'PENDING');
-    App.router.send('retry');
+    this.setRequest(true);
   },
 
-
   /**
    * Enable or disable previous steps according to tasks statuses
    */

+ 0 - 3
ambari-web/app/routes/add_kerberos_routes.js

@@ -347,9 +347,6 @@ module.exports = App.WizardRoute.extend({
         controller.connectOutlet('kerberosWizardStep7', controller.get('content'));
       });
     },
-    retry: function (router) {
-      router.get('kerberosWizardStep7Controller').setRequest(true);
-    },
     unroutePath: function () {
       return false;
     },