Przeglądaj źródła

AMBARI-7139. kerberos security wizard: JS error thrown while deleting ATS host component. (jaimin)

Jaimin Jetly 11 lat temu
rodzic
commit
24dea68d6e

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

@@ -179,7 +179,10 @@ App.MainAdminSecurityAddStep4Controller = App.MainAdminSecurityProgressControlle
    * callback on failed deletion of component
    */
   onDeleteError: function () {
+    var deleteAtsCommand = this.get('commands').findProperty('name', 'DELETE_ATS');
     console.warn('Error: Can\'t delete APP_TIMELINE_SERVER');
+    deleteAtsCommand.set('isError', true);
+    deleteAtsCommand.set('isSuccess', false);
   },
 
   /**

+ 5 - 1
ambari-web/app/controllers/main/admin/security/security_progress_controller.js

@@ -171,7 +171,11 @@ App.MainAdminSecurityProgressController = Em.Controller.extend({
             command.set('isSuccess', true);
           } else {
             var timeLineServer = App.HostComponent.find().findProperty('componentName', 'APP_TIMELINE_SERVER');
-            this.deleteComponents('APP_TIMELINE_SERVER', timeLineServer.get('hostName'));
+            if (timeLineServer) {
+              this.deleteComponents('APP_TIMELINE_SERVER', timeLineServer.get('hostName'));
+            } else {
+              this.onDeleteComplete();
+            }
           }
         }
         return true;