AMBARI-21807. 'Move Hive Metastore' wizard is stuck while configuring MYSQL_SERVER. (jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f5f9a758 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f5f9a758 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f5f9a758 Branch: refs/heads/feature-branch-AMBARI-21307 Commit: f5f9a7581df7e4eb880f3da7f6248a29d332b3b7 Parents: b96c77a Author: Jaimin Jetly <jai...@hortonworks.com> Authored: Thu Aug 24 12:41:14 2017 -0700 Committer: Jaimin Jetly <jai...@hortonworks.com> Committed: Thu Aug 24 12:59:39 2017 -0700 ---------------------------------------------------------------------- .../main/service/reassign/step1_controller.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f5f9a758/ambari-web/app/controllers/main/service/reassign/step1_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/reassign/step1_controller.js b/ambari-web/app/controllers/main/service/reassign/step1_controller.js index c631e85..12d77d3 100644 --- a/ambari-web/app/controllers/main/service/reassign/step1_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step1_controller.js @@ -93,8 +93,7 @@ App.ReassignMasterWizardStep1Controller = Em.Controller.extend({ databaseTypeMatch, properties = {}, configs = {}, - dbPropertyMapItem = Em.getWithDefault(this.get('dbPropertyMap'), this.get('content.reassign.component_name'), null), - serviceDbProp = this.get('content.reassign.service_id').toLowerCase() + '_database'; + dbPropertyMapItem = Em.getWithDefault(this.get('dbPropertyMap'), this.get('content.reassign.component_name'), null); data.items.forEach(function(item) { configs[item.type] = item.properties; @@ -118,8 +117,7 @@ App.ReassignMasterWizardStep1Controller = Em.Controller.extend({ App.router.reassignMasterController.set('content.hasManualSteps', false); } - properties['is_remote_db'] = /Existing/ig.test(properties[serviceDbProp]); - + properties['is_remote_db'] = this.isExistingDb(configs); properties['database_hostname'] = this.getDatabaseHost(); this.saveDatabaseType(databaseType); @@ -145,6 +143,13 @@ App.ReassignMasterWizardStep1Controller = Em.Controller.extend({ } }, + isExistingDb: function(configs) { + var serviceName = this.get('content.reassign.service_id').toLowerCase(); + var serviceDbSite = serviceName + '-env'; + var serviceDbConfig = serviceName + '_database'; + return /Existing/ig.test(configs[serviceDbSite][serviceDbConfig]); + }, + getDatabaseHost: function() { var db_type = this.get('databaseType'), connectionURLProps = {