35 lines
906 B
JavaScript
35 lines
906 B
JavaScript
function restartAutomation(automationId){
|
|
console.log("restartingAutomation" + automationId);
|
|
$.ajax({
|
|
url: 'ajax',
|
|
type: 'POST',
|
|
data: {
|
|
"automation_id" : automationId,
|
|
"action": 'restart'
|
|
},
|
|
success: function(data){
|
|
console.log(data);
|
|
},
|
|
error: function (request, status, error) {
|
|
console.log("ERROR ", request, error);
|
|
}
|
|
});
|
|
}
|
|
|
|
function toggleAutomation(automationId){
|
|
console.log("togglingAutomation" + automationId);
|
|
$.ajax({
|
|
url: 'ajax',
|
|
type: 'POST',
|
|
data: {
|
|
"automation_id" : automationId,
|
|
"action": 'deactive'
|
|
},
|
|
success: function(data){
|
|
console.log(data);
|
|
},
|
|
error: function (request, status, error) {
|
|
console.log("ERROR ", request, error);
|
|
}
|
|
});
|
|
} |