Compare commits

...

27 Commits

Author SHA1 Message Date
jokob-sk
4363e083d5 prevent 401 in ingress #961 2025-01-19 16:05:58 +11:00
jokob-sk
e766b19d8c css, pluginsCore, less verbose debug fixes
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-19 15:05:26 +11:00
jokob-sk
b18ee70b8a Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-01-19 13:41:52 +11:00
jokob-sk
f70bb40ef4 INTERNET ip check curl #937 2025-01-19 13:41:48 +11:00
Hosted Weblate
844a408ff4 Merge branch 'origin/main' into Weblate. 2025-01-19 01:56:31 +00:00
Максим Горпиніч
a21cc0db85 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/uk/
2025-01-19 01:56:30 +00:00
Sylvain Pichon
a5427f795b Translated using Weblate (French)
Currently translated at 99.3% (746 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-01-19 01:56:29 +00:00
jokob-sk
6b390b66de report cleanup + #960 2025-01-19 12:56:00 +11:00
jokob-sk
af1e9b921b Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-18 10:07:13 +11:00
jokob-sk
9503cc6397 HA addon ingress #960 2025-01-18 10:07:03 +11:00
Jokob @NetAlertX
a16c2dfed6 Update README.md
Some checks failed
docker / docker_dev (push) Has been cancelled
2025-01-16 22:53:25 +11:00
Jokob @NetAlertX
b4fc05d1e8 Merge pull request #958 from labmonkey/asuswrt-import
Added AsusWRT device import plugin
2025-01-16 22:47:09 +11:00
labmonkey
adb99e5f1a Revert leftover code 2025-01-16 03:41:26 +01:00
Pawel Derehajlo
fbce3e18c2 Added AsusWRT device import plugin 2025-01-16 03:37:37 +01:00
anton garcias
0fcda5ff0a Translated using Weblate (Catalan)
Some checks are pending
docker / docker_dev (push) Waiting to run
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ca/
2025-01-15 15:13:13 +01:00
jokob-sk
a5c6510654 less verbose AVAHISCAN logs
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-15 12:39:03 +11:00
jokob-sk
6d44ed1bba Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-14 13:28:38 +11:00
jokob-sk
314372a0f2 server time format #954 2025-01-14 13:28:34 +11:00
Sylvain Pichon
5a84cb5cc2 Translated using Weblate (French)
Some checks are pending
docker / docker_dev (push) Waiting to run
Currently translated at 98.0% (736 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2025-01-13 16:58:25 +01:00
jokob-sk
12cc71552c #951, small fixes
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-13 08:16:20 +11:00
jokob-sk
6752b7fc40 gpc.json #952 2025-01-13 07:54:44 +11:00
jokob-sk
f371515258 issue template
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-12 21:21:08 +11:00
jokob-sk
f1d73f6ad4 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2025-01-12 21:18:50 +11:00
jokob-sk
9fee846436 HA addon docs 2025-01-12 21:18:44 +11:00
Massimo Pissarello
b4ebd640e5 Translated using Weblate (Italian)
Some checks are pending
docker / docker_dev (push) Waiting to run
Currently translated at 100.0% (751 of 751 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2025-01-12 08:22:16 +01:00
jokob-sk
e94953b9af Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks are pending
docker / docker_dev (push) Waiting to run
2025-01-12 11:46:35 +11:00
jokob-sk
6718d054dc #951, small fixes 2025-01-12 11:46:32 +11:00
67 changed files with 1046 additions and 616 deletions

View File

@@ -60,10 +60,11 @@ body:
required: false
- type: dropdown
attributes:
label: What branch are you running?
label: What installation are you running?
options:
- Production
- Dev
- Production (netalertx)
- Dev (netalertx-dev)
- Home Assistant (addon)
validations:
required: true
- type: textarea

View File

@@ -14,7 +14,7 @@ ENV PATH="/opt/venv/bin:$PATH"
COPY . ${INSTALL_DIR}/
RUN pip install openwrt-luci-rpc graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git \
RUN pip install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git \
&& bash -c "find ${INSTALL_DIR} -type d -exec chmod 750 {} \;" \
&& bash -c "find ${INSTALL_DIR} -type f -exec chmod 640 {} \;" \
&& bash -c "find ${INSTALL_DIR} -type f \( -name '*.sh' -o -name '*.py' -o -name 'speedtest-cli' \) -exec chmod 750 {} \;"

View File

@@ -43,7 +43,7 @@ RUN phpenmod -v 8.2 sqlite3
RUN apt-get install -y python3-venv
RUN python3 -m venv myenv
RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install openwrt-luci-rpc graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros "
RUN /bin/bash -c "source myenv/bin/activate && update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && pip3 install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros "
# Create a buildtimestamp.txt to later check if a new version was released
RUN date +%s > ${INSTALL_DIR}/front/buildtimestamp.txt

View File

@@ -2,6 +2,7 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/jokobsk/netalertx?label=Pulls&logo=docker&color=0aa8d2&logoColor=fff&style=for-the-badge)](https://hub.docker.com/r/jokobsk/netalertx)
[![GitHub Release](https://img.shields.io/github/v/release/jokob-sk/NetAlertX?color=0aa8d2&logoColor=fff&logo=GitHub&style=for-the-badge)](https://github.com/jokob-sk/NetAlertX/releases)
[![Discord](https://img.shields.io/discord/1274490466481602755?color=0aa8d2&logoColor=fff&logo=Discord&style=for-the-badge)](https://discord.gg/NczTUTWyRr)
[![Home Assistant](https://img.shields.io/badge/Repo-blue?logo=home-assistant&style=for-the-badge&color=0aa8d2&logoColor=fff&label=Add)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons)
# NetAlertX - Network, presence scanner and alert framework
@@ -47,6 +48,7 @@ build your own scanners with the [Plugin system](https://github.com/jokob-sk/Net
Supported browsers: Chrome, Firefox
- [[Installation] Docker](https://github.com/jokob-sk/NetAlertX/blob/main/dockerfiles/README.md)
- [[Installation] Home Assistant](https://github.com/alexbelgium/hassio-addons/tree/master/netalertx)
- [[Installation] Bare metal](https://github.com/jokob-sk/NetAlertX/blob/main/docs/HW_INSTALL.md)
- [[Installation] Unraid App](https://unraid.net/community/apps)
- [[Setup] Usage and Configuration](https://github.com/jokob-sk/NetAlertX/blob/main/docs/README.md)

View File

@@ -38,7 +38,6 @@ services:
- ${DEV_LOCATION}/back/update_vendors.sh:/app/back/update_vendors.sh
- ${DEV_LOCATION}/front/lib:/app/front/lib
- ${DEV_LOCATION}/front/js:/app/front/js
- ${DEV_LOCATION}/front/report_templates:/front/report_templates
- ${DEV_LOCATION}/front/php:/app/front/php
- ${DEV_LOCATION}/front/deviceDetails.php:/app/front/deviceDetails.php
- ${DEV_LOCATION}/front/deviceDetailsEdit.php:/app/front/deviceDetailsEdit.php

View File

@@ -2,7 +2,7 @@
[![Docker Pulls](https://img.shields.io/docker/pulls/jokobsk/netalertx?label=Pulls&logo=docker&color=0aa8d2&logoColor=fff&style=for-the-badge)](https://hub.docker.com/r/jokobsk/netalertx)
[![GitHub Release](https://img.shields.io/github/v/release/jokob-sk/NetAlertX?color=0aa8d2&logoColor=fff&logo=GitHub&style=for-the-badge)](https://github.com/jokob-sk/NetAlertX/releases)
[![Discord](https://img.shields.io/discord/1274490466481602755?color=0aa8d2&logoColor=fff&logo=Discord&style=for-the-badge)](https://discord.gg/NczTUTWyRr)
[![Home Assistant](https://img.shields.io/badge/Repo-blue?logo=home-assistant&style=for-the-badge&color=0aa8d2&logoColor=fff&label=Add)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons)
# NetAlertX - Network scanner & notification framework
@@ -97,4 +97,4 @@ You can read or watch several [community configuration guides](https://github.co
- Bitcoin: `1N8tupjeCK12qRVU2XrV17WvKK7LCawyZM`
- Ethereum: `0x6e2749Cb42F4411bc98501406BdcD82244e3f9C7`
> 📧 Email me at [jokob@duck.com](mailto:jokob@duck.com?subject=NetAlertX) if you want to get in touch or if I should add other sponsorship platforms.
> 📧 Email me at [netalertx@gmail.com](mailto:netalertx@gmail.com?subject=NetAlertX Donations) if you want to get in touch or if I should add other sponsorship platforms.

View File

@@ -2,6 +2,9 @@
NetAlertX comes with MQTT support, allowing you to show all detected devices as devices in Home Assistant. It also supplies a collection of stats, such as number of online devices.
> [!TIP]
> You can install NetAlertX also as a Home Assistant addon [![Home Assistant](https://img.shields.io/badge/Repo-blue?logo=home-assistant&style=for-the-badge&color=0aa8d2&logoColor=fff&label=Add)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2Falexbelgium%2Fhassio-addons) via the [alexbelgium/hassio-addons](https://github.com/alexbelgium/hassio-addons/).
## ⚠ Note
- Please note that discovery takes about ~10s per device.

View File

@@ -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. |

10
front/.well-known/gpc.json Executable file
View File

@@ -0,0 +1,10 @@
{
"gpc": true,
"compliance": [
{
"regulation": "GDPR",
"status": "not applicable"
}
]
}

View File

@@ -949,16 +949,6 @@ height: 50px;
top:0px;
}
.overview-section
{
/* border-top: solid;
border-width: medium;
border-width: medium;
border-width: 1px;
border-radius: 15px;
margin-bottom: 3px; */
}
.settings-group i{
font-size: 16px;
@@ -1310,6 +1300,11 @@ input[readonly] {
min-width: 40px;
}
.iconPreview svg{
min-width: 20px;
max-width: 20px;
}
.dummyDevice
{
@@ -1470,6 +1465,12 @@ input[readonly] {
}
/* #panDetails .dataTables_wrapper .bottom .paging_simple_numbers */
#panDetails #NEWDEV_devIcon
{
display: none;
}
#panDetails #NEWDEV_devCustomProps_label
{
@@ -1622,6 +1623,7 @@ input[readonly] {
/* ----------------------------------------------------------------- */
.plugin-filters
{
margin: 7px;

View File

@@ -737,3 +737,7 @@ input[type="password"]::-webkit-caps-lock-indicator {
color:#000 !important;
}
.thresholdFormControl
{
color:#000;
}

View File

@@ -739,4 +739,9 @@
.callout code {
background-color: #fff !important;
color:#000 !important;
}
.thresholdFormControl
{
color:#000;
}

View File

@@ -79,7 +79,7 @@
data: ["devMac", "devLastIP", "devName", "devOwner", "devType", "devVendor", "devGroup", "devIcon", "devLocation", "devComments"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEVICE_MANAGEMENT.md",
iconClass: "fa fa-pencil",
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
inputGroupClasses: "field-group main-group col-lg-4 col-sm-6 col-xs-12",
labelClasses: "col-sm-4 col-xs-12 control-label",
inputClasses: "col-sm-8 col-xs-12 input-group"
},
@@ -88,7 +88,7 @@
data: ["devStatus", "devLastConnection", "devFirstConnection"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/SESSION_INFO.md",
iconClass: "fa fa-calendar",
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
inputGroupClasses: "field-group session-group col-lg-4 col-sm-6 col-xs-12",
labelClasses: "col-sm-4 col-xs-12 control-label",
inputClasses: "col-sm-8 col-xs-12 input-group"
},
@@ -97,7 +97,7 @@
data: ["devAlertEvents", "devAlertDown", "devSkipRepeated"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md",
iconClass: "fa fa-bell",
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
inputGroupClasses: "field-group alert-group col-lg-4 col-sm-6 col-xs-12",
labelClasses: "col-sm-4 col-xs-12 control-label",
inputClasses: "col-sm-8 col-xs-12 input-group"
},
@@ -106,7 +106,7 @@
data: ["devParentMAC", "devParentPort", "devSSID", "devSite", "devSyncHubNode"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md",
iconClass: "fa fa-network-wired",
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
inputGroupClasses: "field-group network-group col-lg-4 col-sm-6 col-xs-12",
labelClasses: "col-sm-4 col-xs-12 control-label",
inputClasses: "col-sm-8 col-xs-12 input-group"
},
@@ -115,7 +115,7 @@
data: ["devStaticIP", "devIsNew", "devFavorite", "devIsArchived"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEVICE_DISPLAY_SETTINGS.md",
iconClass: "fa fa-list-check",
inputGroupClasses: "field-group col-lg-4 col-sm-6 col-xs-12",
inputGroupClasses: "field-group display-group col-lg-4 col-sm-6 col-xs-12",
labelClasses: "col-sm-4 col-xs-12 control-label",
inputClasses: "col-sm-8 col-xs-12 input-group"
},
@@ -124,7 +124,7 @@
data: ["devCustomProps"],
docs: "https://github.com/jokob-sk/NetAlertX/blob/main/docs/CUSTOM_PROPERTIES.md",
iconClass: "fa fa-list",
inputGroupClasses: "field-group col-lg-12 col-sm-12 col-xs-12",
inputGroupClasses: "field-group cutprop-group col-lg-12 col-sm-12 col-xs-12",
labelClasses: "col-sm-12 col-xs-12 control-label",
inputClasses: "col-sm-12 col-xs-12 input-group"
}

View File

@@ -120,8 +120,8 @@
<!-- page script ----------------------------------------------------------- -->
<script>
var deviceStatus = 'all';
var tableRows = getCookie ("nax_parTableRows") == "" ? 10 : getCookie ("nax_parTableRows") ;
var tableOrder = getCookie ("nax_parTableOrder") == "" ? [[3,'desc'], [0,'asc']] : JSON.parse(getCookie ("nax_parTableOrder")) ;
var tableRows = getCache ("nax_parTableRows") == "" ? 10 : getCache ("nax_parTableRows") ;
var tableOrder = getCache ("nax_parTableOrder") == "" ? [[3,'desc'], [0,'asc']] : JSON.parse(getCache ("nax_parTableOrder")) ;
var tableColumnHide = [];
var tableColumnOrder = [];
@@ -307,6 +307,8 @@ function processDeviceTotals(devicesData) {
//------------------------------------------------------------------------------
// Render the info boxes/tiles on top
function renderInfoboxes(customData) {
if(customData.length > 0)
{
$.ajax({
url: 'php/components/tile_cards.php', // PHP script URL
type: 'POST', // Use POST method to send data
@@ -320,6 +322,7 @@ function renderInfoboxes(customData) {
}
});
}
}
// -----------------------------------------------------------------------------
// Map column index to column name for GraphQL query
@@ -737,11 +740,11 @@ function initializeDatatable (status) {
// Save cookie Rows displayed, and Parameters rows & order
$('#tableDevices').on( 'length.dt', function ( e, settings, len ) {
setCookie ("nax_parTableRows", len, 129600); // save for 90 days
setCache ("nax_parTableRows", len, 129600); // save for 90 days
} );
$('#tableDevices').on( 'order.dt', function () {
setCookie ("nax_parTableOrder", JSON.stringify (table.order()), 129600); // save for 90 days
setCache ("nax_parTableOrder", JSON.stringify (table.order()), 129600); // save for 90 days
} );
// add multi-edit button
@@ -833,7 +836,7 @@ function multiEditDevices()
}
// redirect to the Maintenance section
window.location.href = window.location.origin + '/maintenance.php#tab_multiEdit?macs=' + macs.slice(0, -1);
window.location.href = './maintenance.php#tab_multiEdit?macs=' + macs.slice(0, -1);
}

View File

@@ -463,8 +463,6 @@ function utf8ToBase64(str) {
// General utilities
// -----------------------------------------------------------------------------
// check if JSON object
function isJsonObject(value) {
return typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -751,7 +749,7 @@ function navigateToDeviceWithIp (ip) {
{
mac = obj.devMac;
window.open(window.location.origin +'/deviceDetails.php?mac=' + mac , "_blank");
window.open('./deviceDetails.php?mac=' + mac , "_blank");
}
});

View File

@@ -32,7 +32,7 @@ function renderList(
// remove first item containing the SQL query
options.shift();
const apiUrl = `php/server/dbHelper.php?action=read&rawSql=${encodeURIComponent(sqlQuery)}`;
const apiUrl = `php/server/dbHelper.php?action=read&rawSql=${btoa(encodeURIComponent(sqlQuery))}`;
$.get(apiUrl, function (sqlOptionsData) {

View File

@@ -63,7 +63,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/php/templates/security.php';
}
if (isset ($_REQUEST['rawSql'])) {
$rawSql = $_REQUEST['rawSql'];
$rawSql = urldecode(base64_decode($_REQUEST['rawSql']));
}
if (isset ($_REQUEST['dbtable'])) {

View File

@@ -70,9 +70,6 @@
<!-- Theme style -->
<link rel="stylesheet" href="lib/AdminLTE/dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. We have chosen the skin-blue for this starter
page. However, you can choose any other skin. Make sure you
apply the skin class to the body tag so the changes take effect. -->
@@ -107,6 +104,8 @@
<!-- Servertime to the right of the hostname -->
<script>
// -------------------------------------------------------------
// Updates the backend application state/status in the header
function updateState(){
$.get('/php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) {
@@ -117,19 +116,46 @@
})
}
function show_pia_servertime() {
// -------------------------------------------------------------
// updates the date and time in the header
function update_servertime() {
// Get the current date and time in the specified time zone
let timeZone = "<?php echo $timeZone ?>";
let now = new Date();
// datetime in timeZone in the "en-UK" locale
let time = new Date().toLocaleString("en-UK", { timeZone: "<?php echo $timeZone?>" });
// Convert to the specified time zone
let formatter = new Intl.DateTimeFormat("en-UK", {
timeZone: timeZone,
day: "2-digit",
month: "short",
year: "numeric",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
hour12: false, // Use 24-hour format
});
let parts = formatter.formatToParts(now);
if (document.getElementById) {
document.getElementById("PIA_Servertime_place").innerHTML = '('+time+')';
}
setTimeout("show_pia_servertime()", 1000);
// Extract date components
let day = parts.find(p => p.type === "day").value;
let month = parts.find(p => p.type === "month").value;
let year = parts.find(p => p.type === "year").value;
// Extract time components
let hour = parts.find(p => p.type === "hour").value;
let minute = parts.find(p => p.type === "minute").value;
let second = parts.find(p => p.type === "second").value;
// Construct the date and time in DD-MMM-YYYY HH:MM:SS format
let formattedDateTime = `${day}-${month}-${year} ${hour}:${minute}:${second}`;
if (document.getElementById) {
document.getElementById("PIA_Servertime_place").innerHTML = '(' + formattedDateTime + ')';
}
setTimeout(update_servertime, 1000); // Call recursively every second
}
</script>
</head>
@@ -137,7 +163,7 @@
<!-- ----------------------------------------------------------------------- -->
<!-- Layout Boxed Yellow -->
<body class="hold-transition fixed <?php echo $pia_skin_selected;?> sidebar-mini" onLoad="show_pia_servertime();" >
<body class="hold-transition fixed <?php echo $pia_skin_selected;?> sidebar-mini" onLoad="update_servertime();" >
<!-- Site wrapper -->
<div class="wrapper">
@@ -145,8 +171,6 @@
<!-- Main Header -->
<header class="main-header">
<!-- ----------------------------------------------------------------------- -->
<!-- Logo -->
<a href="devices.php" class="logo">
@@ -185,7 +209,7 @@
</li>
<!-- Clear cache & Reload -->
<li>
<a id="reload-button" href='#' role="button" span onclick='clearCache()'>🔃</a>
<a id="reload-button" href='#' role="button" span onclick='clearCache()' class='fa-solid fa-rotate'></a>
</li>
<!-- Full Screen -->
<li>
@@ -468,7 +492,7 @@ function workInProgress() {
//--------------------------------------------------------------
// Update server time in the header
show_pia_servertime()
update_servertime()
// Update server state in the header
updateState()

54
front/php/templates/language/ca_ca.json Normal file → Executable file
View File

@@ -1,7 +1,7 @@
{
"API_CUSTOM_SQL_description": "Pots especificar una consulta SQL personalitzada que generarà un fitxer JSON i el mostrarà mitjançant <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code> file endpoint</a>.",
"API_CUSTOM_SQL_name": "Punt final personalitzat",
"API_TOKEN_description": "Token API per assegurar les comunicacions, pots generar-ne un o introduir un valor clau. S'enviarà a la capçalera de la petició <code>SYNC</code> plugin, servidor GraphQL i altres endpoints API. Pots fer servir els endpoints API per crear integracions personalitzades tal com es descriu a <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">la documentació API</a>.",
"API_TOKEN_description": "Token API per assegurar les comunicacions, pots generar-ne un o introduir un valor clau. S'enviarà a la capçalera de la petició <code>SYNC</code> plugin, servidor GraphQL i altres endpoints API. Pots fer servir els endpoints API per crear integracions personalitzades tal com es descriu a <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">la documentació API</a>.",
"API_TOKEN_name": "Token API",
"API_display_name": "API",
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
@@ -60,15 +60,15 @@
"BackDevices_darkmode_enabled": "Mode fosc Activat",
"CLEAR_NEW_FLAG_description": "Si està habilitat (<code>0</code> està desactivat), els dispositius marcats com <b>Nou dispositiu</b> es desmarcaran si el temps límit (especificat en hores) supera <b>Primera sessió</b>.",
"CLEAR_NEW_FLAG_name": "Netejar indicador de nou",
"CustProps_cant_remove": "No es pot eliminar, almenys es necessita una propietat.",
"CustProps_cant_remove": "No es pot eliminar, es necessita una propietat mínim.",
"DAYS_TO_KEEP_EVENTS_description": "Això és una configuració de manteniment. Especifica el nombre de dies que es conservaran els esdeveniments. Els esdeveniments antics s'esborraran periòdicament. També aplica als esdeveniments dels Connectors (Plugins).",
"DAYS_TO_KEEP_EVENTS_name": "Esborrar esdeveniments més vells de",
"DAYS_TO_KEEP_EVENTS_name": "Esborrar esdeveniments anteriors",
"DISCOVER_PLUGINS_description": "Desactiva aquesta opció per accelerar la inicialització i l'estalvi de configuració. Quan està desactivat, els connectors no es descobreixen, i no podeu afegir nous connectors a la configuració <code>LOADED_PLUGINS</code>.",
"DISCOVER_PLUGINS_name": "Descobreix els plugins",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copiar detalls des del dispositiu",
"DevDetail_Copy_Device_Tooltip": "Copiar detalls del dispositius des de la llista desplegable. Tot el d'aquesta pàgina es sobre-escriurà",
"DevDetail_CustomProperties_Title": "Propietats personalitzades",
"DevDetail_CustomProps_reset_info": "Això eliminarà les seves propietats personalitzades en aquest dispositiu i restablir-les al valor predeterminat.",
"DevDetail_CustomProps_reset_info": "Això eliminarà les seves propietats personalitzades en aquest dispositiu i restablirà el valor predeterminat.",
"DevDetail_DisplayFields_Title": "Pantalla",
"DevDetail_EveandAl_AlertAllEvents": "Alertes",
"DevDetail_EveandAl_AlertDown": "Cancel·lar alerta",
@@ -77,7 +77,7 @@
"DevDetail_EveandAl_NewDevice_Tooltip": "Es mostrarà el nou estat del dispositiu i s'inclourà a les llistes quan el filtre New Devices estigui actiu. No afecta les notificacions.",
"DevDetail_EveandAl_RandomMAC": "MAC aleatori",
"DevDetail_EveandAl_ScanCycle": "Dispositiu d'escaneig",
"DevDetail_EveandAl_ScanCycle_a": "Dispositiu d'escaneig",
"DevDetail_EveandAl_ScanCycle_a": "Escanejar Dispositiu",
"DevDetail_EveandAl_ScanCycle_z": "No Escanejar Dispositiu",
"DevDetail_EveandAl_Skip": "Omet notificacions repetides per",
"DevDetail_EveandAl_Title": "Configuració de Successos i Alertes",
@@ -183,9 +183,9 @@
"DevDetail_button_AddIcon_Help": "Enganxeu en una etiqueta html SVG o en una icona etiqueta html Font Awesome. Llegir el <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/ICONS.md\" target=\"_blank\">Icons docs</a> per a més detalls.",
"DevDetail_button_AddIcon_Tooltip": "Afegir una nova Icona a aquest dispositiu que encara no està disponible al desplegable.",
"DevDetail_button_Delete": "Eliminar dispositiu",
"DevDetail_button_DeleteEvents": "Eliminar Esdeveniments",
"DevDetail_button_DeleteEvents_Warning": "Estàs segur que vols eliminar tots els esdeveniments d'aquest dispositiu?<br><br>(això esborrarà la <b>Historial d'esdeveniments</b> i la <b>Sessions</b> i pot ajudar amb les notificacions constants (persistents)",
"DevDetail_button_Delete_ask": "T'és segur vols eliminar aquest dispositiu? També el pots arxivar en comptes d'això.",
"DevDetail_button_DeleteEvents": "Esborrar Esdeveniments",
"DevDetail_button_DeleteEvents_Warning": "Estàs segur que vols eliminar tots els esdeveniments d'aquest dispositiu?<br><br>(això esborrarà <b>l'Historial d'esdeveniments</b> i les <b>Sessions</b> i pot ajudar amb les notificacions persistents",
"DevDetail_button_Delete_ask": "Segur que vols eliminar aquest dispositiu?. En comptes d'això el pots arxivar.",
"DevDetail_button_OverwriteIcons": "Sobreescriure icones",
"DevDetail_button_OverwriteIcons_Tooltip": "Sobreescriure icones de tots els dispositius amb el mateix tipus de dispositiu",
"DevDetail_button_OverwriteIcons_Warning": "Estàs segur que vols sobreescriure totes les icones de tots els dispositius amb el mateix tipus de dispositiu que el tipus de dispositiu actual?",
@@ -206,7 +206,7 @@
"Device_Shortcut_DownOnly": "Aturat",
"Device_Shortcut_Favorites": "Favorits",
"Device_Shortcut_NewDevices": "Nous dispositius",
"Device_Shortcut_OnlineChart": "Presència de dispositius",
"Device_Shortcut_OnlineChart": "Dispositius detectats",
"Device_TableHead_AlertDown": "Cancel·lar alerta",
"Device_TableHead_Connected_Devices": "Connexions",
"Device_TableHead_CustomProps": "Props / Accions",
@@ -308,7 +308,7 @@
"Gen_Offline": "Fora de línia",
"Gen_Okay": "Ok",
"Gen_Online": "En línia",
"Gen_Purge": "Elimina",
"Gen_Purge": "Neteja",
"Gen_ReadDocs": "Llegit més dins el docs.",
"Gen_Remove_All": "Esborra tot",
"Gen_Remove_Last": "Esborra el darrer",
@@ -373,9 +373,9 @@
"HelpFAQ_Cat_Presence_401_head": "Un dispositiu és mostrat tan present tot i que és Fora de línia \"\".",
"HelpFAQ_Cat_Presence_401_text": "Si això passa, tens la possibilitat d'esborrar els esdeveniments del dispositiu en qüestió (veure detalls). Una altra possibilitat seria canviar el dispositiu i esperar fins a NetAlert X reconeix el dispositiu com a \"en línia\" amb la següent exploració i, a continuació, simplement torneu a desactivar el dispositiu. NetAlert X ha de tenir en compte l'estat del dispositiu a la base de dades amb la següent exploració.",
"HelpFAQ_Title": "Ajuda / FAQ",
"LOADED_PLUGINS_description": "Quins Connectors(Plugins) carregar. Afegir connectors podria alentir l'aplicació. Llegir més sobre quins connectors necessiten estar habilitats, tipus, o opcions d'escanejar dins del <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme\">documents de connectors</a>. Els connectors descarregats perdran els vostres paràmetres. Només <code>desactivats</code> es poden eliminar els connectors.",
"LOADED_PLUGINS_description": "Quins Plugins carregar. Afegir plugins podria alentir l'aplicació. Llegir més sobre quins connectors necessiten estar habilitats, els tipus, o les opcions d'escaneig dins del <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins#readme\">documents de connectors</a>. Els connectors descarregats perdran els vostres paràmetres. Només <code>desactivats</code> es poden eliminar els connectors.",
"LOADED_PLUGINS_name": "Connectors carregats",
"LOG_LEVEL_description": "Aquest paràmetre permetrà un registre més verbal. Útil per a la depuració d'esdeveniments escrivint a la base de dades.",
"LOG_LEVEL_description": "Aquest paràmetre permetrà un registre més detallat. Útil per a la depuració d'esdeveniments d'escriptura a la base de dades.",
"LOG_LEVEL_name": "Imprimeix el registre addicional",
"Loading": "Carregant ...",
"Login_Box": "Introduïu la vostra contrasenya",
@@ -384,7 +384,7 @@
"Login_Psw-box": "Contrasenya",
"Login_Psw_alert": "Alerta de contrasenya!",
"Login_Psw_folder": "a la carpeta config.",
"Login_Psw_new": "new_password",
"Login_Psw_new": "contrasenya_nova",
"Login_Psw_run": "Per canviar la contrasenya executar:",
"Login_Remember": "Recorda",
"Login_Remember_small": "(vàlid per 7 dies)",
@@ -409,7 +409,7 @@
"Maintenance_Tool_ImportCSV_noti_text": "Estàs segur que vols importar el fitxer CSV? Això <b> sobreescriurà</b> completament els dispositius de la seva base de dades.",
"Maintenance_Tool_ImportCSV_text": "Abans d'utilitzar aquesta funció, fes una còpia de seguretat, si us plau. Importa un CSV (comma separated value) el fitxer que conté la llista dels dispositius que inclouen les relacions de Xarxa entre Nodes i dispositius connectats. Per fer-ho col·loca el CSV el fitxer anomenat <b>devices.csv</b> a la vostra <b>/config</b> carpeta.",
"Maintenance_Tool_ImportConfig_noti": "Importació de la configuració (app.conf)",
"Maintenance_Tool_ImportPastedCSV": "Importació de dispositius CSV (Paste)",
"Maintenance_Tool_ImportPastedCSV": "CSV Importació de dispositius (Paste)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Estàs segur que vols importar el CSV copiat? Això <b> sobreescriurà</b> completament els dispositius de la base de dades.",
"Maintenance_Tool_ImportPastedCSV_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. Importar un fitxer CSV (comma separated value) que contingui la llista de dispositius, incloent les relacions de xarxa entre els nodes i els dispositius connectats.",
"Maintenance_Tool_ImportPastedConfig": "Importació de la configuració (paste)",
@@ -434,25 +434,25 @@
"Maintenance_Tool_del_ActHistory_text": "El gràfic dactivitat de la xarxa es reinicialitzarà. No afecta als esdeveniments.",
"Maintenance_Tool_del_alldev": "Eliminar tots els dispositius",
"Maintenance_Tool_del_alldev_noti": "Eliminar dispositius",
"Maintenance_Tool_del_alldev_noti_text": "Estàs segur que vols eliminar tots els dispositius?",
"Maintenance_Tool_del_alldev_noti_text": "Segur que vols eliminar tots els dispositius?",
"Maintenance_Tool_del_alldev_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els dispositius s'eliminaran de la base de dades.",
"Maintenance_Tool_del_allevents": "Suprimeix esdeveniments (Elimina presència)",
"Maintenance_Tool_del_allevents30": "Suprimeix tots els esdeveniments més vells que 30 dies",
"Maintenance_Tool_del_allevents": "Elimina deteccions (presència)",
"Maintenance_Tool_del_allevents30": "Suprimeix tots els esdeveniments anteriors a 30 dies",
"Maintenance_Tool_del_allevents30_noti": "Eliminar Esdeveniments",
"Maintenance_Tool_del_allevents30_noti_text": "T'és segur vols eliminar tot els successos més vells que 30 dies? Això elimina la Presencia de tots els Dispositius.",
"Maintenance_Tool_del_allevents30_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. S'eliminaran tots els esdeveniments mes vells de 30 dies a la base de dades. També es restablirà la presència de tots els dispositius. Això pot portar a sessions no vàlides. Això significa que els dispositius es mostren com a \"present\" encara que estiguin fora de línia. Una anàlisi mentre el dispositiu en qüestió està en línia resol el problema.",
"Maintenance_Tool_del_allevents30_noti_text": "T'és segur vols eliminar tot els successos més vells que 30 dies? Això elimina tots els dispositius presents.",
"Maintenance_Tool_del_allevents30_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. S'eliminaran tots els esdeveniments mes vells de 30 dies a la base de dades. També es restablirà la detecció de presència de tots els dispositius. Això pot portar a sessions no vàlides. Això significa que els dispositius es mostren com a \"presents/detectats\" encara que estiguin fora de línia. Una anàlisi mentre el dispositiu en qüestió està en línia resol el problema.",
"Maintenance_Tool_del_allevents_noti": "Eliminar Esdeveniments",
"Maintenance_Tool_del_allevents_noti_text": "Estàs segur que vols eliminar tots els esdeveniments? Això reinicialització Presència de tots els dispositius.",
"Maintenance_Tool_del_allevents_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els esdeveniments de la base de dades seran esborrats. Es restablirà dada de presència de tots els dispositius. Les sessions seran invalidades. Això significa que els dispositius es poden mostrar com a \"present\" encara que estiguin fora de línia. Una anàlisi mentre el dispositiu en qüestió està en línia resol el problema.",
"Maintenance_Tool_del_allevents_noti_text": "Estàs segur que vols eliminar tots els esdeveniments? Això reinicialitza la detecció de presència de tots els dispositius.",
"Maintenance_Tool_del_allevents_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els esdeveniments de la base de dades s'esborraran. Es restablirà dada de detecció de tots els dispositius. S'invalidaran les sessions. Això significa que els dispositius es poden mostrar com a \"present\" encara que estiguin fora de línia. Una anàlisi mentre el dispositiu en qüestió està en línia resol el problema.",
"Maintenance_Tool_del_empty_macs": "Eliminar dispositius amb MAC buits",
"Maintenance_Tool_del_empty_macs_noti": "Elimina Dispositius",
"Maintenance_Tool_del_empty_macs_noti_text": "Estàs segur que vols eliminar tots els dispositius amb adreces MAC buides?<br>(potser prefereix arxivar-lo)",
"Maintenance_Tool_del_empty_macs_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els dispositius sense MAC s'eliminaran de la base de dades.",
"Maintenance_Tool_del_selecteddev": "Suprimeix els dispositius seleccionats",
"Maintenance_Tool_del_selecteddev_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Els dispositius seleccionats s'eliminaran de la base de dades.",
"Maintenance_Tool_del_unknowndev": "Suprimeix dispositius (desconeguts)",
"Maintenance_Tool_del_unknowndev_noti": "Suprimeix dispositius (desconeguts)",
"Maintenance_Tool_del_unknowndev_noti_text": "Estàs segur que vols eliminar tots els dispositius (no coneguts) i amb nom (no trobat)?",
"Maintenance_Tool_del_unknowndev": "Elimina dispositius desconeguts",
"Maintenance_Tool_del_unknowndev_noti": "Elimina dispositius desconeguts",
"Maintenance_Tool_del_unknowndev_noti_text": "Estàs segur que vols eliminar tots els dispositius (no coneguts) o amb nom (no trobat)?",
"Maintenance_Tool_del_unknowndev_text": "Abans d'utilitzar aquesta funció, feu una còpia de seguretat. La supressió no es pot desfer. Tots els dispositius anomenats (no coneguts) s'eliminaran de la base de dades.",
"Maintenance_Tool_displayed_columns_text": "Canvieu la visibilitat i l'ordre de les columnes a la pàgina <a href=\"devices.php\"><b> <i class=\"fa fa-laptop\"></i> Dispositius</b></a>.",
"Maintenance_Tool_drag_me": "Arrossega'm a reorder columnes.",
@@ -564,7 +564,7 @@
"PIALERT_WEB_PROTECTION_name": "Activa l'accés",
"PLUGINS_KEEP_HIST_description": "Quantes entrades de Plugins s'han de mantenir a la història (per Plugin, no per dispositiu).",
"PLUGINS_KEEP_HIST_name": "Història dels Plugins",
"Plugins_DeleteAll": "Elimina tot (els filtres són ignorats)",
"Plugins_DeleteAll": "Elimina tot (s'ignoraran els filtres)",
"Plugins_Filters_Mac": "Filtre de MAC",
"Plugins_History": "Historial d'Esdeveniments",
"Plugins_Obj_DeleteListed": "Suprimeix els objectes mostrats",
@@ -593,7 +593,7 @@
"Presence_Shortcut_DownAlerts": "Aturar alertes",
"Presence_Shortcut_Favorites": "Favorits",
"Presence_Shortcut_NewDevices": "Nous dispositius",
"Presence_Title": "Presència per dispositiu",
"Presence_Title": "Detecció de dispositius",
"REPORT_DASHBOARD_URL_description": "Aquesta URL s'utilitza com a base per generar enllaços en informes HTML (per exemple: correus electrònics). Introduïu la URL completa començant per <code>http://</code> incloent el número de port (sense barra inicial <code>/</code>).",
"REPORT_DASHBOARD_URL_name": "URL NetAlertX",
"REPORT_ERROR": "Si us plau, introdueix dins de la caixa de text els caràcters que veu a la imatge de sota. Això és requerit per evitar enviaments automàtics",
@@ -700,7 +700,7 @@
"UI_NOT_RANDOM_MAC_description": "Prefixos MAC que no s'han de marcar com a dispositius aleatoris. Introduïu per exemple <code> 52</code> per excloure els dispositius començant per <code> 52:xx:xx:xx:xx:xx</code> de ser marcats com a dispositius amb una adreça MAC aleatòria.",
"UI_NOT_RANDOM_MAC_name": "No marqueu com a aleatori",
"UI_PRESENCE_description": "Seleccioneu quins estats s'han de mostrar al gràfic <b> Presència de dispositius</b> a la pàgina <a href=\"/devices.php\" target=\"_blank\">Dispositius</a>.",
"UI_PRESENCE_name": "Mostra al mapa de presència",
"UI_PRESENCE_name": "Mostra al mapa de detecció",
"UI_REFRESH_description": "Introduïu el nombre de segons després del qual es recarrega la interfície d'usuari. Configura a <code>0</code> per desactivar.",
"UI_REFRESH_name": "Auto-refresc UI",
"VERSION_description": "Versió o valor timestamp per comprovar si l'aplicació va ser actualitzada.",

0
front/php/templates/language/de_de.json Normal file → Executable file
View File

0
front/php/templates/language/es_es.json Normal file → Executable file
View File

24
front/php/templates/language/fr_fr.json Normal file → Executable file
View File

@@ -248,8 +248,8 @@
"Donations_Title": "Dons",
"ENABLE_PLUGINS_description": "Active les fonctionnalités des <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins\">Plugins</a>. Charger des plugins nécessite plus de ressources, il est recommandé de les désactiver sur des systèmes de faible puissance.",
"ENABLE_PLUGINS_name": "Activer les Plugins",
"ENCRYPTION_KEY_description": "",
"ENCRYPTION_KEY_name": "",
"ENCRYPTION_KEY_description": "Clé de chiffrement des données.",
"ENCRYPTION_KEY_name": "Clé de chiffrement",
"Email_display_name": "Messagerie",
"Email_icon": "<i class=\"fa fa-at\"></i>",
"Events_Loading": "Chargement …",
@@ -285,7 +285,7 @@
"Events_Tablelenght": "Afficher _MENU_ entrées",
"Events_Tablelenght_all": "Tous",
"Events_Title": "Évènements",
"GRAPHQL_PORT_description": "Le numéro de port du serveur GraphQL.",
"GRAPHQL_PORT_description": "Le numéro de port du serveur GraphQL. Assurez vous sue le port est unique a l'échelle de toutes les applications sur cet hôte et vos instances NetAlertX.",
"GRAPHQL_PORT_name": "Port GraphQL",
"Gen_Action": "Action",
"Gen_Add": "Ajouter",
@@ -398,21 +398,21 @@
"Maintenance_Running_Version": "Version installée",
"Maintenance_Status": "État",
"Maintenance_Title": "Outils de maintenance",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Export en CSV",
"Maintenance_Tool_ExportCSV_noti": "Export en CSV",
"Maintenance_Tool_DownloadConfig": "Export des paramètres",
"Maintenance_Tool_DownloadConfig_text": "Télécharger une sauvegarde complète de vos paramètres stockés dans le fichier <code>app.conf</code>.",
"Maintenance_Tool_ExportCSV": "Export des appareils (csv)",
"Maintenance_Tool_ExportCSV_noti": "Export des appareils (csv)",
"Maintenance_Tool_ExportCSV_noti_text": "Êtes-vous sûr de vouloir générer un fichier CSV?",
"Maintenance_Tool_ExportCSV_text": "Génère un fichier CSV (valeurs séparées par des virgules), contenant la liste des appareils, dont les liens entre nœuds Réseaux et les appareils connectés. Vous pouvez aussi lancer cet export depuis l'URL <code>votre URL de NetAlertX/php/server/devices.php?action=ExportCSV</code> ou en activant le plugin <a href=\"settings.php#CSVBCKP_header\">CSV Backup</a>.",
"Maintenance_Tool_ImportCSV": "Import CSV",
"Maintenance_Tool_ImportCSV_noti": "Import CSV",
"Maintenance_Tool_ImportCSV": "Import des appareils (csv)",
"Maintenance_Tool_ImportCSV_noti": "Import des appareils (csv)",
"Maintenance_Tool_ImportCSV_noti_text": "Êtes-vous sûr de vouloir importer le fichier CSV? Cela <b>écrasera</b> complètement les appareils de votre base de données.",
"Maintenance_Tool_ImportCSV_text": "Avant d'utiliser cette fonctionnalité, il est recommandé de faire une sauvegarde. La fonctionnalité importe un fichier CSV (valeurs séparées par des virgules) contenant la liste des appareils, dont les liens réseau entre les nœuds du réseau et ces appareils. Pour cela, placer un fichier CSV nommé <b>devices.csv</b> dans votre répertoire <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Import CSV (coller)",
"Maintenance_Tool_ImportConfig_noti": "Import des appareils (app.conf)",
"Maintenance_Tool_ImportPastedCSV": "Import des appareils (csv) (coller)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Êtes-vous sûr de vouloir importer les CSV copié? Cela va complètement <b>remplacer</b> les appareils de votre base de données.",
"Maintenance_Tool_ImportPastedCSV_text": "Avant d'utiliser cette fonctionnalité, il est recommandé de faire une sauvegarde. Importe un fichier CSV (valeurs séparées par des virgules) contenant la liste des appareils, dont les liens réseaux entre les nœuds du réseau et les appareils connectés.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig": "Import des paramètres (coller)",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_arpscansw": "Basculer l'arp-Scan (activé/désactivé)",

View File

@@ -398,23 +398,23 @@
"Maintenance_Running_Version": "Versione installata",
"Maintenance_Status": "Stato",
"Maintenance_Title": "Strumenti di manutenzione",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Esporta CSV",
"Maintenance_Tool_ExportCSV_noti": "Esporta CSV",
"Maintenance_Tool_DownloadConfig": "Impostazioni Esporta",
"Maintenance_Tool_DownloadConfig_text": "Scarica un backup completo della configurazione delle tue Impostazioni memorizzata nel file <code>app.conf</code>.",
"Maintenance_Tool_ExportCSV": "Esporta dispositivi (csv)",
"Maintenance_Tool_ExportCSV_noti": "Esporta dispositivi (csv)",
"Maintenance_Tool_ExportCSV_noti_text": "Sei sicuro di voler generare un file CSV?",
"Maintenance_Tool_ExportCSV_text": "Genera un file CSV (comma separated value) contenente la lista dei dispositivi incluse le relazioni di rete tra i nodi di rete e i dispositivi connessi. Puoi anche eseguire questa azione accedendo all'URL <code>il_tuo_NetAlertX/php/server/devices.php?action=ExportCSV</code> o abilitando il plugin <a href=\"settings.php#CSVBCKP_header\">Backup CSV</a>.",
"Maintenance_Tool_ImportCSV": "Importa CSV",
"Maintenance_Tool_ImportCSV_noti": "Importa CSV",
"Maintenance_Tool_ImportCSV": "Importa dispositivi (csv)",
"Maintenance_Tool_ImportCSV_noti": "Importa dispositivi (csv)",
"Maintenance_Tool_ImportCSV_noti_text": "Sei sicuro di voler importare il file CSV? Questa operazione <b>sovrascriverà</b> tutti i dispositivi presenti nel database.",
"Maintenance_Tool_ImportCSV_text": "Prima di utilizzare questa funzione, esegui un backup. Importa un file CSV (comma separated value) contenente la lista dei dispositivi incluse le relazioni di rete tra i nodi di rete e i dispositivi connessi. Per far ciò posiziona il file CSV denominato <b>devices.csv</b> nella cartella <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Importazione CSV (incolla)",
"Maintenance_Tool_ImportConfig_noti": "Importa impostazioni (app.conf)",
"Maintenance_Tool_ImportPastedCSV": "Importa dispositivi (csv) (incolla)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Sei sicuro di voler importare il CSV incollato? Questo <b>sovrascriverà</b> completamente i dispositivi nel tuo database.",
"Maintenance_Tool_ImportPastedCSV_text": "Prima di utilizzare questa funzione, esegui un backup. Importa un file CSV (valori separati da virgole) contenente l'elenco dei dispositivi, comprese le relazioni di rete tra i nodi di rete e i dispositivi collegati.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_ImportPastedConfig": "Importa impostazioni (incolla)",
"Maintenance_Tool_ImportPastedConfig_noti_text": "Vuoi davvero importare le impostazioni di configurazione incollate? Questo <b>sovrascriverà</b> completamente il file <code>app.conf</code>.",
"Maintenance_Tool_ImportPastedConfig_text": "Importa il file <code>app.conf</code> contenente tutte le impostazioni dell'applicazione. Potresti voler scaricare prima il file <code>app.conf</code> corrente con <b>Esporta impostazioni</b>.",
"Maintenance_Tool_arpscansw": "Attiva/disattiva arp-Scan",
"Maintenance_Tool_arpscansw_noti": "Attiva o disattiva arp-Scan",
"Maintenance_Tool_arpscansw_noti_text": "Una volta disattivata la scansione rimane disattivata finché non viene nuovamente attivata.",

0
front/php/templates/language/nb_no.json Normal file → Executable file
View File

0
front/php/templates/language/pl_pl.json Normal file → Executable file
View File

0
front/php/templates/language/pt_br.json Normal file → Executable file
View File

0
front/php/templates/language/ru_ru.json Normal file → Executable file
View File

34
front/php/templates/language/uk_ua.json Normal file → Executable file
View File

@@ -1,7 +1,7 @@
{
"API_CUSTOM_SQL_description": "Ви можете вказати спеціальний SQL-запит, який створить файл JSON, а потім відкриє його через кінцеву точку файлу <a href=\"/api/table_custom_endpoint.json\" target=\"_blank\"><code>table_custom_endpoint.json</code></a>.",
"API_CUSTOM_SQL_name": "Спеціальна кінцева точка",
"API_TOKEN_description": "Маркер API для захисту зв’язку, ви можете створити його або ввести будь-яке значення. Його надсилають у заголовку запиту. Використовується в плагіні <code>SYNC</code>, сервер GraphQL.",
"API_TOKEN_description": "Маркер API для безпечного зв’язку. Згенеруйте один або введіть будь-яке значення. Він надсилається в заголовку запиту та використовується в плагіні <code>SYNC</code>, сервері GraphQL та інших кінцевих точках API. Ви можете використовувати кінцеві точки API для створення спеціальних інтеграцій, як описано в <a href=\"https://github.com/jokob-sk/NetAlertX/blob/main/docs/API.md\" target=\"_blank\">API документація</a>.",
"API_TOKEN_name": "Маркер API",
"API_display_name": "API",
"API_icon": "<i class=\"fa fa-arrow-down-up-across-line\"></i>",
@@ -248,8 +248,8 @@
"Donations_Title": "Пожертви",
"ENABLE_PLUGINS_description": "Вмикає функції <a target=\"_blank\" href=\"https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins\">плагінів</a>. Завантаження плагінів вимагає більше апаратних ресурсів, тому ви можете вимкнути їх у системі з низьким енергоспоживанням.",
"ENABLE_PLUGINS_name": "Увімкнути плагіни",
"ENCRYPTION_KEY_description": "",
"ENCRYPTION_KEY_name": "",
"ENCRYPTION_KEY_description": "Ключ шифрування даних.",
"ENCRYPTION_KEY_name": "Ключ шифрування",
"Email_display_name": "Електронна пошта",
"Email_icon": "<i class=\"fa fa-at\"></i>",
"Events_Loading": "Завантаження...",
@@ -285,7 +285,7 @@
"Events_Tablelenght": "Показати записи _МЕНЮ_",
"Events_Tablelenght_all": "все",
"Events_Title": "Події",
"GRAPHQL_PORT_description": "Номер порту сервера GraphQL.",
"GRAPHQL_PORT_description": "Номер порту сервера GraphQL. Переконайтеся, що порт є унікальним для всіх ваших програм на цьому хості та екземплярах NetAlertX.",
"GRAPHQL_PORT_name": "Порт GraphQL",
"Gen_Action": "Дія",
"Gen_Add": "додати",
@@ -398,23 +398,23 @@
"Maintenance_Running_Version": "Встановлена версія",
"Maintenance_Status": "Статус",
"Maintenance_Title": "Інструменти обслуговування",
"Maintenance_Tool_DownloadConfig": "",
"Maintenance_Tool_DownloadConfig_text": "",
"Maintenance_Tool_ExportCSV": "Експорт CSV",
"Maintenance_Tool_ExportCSV_noti": "Експорт CSV",
"Maintenance_Tool_DownloadConfig": "Експорт налаштувань",
"Maintenance_Tool_DownloadConfig_text": "Завантажте повну резервну копію конфігурації налаштувань, яка зберігається у файлі <code>app.conf</code>.",
"Maintenance_Tool_ExportCSV": "Експорт пристроїв (csv)",
"Maintenance_Tool_ExportCSV_noti": "Експорт пристроїв (csv)",
"Maintenance_Tool_ExportCSV_noti_text": "Ви впевнені, що хочете створити файл CSV?",
"Maintenance_Tool_ExportCSV_text": "Створіть файл CSV (значення, розділене комами), що містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеними пристроями. Ви також можете активувати це, перейшовши за цією URL-адресою <code>ваш NetAlertX url/php/server/devices.php?action=ExportCSV</code> або ввімкнувши <a href=\"settings.php#CSVBCKP_header\">Резервне копіювання CSV</a> плагін.",
"Maintenance_Tool_ImportCSV": "Імпорт CSV",
"Maintenance_Tool_ImportCSV_noti": "Імпорт CSV",
"Maintenance_Tool_ExportCSV_text": "Створіть файл CSV (значення, розділене комами), що містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеними пристроями. Ви також можете активувати це, перейшовши за цією URL-адресою <code>your_NetAlertX_url/php/server/devices.php?action=ExportCSV</code> або ввімкнувши <a href=\"settings.php#CSVBCKP_header\">Резервне копіювання CSV</a > плагін.",
"Maintenance_Tool_ImportCSV": "Імпорт пристроїв (csv)",
"Maintenance_Tool_ImportCSV_noti": "Імпорт пристроїв (csv)",
"Maintenance_Tool_ImportCSV_noti_text": "Ви впевнені, що бажаєте імпортувати файл CSV? Це повністю <b>перезапише</b> пристрої у вашій базі даних.",
"Maintenance_Tool_ImportCSV_text": "Перед використанням цієї функції зробіть резервну копію. Імпортуйте файл CSV (значення, розділене комами), який містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеними пристроями. Для цього помістіть файл CSV під назвою <b>devices.csv</b> у папку <b>/config</b>.",
"Maintenance_Tool_ImportConfig_noti": "",
"Maintenance_Tool_ImportPastedCSV": "Імпорт CSV (вставити)",
"Maintenance_Tool_ImportConfig_noti": "Імпорт налаштувань (app.conf)",
"Maintenance_Tool_ImportPastedCSV": "Імпорт пристроїв (csv) (вставити)",
"Maintenance_Tool_ImportPastedCSV_noti_text": "Ви впевнені, що бажаєте імпортувати вставлений CSV? Це повністю <b>перезапише</b> пристрої у вашій базі даних.",
"Maintenance_Tool_ImportPastedCSV_text": "Перед використанням цієї функції зробіть резервну копію. Імпортуйте файл CSV (значення, розділене комами), що містить список пристроїв, включаючи мережеві зв’язки між мережевими вузлами та підключеним пристроєм.",
"Maintenance_Tool_ImportPastedConfig": "",
"Maintenance_Tool_ImportPastedConfig_noti_text": "",
"Maintenance_Tool_ImportPastedConfig_text": "",
"Maintenance_Tool_ImportPastedConfig": "Імпорт налаштувань (вставити)",
"Maintenance_Tool_ImportPastedConfig_noti_text": "Ви впевнені, що бажаєте імпортувати вставлені налаштування конфігурації? Це повністю <b>перезапише</b> файл <code>app.conf</code>.",
"Maintenance_Tool_ImportPastedConfig_text": "Імпортує файл <code>app.conf</code>, який містить усі налаштування програми. Ви можете спочатку завантажити поточний файл <code>app.conf</code> за допомогою <b>Експорту налаштувань</b>.",
"Maintenance_Tool_arpscansw": "Перемикач arp-сканування (увімк./вимк.)",
"Maintenance_Tool_arpscansw_noti": "Увімкніть або вимкніть arp-Scan",
"Maintenance_Tool_arpscansw_noti_text": "Коли сканування було вимкнено, воно залишається вимкненим, доки не буде активовано знову.",
@@ -495,7 +495,7 @@
"Maintenance_themeselector_lable": "Виберіть Скін",
"Maintenance_themeselector_text": "Зміна відбувається на стороні сервера, тому вона впливає на всі пристрої, які використовуються.",
"Maintenance_version": "Оновлення програми",
"NETWORK_DEVICE_TYPES_description": "Які типи пристроїв можна використовувати як мережеві пристрої в поданні мережі. Тип пристрою має точно відповідати налаштуванню <code>Тип</code> на певному пристрої в Деталях пристрою. Не видаляйте існуючі типи, лише додайте нові.",
"NETWORK_DEVICE_TYPES_description": "Які типи пристроїв дозволено використовувати як мережеві пристрої в поданні мережі. Тип пристрою має точно відповідати налаштуванню <code>Тип</code> на певному пристрої в Деталях пристрою. Додайте його на пристрій за допомогою кнопки <code>+</code>. Не видаляйте існуючі типи, лише додайте нові.",
"NETWORK_DEVICE_TYPES_name": "Типи мережевих пристроїв",
"Navigation_About": "про",
"Navigation_Devices": "Пристрої",

0
front/php/templates/language/zh_cn.json Normal file → Executable file
View File

View File

@@ -40,6 +40,7 @@ Device-detecting plugins insert values into the `CurrentScan` database table. T
| `INTRSPD` | ♻ | Internet speed test | | | Script | [internet_speedtest](/front/plugins/internet_speedtest/) |
| `IPNEIGH` | 🔍 | Scan ARP (IPv4) and NDP (IPv6) tables | | | Script | [ipneigh](/front/plugins/ipneigh/) |
| `LUCIRPC` | 🔍 | Import connected devices from OpenWRT | | | Script | [luci_import](/front/plugins/luci_import/) |
| `ASUSWRT` | 🔍 | Import connected devices from AsusWRT | | | Script | [asuswrt_import](/front/plugins/asuswrt_import/) |
| `MAINT` | ⚙ | Maintenance of logs, etc. | | | Script | [maintenance](/front/plugins/maintenance/) |
| `MQTT` | ▶️ | MQTT for synching to Home Assistant | | | Script | [_publisher_mqtt](/front/plugins/_publisher_mqtt/) |
| `NBTSCAN` | 🆎 | Nbtscan (NetBIOS-based) name resolution | | | Script | [nbtscan_scan](/front/plugins/nbtscan_scan/) |

View File

@@ -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)"
}
]
},

View File

@@ -27,9 +27,7 @@ Logger(get_setting_value('LOG_LEVEL'))
pluginName = "PUSHOVER"
LOG_PATH = logPath + '/plugins'
RESULT_FILE = os.path.join(LOG_PATH, "last_result.log")
RESULT_FILE = os.path.join(LOG_PATH, f'last_result.{pluginName}.log')
def main():

View File

@@ -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"
}
]
},

View File

@@ -0,0 +1,20 @@
## Overview
Plugin that imports device IP, MAC, Name, Vendor and Online status from AsusWRT and AsusWRT-Merlin based routers.
This Plugin is using awesome [asusrouter](https://github.com/Vaskivskyi/asusrouter) library. Please check if your router is supported by it [here](https://github.com/Vaskivskyi/asusrouter?tab=readme-ov-file#supported-devices).
### Usage
- Enable the `ASUSWRT` plugin
- Head to **Settings** > **AsusWRT device import** to adjust the default values.
### Notes
- In case an existing imported device is renamed in Asus Router it will not be renamed in NetAlertX. In this case it has to be done manually or the device should be removed and it will appear on the next scan.
## Other info
Version: 1.0.0
Date: 16.1.2025
Author: @labmonkey

View File

@@ -0,0 +1,528 @@
{
"code_name": "asuswrt_import",
"show_ui": true,
"unique_prefix": "ASUSWRT",
"plugin_type": "device_scanner",
"execution_order": "Layer_1",
"enabled": true,
"data_source": "script",
"mapped_to_table": "CurrentScan",
"data_filters": [
{
"compare_column": "Object_PrimaryID",
"compare_operator": "==",
"compare_field_id": "txtMacFilter",
"compare_js_template": "'{value}'.toString()",
"compare_use_quotes": true
}
],
"localized": [
"display_name",
"description",
"icon"
],
"display_name": [
{
"language_code": "en_us",
"string": "AsusWRT device import"
}
],
"description": [
{
"language_code": "en_us",
"string": "The plugin is used to import connected devices from AsusWRT"
}
],
"icon": [
{
"language_code": "en_us",
"string": "<i class=\"fa fa-search\"></i>"
}
],
"params": [],
"settings": [
{
"function": "RUN",
"events": [
"run"
],
"type": {
"dataType": "string",
"elements": [
{
"elementType": "select",
"elementOptions": [],
"transformers": []
}
]
},
"default_value": "disabled",
"options": [
"disabled",
"once",
"schedule"
],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "When to run"
}
],
"description": [
{
"language_code": "en_us",
"string": "When the plugin should run. Good options are <code>schedule</code>"
}
]
},
{
"function": "RUN_SCHD",
"type": {
"dataType": "string",
"elements": [
{
"elementType": "input",
"elementOptions": [],
"transformers": []
}
]
},
"default_value": "*/5 * * * *",
"options": [],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "Schedule"
}
],
"description": [
{
"language_code": "en_us",
"string": "Only enabled if you select <code>schedule</code> in the <a href=\"#SYNC_RUN\"><code>SYNC_RUN</code> setting</a>. Make sure you enter the schedule in the correct cron-like format (e.g. validate at <a href=\"https://crontab.guru/\" target=\"_blank\">crontab.guru</a>). For example entering <code>0 4 * * *</code> will run the scan after 4 am in the <a onclick=\"toggleAllSettings()\" href=\"#TIMEZONE\"><code>TIMEZONE</code> you set above</a>. Will be run NEXT time the time passes."
}
]
},
{
"function": "CMD",
"type": {
"dataType": "string",
"elements": [
{
"elementType": "input",
"elementOptions": [
{
"readonly": "true"
}
],
"transformers": []
}
]
},
"default_value": "python3 /app/front/plugins/asuswrt_import/script.py",
"options": [],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "Command"
}
],
"description": [
{
"language_code": "en_us",
"string": "Command to run. This can not be changed"
}
]
},
{
"function": "RUN_TIMEOUT",
"type": {
"dataType": "integer",
"elements": [
{
"elementType": "input",
"elementOptions": [
{
"type": "number"
}
],
"transformers": []
}
]
},
"default_value": 30,
"options": [],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "Run timeout"
}
],
"description": [
{
"language_code": "en_us",
"string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted."
}
]
},
{
"function": "host",
"type": {
"dataType": "string",
"elements": [
{
"elementType": "input",
"elementOptions": [],
"transformers": []
}
]
},
"default_value": "192.168.1.1",
"options": [],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "Router ip"
}
],
"description": [
{
"language_code": "en_us",
"string": "Router ip(do not include <code>http://</code> or <code>https://</code>)."
}
]
},
{
"function": "user",
"type": {
"dataType": "string",
"elements": [
{
"elementType": "input",
"elementOptions": [],
"transformers": []
}
]
},
"default_value": "admin",
"options": [],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "Router user"
}
],
"description": [
{
"language_code": "en_us",
"string": "User name used to login into your router."
}
]
},
{
"function": "password",
"type": {
"dataType": "string",
"elements": [
{
"elementType": "input",
"elementOptions": [
{
"type": "password"
}
],
"transformers": []
}
]
},
"default_value": "",
"options": [],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "Router password"
}
],
"description": [
{
"language_code": "en_us",
"string": "Password used to login into your router."
}
]
},
{
"function": "ssl",
"type": {
"dataType": "boolean",
"elements": [
{
"elementType": "input",
"elementOptions": [
{
"type": "checkbox"
}
],
"transformers": []
}
]
},
"default_value": false,
"options": [],
"localized": [
"name",
"description"
],
"name": [
{
"language_code": "en_us",
"string": "Router SSL"
}
],
"description": [
{
"language_code": "en_us",
"string": "If your router enforces SSL connections."
}
]
}
],
"database_column_definitions": [
{
"column": "Index",
"css_classes": "col-sm-2",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": [
"name"
],
"name": [
{
"language_code": "en_us",
"string": "Index"
}
]
},
{
"column": "Object_PrimaryID",
"css_classes": "col-sm-2",
"default_value": "",
"localized": [
"name"
],
"mapped_to_column": "cur_MAC",
"name": [
{
"language_code": "en_us",
"string": "MAC address"
},
{
"language_code": "es_es",
"string": "Dirección MAC"
},
{
"language_code": "de_de",
"string": "MAC Adresse"
}
],
"options": [],
"show": true,
"type": "device_mac"
},
{
"column": "Object_SecondaryID",
"css_classes": "col-sm-2",
"default_value": "",
"localized": [
"name"
],
"mapped_to_column": "cur_IP",
"name": [
{
"language_code": "en_us",
"string": "IP"
},
{
"language_code": "es_es",
"string": "IP"
},
{
"language_code": "de_de",
"string": "IP"
}
],
"options": [],
"show": true,
"type": "device_ip"
},
{
"column": "Watched_Value1",
"css_classes": "col-sm-2",
"default_value": "",
"localized": [
"name"
],
"mapped_to_column": "cur_Name",
"name": [
{
"language_code": "en_us",
"string": "Hostname"
},
{
"language_code": "es_es",
"string": "Nombre de host"
},
{
"language_code": "de_de",
"string": "Name des Hosts"
}
],
"options": [],
"show": true,
"type": "label"
},
{
"column": "Watched_Value2",
"mapped_to_column": "cur_Vendor",
"css_classes": "col-sm-2",
"default_value": "",
"localized": [
"name"
],
"name": [
{
"language_code": "en_us",
"string": "Vendor"
},
{
"language_code": "es_es",
"string": "Proveedor"
},
{
"language_code": "de_de",
"string": "Hersteller"
}
],
"options": [],
"show": true,
"type": "label"
},
{
"column": "Dummy",
"mapped_to_column": "cur_ScanMethod",
"mapped_to_column_data": {
"value": "ASUSWRT"
},
"css_classes": "col-sm-2",
"show": true,
"type": "label",
"default_value": "",
"options": [],
"localized": [
"name"
],
"name": [
{
"language_code": "en_us",
"string": "Scan method"
}
]
},
{
"column": "DateTimeCreated",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
"default_value": "",
"options": [],
"localized": [
"name"
],
"name": [
{
"language_code": "en_us",
"string": "Created"
}
]
},
{
"column": "DateTimeChanged",
"css_classes": "col-sm-2",
"show": true,
"type": "label",
"default_value": "",
"options": [],
"localized": [
"name"
],
"name": [
{
"language_code": "en_us",
"string": "Changed"
}
]
},
{
"column": "Status",
"css_classes": "col-sm-1",
"show": true,
"type": "replace",
"default_value": "",
"options": [
{
"equals": "watched-not-changed",
"replacement": "<div style='text-align:center'><i class='fa-solid fa-square-check'></i><div></div>"
},
{
"equals": "watched-changed",
"replacement": "<div style='text-align:center'><i class='fa-solid fa-triangle-exclamation'></i></div>"
},
{
"equals": "new",
"replacement": "<div style='text-align:center'><i class='fa-solid fa-circle-plus'></i></div>"
},
{
"equals": "missing-in-last-scan",
"replacement": "<div style='text-align:center'><i class='fa-solid fa-question'></i></div>"
}
],
"localized": [
"name"
],
"name": [
{
"language_code": "en_us",
"string": "Status"
}
]
}
]
}

View File

@@ -0,0 +1,108 @@
#!/usr/bin/env python
import os
import sys
INSTALL_PATH = "/app"
sys.path.extend([f"{INSTALL_PATH}/front/plugins", f"{INSTALL_PATH}/server"])
pluginName = "ASUSWRT"
import asyncio
import aiohttp
import conf
from asusrouter import AsusData, AsusRouter
from asusrouter.modules.connection import ConnectionState
from const import logPath
from helper import get_setting_value
from logger import Logger, mylog
from plugin_helper import (Plugin_Object, Plugin_Objects, decodeBase64,
handleEmpty)
from pytz import timezone
conf.tz = timezone(get_setting_value("TIMEZONE"))
Logger(get_setting_value("LOG_LEVEL"))
LOG_PATH = logPath + "/plugins"
LOG_FILE = os.path.join(LOG_PATH, f"script.{pluginName}.log")
RESULT_FILE = os.path.join(LOG_PATH, f"last_result.{pluginName}.log")
plugin_objects = Plugin_Objects(RESULT_FILE)
def main():
mylog("verbose", [f"[{pluginName}] started."])
device_data = get_device_data()
mylog(
"verbose",
[f"[{pluginName}] Found '{len(device_data)}' devices"],
)
filtered_devices = [
(key, device)
for key, device in device_data.items()
if device.state == ConnectionState.CONNECTED
]
mylog(
"verbose",
[f"[{pluginName}] Processing '{len(filtered_devices)}' connected devices"],
)
for mac, device in filtered_devices:
entry_mac = str(device.description.mac).lower()
plugin_objects.add_object(
primaryId=entry_mac,
secondaryId=handleEmpty(device.connection.ip_address),
watched1=handleEmpty(device.description.name),
watched2=handleEmpty(device.description.vendor),
extra=pluginName,
foreignKey=entry_mac,
)
plugin_objects.write_result_file()
mylog("verbose", [f"[{pluginName}] finished"])
return 0
def get_device_data():
# Create a new event loop
loop = asyncio.new_event_loop()
# Create aiohttp session
session = aiohttp.ClientSession(loop=loop)
router = AsusRouter( # required - both IP and URL supported
hostname=get_setting_value("ASUSWRT_host"), # required
username=get_setting_value("ASUSWRT_user"), # required
password=get_setting_value("ASUSWRT_password"), # required
use_ssl=get_setting_value("ASUSWRT_ssl"), # optional
session=session, # optional
)
# Connect to the router
loop.run_until_complete(router.async_connect())
if router.connected:
mylog("verbose", [f"[{pluginName}] logged in successfully."])
else:
mylog("error", [f"[{pluginName}] failed to login."])
return []
# Now you can use the router object to call methods
clients = loop.run_until_complete(router.async_get_data(AsusData.CLIENTS))
# Remember to disconnect and close the session when you're done
loop.run_until_complete(router.async_disconnect())
loop.run_until_complete(session.close())
return clients
if __name__ == "__main__":
main()

View File

@@ -108,12 +108,12 @@ def execute_name_lookup(ip, timeout):
output = ""
try:
mylog('verbose', [f'[{pluginName}] DEBUG CMD :', args])
mylog('debug', [f'[{pluginName}] DEBUG CMD :', args])
# Run the subprocess with a forced timeout
output = subprocess.check_output(args, universal_newlines=True, stderr=subprocess.STDOUT, timeout=timeout)
mylog('verbose', [f'[{pluginName}] DEBUG OUTPUT : {output}'])
mylog('debug', [f'[{pluginName}] DEBUG OUTPUT : {output}'])
domain_name = ''
@@ -129,20 +129,20 @@ def execute_name_lookup(ip, timeout):
else:
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Unexpected output format: {line}'])
mylog('verbose', [f'[{pluginName}] Domain Name: {domain_name}'])
mylog('debug', [f'[{pluginName}] Domain Name: {domain_name}'])
return domain_name
except subprocess.CalledProcessError as e:
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - {e.output}'])
mylog('none', [f'[{pluginName}] ⚠ ERROR - {e.output}'])
except subprocess.TimeoutExpired:
mylog('verbose', [f'[{pluginName}] TIMEOUT - the process forcefully terminated as timeout reached'])
mylog('none', [f'[{pluginName}] TIMEOUT - the process forcefully terminated as timeout reached'])
if output == "":
mylog('verbose', [f'[{pluginName}] Scan: FAIL - check logs'])
mylog('none', [f'[{pluginName}] Scan: FAIL - check logs'])
else:
mylog('verbose', [f'[{pluginName}] Scan: SUCCESS'])
mylog('debug', [f'[{pluginName}] Scan: SUCCESS'])
return ''
@@ -151,13 +151,13 @@ def ensure_avahi_running(attempt=1, max_retries=2):
"""
Ensure that D-Bus is running and the Avahi daemon is started, with recursive retry logic.
"""
mylog('verbose', [f'[{pluginName}] Attempt {attempt} - Ensuring D-Bus and Avahi daemon are running...'])
mylog('debug', [f'[{pluginName}] Attempt {attempt} - Ensuring D-Bus and Avahi daemon are running...'])
# Check rc-status
try:
subprocess.run(['rc-status'], check=True)
except subprocess.CalledProcessError as e:
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Failed to check rc-status: {e.output}'])
mylog('none', [f'[{pluginName}] ⚠ ERROR - Failed to check rc-status: {e.output}'])
return
# Create OpenRC soft level
@@ -167,42 +167,42 @@ def ensure_avahi_running(attempt=1, max_retries=2):
try:
subprocess.run(['rc-update', 'add', 'avahi-daemon'], check=True)
except subprocess.CalledProcessError as e:
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Failed to add Avahi to runlevel: {e.output}'])
mylog('none', [f'[{pluginName}] ⚠ ERROR - Failed to add Avahi to runlevel: {e.output}'])
return
# Start the D-Bus service
try:
subprocess.run(['rc-service', 'dbus', 'start'], check=True)
except subprocess.CalledProcessError as e:
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Failed to start D-Bus: {e.output}'])
mylog('none', [f'[{pluginName}] ⚠ ERROR - Failed to start D-Bus: {e.output}'])
return
# Check Avahi status
status_output = subprocess.run(['rc-service', 'avahi-daemon', 'status'], capture_output=True, text=True)
if 'started' in status_output.stdout:
mylog('verbose', [f'[{pluginName}] Avahi Daemon is already running.'])
mylog('debug', [f'[{pluginName}] Avahi Daemon is already running.'])
return
mylog('verbose', [f'[{pluginName}] Avahi Daemon is not running, attempting to start... (Attempt {attempt})'])
mylog('none', [f'[{pluginName}] Avahi Daemon is not running, attempting to start... (Attempt {attempt})'])
# Start the Avahi daemon
try:
subprocess.run(['rc-service', 'avahi-daemon', 'start'], check=True)
except subprocess.CalledProcessError as e:
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Failed to start Avahi daemon: {e.output}'])
mylog('none', [f'[{pluginName}] ⚠ ERROR - Failed to start Avahi daemon: {e.output}'])
# Check status after starting
status_output = subprocess.run(['rc-service', 'avahi-daemon', 'status'], capture_output=True, text=True)
if 'started' in status_output.stdout:
mylog('verbose', [f'[{pluginName}] Avahi Daemon successfully started.'])
mylog('debug', [f'[{pluginName}] Avahi Daemon successfully started.'])
return
# Retry if not started and attempts are left
if attempt < max_retries:
mylog('verbose', [f'[{pluginName}] Retrying... ({attempt + 1}/{max_retries})'])
mylog('debug', [f'[{pluginName}] Retrying... ({attempt + 1}/{max_retries})'])
ensure_avahi_running(attempt + 1, max_retries)
else:
mylog('verbose', [f'[{pluginName}] ⚠ ERROR - Avahi Daemon failed to start after {max_retries} attempts.'])
mylog('none', [f'[{pluginName}] ⚠ ERROR - Avahi Daemon failed to start after {max_retries} attempts.'])
# rc-update add avahi-daemon
# rc-service avahi-daemon status

View File

@@ -231,7 +231,7 @@
"name": [
{
"language_code": "en_us",
"string": "MAC"
"string": "MAC (name)"
},
{
"language_code": "es_es",

View File

@@ -524,7 +524,7 @@
"name": [
{
"language_code": "en_us",
"string": "MAC"
"string": "MAC (name)"
},
{
"language_code": "es_es",

View File

@@ -2,6 +2,7 @@
# Based on the work of https://github.com/leiweibau/Pi.Alert
import subprocess
import os
from datetime import datetime
import sys
@@ -15,6 +16,8 @@ from logger import mylog, Logger
from helper import timeNowTZ, get_setting_value
import conf
from pytz import timezone
from const import logPath
# Make sure the TIMEZONE for logging is correct
conf.tz = timezone(get_setting_value('TIMEZONE'))
@@ -22,10 +25,16 @@ conf.tz = timezone(get_setting_value('TIMEZONE'))
# Make sure log level is initialized correctly
Logger(get_setting_value('LOG_LEVEL'))
pluginName = 'DHCPSRVS'
LOG_PATH = logPath + '/plugins'
LOG_FILE = os.path.join(LOG_PATH, f'script.{pluginName}.log')
RESULT_FILE = os.path.join(LOG_PATH, f'last_result.{pluginName}.log')
def main():
mylog('verbose', ['[DHCPSRVS] In script'])
RESULT_FILE = 'last_result.log'
last_run_logfile = open(RESULT_FILE, 'a')
last_run_logfile.write("")

View File

@@ -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)"
}
]
},

View File

@@ -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)"
}
]
},

View File

@@ -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",

View File

@@ -38,7 +38,6 @@ LOG_FILE = os.path.join(LOG_PATH, f'script.{pluginName}.log')
RESULT_FILE = os.path.join(LOG_PATH, f'last_result.{pluginName}.log')
no_internet_ip = '0.0.0.0'
def main():
@@ -55,10 +54,13 @@ def main():
PREV_IP = values.prev_ip.split('=')[1]
DIG_GET_IP_ARG = get_setting_value("INTRNT_DIG_GET_IP_ARG")
new_internet_IP = no_internet_ip
mylog('verbose', [f'[{pluginName}] INTRNT_DIG_GET_IP_ARG: ', DIG_GET_IP_ARG])
# METHOD 1: dig
# perform the new IP lookup N times specified by the INTRNT_TRIES setting
new_internet_IP = ""
INTRNT_RETRIES = get_setting_value("INTRNT_RETRIES")
retries_needed = 0
@@ -66,12 +68,22 @@ def main():
new_internet_IP, cmd_output = check_internet_IP( PREV_IP, DIG_GET_IP_ARG)
#todo: use `curl ifconfig.me/ip` if above fails
if new_internet_IP == no_internet_ip:
time.sleep(1*i) # Exponential backoff strategy
else:
retries_needed = i
break
# METHOD 2: curl
if new_internet_IP == no_internet_ip:
new_internet_IP, cmd_output = fallback_check_ip()
mylog('verbose', [f'[{pluginName}] Curl Fallback (new_internet_IP|cmd_output): {new_internet_IP} | {cmd_output}'])
# logging
append_line_to_file (logPath + '/IP_changes.log', '['+str(timeNowTZ()) +']\t'+ new_internet_IP +'\n')
plugin_objects = Plugin_Objects(RESULT_FILE)
plugin_objects.add_object(
@@ -110,9 +122,6 @@ def check_internet_IP ( PREV_IP, DIG_GET_IP_ARG ):
mylog('verbose', [f'[{pluginName}] previous_IP : {previous_IP}'])
# logging
append_line_to_file (logPath + '/IP_changes.log', '['+str(timeNowTZ()) +']\t'+ internet_IP +'\n')
return internet_IP, cmd_output
@@ -139,6 +148,21 @@ def get_internet_IP (DIG_GET_IP_ARG):
return IP, cmd_output
#-------------------------------------------------------------------------------
def fallback_check_ip():
"""Fallback mechanism using `curl ifconfig.me/ip`."""
try:
cmd_output = subprocess.check_output(['curl', '-s', 'ifconfig.me/ip'], text=True).strip()
if cmd_output and re.match(r"^\d{1,3}(\.\d{1,3}){3}$", cmd_output):
mylog('verbose', [f'[{pluginName}] Fallback IP retrieved via curl: {cmd_output}'])
return cmd_output, f'Fallback via curl: "{cmd_output}"'
else:
mylog('verbose', [f'[{pluginName}] Invalid IP received from fallback'])
return no_internet_ip, f'Fallback via curl failed: "{cmd_output}"'
except Exception as e:
mylog('none', [f'[{pluginName}] Fallback curl exception: {e}'])
return no_internet_ip, f'Fallback via curl exception: "{e}"'
#===============================================================================
# BEGIN
#===============================================================================

View File

@@ -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)"
}
]
},

View File

@@ -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",

View File

@@ -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": "",

View File

@@ -239,7 +239,7 @@
"name": [
{
"language_code": "en_us",
"string": "MAC"
"string": "MAC (name)"
},
{
"language_code": "es_es",

View File

@@ -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).

View File

@@ -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"
}
]
},

View File

@@ -75,7 +75,6 @@ def main():
foreignKey = entry.mac
)
# generate last_result.log file
plugin_objects.write_result_file()
#-------------------------------------------------------------------------------

View File

@@ -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"
}
]
},

View File

@@ -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",

View File

@@ -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",

View File

@@ -358,7 +358,7 @@
"name": [
{
"language_code": "en_us",
"string": "MAC"
"string": "MAC (name)"
}
]
},

View File

@@ -135,7 +135,10 @@ function processColumnValue(dbColumnDef, value, index, type) {
<span>`;
break;
case 'device_name_mac':
value = createDeviceLink(value);
value = `<div class="text-center"> ${value}
<br/>
(${createDeviceLink(value)})
</div>`;
break;
case 'device_mac':
value = `<span class="anonymizeMac"><a href="/deviceDetails.php?mac=${value}" target="_blank">${value}</a><span>`;
@@ -150,7 +153,7 @@ function processColumnValue(dbColumnDef, value, index, type) {
$.each(dbColumnDef.options, function(index, obj) {
if(Number(value) < Number(obj.maximum) && valueTmp == '')
{
valueTmp = `<div style="background-color:${obj.hexColor}">${value}</div>`
valueTmp = `<div class="thresholdFormControl" style="background-color:${obj.hexColor}">${value}</div>`
// return;
}
});
@@ -365,10 +368,16 @@ function getObjectData(prefix, colDefinitions, pluginObj) {
}
function getHistoryData(prefix, colDefinitions, pluginObj) {
// Extract history data for the plugin, limiting to the first 50 entries for performance
return pluginHistory
.filter((history, index) => history.Plugin === prefix && index < 50) // Filter history for the specific plugin
.map(history => colDefinitions.map(colDef => history[colDef.column] || '')); // Map to the defined columns
.filter(history => history.Plugin === prefix) // First, filter based on the plugin prefix
.sort((a, b) => b.Index - a.Index) // Then, sort by the Index field in descending order
.slice(0, 50) // Limit the result to the first 50 entries
.map(object =>
colDefinitions.map(colDef =>
getFormControl(colDef, object[colDef.column], object["Index"], colDefinitions, object)
)
);
}
function generateTabNavigation(prefix, objectCount, eventCount, historyCount) {

View File

@@ -1,178 +0,0 @@
<!-- ---------------------------------------------------------------------------
# NetAlertX
# Open Source Network Guard / WIFI & LAN intrusion detector
#
# repot_template.html - Back module. Template to email reporting in HTML format
#-------------------------------------------------------------------------------
# Puche 2021 GNU GPLv3
#--------------------------------------------------------------------------- -->
<html>
<head></head>
<body>
<font face=sans-serif>
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
<tr>
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 30px; font-weight: bold; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<img src="https://netalertx.com/favicon.ico" alt="NetAlertX Logo" style="vertical-align: middle;" width="32" height="32" />
Net<b>Alert</b><sup>x</sup>
</td>
</tr>
<tr>
<td bgcolor=#2656f1 width=100% align=center style="padding: 20px 10px 10px 10px; font-size: 20px; font-weight: bold; color:#ffffff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/NetAlertX/releases">🆕 New version available 🆕</a>
</td>
</tr>
<tr>
<td>
<table width=100% border=0 bgcolor=#00c0ef cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#404040">
<tr>
<td width=100%> Report Date: <b>2023-01-30 22:17</b> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor=#F5F5F5 height=200 valign=top style="padding: 10px">
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
<tr>
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >New devices</th>
</tr>
<tr>
<td>
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
<tr>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Datetime</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >IP</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Event Type</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device name</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Comments</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device Vendor</th>
</tr>
<tr>
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
<td>2023-01-30 22:15:09</td>
<td>192.168.1.1</td>
<td>New Device</td>
<td>(name not found)</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
<td>2023-01-30 22:17:59</td>
<td>192.168.1.82</td>
<td>New Device</td>
<td>(name not found)</td>
<td></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
<tr>
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >Events</th>
</tr>
<tr>
<td>
<ul>
<li>
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
<tr>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Datetime</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >IP</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Event Type</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device name</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Comments</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Device Vendor</th>
</tr>
<tr>
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
<td>2023-01-30 22:15:09</td>
<td>192.168.1.92</td>
<td>Disconnected</td>
<td>(name not found)</td>
<td></td>
</tr>
</table>
</li>
</ul>
</td>
</tr>
</table>
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
<tr>
<th width='120px' style='color:blue; font-size: 12px;' bgcolor='#909090' >Changed or new ports</th>
</tr>
<tr>
<td>
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
<tr>
<th>new</th>
</tr>
<tr>
<td>
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
<tr>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Name</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Port</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >State</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Service</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Extra</th>
</tr>
<tr>
<td>New device</td>
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
<td>3263/tcp</td>
<td>open</td>
<td>ecolor-imager</td>
<td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table style="border-collapse: collapse; font-size: 12px; color:#70707" width="100%" cellspacing="0" cellpadding="3px" bordercolor="#C0C0C0" border="1">
<tr>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Name</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >MAC</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Port</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >State</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Service</th>
<th width='120px' style='color:#F0F0F0' bgcolor='#909090' >Extra</th>
</tr>
<tr>
<td>New device</td>
<td><a href="http://192.168.1.1:20211/deviceDetails.php?mac=00:00:00:ef:a5:6c">00:00:00:ef:a5:6c</a></td>
<td>3264/tcp</td>
<td>open</td>
<td>ccmail</td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<tr>
<td>
<table width=100% bgcolor=#46802e cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
<tr>
<td width=50% style="text-align:center"> NetAlertX - Synology-NAS</td>
</tr>
</table>
</td>
</tr>
</table>
</font>
</body>
</html>

View File

@@ -1,50 +1,46 @@
Report Date: 2021-12-08 12:30
Server: Synology-NAS
New Devices
----------------------
Name: (name not found)
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.121
Time: 2021-12-08 12:30
More Info: Micro-Star INTL CO., LTD.
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.121
Time: 2021-12-08 12:30
More Info: Micro-Star INTL CO., LTD.
Name: (name not found)
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.151
Time: 2021-12-08 12:30
More Info: Espressif Inc.
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.151
Time: 2021-12-08 12:30
More Info: Espressif Inc.
Events
----------------------
Name: Samsung
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.27
Time: 2021-12-08 12:30
Event: Connected
More Info:
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.27
Time: 2021-12-08 12:30
Event: Connected
More Info:
Name: (name not found)
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.6
Time: 2021-12-08 12:30
Event: Disconnected
More Info:
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.6
Time: 2021-12-08 12:30
Event: Disconnected
More Info:
Name: Google-Home-Mini
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.16
Time: 2021-12-08 12:30
Event: Disconnected
More Info:
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.16
Time: 2021-12-08 12:30
Event: Disconnected
More Info:
Name: (name not found)
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.119
Time: 2021-12-08 12:30
Event: Disconnected
More Info:
MAC: 2c:2c:2c:2c:2c:2c
IP: 192.168.1.119
Time: 2021-12-08 12:30
Event: Disconnected
More Info:
Report Date: 2021-12-08 12:30
Server: Synology-NAS

View File

@@ -8,33 +8,18 @@
-->
<html>
<head>
</head>
<head></head>
<body>
<font face=sans-serif>
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
<tr>
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 20px; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<img src="https://netalertx.com/favicon.ico" alt="NetAlertX Logo" style="vertical-align: middle;" width="32" height="32" />
Net<b>Alert</b><sup>x</sup>
<img src="https://netalertx.com/NetAlertX_logo.png" alt="NetAlertX Logo" style="vertical-align: middle;" width="32" height="32" />
Net<b>Alert</b><sup>x</sup>
</td>
</tr>
<tr>
<td>
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=200 valign=top style="padding: 10px">
<NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE>
<DOWN_RECONNECTED_TABLE>
@@ -46,16 +31,14 @@
<tr>
<td>
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
<tr>
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 10px; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
<tr>
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
<a href="https://github.com/jokob-sk/NetAlertX" target="_blank" style="color: white">NetAlertX</a>
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">&copy;</span>2022
<a style="color: white" href="mailto:jokob@duck.com?subject=NetAlertX">jokob-sk</a> | <b>Built on: <BUILD_DATE> </b> | <b> Version: <BUILD_VERSION> </b> |
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs" target="_blank" style="color: white">
<span>Docs <i class="fa fa-circle-question"></i>
</a><span>
<NEW_VERSION>
| Sent: <REPORT_DATE>
| Server: <SERVER_NAME>
| Built: <BUILD_DATE>
| Version: <BUILD_VERSION>
</td>
</tr>
</table>

View File

@@ -1,8 +1,9 @@
Report Date: <REPORT_DATE>
Server: <SERVER_NAME>
<NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE>
<DOWN_RECONNECTED_TABLE>
<EVENTS_TABLE>
<PLUGINS_TABLE>
Report Date: <REPORT_DATE>
Server: <SERVER_NAME>
<NEW_VERSION>

View File

@@ -1,72 +0,0 @@
<!--
#---------------------------------------------------------------------------------#
# NetAlertX #
# Open Source Network Guard / WIFI & LAN intrusion detector #
# #
# report_template.html - Back module. Template to email reporting in HTML format #
#---------------------------------------------------------------------------------#
-->
<html>
<head>
</head>
<body>
<font face=sans-serif>
<table align=center width=100% cellpadding=0 cellspacing=0 style="border-radius: 5px;">
<tr>
<td bgcolor=#3c8dbc align=center style="padding: 20px 10px 10px 10px; font-size: 20px; color:#ffffff; border-top-right-radius: 5px; border-top-left-radius: 5px; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<img src="https://netalertx.com/favicon.ico" alt="NetAlertX Logo" style="vertical-align: middle;" width="32" height="32" />
Net<b>Alert</b><sup>x</sup>
</td>
</tr>
<tr>
<td bgcolor=#2656f1 width=100% align=center style="padding: 10px 10px 10px 10px; font-size: 20px; color:#ffffff; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2)">
<a style="color:#ffffff;cursor:pointer;" href="https://github.com/jokob-sk/NetAlertX/releases">New version available</a>
</td>
</tr>
<tr>
<td>
<table width=100% border=0 bgcolor=#4b99d3 cellpadding=5px cellspacing=0 style="border-collapse: collapse; font-size: 15px; text-align:center; color:#ffffff"> <tr>
<td width=100% bgcolor="#3c8dbc"> Report Date: <b><REPORT_DATE></b> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=200 valign=top style="padding: 10px">
<NEW_DEVICES_TABLE>
<DOWN_DEVICES_TABLE>
<DOWN_RECONNECTED_TABLE>
<EVENTS_TABLE>
<PLUGINS_TABLE>
</td>
</tr>
<tr>
<td>
<table width=100% bgcolor=#3c8dbc cellpadding=5px cellspacing=0 style="font-size: 13px; font-weight: bold; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;">
<tr>
<td width=50% style="text-align:center;color: white;" bgcolor="#3c8dbc">
<a href="https://github.com/jokob-sk/NetAlertX" target="_blank" style="color: white">NetAlertX</a>
<a href=".." target="_blank" style="color: white"> (<SERVER_NAME>)</a>
<br><span style="display:inline-block;color: white; transform: rotate(180deg)">&copy;</span>2022
<a style="color: white" href="mailto:jokob@duck.com?subject=NetAlertX">jokob-sk</a> | <b>Built on: <BUILD_DATE> </b> | <b> Version: <BUILD_VERSION> </b> |
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs" target="_blank" style="color: white">
<span>Docs <i class="fa fa-circle-question"></i>
</a><span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</font>
</body>
</html>

View File

@@ -18,37 +18,36 @@
"title_link": "",
"text": {
"new_devices_meta": {
"title": "🆕New devices",
"columnNames": [
"MAC",
"Datetime",
"IP",
"Event Type",
"Device name",
"Comments"
]
"title": "🆕 New devices",
"columnNames": [
"MAC",
"Datetime",
"IP",
"Event Type",
"Device name",
"Comments"
]
},
"new_devices": [
{
"MAC": "74:ac:74:ac:74:ac",
"Datetime": "2023-01-30 22:15:09",
"IP": "192.168.1.1",
"MAC": "00:1a:76:e3:26:4a",
"Datetime": "2025-01-06 11:05:00+11:00",
"IP": "192.168.1.82",
"Event Type": "New Device",
"Device name": "(name not found)",
"Comments": null,
"Device Vendor": null
"Device name": "(unknown) TEST",
"Comments": ""
}
],
"down_devices_meta": {
"title": "Down devices",
"columnNames": [
"MAC",
"Datetime",
"IP",
"Event Type",
"Device name",
"Comments"
]
"title": "🔴 Down devices",
"columnNames": [
"devName",
"eve_MAC",
"devVendor",
"eve_IP",
"eve_DateTime",
"eve_EventType"
]
},
"down_devices": [],
"events_meta": {
@@ -64,12 +63,12 @@
},
"down_reconnected": [
{
"devName": "Phone - Pixel",
"devName": "Phone - Moto 82",
"eve_MAC": "74:ac:74:ac:74:ac",
"devVendor": "Google",
"devVendor": "Motorola Mobility LLC, a Lenovo Company",
"eve_IP": "192.168.1.167",
"DownTime": "2024-05-26 09:06:56+10:00",
"ConnectedTime": "2024-05-26 09:13:24+10:00"
"eve_DateTime": "2025-01-11 10:05:01+11:00",
"eve_EventType": "Down Reconnected"
}
],
"down_reconnected_meta": {
@@ -79,8 +78,8 @@
"eve_MAC",
"devVendor",
"eve_IP",
"DownTime",
"ConnectedTime"
"eve_DateTime",
"eve_EventType"
]
},
"events": [
@@ -90,8 +89,7 @@
"IP": "192.168.1.92",
"Event Type": "Disconnected",
"Device name": "(name not found)",
"Comments": null,
"Device Vendor": null
"Comments": null
},
{
"MAC": "74:ac:74:ac:74:ac",
@@ -99,45 +97,34 @@
"IP": "192.168.1.150",
"Event Type": "Disconnected",
"Device name": "(name not found)",
"Comments": null,
"Device Vendor": null
"Comments": null
}
],
"plugins_meta": {
"title": "Plugins",
"title": "🔌 Plugins",
"columnNames": [
"Plugin",
"Object_PrimaryID",
"Object_SecondaryID",
"DateTimeChanged",
"Watched_Value1",
"Watched_Value2",
"Watched_Value3",
"Watched_Value4",
"Status",
"Extra",
"UserData",
"ForeignKey",
"SyncHubNodeName"
"Plugin",
"Object_PrimaryID",
"Object_SecondaryID",
"DateTimeChanged",
"Watched_Value1",
"Watched_Value2",
"Watched_Value3",
"Watched_Value4",
"Status"
]
},
"plugins": [
{
"Index": 138,
"Plugin": "INTRSPD",
"Object_PrimaryID": "Speedtest",
"Object_SecondaryID": "2023-10-08 02:01:16+02:00",
"DateTimeCreated": "2023-10-08 02:01:16",
"DateTimeChanged": "2023-10-08 02:32:15",
"Watched_Value1": "-1",
"Watched_Value2": "-1",
"Watched_Value3": "null",
"Watched_Value4": "null",
"Status": "missing-in-last-scan",
"Extra": "null",
"UserData": "null",
"ForeignKey": "null",
"SyncHubNodeName": "null"
"Plugin": "ARPSCAN",
"Object_PrimaryID": "74:ac:74:ac:74:ac",
"Object_SecondaryID": "192.168.1.114",
"DateTimeChanged": "2025-01-11 12:21:00",
"Watched_Value1": "192.168.1.114",
"Watched_Value2": "Microsoft Corporation",
"Watched_Value3": "192.168.1.0/24 --interface=eth1",
"Watched_Value4": "",
"Status": "new"
}
]
}

View File

@@ -30,5 +30,5 @@ source myenv/bin/activate
update-alternatives --install /usr/bin/python python /usr/bin/python3 10
# install packages thru pip3
pip3 install openwrt-luci-rpc graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git
pip3 install openwrt-luci-rpc asusrouter asyncio aiohttp graphene flask netifaces tplink-omada-client wakeonlan pycryptodome requests paho-mqtt scapy cron-converter pytz json2table dhcp-leases pyunifi speedtest-cli chardet python-nmap dnspython librouteros git+https://github.com/foreign-sub/aiofreepybox.git

View File

@@ -151,9 +151,9 @@ class api_endpoint_class:
execution_log.finalize_event("update_api")
self.is_ad_hoc_user_event = False
else:
# Debugging if write is skipped
mylog('trace', [f'[API] api_endpoint_class: Skipping write for {self.fileName}, debounce time not passed.'])
# else:
# # Debugging if write is skipped
# mylog('trace', [f'[API] api_endpoint_class: Skipping write for {self.fileName}, debounce time not passed.'])

View File

@@ -376,7 +376,7 @@ def importConfigs (db, all_plugins):
# ccd(key, default, config_dir, name, inputtype, options, group, events=None, desc="", setJsonMetadata=None, overrideTemplate=None, forceDefault=False)
ccd('VERSION', buildTimestamp , c_d, '_KEEP_', '_KEEP_', '_KEEP_', '_KEEP_', None, "_KEEP_", None, None, True)
write_notification(f'[Upgrade] : App upgraded 🚀 Please clear the cache: <ol> <li>Click OK below</li> <li>Clear the browser cache (shift + browser refresh button)</li> <li> Clear app cache with the 🔄 (reload) button in the header</li><li>Go to Settings and click Save</li> </ol> Check out new features and what has changed in the <a href="https://github.com/jokob-sk/NetAlertX/releases" target="_blank">📓 release notes</a>.', 'interrupt', timeNowTZ())
write_notification(f'[Upgrade] : App upgraded 🚀 Please clear the cache: <ol> <li>Click OK below</li> <li>Clear the browser cache (shift + browser refresh button)</li> <li> Clear app cache with the <i class="fa-solid fa-rotate"></i> (reload) button in the header</li><li>Go to Settings and click Save</li> </ol> Check out new features and what has changed in the <a href="https://github.com/jokob-sk/NetAlertX/releases" target="_blank">📓 release notes</a>.', 'interrupt', timeNowTZ())

View File

@@ -78,7 +78,8 @@ class Notification_obj:
# mylog('debug', ['[Notification] notiStruc:', json.dumps(notiStruc.__dict__, indent=4)])
Text = ""
HTML = ""
HTML = ""
template_file_path = reportTemplatesPath + 'report_template.html'
# Open text Template
@@ -90,17 +91,17 @@ class Notification_obj:
# Open html Template
mylog('verbose', ['[Notification] Open html Template'])
# select template type depoending if running latest version or an older one
if conf.newVersionAvailable :
template_file_path = reportTemplatesPath + 'report_template_new_version.html'
else:
template_file_path = reportTemplatesPath + 'report_template.html'
mylog('verbose', ['[Notification] Using template', template_file_path])
template_file = open(template_file_path, 'r')
mail_html = template_file.read()
template_file.close()
# prepare new version text
newVersionText = ''
if conf.newVersionAvailable :
newVersionText = '🚀A new version is available.'
mail_text = mail_text.replace ('<NEW_VERSION>', newVersionText)
mail_html = mail_html.replace ('<NEW_VERSION>', newVersionText)
# Report "REPORT_DATE" in Header & footer
timeFormated = timeNowTZ().strftime ('%Y-%m-%d %H:%M')

View File

@@ -11,13 +11,15 @@ from collections import namedtuple
# Register NetAlertX modules
import conf
from const import pluginsPath, logPath, applicationPath, reportTemplatesPath
from logger import mylog
from logger import mylog, Logger
from helper import timeNowTZ, updateState, get_file_content, write_file, get_setting, get_setting_value
from api import update_api
from plugin_utils import logEventStatusCounts, get_plugin_string, get_plugin_setting_obj, print_plugin_info, list_to_csv, combine_plugin_objects, resolve_wildcards_arr, handle_empty, custom_plugin_decoder, decode_and_rename_files
from notification import Notification_obj, write_notification
from execution_log import ExecutionLog
# Make sure log level is initialized correctly
Logger(get_setting_value('LOG_LEVEL'))
#-------------------------------------------------------------------------------
class plugin_param:
@@ -316,7 +318,7 @@ def execute_plugin(db, all_plugins, plugin, pluginsState = plugins_state() ):
# keep current instance log file, delete all from other nodes
if filename != 'last_result.log' and os.path.exists(full_path):
os.remove(full_path)
os.remove(full_path) # DEBUG:TODO uncomment 🐛
mylog('verbose', [f'[Plugins] Processed and deleted file: {full_path} '])
@@ -453,7 +455,6 @@ def execute_plugin(db, all_plugins, plugin, pluginsState = plugins_state() ):
sqlParams.append(tuple(base_params))
else:
mylog('none', ['[Plugins] Skipped invalid sql result'])
# check if the subprocess / SQL query failed / there was no valid output
if len(sqlParams) == 0:
@@ -461,7 +462,7 @@ def execute_plugin(db, all_plugins, plugin, pluginsState = plugins_state() ):
return pluginsState
else:
mylog('verbose', ['[Plugins] SUCCESS, received ', len(sqlParams), ' entries'])
mylog('debug', ['[Plugins] sqlParam entries: ', sqlParams])
mylog('debug', ['[Plugins] sqlParam entries: ', sqlParams])
# process results if any
if len(sqlParams) > 0:
@@ -605,7 +606,6 @@ def process_plugin_events(db, plugin, pluginsState, plugEventsArr):
# combine all DB insert and update events into one for history
history_to_insert.append(values)
mylog('debug', ['[Plugins] pluginEvents count: ', len(pluginEvents)])
mylog('debug', ['[Plugins] pluginObjects count: ', len(pluginObjects)])
@@ -614,6 +614,10 @@ def process_plugin_events(db, plugin, pluginsState, plugEventsArr):
mylog('debug', ['[Plugins] history_to_insert count: ', len(history_to_insert)])
mylog('debug', ['[Plugins] objects_to_insert count: ', len(objects_to_insert)])
mylog('debug', ['[Plugins] objects_to_update count: ', len(objects_to_update)])
mylog('trace', ['[Plugins] objects_to_update: ', objects_to_update])
mylog('trace', ['[Plugins] events_to_insert: ', events_to_insert])
mylog('trace', ['[Plugins] history_to_insert: ', history_to_insert])
logEventStatusCounts('pluginEvents', pluginEvents)
logEventStatusCounts('pluginObjects', pluginObjects)
@@ -913,8 +917,6 @@ def handle_test(runType, db, all_plugins, pluginsState):
mylog('minimal', ['[', timeNowTZ(), '] [Test] START Test: ', runType])
# Prepare test samples
sample_txt = get_file_content(reportTemplatesPath + 'report_sample.txt')
sample_html = get_file_content(reportTemplatesPath + 'report_sample.html')
sample_json = json.loads(get_file_content(reportTemplatesPath + 'webhook_json_sample.json'))[0]["body"]["attachments"][0]["text"]
# Create fake notification