mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-03 16:51:24 -07:00
feat: authoritative plugin fields
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ function renderList(
|
||||
data: JSON.stringify({ rawSql: base64Sql }),
|
||||
contentType: "application/json",
|
||||
success: function(data) {
|
||||
console.log("SQL query response:", data);
|
||||
// console.log("SQL query response:", data);
|
||||
|
||||
// Parse the returned SQL data
|
||||
let sqlOption = [];
|
||||
@@ -62,7 +62,7 @@ function renderList(
|
||||
// Concatenate options from SQL query with the supplied options
|
||||
options = options.concat(sqlOption);
|
||||
|
||||
console.log("Combined options:", options);
|
||||
// console.log("Combined options:", options);
|
||||
|
||||
// Process the combined options
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -16,8 +16,12 @@ function askDeleteDevice() {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function askDelDevDTInline(mac) {
|
||||
// Check MAC
|
||||
mac = getMac()
|
||||
|
||||
// only try getting mac from URL if not supplied - used in inline buttons on in the my devices listing pages
|
||||
if(isEmpty(mac))
|
||||
{
|
||||
mac = getMac()
|
||||
}
|
||||
|
||||
showModalWarning(
|
||||
getString("DevDetail_button_Delete"),
|
||||
@@ -54,13 +58,17 @@ function deleteDevice() {
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
function deleteDeviceByMac(mac) {
|
||||
// Check MAC
|
||||
mac = getMac()
|
||||
// only try getting mac from URL if not supplied - used in inline buttons on in teh my devices listing pages
|
||||
if(isEmpty(mac))
|
||||
{
|
||||
mac = getMac()
|
||||
}
|
||||
|
||||
const apiBase = getApiBase();
|
||||
const apiToken = getSetting("API_TOKEN");
|
||||
const url = `${apiBase}/device/${mac}/delete`;
|
||||
|
||||
|
||||
$.ajax({
|
||||
url,
|
||||
method: "DELETE",
|
||||
|
||||
Reference in New Issue
Block a user