Repository: ambari Updated Branches: refs/heads/trunk 6c687711c -> d9db1db3d
AMBARI-8951 Distribute repositories/install packages UI hangs on latest trunk. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d9db1db3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d9db1db3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d9db1db3 Branch: refs/heads/trunk Commit: d9db1db3d6e7188550a69bdcb63123f3627e7ace Parents: 6c68771 Author: aBabiichuk <ababiic...@cybervisiontech.com> Authored: Tue Dec 30 12:22:05 2014 +0200 Committer: aBabiichuk <ababiic...@cybervisiontech.com> Committed: Tue Dec 30 12:23:09 2014 +0200 ---------------------------------------------------------------------- .../admin/stack_versions/stack_version_details_controller.js | 5 +++-- ambari-web/app/utils/ajax/ajax.js | 4 ---- .../stack_version/stack_version_details_controller_test.js | 3 ++- 3 files changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/d9db1db3/ambari-web/app/controllers/main/admin/stack_versions/stack_version_details_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/admin/stack_versions/stack_version_details_controller.js b/ambari-web/app/controllers/main/admin/stack_versions/stack_version_details_controller.js index d467d20..c4c4060 100644 --- a/ambari-web/app/controllers/main/admin/stack_versions/stack_version_details_controller.js +++ b/ambari-web/app/controllers/main/admin/stack_versions/stack_version_details_controller.js @@ -112,7 +112,7 @@ App.MainStackVersionsDetailsController = Em.Controller.extend({ } else { clearTimeout(self.get('timeoutRef')); } - }, App.componentsUpdateInterval)); + }, 3000)); }, /** @@ -123,7 +123,7 @@ App.MainStackVersionsDetailsController = Em.Controller.extend({ */ updateProgress: function() { return App.ajax.send({ - 'name': 'admin.stack_versions.progress.request', + 'name': 'admin.high_availability.polling', 'sender': this, 'data': { requestId: App.db.get('repoVersion', 'id') @@ -140,6 +140,7 @@ App.MainStackVersionsDetailsController = Em.Controller.extend({ updateProgressSuccess: function(data) { if (Em.get(data, 'Requests.progress_percent')) { this.set('progress', parseInt(Em.get(data, 'Requests.progress_percent'))); + this.set('logs', data.tasks); } }, http://git-wip-us.apache.org/repos/asf/ambari/blob/d9db1db3/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 ec80075..9a46781 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -1372,10 +1372,6 @@ var urls = { }, 'mock': '' }, - 'admin.stack_versions.progress.request': { - 'real': '/clusters/{clusterName}/requests/{requestId}?fields=Requests/progress_percent', - 'mock': '/data/background_operations/host_upgrade_tasks.json' - }, 'admin.rolling_upgrade.pre_upgrade_check': { 'real': '/clusters/{clusterName}/rolling_upgrades_check?fields=*', 'mock': '/data/stack_versions/pre_upgrade_check.json' http://git-wip-us.apache.org/repos/asf/ambari/blob/d9db1db3/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js b/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js index 235e845..4e288bf 100644 --- a/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js +++ b/ambari-web/test/controllers/main/admin/stack_version/stack_version_details_controller_test.js @@ -90,8 +90,9 @@ describe('App.MainStackVersionsDetailsController', function () { describe('#updateProgressSuccess', function () { it("saves progress state t othe controller", function () { - controller.updateProgressSuccess({Requests: {progress_percent: 10} }); + controller.updateProgressSuccess({Requests: {progress_percent: 10} , tasks: [{task: 1}]}); expect(controller.get('progress')).to.equal(10); + expect(controller.get('logs')).to.eql([{task: 1}]) }); });