ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject git commit: AMBARI-4848. When recommissioning, UI incorrectly shows ability to Abort (alexantonenko)
Date Wed, 26 Feb 2014 16:24:11 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 3d15e7382 -> f9bc43dde


AMBARI-4848. When recommissioning, UI incorrectly shows ability to Abort (alexantonenko)


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

Branch: refs/heads/trunk
Commit: f9bc43dde9286b428adaeafedb3163bdbcb4b821
Parents: 3d15e73
Author: Alex Antonenko <hiveww@gmail.com>
Authored: Wed Feb 26 18:22:19 2014 +0200
Committer: Alex Antonenko <hiveww@gmail.com>
Committed: Wed Feb 26 18:22:19 2014 +0200

----------------------------------------------------------------------
 .../controllers/global/background_operations_controller.js  | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f9bc43dd/ambari-web/app/controllers/global/background_operations_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/global/background_operations_controller.js b/ambari-web/app/controllers/global/background_operations_controller.js
index 6a4c12f..9d24e1d 100644
--- a/ambari-web/app/controllers/global/background_operations_controller.js
+++ b/ambari-web/app/controllers/global/background_operations_controller.js
@@ -164,6 +164,15 @@ App.BackgroundOperationsController = Em.Controller.extend({
         (request.Requests.aborted_task_count + request.Requests.completed_task_count + request.Requests.failed_task_count
          + request.Requests.timed_out_task_count - request.Requests.queued_task_count)) >
0;
       var requestParams = this.parseRequestContext(request.Requests.request_context);
+      var inputs = JSON.parse(request.Requests.inputs);
+      var oneHost = false;
+      if (inputs && inputs.included_hosts) {
+        var hosts = inputs.included_hosts.split(',');
+        oneHost = hosts.length < 2 ? true : false;
+      };
+      if(request.Requests.request_schedule && oneHost && /Recommission/.test(requestParams.requestContext)){
+        request.Requests.request_schedule.schedule_id = null;
+      }
       currentRequestIds.push(request.Requests.id);
       if (rq) {
         rq.set('progress', Math.ceil(request.Requests.progress_percent));


Mime
View raw message