diff --git a/front/css/app.css b/front/css/app.css index d8bef07f..df98467e 100755 --- a/front/css/app.css +++ b/front/css/app.css @@ -1042,7 +1042,7 @@ height: 50px; .myhidden { - display:none; + display:none !important; } .center @@ -1364,6 +1364,7 @@ input[readonly] { .iconPreview { min-width: 40px; + /* display: inherit; */ } .iconPreview svg{ @@ -1469,6 +1470,11 @@ input[readonly] { text-align: left; } +#panDetails .input-group { + + min-height: 40px; +} + #devicePageInfoPlc { display: none; @@ -1547,10 +1553,6 @@ input[readonly] { } /* #panDetails .dataTables_wrapper .bottom .paging_simple_numbers */ -#panDetails #NEWDEV_devIcon -{ - display: none; -} #panDetails #NEWDEV_devCustomProps_label { @@ -2023,8 +2025,9 @@ input[readonly] { .pluginBadge { float: right; - margin-right: 3px; + margin-right: 10px; opacity: 0.6; + margin-top: 4px; } .pluginBadgeWrap @@ -2033,7 +2036,7 @@ input[readonly] { display: ruby; z-index: 1; position: sticky; - margin-top: 1px; + margin-top: 4px; } /* ----------------------------------------------------------------------------- diff --git a/front/deviceDetails.php b/front/deviceDetails.php index cd19221c..e46f9281 100755 --- a/front/deviceDetails.php +++ b/front/deviceDetails.php @@ -447,7 +447,7 @@ async function renderSmallBoxes() { "labelLang": "DevDetail_Shortcut_Presence", "iconId": "deviceEventsIcon", "iconClass": "fa fa-calendar", - "dataValue": `${deviceData.devPresenceHours}h` + "dataValue": `${deviceData.devPresenceHours ?? 0}h` }, { "onclickEvent": "$('#tabEvents').trigger('click');", diff --git a/front/deviceDetailsEdit.php b/front/deviceDetailsEdit.php index fb827894..150d787d 100755 --- a/front/deviceDetailsEdit.php +++ b/front/deviceDetailsEdit.php @@ -126,9 +126,9 @@ // Group for Children. DevDetail_Children_Title: { data: ["devChildrenDynamic"], - docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/CUSTOM_PROPERTIES.md", + docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md", iconClass: "fa fa-list", - inputGroupClasses: "field-group cutprop-group col-lg-12 col-sm-12 col-xs-12", + inputGroupClasses: "field-group cutprop-group col-lg-6 col-sm-12 col-xs-12", labelClasses: "col-sm-12 col-xs-12 control-label", inputClasses: "col-sm-12 col-xs-12 input-group" }, @@ -137,7 +137,7 @@ data: ["devCustomProps"], docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/CUSTOM_PROPERTIES.md", iconClass: "fa fa-list", - inputGroupClasses: "field-group cutprop-group col-lg-12 col-sm-12 col-xs-12", + inputGroupClasses: "field-group cutprop-group col-lg-6 col-sm-12 col-xs-12", labelClasses: "col-sm-12 col-xs-12 control-label", inputClasses: "col-sm-12 col-xs-12 input-group" } @@ -212,15 +212,6 @@ `; } - - // handle generate IP for new device - if (setting.setKey == "NEWDEV_devIcon") { - inlineControl += ` - - `; - } // handle devChildrenDynamic or NEWDEV_devChildrenNicsDynamic - selected values and options are the same if ( diff --git a/front/js/settings_utils.js b/front/js/settings_utils.js index 118ed2ba..715af297 100755 --- a/front/js/settings_utils.js +++ b/front/js/settings_utils.js @@ -1198,6 +1198,9 @@ if (eventsList.length > 0) { let eventIcon = "fa-play"; switch (event) { + case "select_icon": + eventIcon = "fa-chevron-down"; + break; case "add_icon": case "add_option": eventIcon = "fa-square-plus"; diff --git a/front/js/ui_components.js b/front/js/ui_components.js index cd7da334..b201606d 100755 --- a/front/js/ui_components.js +++ b/front/js/ui_components.js @@ -323,8 +323,12 @@ function execute_settingEvent(element) { () => addIconAsBase64(element), // Wrap in an arrow function feSourceId // triggered by id ); - } else if (["copy_icons"].includes(feEvent)) { + } else if (["select_icon"].includes(feEvent)) { + showIconSelection(feSetKey) + // myparam-setkey + + } else if (["copy_icons"].includes(feEvent)) { // Ask overwrite icon types showModalWarning ( @@ -449,10 +453,11 @@ function addIconAsBase64 (el) { } +// ----------------------------------------------- +// modal pop up for icon selection +function showIconSelection(setKey) { - -function showIconSelection() { - const selectElement = document.getElementById('NEWDEV_devIcon'); + const selectElement = document.getElementById(setKey); const modalId = 'dynamicIconModal'; // Create modal HTML dynamically @@ -560,7 +565,10 @@ function getColumnNameFromLangString(headStringKey) { "Device_TableHead_SourcePlugin": "devSourcePlugin", "Device_TableHead_PresentLastScan": "devPresentLastScan", "Device_TableHead_AlertDown": "devAlertDown", - "Device_TableHead_CustomProps": "devCustomProps" + "Device_TableHead_CustomProps": "devCustomProps", + "Device_TableHead_FQDN": "devFQDN", + "Device_TableHead_ParentRelType": "devParentRelType", + "Device_TableHead_ReqNicsOnline": "devReqNicsOnline" }; return columnNameMap[headStringKey] || ""; diff --git a/front/network.php b/front/network.php index be171430..78536068 100755 --- a/front/network.php +++ b/front/network.php @@ -167,7 +167,7 @@ const paneHtml = `
- +
${getString('Network_Node')}
@@ -201,12 +201,13 @@ ${isRootNode ? '' : ``}
- +
-
${getString('Network_Connected')} -
+ +
@@ -326,7 +327,7 @@
-

${getString('Network_UnassignedDevices')}

+
${getString('Network_UnassignedDevices')}
diff --git a/front/php/templates/language/ar_ar.json b/front/php/templates/language/ar_ar.json index 0fcf202e..c01f65d4 100755 --- a/front/php/templates/language/ar_ar.json +++ b/front/php/templates/language/ar_ar.json @@ -726,6 +726,7 @@ "report_select_format": "اختر تنسيق التقرير", "report_time": "وقت التقرير", "run_event_tooltip": "تلميح تشغيل الحدث", + "select_icon_event_tooltip": "", "settings_core_icon": "أيقونة الإعدادات الأساسية", "settings_core_label": "تسمية الإعدادات الأساسية", "settings_device_scanners": "ماسحات الأجهزة", diff --git a/front/php/templates/language/ca_ca.json b/front/php/templates/language/ca_ca.json index 27a4ebf0..0149c13c 100755 --- a/front/php/templates/language/ca_ca.json +++ b/front/php/templates/language/ca_ca.json @@ -726,6 +726,7 @@ "report_select_format": "Seleccioneu Format:", "report_time": "Data de recepció:", "run_event_tooltip": "Habiliteu la configuració i deseu els canvis al principi abans d'executar-lo.", + "select_icon_event_tooltip": "", "settings_core_icon": "fa-solid fa-gem", "settings_core_label": "Nucli", "settings_device_scanners": "Escàners de dispositius utilitzats per descobrir dispositius que escriuen a la taula de base de dades CurrentScan.", diff --git a/front/php/templates/language/cs_cz.json b/front/php/templates/language/cs_cz.json index 34a5a9c6..0358d467 100755 --- a/front/php/templates/language/cs_cz.json +++ b/front/php/templates/language/cs_cz.json @@ -726,6 +726,7 @@ "report_select_format": "", "report_time": "", "run_event_tooltip": "", + "select_icon_event_tooltip": "", "settings_core_icon": "", "settings_core_label": "", "settings_device_scanners": "", diff --git a/front/php/templates/language/de_de.json b/front/php/templates/language/de_de.json index 0a7ab0ad..82527434 100755 --- a/front/php/templates/language/de_de.json +++ b/front/php/templates/language/de_de.json @@ -807,6 +807,7 @@ "report_select_format": "Format auswählen:", "report_time": "Benachrichtigungszeit:", "run_event_tooltip": "Aktiviere die Einstellung und speichere deine Änderungen, bevor du sie ausführst.", + "select_icon_event_tooltip": "", "settings_core_icon": "", "settings_core_label": "Kern", "settings_device_scanners": "", diff --git a/front/php/templates/language/en_us.json b/front/php/templates/language/en_us.json index 5c679c9c..5f4830ad 100755 --- a/front/php/templates/language/en_us.json +++ b/front/php/templates/language/en_us.json @@ -726,6 +726,7 @@ "report_select_format": "Select Format:", "report_time": "Notification time:", "run_event_tooltip": "Enable the setting and save your changes at first before you run it.", + "select_icon_event_tooltip": "Select icon", "settings_core_icon": "fa-solid fa-gem", "settings_core_label": "Core", "settings_device_scanners": "Device scanners used to discover devices that write into the CurrentScan database table.", diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json index 48ae02c4..7dd1de4a 100755 --- a/front/php/templates/language/es_es.json +++ b/front/php/templates/language/es_es.json @@ -805,6 +805,7 @@ "report_select_format": "Selecciona el formato:", "report_time": "Hora de la notificación:", "run_event_tooltip": "Activa el ajuste y guarda tus cambios antes de ejecutarlo.", + "select_icon_event_tooltip": "", "settings_core_icon": "fa-solid fa-gem", "settings_core_label": "Núcleo", "settings_device_scanners": "Los escáneres de los dispositivos se utilizan para descubrir dispositivos que escriben en la tabla de base de datos de CurrentScan.", diff --git a/front/php/templates/language/fr_fr.json b/front/php/templates/language/fr_fr.json old mode 100644 new mode 100755 index 77fc2178..e29c84b2 --- a/front/php/templates/language/fr_fr.json +++ b/front/php/templates/language/fr_fr.json @@ -726,6 +726,7 @@ "report_select_format": "Sélectionner un format :", "report_time": "Heure de la notification :", "run_event_tooltip": "Activez le paramètre et enregistrez vos changements avant de le lancer.", + "select_icon_event_tooltip": "", "settings_core_icon": "fa-solid fa-gem", "settings_core_label": "Principal", "settings_device_scanners": "Les scanners d'appareils utilisés pour découvrir des appareils, qui écrivent dans la table CurrentScan (scan actuel) de la base de données.", @@ -753,4 +754,4 @@ "settings_system_label": "Système", "settings_update_item_warning": "Mettre à jour la valeur ci-dessous. Veillez à bien suivre le même format qu'auparavant. Il n'y a pas de pas de contrôle.", "test_event_tooltip": "Enregistrer d'abord vos modifications avant de tester vôtre paramétrage." -} +} \ No newline at end of file diff --git a/front/php/templates/language/it_it.json b/front/php/templates/language/it_it.json index b8336552..683ed006 100755 --- a/front/php/templates/language/it_it.json +++ b/front/php/templates/language/it_it.json @@ -726,6 +726,7 @@ "report_select_format": "Seleziona formato:", "report_time": "Orario notifica:", "run_event_tooltip": "Abilita l'impostazione e salva le modifiche prima di eseguirla.", + "select_icon_event_tooltip": "", "settings_core_icon": "fa-solid fa-gem", "settings_core_label": "Core", "settings_device_scanners": "Scanner dei dispositivi utilizzati per rilevare i dispositivi che scrivono nella tabella del database CurrentScan.", diff --git a/front/php/templates/language/nb_no.json b/front/php/templates/language/nb_no.json index cc561acb..4956dd51 100755 --- a/front/php/templates/language/nb_no.json +++ b/front/php/templates/language/nb_no.json @@ -726,6 +726,7 @@ "report_select_format": "Velg format:", "report_time": "Notifikasjonstid:", "run_event_tooltip": "Aktiver innstillingen og lagre endringene først før du kjører den.", + "select_icon_event_tooltip": "", "settings_core_icon": "fa-solid fa-gem", "settings_core_label": "Core", "settings_device_scanners": "Enhets-skannere som brukes til å oppdage enheter som skrives inn i CurrentScan databasetabellen.", diff --git a/front/php/templates/language/pl_pl.json b/front/php/templates/language/pl_pl.json index 8a6d931b..609a40da 100755 --- a/front/php/templates/language/pl_pl.json +++ b/front/php/templates/language/pl_pl.json @@ -726,6 +726,7 @@ "report_select_format": "Wybierz format:", "report_time": "Czas powiadomienia:", "run_event_tooltip": "Najpierw włącz to ustawienie i zapisz zmiany, zanim je uruchomisz.", + "select_icon_event_tooltip": "", "settings_core_icon": "fa-solid fa-gem", "settings_core_label": "Główne", "settings_device_scanners": "Skanery urządzeń używane do wykrywania urządzeń, które zapisują dane w tabeli bazy danych CurrentScan.", diff --git a/front/php/templates/language/pt_br.json b/front/php/templates/language/pt_br.json index 92aa3cb4..36a29d58 100755 --- a/front/php/templates/language/pt_br.json +++ b/front/php/templates/language/pt_br.json @@ -726,6 +726,7 @@ "report_select_format": "", "report_time": "", "run_event_tooltip": "", + "select_icon_event_tooltip": "", "settings_core_icon": "", "settings_core_label": "", "settings_device_scanners": "", diff --git a/front/php/templates/language/ru_ru.json b/front/php/templates/language/ru_ru.json index bf48023f..45b83d59 100755 --- a/front/php/templates/language/ru_ru.json +++ b/front/php/templates/language/ru_ru.json @@ -726,6 +726,7 @@ "report_select_format": "Выбрать формат:", "report_time": "Время уведомления:", "run_event_tooltip": "Включите настройку и сначала сохраните изменения, прежде чем запускать ее.", + "select_icon_event_tooltip": "", "settings_core_icon": "fa-solid fa-gem", "settings_core_label": "Основные", "settings_device_scanners": "Сканеры устройств, используемые для обнаружения устройств, записывающих данные в таблицу базы данных CurrentScan.", diff --git a/front/php/templates/language/tr_tr.json b/front/php/templates/language/tr_tr.json index f28323c1..85c84cf1 100755 --- a/front/php/templates/language/tr_tr.json +++ b/front/php/templates/language/tr_tr.json @@ -726,6 +726,7 @@ "report_select_format": "", "report_time": "Bildirim zamanı:", "run_event_tooltip": "", + "select_icon_event_tooltip": "", "settings_core_icon": "", "settings_core_label": "", "settings_device_scanners": "", diff --git a/front/php/templates/language/uk_ua.json b/front/php/templates/language/uk_ua.json old mode 100644 new mode 100755 index c5a0de51..260983be --- a/front/php/templates/language/uk_ua.json +++ b/front/php/templates/language/uk_ua.json @@ -726,6 +726,7 @@ "report_select_format": "Виберіть формат:", "report_time": "Час сповіщення:", "run_event_tooltip": "Увімкніть налаштування та збережіть зміни, перш ніж запускати його.", + "select_icon_event_tooltip": "", "settings_core_icon": "фа-твердий фа-самоцвіт", "settings_core_label": "Ядро", "settings_device_scanners": "Сканери пристроїв, які використовуються для виявлення пристроїв, які записують дані в таблицю бази даних CurrentScan.", @@ -753,4 +754,4 @@ "settings_system_label": "Система", "settings_update_item_warning": "Оновіть значення нижче. Слідкуйте за попереднім форматом. Перевірка не виконана.", "test_event_tooltip": "Перш ніж перевіряти налаштування, збережіть зміни." -} +} \ No newline at end of file diff --git a/front/php/templates/language/zh_cn.json b/front/php/templates/language/zh_cn.json index 997b62a3..fc479a91 100755 --- a/front/php/templates/language/zh_cn.json +++ b/front/php/templates/language/zh_cn.json @@ -726,6 +726,7 @@ "report_select_format": "选择格式:", "report_time": "通知时间:", "run_event_tooltip": "在运行之前,请先启用设置并保存更改。", + "select_icon_event_tooltip": "", "settings_core_icon": "", "settings_core_label": "核", "settings_device_scanners": "设备扫描器用于发现写入当前扫描数据库表的设备。", diff --git a/front/plugins/__template/config.json b/front/plugins/__template/config.json index fbc5188b..8eb8dba0 100755 --- a/front/plugins/__template/config.json +++ b/front/plugins/__template/config.json @@ -453,7 +453,7 @@ "value": "Example Plugin" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/_publisher_apprise/config.json b/front/plugins/_publisher_apprise/config.json index 0025b5c1..fb500de2 100755 --- a/front/plugins/_publisher_apprise/config.json +++ b/front/plugins/_publisher_apprise/config.json @@ -134,7 +134,7 @@ }, { "column": "Watched_Value1", - "css_classes": "col-sm-2", + "css_classes": "col-sm-1", "show": true, "type": "eval", "default_value": "", diff --git a/front/plugins/_publisher_email/config.json b/front/plugins/_publisher_email/config.json index 42aff9d3..69fabbbf 100755 --- a/front/plugins/_publisher_email/config.json +++ b/front/plugins/_publisher_email/config.json @@ -134,7 +134,7 @@ }, { "column": "Watched_Value1", - "css_classes": "col-sm-2", + "css_classes": "col-sm-1", "show": true, "type": "eval", "default_value": "", diff --git a/front/plugins/_publisher_ntfy/config.json b/front/plugins/_publisher_ntfy/config.json index 317300cc..7afb93e6 100755 --- a/front/plugins/_publisher_ntfy/config.json +++ b/front/plugins/_publisher_ntfy/config.json @@ -96,7 +96,7 @@ }, { "column": "Watched_Value1", - "css_classes": "col-sm-3", + "css_classes": "col-sm-1", "show": true, "type": "eval", "default_value": "", diff --git a/front/plugins/_publisher_pushover/config.json b/front/plugins/_publisher_pushover/config.json index 4de0c282..7fbc2b2a 100755 --- a/front/plugins/_publisher_pushover/config.json +++ b/front/plugins/_publisher_pushover/config.json @@ -96,7 +96,7 @@ }, { "column": "Watched_Value1", - "css_classes": "col-sm-3", + "css_classes": "col-sm-1", "show": true, "type": "eval", "default_value": "", diff --git a/front/plugins/_publisher_pushsafer/config.json b/front/plugins/_publisher_pushsafer/config.json index 20bfa864..a7826942 100755 --- a/front/plugins/_publisher_pushsafer/config.json +++ b/front/plugins/_publisher_pushsafer/config.json @@ -96,7 +96,7 @@ }, { "column": "Watched_Value1", - "css_classes": "col-sm-3", + "css_classes": "col-sm-1", "show": true, "type": "eval", "default_value": "", diff --git a/front/plugins/_publisher_telegram/config.json b/front/plugins/_publisher_telegram/config.json index 76ba69ea..9b6cbb65 100755 --- a/front/plugins/_publisher_telegram/config.json +++ b/front/plugins/_publisher_telegram/config.json @@ -130,7 +130,7 @@ }, { "column": "Watched_Value1", - "css_classes": "col-sm-2", + "css_classes": "col-sm-1", "show": true, "type": "eval", "default_value": "", diff --git a/front/plugins/_publisher_webhook/config.json b/front/plugins/_publisher_webhook/config.json index aa7fc8c7..1850ed89 100755 --- a/front/plugins/_publisher_webhook/config.json +++ b/front/plugins/_publisher_webhook/config.json @@ -96,7 +96,7 @@ }, { "column": "Watched_Value1", - "css_classes": "col-sm-3", + "css_classes": "col-sm-1", "show": true, "type": "eval", "default_value": "", @@ -116,7 +116,7 @@ }, { "column": "Watched_Value2", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "textarea_readonly", "default_value": "", @@ -131,7 +131,7 @@ }, { "column": "Watched_Value3", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "textarea_readonly", "default_value": "", diff --git a/front/plugins/arp_scan/config.json b/front/plugins/arp_scan/config.json index 231c152c..11542ee9 100755 --- a/front/plugins/arp_scan/config.json +++ b/front/plugins/arp_scan/config.json @@ -468,7 +468,7 @@ "value": "ARPSCAN" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/asuswrt_import/config.json b/front/plugins/asuswrt_import/config.json index adc267ca..5d3b3f57 100755 --- a/front/plugins/asuswrt_import/config.json +++ b/front/plugins/asuswrt_import/config.json @@ -492,7 +492,7 @@ "value": "ASUSWRT" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/avahi_scan/config.json b/front/plugins/avahi_scan/config.json index 66c02c91..bb227662 100755 --- a/front/plugins/avahi_scan/config.json +++ b/front/plugins/avahi_scan/config.json @@ -284,7 +284,7 @@ { "column": "Watched_Value1", "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/custom_props/config.json b/front/plugins/custom_props/config.json index 68c78319..5d053f00 100755 --- a/front/plugins/custom_props/config.json +++ b/front/plugins/custom_props/config.json @@ -28,6 +28,9 @@ "settings": [ { "function": "icon", + "events": [ + "select_icon" + ], "type": { "dataType": "array", "elements": [ diff --git a/front/plugins/ddns_update/config.json b/front/plugins/ddns_update/config.json index 3f8463af..4872820e 100755 --- a/front/plugins/ddns_update/config.json +++ b/front/plugins/ddns_update/config.json @@ -607,7 +607,7 @@ "value": "DDNS" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/freebox/config.json b/front/plugins/freebox/config.json index ddc3380a..4287f832 100755 --- a/front/plugins/freebox/config.json +++ b/front/plugins/freebox/config.json @@ -437,7 +437,7 @@ "value": "Freebox" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/icmp_scan/config.json b/front/plugins/icmp_scan/config.json index 02895cf2..abbc47fc 100755 --- a/front/plugins/icmp_scan/config.json +++ b/front/plugins/icmp_scan/config.json @@ -365,7 +365,7 @@ "value": "ICMP" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/internet_ip/config.json b/front/plugins/internet_ip/config.json index 8fb53e09..f81640b8 100755 --- a/front/plugins/internet_ip/config.json +++ b/front/plugins/internet_ip/config.json @@ -548,7 +548,7 @@ "value": "INTRNT" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/ipneigh/config.json b/front/plugins/ipneigh/config.json index f0cb34cc..8e9103ca 100755 --- a/front/plugins/ipneigh/config.json +++ b/front/plugins/ipneigh/config.json @@ -335,7 +335,7 @@ "value": "IPNEIGH" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/luci_import/config.json b/front/plugins/luci_import/config.json index ffb22812..f02b7c4c 100755 --- a/front/plugins/luci_import/config.json +++ b/front/plugins/luci_import/config.json @@ -491,7 +491,7 @@ "value": "LUCIRPC" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/nbtscan_scan/config.json b/front/plugins/nbtscan_scan/config.json index 51fd3a13..dfff76c9 100755 --- a/front/plugins/nbtscan_scan/config.json +++ b/front/plugins/nbtscan_scan/config.json @@ -292,7 +292,7 @@ { "column": "Watched_Value1", "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/newdev_template/config.json b/front/plugins/newdev_template/config.json index 6984ad7b..fbb6f547 100755 --- a/front/plugins/newdev_template/config.json +++ b/front/plugins/newdev_template/config.json @@ -562,7 +562,8 @@ "function": "devIcon", "events": [ "copy_icons", - "add_icon" + "add_icon", + "select_icon" ], "type": { "dataType": "string", @@ -587,7 +588,7 @@ "elementHasInputValue": 1, "elementOptions": [ { - "cssClasses": "iconInputVal" + "cssClasses": "iconInputVal myhidden" }, { "onChange": "updateIconPreview(this)" @@ -1624,7 +1625,7 @@ "elementHasInputValue": 1, "elementOptions": [ { - "cssClasses": "iconInputVal" + "cssClasses": "iconInputVal myhidden" }, { "onChange": "updateIconPreview(this)" diff --git a/front/plugins/nmap_dev_scan/config.json b/front/plugins/nmap_dev_scan/config.json index e229ab6b..2eeb6d9b 100755 --- a/front/plugins/nmap_dev_scan/config.json +++ b/front/plugins/nmap_dev_scan/config.json @@ -508,7 +508,7 @@ "value": "NMAPDEV" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/nslookup_scan/config.json b/front/plugins/nslookup_scan/config.json index bb2c2473..06a93d8c 100755 --- a/front/plugins/nslookup_scan/config.json +++ b/front/plugins/nslookup_scan/config.json @@ -284,7 +284,7 @@ { "column": "Watched_Value1", "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/omada_sdn_imp/config.json b/front/plugins/omada_sdn_imp/config.json index 27da38fc..babd584d 100755 --- a/front/plugins/omada_sdn_imp/config.json +++ b/front/plugins/omada_sdn_imp/config.json @@ -620,7 +620,7 @@ "value": "OMDSDN" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/pihole_scan/config.json b/front/plugins/pihole_scan/config.json index 9360b3ab..5b9f4aaf 100755 --- a/front/plugins/pihole_scan/config.json +++ b/front/plugins/pihole_scan/config.json @@ -426,7 +426,7 @@ "value": "PIHOLE" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/snmp_discovery/config.json b/front/plugins/snmp_discovery/config.json index 9349c02b..6efe1f97 100755 --- a/front/plugins/snmp_discovery/config.json +++ b/front/plugins/snmp_discovery/config.json @@ -279,7 +279,7 @@ "value": "SNMPDSC" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/sync/config.json b/front/plugins/sync/config.json index 10bbe6ce..0f97305c 100755 --- a/front/plugins/sync/config.json +++ b/front/plugins/sync/config.json @@ -587,7 +587,7 @@ "value": "sync" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/plugins/ui_settings/config.json b/front/plugins/ui_settings/config.json index 3ee90937..0db907a1 100755 --- a/front/plugins/ui_settings/config.json +++ b/front/plugins/ui_settings/config.json @@ -456,7 +456,8 @@ "Device_TableHead_SyncHubNodeName", "Device_TableHead_NetworkSite", "Device_TableHead_SSID", - "Device_TableHead_SourcePlugin" + "Device_TableHead_SourcePlugin", + "Device_TableHead_ParentRelType" ], "localized": ["name", "description"], "name": [ diff --git a/front/plugins/unifi_import/config.json b/front/plugins/unifi_import/config.json index e9413083..e0d5e911 100755 --- a/front/plugins/unifi_import/config.json +++ b/front/plugins/unifi_import/config.json @@ -355,7 +355,7 @@ } ], "options": [], - "show": true, + "show": false, "type": "label" }, { diff --git a/front/plugins/vendor_update/config.json b/front/plugins/vendor_update/config.json index bd313cf6..d1868d07 100755 --- a/front/plugins/vendor_update/config.json +++ b/front/plugins/vendor_update/config.json @@ -462,7 +462,7 @@ "value": "VNDRPDT" }, "css_classes": "col-sm-2", - "show": true, + "show": false, "type": "label", "default_value": "", "options": [], diff --git a/front/pluginsCore.php b/front/pluginsCore.php index 8945ddbe..1c273f69 100755 --- a/front/pluginsCore.php +++ b/front/pluginsCore.php @@ -523,12 +523,14 @@ function shouldBeShown(entry, pluginObj) plugPrefix = '' dbTable = '' +// -------------------------------------------------------- function purgeAll(callback) { plugPrefix = arguments[0]; // plugin prefix dbTable = arguments[1]; // DB table - // Ask - showModalWarning('' + ' ' + plugPrefix + ' ' + dbTable , '', - '', '', "purgeAllExecute"); + + // Ask for confirmation + showModalWarning(`${getString('Gen_Purge')} ${plugPrefix} ${dbTable}`, `${getString('Gen_AreYouSure')}`, + `${getString('Gen_Cancel')}`, `${getString('Gen_Okay')}`, "purgeAllExecute"); } // -------------------------------------------------------- @@ -544,22 +546,37 @@ function purgeAllExecute() { } // -------------------------------------------------------- -function deleteListed(plugPrefix, dbTable) { +function deleteListed(plugPrefixArg, dbTableArg) { + plugPrefix = plugPrefixArg; + dbTable = dbTableArg; - idArr = $(`#${plugPrefix} table[data-my-dbtable="${dbTable}"] tr[data-my-index]`).map(function(){return $(this).attr("data-my-index");}).get(); + // Collect selected IDs + idArr = $(`#${plugPrefix} table[data-my-dbtable="${dbTable}"] tr[data-my-index]`) + .map(function() { + return $(this).attr("data-my-index"); + }).get(); - console.log(idArr); + if (idArr.length === 0) { + showModalOk('Nothing to delete', 'No items are selected for deletion.'); + return; + } + // Ask for confirmation + showModalWarning(`${getString('Gen_Purge')} ${plugPrefix} ${dbTable}`, `${getString('Gen_AreYouSure')} (${idArr.length})`, + `${getString('Gen_Cancel')}`, `${getString('Gen_Okay')}`, "deleteListedExecute"); +} + +// -------------------------------------------------------- +function deleteListedExecute() { $.ajax({ method: "POST", url: "php/server/dbHelper.php", data: { action: "delete", dbtable: dbTable, columnName: 'Index', id:idArr.toString() }, success: function(data, textStatus) { updateApi("plugins_objects") - showModalOk ('Result', data ); + showModalOk('Result', data); } }) - }