Repository: ambari Updated Branches: refs/heads/trunk d1c99a06b -> c7528452c
AMBARI-9162. Kerberos wizard: Test Connectivity button does not work. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c7528452 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c7528452 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c7528452 Branch: refs/heads/trunk Commit: c7528452c59501d809abe9f7b93e497748ddeffb Parents: d1c99a0 Author: Jaimin Jetly <[email protected]> Authored: Thu Jan 15 15:40:21 2015 -0800 Committer: Jaimin Jetly <[email protected]> Committed: Thu Jan 15 15:40:21 2015 -0800 ---------------------------------------------------------------------- ambari-web/app/utils/ajax/ajax.js | 7 +++---- ambari-web/app/views/wizard/controls_view.js | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/c7528452/ambari-web/app/utils/ajax/ajax.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index e4a0960..9e459d2 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -1407,11 +1407,10 @@ var urls = { 'admin.kerberos_security.test_connection': { 'real': '/kdc_check/{kdcHostname}', 'mock': '', - 'format': function (data) { + 'format': function () { return { - type: 'POST', - data: JSON.stringify(data) - } + dataType: 'text' + }; } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/c7528452/ambari-web/app/views/wizard/controls_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/controls_view.js b/ambari-web/app/views/wizard/controls_view.js index 460d5f2..c595d18 100644 --- a/ambari-web/app/views/wizard/controls_view.js +++ b/ambari-web/app/views/wizard/controls_view.js @@ -1031,12 +1031,29 @@ App.CheckDBConnectionView = Ember.View.extend({ data: { kdcHostname: this.get('masterHostName') }, - success: 'onCreateActionSuccess', + success: 'onRunKDCCheckSuccess', error: 'onCreateActionError' }); }, /** + * + * @param data + */ + onRunKDCCheckSuccess: function(data) { + var statusCode = { + success: 'REACHABLE', + failed: 'UNREACHABLE' + }; + if (data == statusCode['success']) { + this.setResponseStatus('success'); + } else { + this.setResponseStatus('failed'); + } + this.set('responseFromServer', data); + }, + + /** * Run custom action for database connection. * * @method createCustomAction
