You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2017/10/09 18:34:57 UTC

[43/50] [abbrv] ambari git commit: AMBARI-21807. 'Move Hive Metastore' wizard is stuck while configuring MYSQL_SERVER. (jaimin)

AMBARI-21807. 'Move Hive Metastore' wizard is stuck while configuring MYSQL_SERVER. (jaimin)

Change-Id: I2176cecabdaeee3e23d9f5a5302e79a296edc17c


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/859673a7
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/859673a7
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/859673a7

Branch: refs/heads/2.5-maint
Commit: 859673a77055b3315d763535b2c9e2747602d7c5
Parents: 4b71161
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Thu Aug 24 13:18:58 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Thu Aug 24 13:18:58 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/859673a7/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 = {