From 6718d054dc7031dbf71c1ac6f53c4efd18bc75a3 Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Sun, 12 Jan 2025 11:46:32 +1100 Subject: [PATCH] #951, small fixes --- docs/PLUGINS_DEV.md | 2 +- front/php/templates/language/ca_ca.json | 0 front/php/templates/language/de_de.json | 0 front/php/templates/language/es_es.json | 0 front/php/templates/language/fr_fr.json | 0 front/php/templates/language/nb_no.json | 0 front/php/templates/language/pl_pl.json | 0 front/php/templates/language/ru_ru.json | 0 front/php/templates/language/uk_ua.json | 0 front/php/templates/language/zh_cn.json | 0 front/plugins/__template/config.json | 4 ++-- front/plugins/arp_scan/config.json | 20 ++------------------ front/plugins/avahi_scan/config.json | 2 +- front/plugins/ddns_update/config.json | 2 +- front/plugins/freebox/config.json | 4 ++-- front/plugins/icmp_scan/config.json | 4 ++-- front/plugins/internet_ip/config.json | 4 ++-- front/plugins/ipneigh/config.json | 4 ++-- front/plugins/luci_import/config.json | 4 ++-- front/plugins/mikrotik_scan/config.json | 2 +- front/plugins/nbtscan_scan/config.json | 2 +- front/plugins/nmap_dev_scan/README.md | 3 +++ front/plugins/nmap_dev_scan/config.json | 22 +++------------------- front/plugins/nslookup_scan/config.json | 12 ++---------- front/plugins/omada_sdn_imp/config.json | 4 ++-- front/plugins/sync/config.json | 4 ++-- front/plugins/wake_on_lan/config.json | 2 +- front/pluginsCore.php | 5 ++++- 28 files changed, 36 insertions(+), 70 deletions(-) mode change 100644 => 100755 front/php/templates/language/ca_ca.json mode change 100644 => 100755 front/php/templates/language/de_de.json mode change 100644 => 100755 front/php/templates/language/es_es.json mode change 100644 => 100755 front/php/templates/language/fr_fr.json mode change 100644 => 100755 front/php/templates/language/nb_no.json mode change 100644 => 100755 front/php/templates/language/pl_pl.json mode change 100644 => 100755 front/php/templates/language/ru_ru.json mode change 100644 => 100755 front/php/templates/language/uk_ua.json mode change 100644 => 100755 front/php/templates/language/zh_cn.json diff --git a/docs/PLUGINS_DEV.md b/docs/PLUGINS_DEV.md index 268eb195..d76780dd 100755 --- a/docs/PLUGINS_DEV.md +++ b/docs/PLUGINS_DEV.md @@ -660,7 +660,7 @@ The UI will adjust how columns are displayed in the UI based on the resolvers de | Type Definitions | | | `device_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given MAC address is generated. | | `device_ip` | The value is considered to be an IP address. A link pointing to the device with the given IP is generated. The IP is checked against the last detected IP address and translated into a MAC address, which is then used for the link itself. | -| `device_name_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given IP is generated. The link label is resolved as the target device name. | +| `device_name_mac` | The value is considered to be a MAC address, and a link pointing to the device with the given MAC is generated. The link label is resolved as the target device name. | | `url` | The value is considered to be a URL, so a link is generated. | | `textbox_save` | Generates an editable and saveable text box that saves values in the database. Primarily intended for the `UserData` database column in the `Plugins_Objects` table. | | `url_http_https` | Generates two links with the `https` and `http` prefix as lock icons. | diff --git a/front/php/templates/language/ca_ca.json b/front/php/templates/language/ca_ca.json old mode 100644 new mode 100755 diff --git a/front/php/templates/language/de_de.json b/front/php/templates/language/de_de.json old mode 100644 new mode 100755 diff --git a/front/php/templates/language/es_es.json b/front/php/templates/language/es_es.json old mode 100644 new mode 100755 diff --git a/front/php/templates/language/fr_fr.json b/front/php/templates/language/fr_fr.json old mode 100644 new mode 100755 diff --git a/front/php/templates/language/nb_no.json b/front/php/templates/language/nb_no.json old mode 100644 new mode 100755 diff --git a/front/php/templates/language/pl_pl.json b/front/php/templates/language/pl_pl.json old mode 100644 new mode 100755 diff --git a/front/php/templates/language/ru_ru.json b/front/php/templates/language/ru_ru.json old mode 100644 new mode 100755 diff --git a/front/php/templates/language/uk_ua.json b/front/php/templates/language/uk_ua.json old mode 100644 new mode 100755 diff --git a/front/php/templates/language/zh_cn.json b/front/php/templates/language/zh_cn.json old mode 100644 new mode 100755 diff --git a/front/plugins/__template/config.json b/front/plugins/__template/config.json index 83e2f5ff..cdc61e58 100755 --- a/front/plugins/__template/config.json +++ b/front/plugins/__template/config.json @@ -331,7 +331,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -340,7 +340,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" } ] }, diff --git a/front/plugins/arp_scan/config.json b/front/plugins/arp_scan/config.json index ae6ab9fd..848902ea 100755 --- a/front/plugins/arp_scan/config.json +++ b/front/plugins/arp_scan/config.json @@ -385,7 +385,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -394,15 +394,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" - }, - { - "language_code": "es_es", - "string": "MAC" - }, - { - "language_code": "de_de", - "string": "MAC" + "string": "MAC (name)" } ] }, @@ -419,14 +411,6 @@ { "language_code": "en_us", "string": "IP" - }, - { - "language_code": "es_es", - "string": "IP" - }, - { - "language_code": "de_de", - "string": "IP" } ] }, diff --git a/front/plugins/avahi_scan/config.json b/front/plugins/avahi_scan/config.json index 9dc3c628..e7845f27 100755 --- a/front/plugins/avahi_scan/config.json +++ b/front/plugins/avahi_scan/config.json @@ -231,7 +231,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" }, { "language_code": "es_es", diff --git a/front/plugins/ddns_update/config.json b/front/plugins/ddns_update/config.json index b043fc06..b837d3f3 100755 --- a/front/plugins/ddns_update/config.json +++ b/front/plugins/ddns_update/config.json @@ -524,7 +524,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" }, { "language_code": "es_es", diff --git a/front/plugins/freebox/config.json b/front/plugins/freebox/config.json index fc3ced3c..18fbf0f7 100755 --- a/front/plugins/freebox/config.json +++ b/front/plugins/freebox/config.json @@ -307,7 +307,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -318,7 +318,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" } ] }, diff --git a/front/plugins/icmp_scan/config.json b/front/plugins/icmp_scan/config.json index 8d1697a2..5064c588 100755 --- a/front/plugins/icmp_scan/config.json +++ b/front/plugins/icmp_scan/config.json @@ -233,7 +233,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -244,7 +244,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" } ] }, diff --git a/front/plugins/internet_ip/config.json b/front/plugins/internet_ip/config.json index cf946ff4..ffdf77db 100755 --- a/front/plugins/internet_ip/config.json +++ b/front/plugins/internet_ip/config.json @@ -408,7 +408,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -417,7 +417,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" }, { "language_code": "es_es", diff --git a/front/plugins/ipneigh/config.json b/front/plugins/ipneigh/config.json index 207dc6ca..46798347 100755 --- a/front/plugins/ipneigh/config.json +++ b/front/plugins/ipneigh/config.json @@ -205,7 +205,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -216,7 +216,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" } ] }, diff --git a/front/plugins/luci_import/config.json b/front/plugins/luci_import/config.json index 804cf93b..ec232a56 100755 --- a/front/plugins/luci_import/config.json +++ b/front/plugins/luci_import/config.json @@ -380,7 +380,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -389,7 +389,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" }, { "language_code": "ru_ru", diff --git a/front/plugins/mikrotik_scan/config.json b/front/plugins/mikrotik_scan/config.json index f8a9e12e..4bbb9298 100755 --- a/front/plugins/mikrotik_scan/config.json +++ b/front/plugins/mikrotik_scan/config.json @@ -265,7 +265,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", diff --git a/front/plugins/nbtscan_scan/config.json b/front/plugins/nbtscan_scan/config.json index 50b768a5..c3e5afba 100755 --- a/front/plugins/nbtscan_scan/config.json +++ b/front/plugins/nbtscan_scan/config.json @@ -239,7 +239,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" }, { "language_code": "es_es", diff --git a/front/plugins/nmap_dev_scan/README.md b/front/plugins/nmap_dev_scan/README.md index b83dcbb0..9991997b 100755 --- a/front/plugins/nmap_dev_scan/README.md +++ b/front/plugins/nmap_dev_scan/README.md @@ -5,6 +5,9 @@ NMAP-scan is a command-line tool to discover and fingerprint IP hosts on the loc > [!NOTE] > The `NMAPDEV` plugin is great for detecting the availability of devices, however ARP scan might be better covering multiple VLANS and subnets as NMAP can't pickup the MAC address from other subnets (this is an NMAP limitation) which are necessary to identify a device. You can always combine different scan methods. You can find all available network scanning options (marked as `🔍 dev scanner`) in the [Plugins overview](https://github.com/jokob-sk/NetAlertX/blob/main/front/plugins/README.md) readme. + +This plugin is not the best for name resolution (Use e.g.: `NSLOOKUP`, `AVAHISCAN` instead), however if available a name will be displayed in the `Resolved Name` column. + ### Usage - Go to settings and set the `SCAN_SUBNETS` setting as per [subnets documentation](https://github.com/jokob-sk/NetAlertX/blob/main/docs/SUBNETS.md). diff --git a/front/plugins/nmap_dev_scan/config.json b/front/plugins/nmap_dev_scan/config.json index a3e1731e..e72d2aba 100755 --- a/front/plugins/nmap_dev_scan/config.json +++ b/front/plugins/nmap_dev_scan/config.json @@ -389,7 +389,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -398,15 +398,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" - }, - { - "language_code": "es_es", - "string": "MAC" - }, - { - "language_code": "de_de", - "string": "MAC" + "string": "MAC (name)" } ] }, @@ -423,14 +415,6 @@ { "language_code": "en_us", "string": "IP" - }, - { - "language_code": "es_es", - "string": "IP" - }, - { - "language_code": "de_de", - "string": "IP" } ] }, @@ -446,7 +430,7 @@ "name": [ { "language_code": "en_us", - "string": "Name" + "string": "Resolved Name" } ] }, diff --git a/front/plugins/nslookup_scan/config.json b/front/plugins/nslookup_scan/config.json index 041def1f..fe6921bd 100755 --- a/front/plugins/nslookup_scan/config.json +++ b/front/plugins/nslookup_scan/config.json @@ -230,7 +230,7 @@ }, { "column": "Object_PrimaryID", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -239,11 +239,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" - }, - { - "language_code": "es_es", - "string": "MAC" + "string": "MAC (name)" } ] }, @@ -259,10 +255,6 @@ { "language_code": "en_us", "string": "IP" - }, - { - "language_code": "es_es", - "string": "IP" } ] }, diff --git a/front/plugins/omada_sdn_imp/config.json b/front/plugins/omada_sdn_imp/config.json index 67257ada..2ad02117 100755 --- a/front/plugins/omada_sdn_imp/config.json +++ b/front/plugins/omada_sdn_imp/config.json @@ -465,7 +465,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -474,7 +474,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" }, { "language_code": "es_es", diff --git a/front/plugins/sync/config.json b/front/plugins/sync/config.json index a1d88689..41204b22 100755 --- a/front/plugins/sync/config.json +++ b/front/plugins/sync/config.json @@ -449,7 +449,7 @@ { "column": "Object_PrimaryID", "mapped_to_column": "cur_MAC", - "css_classes": "col-sm-2", + "css_classes": "col-sm-3", "show": true, "type": "device_name_mac", "default_value": "", @@ -458,7 +458,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" }, { "language_code": "es_es", diff --git a/front/plugins/wake_on_lan/config.json b/front/plugins/wake_on_lan/config.json index c316251d..25af875a 100755 --- a/front/plugins/wake_on_lan/config.json +++ b/front/plugins/wake_on_lan/config.json @@ -358,7 +358,7 @@ "name": [ { "language_code": "en_us", - "string": "MAC" + "string": "MAC (name)" } ] }, diff --git a/front/pluginsCore.php b/front/pluginsCore.php index ab9cddbf..bcc1d60a 100755 --- a/front/pluginsCore.php +++ b/front/pluginsCore.php @@ -135,7 +135,10 @@ function processColumnValue(dbColumnDef, value, index, type) { `; break; case 'device_name_mac': - value = createDeviceLink(value); + value = `
${value} +
+ (${createDeviceLink(value)}) +
`; break; case 'device_mac': value = `${value}`;