Updated Branches:
  refs/heads/trunk 0a292cc86 -> 257d92f28

AMBARI-3250. NameNode HA wizard (rollback): Add Skip button for failed task, in 
rollback popup


Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/257d92f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/257d92f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/257d92f2

Branch: refs/heads/trunk
Commit: 257d92f2880bc2a30f2e91c941fcc2094ee0817b
Parents: 0a292cc
Author: Alex Antonenko <[email protected]>
Authored: Mon Sep 16 22:47:26 2013 +0300
Committer: Alex Antonenko <[email protected]>
Committed: Mon Sep 16 23:30:26 2013 +0300

----------------------------------------------------------------------
 .../main/admin/highAvailability/rollback_controller.js      | 9 +++++++++
 ambari-web/app/messages.js                                  | 1 +
 .../app/templates/main/admin/highAvailability/progress.hbs  | 6 ++++++
 3 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/257d92f2/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js 
b/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
index ca9ec44..a07a051 100644
--- 
a/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
+++ 
b/ambari-web/app/controllers/main/admin/highAvailability/rollback_controller.js
@@ -111,6 +111,7 @@ App.HighAvailabilityRollbackController = 
App.HighAvailabilityProgressPageControl
         command: commands[i],
         showRetry: false,
         showRollback: false,
+        showSkip: false,
         name: Em.I18n.t('admin.highAvailability.rollback.task' + i + '.title'),
         displayName: Em.I18n.t('admin.highAvailability.rollback.task' + i + 
'.title'),
         progress: 0,
@@ -136,6 +137,7 @@ App.HighAvailabilityRollbackController = 
App.HighAvailabilityProgressPageControl
     } else if (this.get('tasks').someProperty('status', 'FAILED') || 
this.get('tasks').someProperty('status', 'TIMEDOUT') || 
this.get('tasks').someProperty('status', 'ABORTED')) {
       this.set('status', 'FAILED');
       this.get('tasks').findProperty('status', 'FAILED').set('showRetry', 
true);
+      this.get('tasks').findProperty('status', 'FAILED').set('showSkip', true);
     }
 
     var statuses = this.get('tasks').mapProperty('status');
@@ -150,6 +152,13 @@ App.HighAvailabilityRollbackController = 
App.HighAvailabilityProgressPageControl
     });
   },
 
+  skipTask: function () {
+    var task = this.get('tasks').findProperty('status', 'FAILED');
+    task.set('showRetry', false);
+    task.set('showSkip', false);
+    task.set('status', 'COMPLETED');
+  },
+
   onTaskCompleted: function () {
     var curTaskStatus = this.getTaskStatus(this.get('currentTaskId'));
     if (curTaskStatus != 'FAILED' && curTaskStatus != 'TIMEDOUT' && 
curTaskStatus != 'ABORTED') {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/257d92f2/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 0ae5157..44da0bf 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -56,6 +56,7 @@ Em.I18n.translations = {
   'common.addComponent':'Add Component',
   'common.remove':'Remove',
   'common.retry':'Retry',
+  'common.skip':'Skip',
   'common.rollBack':'Rollback',
   'common.show':'Show',
   'common.hide':'Hide',

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/257d92f2/ambari-web/app/templates/main/admin/highAvailability/progress.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/highAvailability/progress.hbs 
b/ambari-web/app/templates/main/admin/highAvailability/progress.hbs
index 0f86f11..be3b8f3 100644
--- a/ambari-web/app/templates/main/admin/highAvailability/progress.hbs
+++ b/ambari-web/app/templates/main/admin/highAvailability/progress.hbs
@@ -47,6 +47,12 @@
           {{t common.rollBack}}
         </a>
       {{/if}}
+      {{#if task.showSkip}}
+        <a {{action skipTask target="controller"}} class="btn btn-primary 
retry">
+          <i class="icon-repeat icon-white"></i>
+          {{t common.skip}}
+        </a>
+      {{/if}}
       </div>
     </div>
   {{/view}}

Reply via email to