diff --git a/front/devices.php b/front/devices.php index 4393d87a..8035a11e 100755 --- a/front/devices.php +++ b/front/devices.php @@ -148,10 +148,7 @@ function main () { //initialize the table headers in the correct order var availableColumns = getSettingOptions("UI_device_columns").split(","); - headersDefaultOrder = availableColumns.map(val => getString(val)); - - console.log(headersDefaultOrder); - + headersDefaultOrder = availableColumns.map(val => getString(val)); var selectedColumns = JSON.parse(getSetting("UI_device_columns").replace(/'/g, '"')); @@ -353,8 +350,6 @@ function initFilters() { // Clear any existing filters in the DOM $('#columnFilters').empty(); - console.log(displayedFilters); - // Ensure displayedFilters is an array and not empty if (Array.isArray(displayedFilters) && displayedFilters.length > 0) { $('#columnFiltersWrap').removeClass("hidden"); @@ -690,8 +685,6 @@ function initializeDatatable (status) { return JSON.stringify(query); // Send the JSON request }, "dataSrc": function (json) { - console.log(json); - // Set the total number of records for pagination json.recordsTotal = json.devices.count || 0; json.recordsFiltered = json.devices.count || 0; diff --git a/front/network.php b/front/network.php index 77af4110..0a12bc7b 100755 --- a/front/network.php +++ b/front/network.php @@ -437,7 +437,7 @@ if(archivedCount > 0) { - $('#showArchivedNumber').text(`(${archivedCount})`); + $('#showArchivedNumber').text(`(${archivedCount})`); } if(offlineCount > 0) @@ -968,7 +968,6 @@ $(window).on('resize', function () { // init pop up hover boxes for device details initHoverNodeInfo(); -// display toggles $(document).ready(function () { // Restore cached values on load const cachedOffline = getCache('showOffline'); @@ -981,12 +980,34 @@ $(document).ready(function () { $('input[name="showArchived"]').prop('checked', cachedArchived === 'true'); } + // Function to enable/disable showArchived based on showOffline + function updateArchivedToggle() { + const isOfflineChecked = $('input[name="showOffline"]').is(':checked'); + const archivedToggle = $('input[name="showArchived"]'); + + if (!isOfflineChecked) { + archivedToggle.prop('checked', false); + archivedToggle.prop('disabled', true); + setCache('showArchived', false); + } else { + archivedToggle.prop('disabled', false); + } + } + + // Initial state on load + updateArchivedToggle(); + // Bind change event for both toggles $('input[name="showOffline"], input[name="showArchived"]').on('change', function () { const name = $(this).attr('name'); const value = $(this).is(':checked'); setCache(name, value); + // Update state of showArchived if showOffline changed + if (name === 'showOffline') { + updateArchivedToggle(); + } + // Refresh page after a brief delay to ensure cache is written setTimeout(() => { location.reload(); @@ -994,6 +1015,7 @@ $(document).ready(function () { }); }); + diff --git a/front/php/templates/language/de_de.json b/front/php/templates/language/de_de.json index ae02620c..54e2d513 100755 --- a/front/php/templates/language/de_de.json +++ b/front/php/templates/language/de_de.json @@ -5,14 +5,6 @@ "API_TOKEN_name": "API-Schlüssel", "API_display_name": "API", "API_icon": "", - "APPRISE_HOST_description": "Apprise host URL starting with http:// or https://. (do not forget to include /notify at the end)", - "APPRISE_HOST_name": "Apprise host URL", - "APPRISE_PAYLOAD_description": "Select the payload type sent to Apprise. For example html works well with emails, text with chat apps, such as Telegram.", - "APPRISE_PAYLOAD_name": "Payload type", - "APPRISE_SIZE_description": "The maximum size of the apprise payload as number of characters in the passed string. If above limit, it will be truncated and a (text was truncated) message is appended.", - "APPRISE_SIZE_name": "Max payload size", - "APPRISE_URL_description": "Apprise notification target URL. For example for Telegram it would be tgram://{bot_token}/{chat_id}.", - "APPRISE_URL_name": "Apprise notification URL", "About_Design": "Entworfen für:", "About_Exit": "Abmelden", "About_Title": "Netzwerksicherheitsscanner und Benachrichtigungsframework", diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json index 4ce527fb..8963b9bc 100755 --- a/front/php/templates/language/es_es.json +++ b/front/php/templates/language/es_es.json @@ -5,14 +5,6 @@ "API_TOKEN_name": "Token de la API", "API_display_name": "API", "API_icon": "", - "APPRISE_HOST_description": "URL del host de Apprise que comienza con http:// o https://. (no olvide incluir /notify al final)", - "APPRISE_HOST_name": "URL del host de Apprise", - "APPRISE_PAYLOAD_description": "Seleccione el tipo de carga útil enviada a Apprise. Por ejemplo, html funciona bien con correos electrónicos, text con aplicaciones de chat, como Telegram.", - "APPRISE_PAYLOAD_name": "Tipo de carga", - "APPRISE_SIZE_description": "El tamaño máximo de la carga útil de información como número de caracteres en la cadena pasada. Si supera el límite, se truncará y se agregará un mensaje (text was truncated).", - "APPRISE_SIZE_name": "Tamaño máximo de carga útil", - "APPRISE_URL_description": "Informar de la URL de destino de la notificación. Por ejemplo, para Telegram sería tgram://{bot_token}/{chat_id}.", - "APPRISE_URL_name": "URL de notificación de Apprise", "About_Design": "Diseñado para:", "About_Exit": "Salir", "About_Title": "Escáner de seguridad de la red y marco de notificaciones", diff --git a/front/php/templates/language/fr_fr.json b/front/php/templates/language/fr_fr.json old mode 100644 new mode 100755