AMBARI-23624 Additional realm config change not working. (ababiichuk)
authorababiichuk <ababiichuk@hortonworks.com>
Thu, 19 Apr 2018 14:02:00 +0000 (17:02 +0300)
committeraBabiichuk <ababiichuk@hortonworks.com>
Thu, 19 Apr 2018 14:50:48 +0000 (17:50 +0300)
ambari-web/app/controllers/main/admin/kerberos.js

index 1b94758..c559398 100644 (file)
@@ -562,7 +562,8 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
             artifact_data: kerberosDescriptor
           }
         },
-        success: '_updateConfigs'
+        success: '_updateConfigs',
+        error: 'createKerberosDescriptor'
       });
     };
     this.updateKerberosDescriptor(kerberosDescriptor, configs);
@@ -575,6 +576,21 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({
     }
   },
 
+  createKerberosDescriptor: function (requestData, ajaxOptions, error, opt, params) {
+    if (requestData && requestData.status === 404) {
+      const {artifactName, data} = params;
+      App.ajax.send({
+        name: 'admin.kerberos.cluster.artifact.create',
+        sender: self,
+        data: {
+          artifactName,
+          data
+        },
+        success: '_updateConfigs'
+      });
+    }
+  },
+
   /**
    * List of the warnings regarding specific services before enabling/disabling Kerberos.
    *