Repository: ambari Updated Branches: refs/heads/branch-2.1 d4987f965 -> 88a40af3d
AMBARI-12849 SQLA: UI should fix db_name for check_host custom action. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/88a40af3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/88a40af3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/88a40af3 Branch: refs/heads/branch-2.1 Commit: 88a40af3d16f8c65576aef579da47cd4e22f68f1 Parents: d4987f9 Author: aBabiichuk <[email protected]> Authored: Fri Aug 21 15:46:54 2015 +0300 Committer: aBabiichuk <[email protected]> Committed: Fri Aug 21 15:51:46 2015 +0300 ---------------------------------------------------------------------- ambari-web/app/data/HDP2/site_properties.js | 4 ++-- ambari-web/app/data/db_properties_info.js | 2 +- ambari-web/app/utils/configs/database.js | 5 +++-- ambari-web/app/views/common/controls_view.js | 5 ++--- 4 files changed, 8 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/88a40af3/ambari-web/app/data/HDP2/site_properties.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js index 060e3b5..11ea3b7 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -3393,7 +3393,7 @@ var hdp2properties = [ }, { displayName: 'Existing SQLA Database', - hidden: false + hidden: !App.get('isHadoop23Stack') } ], "description": "MySQL will be installed by Ambari", @@ -3636,7 +3636,7 @@ var hdp2properties = [ }, { displayName: 'Existing SQLA Database', - hidden: false + hidden: !App.get('isHadoop23Stack') } ], "description": "Current Derby Database will be installed by Ambari", http://git-wip-us.apache.org/repos/asf/ambari/blob/88a40af3/ambari-web/app/data/db_properties_info.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/db_properties_info.js b/ambari-web/app/data/db_properties_info.js index 7906648..360204c 100644 --- a/ambari-web/app/data/db_properties_info.js +++ b/ambari-web/app/data/db_properties_info.js @@ -109,7 +109,7 @@ module.exports = { 'db_type': 'mssql' }, 'SQLA': { - 'connection_url': 'jdbc:sqlanywhere:uid={2};pwd={3};database={1};host={0}', + 'connection_url': 'jdbc:sqlanywhere:host={0};database={1};uid={2};pwd={3}', 'driver': 'sap.jdbc4.sqlanywhere.IDriver', 'sql_jar_connector': '/path_to_driver/sqla-client-jdbc.tar.gz', 'db_type': 'sqlanywhere' http://git-wip-us.apache.org/repos/asf/ambari/blob/88a40af3/ambari-web/app/utils/configs/database.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/configs/database.js b/ambari-web/app/utils/configs/database.js index 3ef7c0a..74ff642 100644 --- a/ambari-web/app/utils/configs/database.js +++ b/ambari-web/app/utils/configs/database.js @@ -60,7 +60,8 @@ module.exports = { mssql: 'jdbc:sqlserver://{0};databaseName={1}', postgres: 'jdbc:postgresql://{0}:5432/{1}', derby: 'jdbc:derby:{0}/{1}', - oracle: 'jdbc:oracle:thin:@(?:\/?\/?){0}:1521(\:|\/){1}' + oracle: 'jdbc:oracle:thin:@(?:\/?\/?){0}:1521(\:|\/){1}', + sqla: 'jdbc:sqlanywhere:host={0};database={1};uid={2};pwd={3}' }, /** @@ -150,7 +151,7 @@ module.exports = { getDBLocationFromJDBC: function(jdbcUrl) { var self = this; var matches = Em.keys(this.DB_JDBC_PATTERNS).map(function(key) { - var reg = new RegExp(self.DB_JDBC_PATTERNS[key].format('(.*)', '(.*)')); + var reg = new RegExp(self.DB_JDBC_PATTERNS[key].format('(.*)', '(.*)', '(.*)', '(.*)')); return jdbcUrl.match(reg); }).compact(); if (matches.length) { http://git-wip-us.apache.org/repos/asf/ambari/blob/88a40af3/ambari-web/app/views/common/controls_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/controls_view.js b/ambari-web/app/views/common/controls_view.js index 7aabacd..91be642 100644 --- a/ambari-web/app/views/common/controls_view.js +++ b/ambari-web/app/views/common/controls_view.js @@ -676,7 +676,7 @@ App.ServiceConfigRadioButtons = Ember.View.extend(App.ServiceConfigCalculateId, var shouldAdditionalViewsBeSet = currentDB && checkDatabase && handledProperties.contains(this.get('serviceConfig.name')), driver = this.getDefaultPropertyValue('sql_jar_connector') ? this.getDefaultPropertyValue('sql_jar_connector').split("/").pop() : 'driver.jar', dbType = this.getDefaultPropertyValue('db_type'), - additionalView1 = shouldAdditionalViewsBeSet ? App.CheckDBConnectionView.extend({databaseName: currentDB}) : null, + additionalView1 = shouldAdditionalViewsBeSet ? App.CheckDBConnectionView.extend({databaseName: dbType}) : null, additionalView2 = shouldAdditionalViewsBeSet ? Ember.View.extend({ template: Ember.Handlebars.compile('<div class="alert">{{{view.message}}}</div>'), message: Em.I18n.t('services.service.config.database.msg.jdbcSetup').format(dbType, driver) @@ -1320,8 +1320,7 @@ App.CheckDBConnectionView = Ember.View.extend({ * @method createCustomAction **/ createCustomAction: function() { - var dbName = this.get('databaseName').toLowerCase() === 'postgresql' ? 'postgres' : this.get('databaseName').toLowerCase(); - var params = $.extend(true, {}, { db_name: dbName }, this.get('connectionProperties'), this.get('ambariProperties')); + var params = $.extend(true, {}, { db_name: this.get('databaseName').toLowerCase() }, this.get('connectionProperties'), this.get('ambariProperties')); App.ajax.send({ name: 'custom_action.create', sender: this,
