|
@@ -37,6 +37,7 @@ App.MainDatasetJobsController = Em.Controller.extend({
|
|
|
|
|
|
onSuspendSuccess: function() {
|
|
onSuspendSuccess: function() {
|
|
this.set('content.status', 'SUSPENDED');
|
|
this.set('content.status', 'SUSPENDED');
|
|
|
|
+ this.get('content.datasetJobs').filterProperty('status', 'RUNNING').setEach('status', 'SUSPENDED');
|
|
},
|
|
},
|
|
|
|
|
|
schedule: function () {
|
|
schedule: function () {
|
|
@@ -55,6 +56,7 @@ App.MainDatasetJobsController = Em.Controller.extend({
|
|
|
|
|
|
onScheduleSuccess: function() {
|
|
onScheduleSuccess: function() {
|
|
this.set('content.status', 'RUNNING');
|
|
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,
|
|
job: event.context,
|
|
falconServer: App.get('falconServerURL')
|
|
falconServer: App.get('falconServerURL')
|
|
},
|
|
},
|
|
|
|
+ success: 'onSuspendInstanceSuccess',
|
|
error: 'onError'
|
|
error: 'onError'
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ onSuspendInstanceSuccess: function () {
|
|
|
|
+ this.get('content.datasetJobs').filterProperty('name', arguments[2].name).setEach('status', 'SUSPENDED');
|
|
|
|
+ },
|
|
|
|
+
|
|
resumeInstance: function (event) {
|
|
resumeInstance: function (event) {
|
|
App.ajax.send({
|
|
App.ajax.send({
|
|
name: 'mirroring.resume_instance',
|
|
name: 'mirroring.resume_instance',
|
|
@@ -107,10 +114,15 @@ App.MainDatasetJobsController = Em.Controller.extend({
|
|
job: event.context,
|
|
job: event.context,
|
|
falconServer: App.get('falconServerURL')
|
|
falconServer: App.get('falconServerURL')
|
|
},
|
|
},
|
|
|
|
+ success: 'onResumeInstanceSuccess',
|
|
error: 'onError'
|
|
error: 'onError'
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ onResumeInstanceSuccess: function () {
|
|
|
|
+ this.get('content.datasetJobs').filterProperty('name', arguments[2].name).setEach('status', 'RUNNING');
|
|
|
|
+ },
|
|
|
|
+
|
|
killInstance: function (event) {
|
|
killInstance: function (event) {
|
|
App.ajax.send({
|
|
App.ajax.send({
|
|
name: 'mirroring.kill_instance',
|
|
name: 'mirroring.kill_instance',
|
|
@@ -121,10 +133,15 @@ App.MainDatasetJobsController = Em.Controller.extend({
|
|
job: event.context,
|
|
job: event.context,
|
|
falconServer: App.get('falconServerURL')
|
|
falconServer: App.get('falconServerURL')
|
|
},
|
|
},
|
|
|
|
+ success: 'onKillInstanceSuccess',
|
|
error: 'onError'
|
|
error: 'onError'
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ onKillInstanceSuccess: function () {
|
|
|
|
+ this.get('content.datasetJobs').filterProperty('name', arguments[2].name).setEach('status', 'KILLED');
|
|
|
|
+ },
|
|
|
|
+
|
|
onError: function () {
|
|
onError: function () {
|
|
App.showAlertPopup(Em.I18n.t('common.error'), arguments[2]);
|
|
App.showAlertPopup(Em.I18n.t('common.error'), arguments[2]);
|
|
},
|
|
},
|