You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2015/01/27 17:10:26 UTC
ambari git commit: AMBARI-9356. Handle the scenario where the Kerb
API call returns 200. (akovalenko)
Repository: ambari
Updated Branches:
refs/heads/trunk f1f3e3971 -> fcb317ae4
AMBARI-9356. Handle the scenario where the Kerb API call returns 200. (akovalenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fcb317ae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fcb317ae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fcb317ae
Branch: refs/heads/trunk
Commit: fcb317ae42480d0ab7f1167973c6bf55e4a13659
Parents: f1f3e39
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Tue Jan 27 17:48:55 2015 +0200
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Tue Jan 27 18:09:58 2015 +0200
----------------------------------------------------------------------
.../app/mixins/wizard/wizardProgressPageController.js | 14 +++++++++++++-
ambari-web/app/templates/common/progress.hbs | 2 +-
2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/fcb317ae/ambari-web/app/mixins/wizard/wizardProgressPageController.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/wizardProgressPageController.js b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
index 9d12aff..e2c09e5 100644
--- a/ambari-web/app/mixins/wizard/wizardProgressPageController.js
+++ b/ambari-web/app/mixins/wizard/wizardProgressPageController.js
@@ -42,6 +42,11 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
return !this.get('isSingleRequestPage');
}.property('isSingleRequestPage'),
showRetry: false,
+ /**
+ * Show whether tasks data was loaded
+ * @type {Boolean}
+ */
+ isLoading: false,
k: Em.K,
/**
@@ -57,12 +62,17 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
var runningOperations = App.router.get('backgroundOperationsController.services').filterProperty('isRunning');
var currentOperation = runningOperations.findProperty('name', this.contextForPollingRequest);
if (!currentOperation) {
- this.submitRequest().done(function (data) {
+ this.submitRequest().done(function (data, result, request) {
if (data) {
self.set('currentPageRequestId', data.Requests.id);
self.doPollingForPageRequest();
} else {
//Step has been successfully completed
+ if (request.status === 200) {
+ self.set('status', 'COMPLETED');
+ self.set('isSubmitDisabled', false);
+ self.set('isLoaded', true);
+ }
}
});
} else {
@@ -98,6 +108,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
this.set('isBackButtonDisabled', true);
this.set('tasks', []);
this.set('currentRequestIds', []);
+ this.set('isLoaded', false);
},
retry: function () {
@@ -203,6 +214,7 @@ App.wizardProgressPageControllerMixin = Em.Mixin.create({
requestIds: []
}));
}
+ this.set('isLoaded', true);
},
loadTasks: function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/fcb317ae/ambari-web/app/templates/common/progress.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/progress.hbs b/ambari-web/app/templates/common/progress.hbs
index 92942d9..5f5c38d 100644
--- a/ambari-web/app/templates/common/progress.hbs
+++ b/ambari-web/app/templates/common/progress.hbs
@@ -25,7 +25,7 @@
</a>
{{/if}}
</div>
- {{#if controller.tasks.length}}
+ {{#if controller.isLoaded}}
{{#each task in controller.tasks}}
{{#view view.taskView contentBinding="task"}}
<div class="item">