Преглед изворни кода

AMBARI-13937. Oozie and hive db hostname should be non-editable for new databases (onechiporenko)

Oleg Nechiporenko пре 9 година
родитељ
комит
7031576d25
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      ambari-web/app/views/common/controls_view.js

+ 3 - 1
ambari-web/app/views/common/controls_view.js

@@ -431,7 +431,9 @@ App.ServiceConfigRadioButtons = Ember.View.extend(App.ServiceConfigCalculateId,
   didInsertElement: function () {
   didInsertElement: function () {
     // on page render, automatically populate JDBC URLs only for default database settings
     // on page render, automatically populate JDBC URLs only for default database settings
     // so as to not lose the user's customizations on these fields
     // so as to not lose the user's customizations on these fields
-    this.get('hostNameProperty').set('isEditable', !this.get('isNewDb'));
+    if (this.get('hostNameProperty')) {
+      this.get('hostNameProperty').set('isEditable', !this.get('isNewDb'));
+    }
     if (['addServiceController', 'installerController'].contains(this.get('controller.wizardController.name')) && !App.StackService.find(this.get('serviceConfig.serviceName')).get('isInstalled')) {
     if (['addServiceController', 'installerController'].contains(this.get('controller.wizardController.name')) && !App.StackService.find(this.get('serviceConfig.serviceName')).get('isInstalled')) {
       if (this.get('isNewDb') || this.get('dontUseHandleDbConnection').contains(this.get('serviceConfig.name'))) {
       if (this.get('isNewDb') || this.get('dontUseHandleDbConnection').contains(this.get('serviceConfig.name'))) {
         this.onOptionsChange();
         this.onOptionsChange();