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/08/24 19:58:46 UTC

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

Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 04b4013e2 -> e27a21428


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/e27a2142
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e27a2142
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e27a2142

Branch: refs/heads/branch-2.6
Commit: e27a214285c62bc43f11e3026de912410bc47ddc
Parents: 04b4013
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Thu Aug 24 12:41:14 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Thu Aug 24 12:41:14 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/e27a2142/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 = {