2019-10-11 15:16:24 +00:00
|
|
|
function restartAutomation(automationId){
|
|
|
|
console.log("restartingAutomation" + automationId);
|
|
|
|
$.ajax({
|
|
|
|
url: 'ajax',
|
|
|
|
type: 'POST',
|
|
|
|
data: {
|
|
|
|
"automation_id" : automationId,
|
2019-10-11 15:41:58 +00:00
|
|
|
"action": "restart"
|
2019-10-11 15:16:24 +00:00
|
|
|
},
|
|
|
|
success: function(data){
|
|
|
|
console.log(data);
|
|
|
|
},
|
|
|
|
error: function (request, status, error) {
|
|
|
|
console.log("ERROR ", request, error);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2019-10-11 15:41:58 +00:00
|
|
|
function toggleAutomation(automationId){
|
2019-10-11 15:16:24 +00:00
|
|
|
console.log("togglingAutomation" + automationId);
|
|
|
|
$.ajax({
|
|
|
|
url: 'ajax',
|
|
|
|
type: 'POST',
|
|
|
|
data: {
|
|
|
|
"automation_id" : automationId,
|
2019-10-11 15:41:58 +00:00
|
|
|
"action": "deactive"
|
2019-10-11 15:16:24 +00:00
|
|
|
},
|
|
|
|
success: function(data){
|
2019-10-11 15:35:06 +00:00
|
|
|
$('#automation-'+automationId).toggleClass("is-inactive");
|
2019-10-11 15:16:24 +00:00
|
|
|
},
|
|
|
|
error: function (request, status, error) {
|
|
|
|
console.log("ERROR ", request, error);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|