mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-12 02:04:34 +00:00
To docker Image
This commit is contained in:
1 parent
ded8a698f0
commit
619386d391
104 files changed
+52
-13
No files matched your search
@@ -0,0 +1,35 @@
|
||||
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){
|
||||
$('#automation-'+automationId).toggleClass("is-inactive");
|
||||
},
|
||||
error: function (request, status, error) {
|
||||
console.log("ERROR ", request, error);
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user