ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject [1/3] git commit: AMBARI-5017. Mirroring: there's no immediate feedback on "Kill Instance" and "Suspend Instance" actions. (akovalenko)
Date Tue, 11 Mar 2014 15:33:16 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk fa65de900 -> 97cff09d2


AMBARI-5017. Mirroring: there's no immediate feedback on "Kill Instance" and "Suspend Instance"
actions. (akovalenko)


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

Branch: refs/heads/trunk
Commit: 1b1dcaf9a4d64b24367a8961513125042c92ddce
Parents: 7187a26
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Tue Mar 11 14:45:23 2014 +0200
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Tue Mar 11 17:31:20 2014 +0200

----------------------------------------------------------------------
 .../controllers/main/mirroring/jobs_controller.js  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b1dcaf9/ambari-web/app/controllers/main/mirroring/jobs_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/mirroring/jobs_controller.js b/ambari-web/app/controllers/main/mirroring/jobs_controller.js
index 86c7dd9..d8e6d47 100644
--- a/ambari-web/app/controllers/main/mirroring/jobs_controller.js
+++ b/ambari-web/app/controllers/main/mirroring/jobs_controller.js
@@ -37,6 +37,7 @@ App.MainDatasetJobsController = Em.Controller.extend({
 
   onSuspendSuccess: function() {
     this.set('content.status', 'SUSPENDED');
+    this.get('content.datasetJobs').filterProperty('status', 'RUNNING').setEach('status',
'SUSPENDED');
   },
 
   schedule: function () {
@@ -55,6 +56,7 @@ App.MainDatasetJobsController = Em.Controller.extend({
 
   onScheduleSuccess: function() {
     this.set('content.status', 'RUNNING');
+    this.get('content.datasetJobs').filterProperty('status', 'SUSPENDED').setEach('status',
'RUNNING');
   },
 
 
@@ -93,10 +95,15 @@ App.MainDatasetJobsController = Em.Controller.extend({
         job: event.context,
         falconServer: App.get('falconServerURL')
       },
+      success: 'onSuspendInstanceSuccess',
       error: 'onError'
     });
   },
 
+  onSuspendInstanceSuccess: function () {
+    this.get('content.datasetJobs').filterProperty('name', arguments[2].name).setEach('status',
'SUSPENDED');
+  },
+
   resumeInstance: function (event) {
     App.ajax.send({
       name: 'mirroring.resume_instance',
@@ -107,10 +114,15 @@ App.MainDatasetJobsController = Em.Controller.extend({
         job: event.context,
         falconServer: App.get('falconServerURL')
       },
+      success: 'onResumeInstanceSuccess',
       error: 'onError'
     });
   },
 
+  onResumeInstanceSuccess: function () {
+    this.get('content.datasetJobs').filterProperty('name', arguments[2].name).setEach('status',
'RUNNING');
+  },
+
   killInstance: function (event) {
     App.ajax.send({
       name: 'mirroring.kill_instance',
@@ -121,10 +133,15 @@ App.MainDatasetJobsController = Em.Controller.extend({
         job: event.context,
         falconServer: App.get('falconServerURL')
       },
+      success: 'onKillInstanceSuccess',
       error: 'onError'
     });
   },
 
+  onKillInstanceSuccess: function () {
+    this.get('content.datasetJobs').filterProperty('name', arguments[2].name).setEach('status',
'KILLED');
+  },
+
   onError: function () {
     App.showAlertPopup(Em.I18n.t('common.error'), arguments[2]);
   },


Mime
View raw message