diff --git a/front/css/app.css b/front/css/app.css index bba5e5d0..c686a831 100755 --- a/front/css/app.css +++ b/front/css/app.css @@ -101,8 +101,8 @@ a[target="_blank"] { ----------------------------------------------------------------------------- */ .logs { - color:white; - background-color: black; + color:white !important; + background-color: black !important; font-family: 'Courier New', monospace; font-size: .85em; diff --git a/front/css/dark-patch.css b/front/css/dark-patch.css index 50f51051..e3458c2a 100755 --- a/front/css/dark-patch.css +++ b/front/css/dark-patch.css @@ -518,7 +518,7 @@ textarea[readonly], .form-control[readonly] { background-color: #545659 !important; border-color: #3d444b; - color: #888a8c; + color: #979a9d; cursor: not-allowed; opacity: 1; } diff --git a/front/css/system-dark-patch.css b/front/css/system-dark-patch.css index 2b809310..21bed0b1 100755 --- a/front/css/system-dark-patch.css +++ b/front/css/system-dark-patch.css @@ -22,7 +22,7 @@ --color-gray: #8c8c8c; --color-white: #fff; } - + :root { --datatable-bgcolor: rgba(64, 76, 88, 0.8); } @@ -427,7 +427,7 @@ background: transparent; color: var(--color-white); } - + /* Used in debug log page */ .log-red { color: #ff4038; @@ -519,9 +519,9 @@ input[readonly], textarea[readonly], .form-control[readonly] { - background-color: #2f353b !important; + background-color: #545659 !important; border-color: #3d444b; - color: #c7cdd3; + color: #979a9d; cursor: not-allowed; opacity: 1; } @@ -693,7 +693,7 @@ .db_tools_table_cell_b:nth-child(1) {background: #272c30} .db_tools_table_cell_b:nth-child(2) {background: #272c30} - .db_info_table { + .db_info_table { display: table; border-spacing: 0em; font-weight: 400; @@ -757,7 +757,7 @@ .small-box:hover .icon { font-size: 3em; } - .small-box .icon { + .small-box .icon { top: 0.01em; font-size: 3.25em; } @@ -808,7 +808,7 @@ .thresholdFormControl { - color:#000; + color:#000; } .btn:hover diff --git a/front/deviceDetailsEdit.php b/front/deviceDetailsEdit.php index 0c8a28f7..09822b7a 100755 --- a/front/deviceDetailsEdit.php +++ b/front/deviceDetailsEdit.php @@ -276,9 +276,9 @@ function getDeviceData() { fieldData = localizeTimestamp(fieldData) } - // Add lock/unlock button for tracked fields (not for new devices) + // Add lock/unlock icon button for tracked fields (not for new devices) const fieldName = setting.setKey.replace('NEWDEV_', ''); - if (trackedFields[fieldName] && fieldName !== "devFQDN" && mac != "new") { + if (trackedFields[fieldName] && fieldName !== "devFQDN" && fieldName !== "devMac" && mac != "new") { const sourceField = fieldName + "Source"; const currentSource = deviceData[sourceField] || "N/A"; diff --git a/front/js/db_methods.js b/front/js/db_methods.js index 958a6bbd..0212fb0d 100755 --- a/front/js/db_methods.js +++ b/front/js/db_methods.js @@ -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(() => { diff --git a/front/js/device.js b/front/js/device.js index dec06a34..934878c9 100755 --- a/front/js/device.js +++ b/front/js/device.js @@ -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", diff --git a/server/const.py b/server/const.py index b8704e47..63594d62 100755 --- a/server/const.py +++ b/server/const.py @@ -193,14 +193,18 @@ sql_online_history = "SELECT * FROM Online_History" sql_plugins_events = "SELECT * FROM Plugins_Events" sql_plugins_history = "SELECT * FROM Plugins_History ORDER BY DateTimeChanged DESC" sql_new_devices = """SELECT * FROM ( - SELECT eve_IP as devLastIP, eve_MAC as devMac + SELECT eve_IP as devLastIP, + eve_MAC as devMac, + MAX(eve_DateTime) as lastEvent FROM Events_Devices WHERE eve_PendingAlertEmail = 1 AND eve_EventType = 'New Device' - ORDER BY eve_DateTime ) t1 - LEFT JOIN - ( SELECT devName, devMac as devMac_t2 FROM Devices) t2 - ON t1.devMac = t2.devMac_t2""" + GROUP BY eve_MAC + ORDER BY lastEvent + ) t1 + LEFT JOIN + ( SELECT devName, devMac as devMac_t2 FROM Devices ) t2 + ON t1.devMac = t2.devMac_t2""" sql_generateGuid = """