mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
@@ -354,22 +354,23 @@
|
|||||||
function executeAction(action, whereColumnName, key, targetColumns, newTargetColumnValue )
|
function executeAction(action, whereColumnName, key, targetColumns, newTargetColumnValue )
|
||||||
{
|
{
|
||||||
$.get(`php/server/dbHelper.php?action=${action}&dbtable=Devices&columnName=${whereColumnName}&id=${key}&columns=${targetColumns}&values=${newTargetColumnValue}`, function(data) {
|
$.get(`php/server/dbHelper.php?action=${action}&dbtable=Devices&columnName=${whereColumnName}&id=${key}&columns=${targetColumns}&values=${newTargetColumnValue}`, function(data) {
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
|
|
||||||
if (sanitize(data) == 'OK') {
|
if (sanitize(data) == 'OK') {
|
||||||
showMessage(getString('Gen_DataUpdatedUITakesTime'));
|
showMessage(getString('Gen_DataUpdatedUITakesTime'));
|
||||||
// Remove navigation prompt "Are you sure you want to leave..."
|
// Remove navigation prompt "Are you sure you want to leave..."
|
||||||
window.onbeforeunload = null;
|
window.onbeforeunload = null;
|
||||||
|
|
||||||
// update API endpoints to refresh the UI
|
// update API endpoints to refresh the UI
|
||||||
updateApi("devices,appevents")
|
updateApi("devices,appevents")
|
||||||
|
|
||||||
write_notification(`[Multi edit] Executed "${action}" on Columns "${targetColumns}" matching "${key}"`, 'info')
|
write_notification(`[Multi edit] Executed "${action}" on Columns "${targetColumns}" matching "${key}"`, 'info')
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
showMessage(getString('Gen_LockedDB'));
|
console.error(data);
|
||||||
}
|
showMessage(getString('Gen_LockedDB'));
|
||||||
});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user