You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2017/03/17 08:04:22 UTC
ambari git commit: AMBARI-20481. Start/Stop Service command may
silently fail without any reporting for user (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/trunk bcad0bdd3 -> 2ef903165
AMBARI-20481. Start/Stop Service command may silently fail without any reporting for user (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ef90316
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ef90316
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ef90316
Branch: refs/heads/trunk
Commit: 2ef90316516e305ead42b8b851916f41f1502e60
Parents: bcad0bd
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Thu Mar 16 14:59:00 2017 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Fri Mar 17 10:03:42 2017 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/main/service/item.js | 1 +
.../test/controllers/main/service/item_test.js | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ef90316/ambari-web/app/controllers/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/item.js b/ambari-web/app/controllers/main/service/item.js
index 5169564..37713dc 100644
--- a/ambari-web/app/controllers/main/service/item.js
+++ b/ambari-web/app/controllers/main/service/item.js
@@ -268,6 +268,7 @@ App.MainServiceItemController = Em.Controller.extend(App.SupportClientConfigsDow
}
},
startStopPopupErrorCallback: function(request, ajaxOptions, error, opt, params){
+ App.ajax.defaultErrorHandler(request, opt.url, opt.type, request.status);
params.query.set('status', 'FAIL');
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ef90316/ambari-web/test/controllers/main/service/item_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/item_test.js b/ambari-web/test/controllers/main/service/item_test.js
index c4a50ea..69a02de 100644
--- a/ambari-web/test/controllers/main/service/item_test.js
+++ b/ambari-web/test/controllers/main/service/item_test.js
@@ -2000,4 +2000,21 @@ describe('App.MainServiceItemController', function () {
});
+ describe('#startStopPopupErrorCallback', function () {
+
+ beforeEach(function () {
+ sinon.spy(App.ajax, 'defaultErrorHandler');
+ });
+
+ afterEach(function () {
+ App.ajax.defaultErrorHandler.restore();
+ });
+
+ it('`App.ajax.defaultErrorHandler` should be called', function () {
+ App.MainServiceItemController.create().startStopPopupErrorCallback({}, {}, '', {}, {query: Em.Object.create()});
+ expect(App.ajax.defaultErrorHandler.calledOnce).to.be.true;
+ });
+
+ });
+
});