Compare commits

..

35 Commits

Author SHA1 Message Date
jokob-sk
c6b5f0d18a Better descriptions
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-31 15:19:52 +11:00
jokob-sk
a6322f6cfa Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2024-10-31 15:19:24 +11:00
jokob-sk
c0bfb0d4e4 Better descriptions 2024-10-31 15:19:18 +11:00
github-actions[bot]
9c42cb0013 [🤖Automation] Update README with sponsors information
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-30 11:53:43 +00:00
Massimo Pissarello
e42c3d8b76 Translated using Weblate (Italian)
Some checks are pending
docker / docker_dev (push) Waiting to run
Currently translated at 100.0% (712 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2024-10-30 03:08:06 +01:00
BlueTurtle
f13d3c38aa Translated using Weblate (French)
Currently translated at 100.0% (712 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2024-10-30 03:08:05 +01:00
github-actions[bot]
38b8eaffe1 [🤖Automation] Update README with sponsors information
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-29 11:53:48 +00:00
Anonymous
4be345af45 Translated using Weblate (Chinese (Simplified Han script))
Some checks are pending
docker / docker_dev (push) Waiting to run
Currently translated at 94.3% (672 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/zh_Hans/
2024-10-29 01:00:22 +00:00
Anonymous
36dd3f9f06 Translated using Weblate (Polish)
Currently translated at 95.0% (677 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pl/
2024-10-29 01:00:21 +00:00
Anonymous
a4b2fb0abf Translated using Weblate (Portuguese (Brazil))
Currently translated at 33.9% (242 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/pt_BR/
2024-10-29 01:00:21 +00:00
Anonymous
de35cdafda Translated using Weblate (Italian)
Currently translated at 99.8% (711 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2024-10-29 01:00:20 +00:00
Anonymous
96bce2666f Translated using Weblate (Russian)
Currently translated at 98.4% (701 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/ru/
2024-10-29 01:00:19 +00:00
Anonymous
95d3fc55ab Translated using Weblate (Norwegian Bokmål)
Currently translated at 93.9% (669 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/nb_NO/
2024-10-29 01:00:18 +00:00
Anonymous
868210598f Translated using Weblate (French)
Currently translated at 98.7% (703 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/fr/
2024-10-29 01:00:16 +00:00
Anonymous
fa14e657c9 Translated using Weblate (Spanish)
Currently translated at 99.8% (711 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2024-10-29 01:00:15 +00:00
Anonymous
84c1aad700 Translated using Weblate (German)
Currently translated at 92.4% (658 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/de/
2024-10-29 01:00:14 +00:00
github-actions[bot]
3c6a48617a [🤖Automation] Update README with sponsors information
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-28 11:53:56 +00:00
jokob-sk
20c9b8c5ca 📚 Better notification docs + exclude New Device eve if disabled Alert Events
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-28 11:22:11 +11:00
jokob-sk
10ed589cd5 📚 Better notification docs + exclude New Device eve if disabled Alert Events 2024-10-28 11:17:34 +11:00
jokob-sk
bb33ab16fd Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2024-10-28 07:56:44 +11:00
jokob-sk
12c848d3cd Settins time logging + Saving Location issue #862 2024-10-28 07:56:38 +11:00
github-actions[bot]
87a0dbba46 [🤖Automation] Update README with sponsors information
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-27 11:53:46 +00:00
Massimo Pissarello
ea62b1116f Translated using Weblate (Italian)
Currently translated at 100.0% (712 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2024-10-27 08:00:23 +01:00
gallegonovato
b52c7ae0ed Translated using Weblate (Spanish)
Currently translated at 100.0% (712 of 712 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/es/
2024-10-27 08:00:22 +01:00
github-actions[bot]
f46bfde782 [🤖Automation] Update README with sponsors information
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-26 11:53:45 +00:00
Hosted Weblate
463d7d7524 Merge branch 'origin/main' into Weblate.
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-26 02:33:00 +02:00
Massimo Pissarello
8e4e7bd76d Translated using Weblate (Italian)
Currently translated at 100.0% (706 of 706 strings)

Translation: NetAlertX/core
Translate-URL: https://hosted.weblate.org/projects/pialert/core/it/
2024-10-26 02:33:00 +02:00
jokob-sk
cac35e2f20 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX 2024-10-26 11:32:45 +11:00
jokob-sk
425381a63e 🆕 Presence chart key 2024-10-26 11:32:29 +11:00
github-actions[bot]
9f6e61581e [🤖Automation] Update README with sponsors information
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-25 11:53:42 +00:00
jokob-sk
9c255c77d1 Merge branch 'main' of https://github.com/jokob-sk/NetAlertX
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-25 08:00:09 +11:00
jokob-sk
c47ac62e9a 🆕 Delete offline after N hours HRS_TO_KEEP_OFFDEV #865 2024-10-25 07:59:53 +11:00
github-actions[bot]
7e2999b28a [🤖Automation] Update README with sponsors information
Some checks are pending
docker / docker_dev (push) Waiting to run
2024-10-24 11:53:49 +00:00
jokob-sk
840413843b Network diagram - Alphabetical sorting #860 2024-10-24 22:00:50 +11:00
jokob-sk
4c46b27643 🔌Plugins page rebuild with DataTables 2024-10-24 21:51:16 +11:00
62 changed files with 938 additions and 646 deletions

View File

@@ -11,16 +11,15 @@ There are 4 ways how to influence notifications:
> It's recommended to use the same schedule interval for all plugins responsible for scanning devices, otherwise false positives might be reported if different devices are discovered by different plugins. Check the **Settings** > **Enabled settings** section for a warning:
> ![Schedules out-of-sync](/docs/img/NOTIFICATIONS/Schedules_out-of-sync.png)
## Device settings 💻
![Device notification settings](/docs/img/NOTIFICATIONS/Device-notification-settings.png)
There are 4 settings on the device for influencing notifications. You can:
1. Completely disable the scanning of the device
2. **Alert all events**, connections, disconnections, IP changes (noisy, usually not recommended)
3. **Alert down** - alerts when a device goes down. This setting overrides disabled Alert All Events, so you will get a notification of a device going down even if you don't have Alert All Events ticked.
1. **Scan Device** - Completely disable the scanning of the device.
2. **Alert Events** - Enables alerts of connections, disconnections, IP changes.
3. **Alert Down** - Alerts when a device goes down. This setting overrides a disabled **Alert Events** setting, so you will get a notification of a device going down even if you don't have **Alert Events** ticked.
4. **Skip repeated notifications**, if for example you know there is a temporary issue and want to pause the same notification for this device for a given time.
## Plugin settings 🔌
@@ -40,7 +39,7 @@ Click the **Read more in the docs.** Link at the top of each plugin to get more
In Notification Processing settings, you can specify blanket rules. These allow you to specify exceptions to the Plugin and Device settings and will override those.
1. Notify on (`NTFPRCS_INCLUDED_SECTIONS`) allows you to specify which events trigger notifications. Usual setups will have `new_devices`, `down_devices`, and possibly `events` set. Setting `plugin` might be too noisy for most setups. More info in the [NTFPRCS plugin](/front/plugins/notification_processing/README.md)
1. Notify on (`NTFPRCS_INCLUDED_SECTIONS`) allows you to specify which events trigger notifications. Usual setups will have `new_devices`, `down_devices`, and possibly `down_reconnected` set. Including `plugin` (dependenton the Plugin `<plugin>_WATCH` and `<plugin>_REPORT_ON` settings) and `events` (dependent on the on-device **Alert Events** setting) might be too noisy for most setups. More info in the [NTFPRCS plugin](/front/plugins/notification_processing/README.md)
2. Alert down after (`NTFPRCS_alert_down_time`) is useful if you want to wait for some time before the system sends out a down notification for a device. This is related to the on-device **Alert down** setting and only devices with this checked will trigger a down notification.
3. A filter to allow you to set device-specific exceptions to New devices being added to the app.
4. A filter to allow you to set device-specific exceptions to generated Events.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -12,11 +12,26 @@
----------------------------------------------------------------------------- */
:root {
--color-aqua: #00c0ef;
--color-blue: #0060df;
--color-green: #00a65a;
--color-yellow: #f39c12;
--color-red: #dd4b39;
}
/* -----------------------------------------------------------------------------
Helper Classes
----------------------------------------------------------------------------- */
.pointer
{
cursor: pointer;
}
.question
{
cursor: help;
}
/* -----------------------------------------------------------------------------
Text Classes
----------------------------------------------------------------------------- */
@@ -778,6 +793,35 @@ height: 50px;
display: inline-grid;
}
/* --------------------------------------------------------- */
/* Presence */
/* --------------------------------------------------------- */
.presencenceKey
{
float: right;
}
.presenceOnlineNow{
background-color: var(--color-green);
}
.presenceOnlinePast{
background-color: var(--color-blue);
}
.presenceOnlinePastMiss{
background-color: var(--color-yellow);
}
.presenceKeyBoxes
{
width: 10px;
height: 10px;
display: inline-block;
/* background: #fff; */
opacity: .75;
}
/* --------------------------------------------------------- */
/* report */
/* --------------------------------------------------------- */
@@ -1058,7 +1102,11 @@ input[readonly] {
.settingsSearchWrap
{
padding:10px;
/* padding:10px; */
/* display: flex; */
justify-content: center; /* Centers horizontally */
align-items: center; /* Centers vertically */
/* height: 60px; */
}
.settings-sticky-bottom-section {
@@ -1068,11 +1116,12 @@ input[readonly] {
/* opacity: 0.8; */
bottom: 30px;
border-radius: 5px;
margin:1px;
/* margin:1px; */
border-width: 1px;
border-style: solid;
border-color: inherit;
/* width: 87%; */
padding: 10px;
}
.settings-sticky-bottom-section:hover {
@@ -1091,7 +1140,7 @@ input[readonly] {
width: 14px;
position: absolute;
right: -6px;
top: 6px;
top: 13px;
}
@@ -1103,9 +1152,9 @@ input[readonly] {
.saveSettingsWrapper button
{
width:70%;
margin-top:20px;
/* margin-top:20px; */
margin-left:15%;
margin-bottom:20px;
/* margin-bottom:20px; */
}
#settingsPage .select2-selection
@@ -1181,11 +1230,6 @@ input[readonly] {
font-size: large;
}
.pointer
{
cursor: pointer;
}
.drag
{
cursor: move; /* fallback if grab cursor is unsupported */
@@ -1208,7 +1252,7 @@ input[readonly] {
background-color:#606060 !important;
}
.networkPageHelp{
.helpIconSmallTopRight{
position: absolute;
font-size: x-small;
margin-bottom: 6px;
@@ -1407,7 +1451,17 @@ input[readonly] {
.plugin-content #tabs-content-location
{
margin: 0px;
/* padding-top: 0; */
}
.integrations-plugins .content
{
display: table;
}
.plugin-content .tab-content
{
padding-top: 10px;
}
.plugins-description
@@ -1462,6 +1516,33 @@ input[readonly] {
}
.textOverflow
{
white-space: nowrap; /* Prevent text from wrapping to a new line */
overflow: hidden; /* Hide the overflowed text */
text-overflow: ellipsis; /* Show ellipsis (...) */
}
.table-stretched
{
min-width: -moz-available;
min-width: -webkit-fill-available;
}
.pluginBadge
{
float: right;
}
.pluginBadgeWrap
{
float: right;
display: ruby;
z-index: 1;
position: sticky;
margin-top: 1px;
}
/* -----------------------------------------------------------------------------
Spin
----------------------------------------------------------------------------- */

View File

@@ -325,7 +325,7 @@
</div>
<!-- Network -->
<h4 class="bottom-border-aqua"><?= lang('DevDetail_MainInfo_Network_Title');?><span class="networkPageHelp"> <a target="_blank" href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md"><i class="fa fa-circle-question"></i></a><span></h4>
<h4 class="bottom-border-aqua"><?= lang('DevDetail_MainInfo_Network_Title');?><span class="helpIconSmallTopRight"> <a target="_blank" href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md"><i class="fa fa-circle-question"></i></a><span></h4>
<div class="form-group" title="<?= lang('DevDetail_Network_Node_hover');?>">
<label class="col-sm-3 control-label"><?= lang('DevDetail_MainInfo_Network');?></label>
<div class="col-sm-9">
@@ -370,7 +370,8 @@
<!-- column 3 -->
<div class="col-lg-4 col-sm-6 col-xs-12">
<h4 class="bottom-border-aqua"><?= lang('DevDetail_EveandAl_Title');?></h4>
<h4 class="bottom-border-aqua"><?= lang('DevDetail_EveandAl_Title');?>
<span class="helpIconSmallTopRight"> <a target="_blank" href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/NOTIFICATIONS.md"><i class="fa fa-circle-question"></i></a><span></h4>
<div class="box-body form-horizontal">
<!-- Scan Cycle -->
@@ -455,7 +456,8 @@
<i style="font-size: 24px;" class="text-yellow glyphicon glyphicon-random"></i> &nbsp &nbsp </span>
<a href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/RANDOM_MAC.md" target="_blank" style="color: #777;">
<i class="fa fa-info-circle"></i> </a>
<i class="fa fa-info-circle"></i>
</a>
</div>
</div>
</div>

View File

@@ -167,6 +167,8 @@
// -----------------------------------------------------------------------------
function main () {
showSpinner();
//initialize the table headers in the correct order
var availableColumns = getSettingOptions("UI_device_columns").split(",");
var headersDefaultOrder = availableColumns.map(val => getString(val));

View File

@@ -19,7 +19,7 @@
<?php require 'php/templates/notification.php'; ?>
<h1 id="pageTitle">
<i class="fa fa-network-wired"></i> <?= lang('Network_Title');?>
<span class="networkPageHelp"> <a target="_blank" href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md"><i class="fa fa-circle-question"></i></a><span>
<span class="helpIconSmallTopRight"> <a target="_blank" href="https://github.com/jokob-sk/NetAlertX/blob/main/docs/NETWORK_TREE.md"><i class="fa fa-circle-question"></i></a><span>
</h1>
</section>
@@ -481,21 +481,31 @@
return;
}
devicesListnew = rawData["data"].map(item => { return {
"name":item[0],
"type":item[2],
"icon":item[3],
"mac":item[11],
"parentMac":item[14],
"rowid":item[13],
"status":item[10],
"childrenQty":item[15],
"port":item[18]
}})
devicesListnew = rawData["data"].map(item => {
return {
"name": item[0],
"type": item[2],
"icon": item[3],
"mac": item[11],
"parentMac": item[14],
"rowid": item[13],
"status": item[10],
"childrenQty": item[15],
"port": item[18]
};
}).sort((a, b) => {
// First sort by name alphabetically
const nameCompare = a.name.localeCompare(b.name);
if (nameCompare !== 0) {
return nameCompare;
}
// If names are the same, sort by port numerically
return a.port - b.port;
});
setCache('devicesListNew', JSON.stringify(devicesListnew))
setCache('devicesListNew', JSON.stringify(devicesListnew));
// init global variable
// Init global variable
deviceListGlobal = devicesListnew;

View File

@@ -31,6 +31,7 @@
| <a href="https://github.com/jokob-sk/NetAlertX/tree/main/docs#documentation-overview" target="_blank">Docs <i class="fa fa-circle-question"></i></a>
| <a href="https://github.com/jokob-sk/NetAlertX/issues"><i class="fa-solid fa-bug"></i></a>
| <a href="https://github.com/jokob-sk/NetAlertX/"><i class="fa-brands fa-github"></i></a>
| <a href="https://discord.gg/UQnnHNYV"><i class="fa-brands fa-discord"></i></a>
| <a href="mailto:jokob@duck.com?subject=NetAlertX"><i class="fa-solid fa-envelope"></i></a>
| <a href="https://github.com/pucherot/Pi.Alert">&copy;</a>
| <?= lang('Maintenance_built_on');?>: <?php include 'php/templates/build.php'; ?>

View File

@@ -311,6 +311,8 @@
"General_icon": "",
"HRS_TO_KEEP_NEWDEV_description": "",
"HRS_TO_KEEP_NEWDEV_name": "",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "",
"HelpFAQ_Cat_Detail_300_head": "",
"HelpFAQ_Cat_Detail_300_text_a": "",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "",
"Presence_CalHead_year": "",
"Presence_CallHead_Devices": "",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "",
"Presence_Shortcut_AllDevices": "",
"Presence_Shortcut_Archived": "",

View File

@@ -311,6 +311,8 @@
"General_icon": "",
"HRS_TO_KEEP_NEWDEV_description": "",
"HRS_TO_KEEP_NEWDEV_name": "",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "",
"HelpFAQ_Cat_Detail_300_head": "",
"HelpFAQ_Cat_Detail_300_text_a": "",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "",
"Presence_CalHead_year": "",
"Presence_CallHead_Devices": "",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "",
"Presence_Shortcut_AllDevices": "",
"Presence_Shortcut_Archived": "",

View File

@@ -323,6 +323,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Dies ist eine Wartungseinstellung <b>DELETING devices</b>. Wenn aktiviert (<code>0</code> bedeutet deaktiviert), werden als <b>\"Neues Gerät\"</b> markierte Geräte gelöscht, wenn ihre <b>erste Sitzung</b> länger her ist als in dieser Einstellung angegeben. Verwenden Sie diese Einstellung, wenn Sie <b>Neue Geräte</b> nach <code>X</code> Stunden automatisch löschen wollen.",
"HRS_TO_KEEP_NEWDEV_name": "Neue Geräte löschen nach",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "Detailansicht",
"HelpFAQ_Cat_Detail_300_head": "Was bedeutet ",
"HelpFAQ_Cat_Detail_300_text_a": "meint ein Netzwerkgerät (ein Gerät vom Typ AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Router, USB-LAN-Adapter oder Internet). Benutzerdefinierte Typen können über die <code>NETWORK_DEVICE_TYPES</code> Einstellung hinzugefügt werden.",
@@ -588,6 +590,12 @@
"Presence_CalHead_week": "Woche",
"Presence_CalHead_year": "Jahr",
"Presence_CallHead_Devices": "Geräte",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "Laden...",
"Presence_Shortcut_AllDevices": "Meine Geräte",
"Presence_Shortcut_Archived": "Archiviert",

View File

@@ -62,7 +62,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Delete events older than",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copy details from device",
"DevDetail_Copy_Device_Tooltip": "Copy details from device from the dropdown list. Everything on this page will be overwritten",
"DevDetail_EveandAl_AlertAllEvents": "Alert All Events",
"DevDetail_EveandAl_AlertAllEvents": "Alert Events",
"DevDetail_EveandAl_AlertDown": "Alert Down",
"DevDetail_EveandAl_Archived": "Archived",
"DevDetail_EveandAl_NewDevice": "New Device",
@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "This is a maintenance setting <b>DELETING devices</b>. If enabled (<code>0</code> is disabled), devices marked as <b>New Device</b> will be deleted if their <b>First Session</b> time was older than the specified hours in this setting. Use this setting if you want to auto-delete <b>New Devices</b> after <code>X</code> hours.",
"HRS_TO_KEEP_NEWDEV_name": "Delete new devices after",
"HRS_TO_KEEP_OFFDEV_description": "This is a maintenance setting <b>DELETING devices</b>. If enabled (<code>0</code> is disabled), devices that are <b>Offline</b> and their <b>Last Offline</b> date time is older than the specified hours in this setting. Use this setting if you want to auto-delete <b>Offline Devices</b> after <code>X</code> hours being offline.",
"HRS_TO_KEEP_OFFDEV_name": "Delete offline devices after",
"HelpFAQ_Cat_Detail": "Details",
"HelpFAQ_Cat_Detail_300_head": "What means ",
"HelpFAQ_Cat_Detail_300_text_a": "means a network device (a device of the type AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Router,USB LAN Adapter, USB WIFI Adapter, or Internet). Custom types can be added via the <code>NETWORK_DEVICE_TYPES</code> setting.",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "week",
"Presence_CalHead_year": "year",
"Presence_CallHead_Devices": "Devices",
"Presence_Key_OnlineNow": "Now online",
"Presence_Key_OnlineNow_desc": "Device detected in the last scan as online.",
"Presence_Key_OnlinePast": "Past online",
"Presence_Key_OnlinePastMiss": "Past online (miss-match)",
"Presence_Key_OnlinePastMiss_desc": "Device online in the past, but currently offline, but the start session might be missing or has conflicting data. (might be a bug - please submit a PR if you know how to fix it - I'm a bit lost in code here)",
"Presence_Key_OnlinePast_desc": "Device online in the past, but currently offline.",
"Presence_Loading": "Loading...",
"Presence_Shortcut_AllDevices": "My Devices",
"Presence_Shortcut_Archived": "Archived",

View File

@@ -321,6 +321,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Se trata de una configuración de mantenimiento <b>BORRAR dispositivos</b>. Si está activado (<code>0</code> está desactivado), los dispositivos marcados como <b>Nuevo dispositivo</b> se eliminarán si su fecha de <b>primera sesión</b> es anterior a las horas especificadas en este ajuste. Use este ajuste si desea eliminar automáticamente <b>Nuevos dispositivos</b> después de <code>X</code> horas.",
"HRS_TO_KEEP_NEWDEV_name": "Eliminar nuevos dispositivos después",
"HRS_TO_KEEP_OFFDEV_description": "Se trata de una configuración de mantenimiento <b>BORRAR dispositivos</b>. Si está activado (<code>0</code> está desactivado), los dispositivos que están <b>sin conexión</b> y su fecha de <b>última conexión</b> son anteriores a las horas especificadas en este ajuste. Use este ajuste si desea eliminar automáticamente <b>los dispositivos sin conexión</b> después de que el <code>X</code> horas esté sin conexión.",
"HRS_TO_KEEP_OFFDEV_name": "Borrar dispositivos sin conexión después de",
"HelpFAQ_Cat_Detail": "Detalles",
"HelpFAQ_Cat_Detail_300_head": "¿Qué significa? ",
"HelpFAQ_Cat_Detail_300_text_a": "significa un dispositivo de red (un dispositivo del tipo AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Router,Adaptador LAN USB, Adaptador WIFI USB o Internet). Los tipos personalizados pueden añadirse mediante el ajuste <code>NETWORK_DEVICE_TYPES</code>.",
@@ -586,6 +588,12 @@
"Presence_CalHead_week": "semana",
"Presence_CalHead_year": "año",
"Presence_CallHead_Devices": "Dispositivos",
"Presence_Key_OnlineNow": "En línea",
"Presence_Key_OnlineNow_desc": "Dispositivo detectado en el último escaneo como conectado.",
"Presence_Key_OnlinePast": "Anterior en línea",
"Presence_Key_OnlinePastMiss": "Anterior en línea (miss-match)",
"Presence_Key_OnlinePastMiss_desc": "Dispositivo en línea en el pasado, pero actualmente desconectado, pero la sesión de inicio podría estar faltando o tiene datos conflictivos. (Puede ser un error - por favor envíe un PR si sabe cómo solucionarlo - estoy un poco perdido en código)",
"Presence_Key_OnlinePast_desc": "Dispositivo en línea en el pasado, pero actualmente no conectado.",
"Presence_Loading": "Cargando...",
"Presence_Shortcut_AllDevices": "Mis dispositivos",
"Presence_Shortcut_Archived": "Archivado(s)",
@@ -782,4 +790,4 @@
"settings_update_item_warning": "Actualice el valor a continuación. Tenga cuidado de seguir el formato anterior. <b>O la validación no se realiza.</b>",
"test_event_icon": "fa-vial-circle-check",
"test_event_tooltip": "Guarda tus cambios antes de probar nuevos ajustes."
}
}

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

@@ -62,7 +62,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Supprimer les événements plus anciens que",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copier les détails de l'appareil",
"DevDetail_Copy_Device_Tooltip": "Copier les détails de l'appareil dans la liste déroulante. Tout ce qui se trouve sur cette page sera remplacé",
"DevDetail_EveandAl_AlertAllEvents": "Alerter de tous les événements",
"DevDetail_EveandAl_AlertAllEvents": "Alerter les événements",
"DevDetail_EveandAl_AlertDown": "Alerte de panne",
"DevDetail_EveandAl_Archived": "Archivés",
"DevDetail_EveandAl_NewDevice": "Nouvel appareil",
@@ -76,7 +76,7 @@
"DevDetail_Events_CheckBox": "Masquer les événements de connexion",
"DevDetail_GoToNetworkNode": "Naviguer à la page Réseau pour le nœud sélectionné.",
"DevDetail_Icon": "Icône",
"DevDetail_Icon_Descr": "Renseigner le nom d'une icône Font Awesome sans le préfixe fa- ou la classe complète; par ex. fa fa-brands fa-apple.",
"DevDetail_Icon_Descr": "Renseigner le nom d'une icône Font Awesome sans le préfixe fa- ou la classe complète, par ex. fa fa-brands fa-apple.",
"DevDetail_Loading": "Chargement…",
"DevDetail_MainInfo_Comments": "Observations",
"DevDetail_MainInfo_Favorite": "Favori",
@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Paramètre de maintenance. S'il est activé (<code>0</code> s'il est désactivé), les appareils marqués comme <b>Nouvel appareil</b> seront supprimés si leur durée depuis la <b>première session</b> est plus ancienne que le nombre d'heures paramétré. Utilisez ce paramétrage si vous voulez supprimer automatiquement les <b>Nouveaux appareils</b> après <code>X</code> heures.",
"HRS_TO_KEEP_NEWDEV_name": "Supprimer les nouveaux appareils après",
"HRS_TO_KEEP_OFFDEV_description": "Il s'agit d'un paramètre de maintenance <b>SUPPRIMER des appareils</b>. Si cette option est activée (<code>0</code> est désactivé), les appareils qui sont <b>Hors ligne</b> et dont la <b>dernière heure hors ligne</b> est plus ancienne que les heures spécifiées dans ce paramètre. Utilisez ce paramètre si vous souhaitez supprimer automatiquement <b>Appareils hors ligne</b> après <code>X</code> heures de déconnexion.",
"HRS_TO_KEEP_OFFDEV_name": "Supprimez les appareils hors ligne après",
"HelpFAQ_Cat_Detail": "Détails",
"HelpFAQ_Cat_Detail_300_head": "Que signifie ",
"HelpFAQ_Cat_Detail_300_text_a": "signifie que cela représente un équipement réseau (Access Point, Gateway, Firewall, Hyperviseur, Powerline, Switch, WLAN, CPL, adaptateur Ethernet USB, adaptateur Wifi USB, Internet). Les types d'appareils personnalisés peuvent être ajoutés via le paramètre <code>NETWORK_DEVICE_TYPES</code>.",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "semaine",
"Presence_CalHead_year": "année",
"Presence_CallHead_Devices": "Appareils",
"Presence_Key_OnlineNow": "Maintenant en ligne",
"Presence_Key_OnlineNow_desc": "Appareil détecté comme étant en ligne lors de la dernière analyse.",
"Presence_Key_OnlinePast": "Passé en ligne",
"Presence_Key_OnlinePastMiss": "Passé en ligne (correspondance manquée)",
"Presence_Key_OnlinePastMiss_desc": "Appareil en ligne dans le passé, mais actuellement hors ligne, mais la session de démarrage pourrait être manquante ou avoir des données contradictoires. (il s'agit peut-être d'un bogue - veuillez soumettre un PR si vous savez comment le corriger - je suis un peu perdu dans le code ici)",
"Presence_Key_OnlinePast_desc": "Appareil en ligne dans le passé, mais actuellement hors ligne.",
"Presence_Loading": "Chargement …",
"Presence_Shortcut_AllDevices": "Mes appareils",
"Presence_Shortcut_Archived": "Archivés",
@@ -703,4 +711,4 @@
"settings_update_item_warning": "Mettre à jour la valeur ci-dessous. Veillez à bien suivre le même format qu'auparavant. <b>Il n'y a pas de pas de contrôle.</b>",
"test_event_icon": "fa-vial-circle-check",
"test_event_tooltip": "Enregistrer d'abord vos modifications avant de tester vôtre paramétrage."
}
}

View File

@@ -62,7 +62,7 @@
"DAYS_TO_KEEP_EVENTS_name": "Elimina eventi più vecchi di",
"DevDetail_Copy_Device_Title": "<i class=\"fa fa-copy\"></i> Copia dettagli dal dispositivo",
"DevDetail_Copy_Device_Tooltip": "Copia i dettagli dal dispositivo dall'elenco a discesa. Tutto in questa pagina verrà sovrascritto",
"DevDetail_EveandAl_AlertAllEvents": "Notifica tutti gli eventi",
"DevDetail_EveandAl_AlertAllEvents": "Notifica eventi",
"DevDetail_EveandAl_AlertDown": "Avviso disconnessione",
"DevDetail_EveandAl_Archived": "Archiviato",
"DevDetail_EveandAl_NewDevice": "Nuovo dispositivo",
@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Questa è un'impostazione di manutenzione <b>ELIMINAZIONE dispositivi</b>. Se abilitata (<code>0</code> è disabilitata), tutti i dispositivi marcati con <b>Nuovo dispositivo</b> verranno eliminati se l'orario della <b>Prima sessione</b> è precedente all'orario di questa impostazione. Usa questa impostazione se vuoi eliminare automaticamente i <b>Nuovi dispositivi</b> dopo <code>X</code> ore.",
"HRS_TO_KEEP_NEWDEV_name": "Elimina nuovi dispositivi dopo",
"HRS_TO_KEEP_OFFDEV_description": "Questa è un'impostazione di manutenzione <b>ELIMINAZIONE dispositivi</b>. Se abilitata (<code>0</code> è disabilitata), i dispositivi che sono <b>Offline</b> e la loro data e ora <b>Ultima offline</b> sono più vecchi delle ore specificate in questa impostazione. Usa questa impostazione se vuoi eliminare automaticamente <b>Dispositivi offline</b> dopo <code>X</code> ore trascorse offline.",
"HRS_TO_KEEP_OFFDEV_name": "Elimina dispositivi offline dopo",
"HelpFAQ_Cat_Detail": "Dettagli",
"HelpFAQ_Cat_Detail_300_head": "Cosa significa ",
"HelpFAQ_Cat_Detail_300_text_a": "indica un dispositivo di rete (un dispositivo di tipo AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Router, USB LAN Adapter, USB WIFI Adapter, o Internet). Tipi personalizzati possono essere aggiunti attraverso l'impostazione <code>NETWORK_DEVICE_TYPES</code>.",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "settimana",
"Presence_CalHead_year": "anno",
"Presence_CallHead_Devices": "Dispositivi",
"Presence_Key_OnlineNow": "Online adesso",
"Presence_Key_OnlineNow_desc": "Dispositivo rilevato durante l'ultima scansione come online.",
"Presence_Key_OnlinePast": "Online in passato",
"Presence_Key_OnlinePastMiss": "Online in passato (non corrispondente)",
"Presence_Key_OnlinePastMiss_desc": "Dispositivo online in passato, ma attualmente offline, ma la sessione di avvio potrebbe essere mancante o presentare dati in conflitto. (potrebbe trattarsi di un bug: invia una PR se sai come risolverlo, sono un po' perso nel codice qui)",
"Presence_Key_OnlinePast_desc": "Dispositivo online in passato, ma attualmente offline.",
"Presence_Loading": "Caricamento...",
"Presence_Shortcut_AllDevices": "Miei dispositivi",
"Presence_Shortcut_Archived": "Archiviati",

View File

@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Dette er en vedlikeholdsinnstilling. Hvis aktivert (<code>0</code> er deaktivert), vil enheter merket som <b>Ny Enhet</b> bli slettet hvis tiden deres for <b>Første økt</b> var eldre enn de angitte timene i denne innstilling. Bruk denne innstillingen hvis du vil automatisk slette <b>Nye Enheter</b> etter <code>X</code> timer.",
"HRS_TO_KEEP_NEWDEV_name": "Behold nye enheter for",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "Detaljer",
"HelpFAQ_Cat_Detail_300_head": "Hva betyr ",
"HelpFAQ_Cat_Detail_300_text_a": "betyr en nettverksenhet (en enhet av typen AP, Gateway, Brannmur, Hypervisor, Powerline, Switch, WLAN, PLS, ruter, USB LAN-adapter, USB WIFI-adapter eller Internett). Egendefinerte typer kan legges til via <code>NETWORK_DEVICE_TYPES</code>-innstillingen.",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "uke",
"Presence_CalHead_year": "år",
"Presence_CallHead_Devices": "Enheter",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "Laster...",
"Presence_Shortcut_AllDevices": "Mine enheter",
"Presence_Shortcut_Archived": "Arkivert",

View File

@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "To jest ustawienie konserwacyjne. Jeżeli uruchomione (<code>0</code> jest wyłączone), urządzenie oznaczone jako <b>Nowe Urządzenie</b> zostanie usunięte jeżeli czas <b>Pierwszej Sesji</b> jest starszy niż godzina podana w tym ustawieniu. Uzyj tego ustawienia jeżeli chcesz automatycznie usuwać <b>Nowe Urządzenia</b> po <code>X</code> godzinach.",
"HRS_TO_KEEP_NEWDEV_name": "Trzymaj nowe urządzenia przez",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "Szczegóły",
"HelpFAQ_Cat_Detail_300_head": "Co oznacza ",
"HelpFAQ_Cat_Detail_300_text_a": "oznacza urządzenie sieciowe (urządzenie typu AP, Gateway, Zapora sieciowa, Hypervisor, Powerline, Switch, WLAN, PLC, Ruter, Adapter USB LAN, Adapter USB WIFI, oraz Internet). Własny typ może zostać dodany poprzez ustawienie <code>NETWORK_DEVICE_TYPE</code>.",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "tydzień",
"Presence_CalHead_year": "rok",
"Presence_CallHead_Devices": "Urządzenia",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "Wczytywanie...",
"Presence_Shortcut_AllDevices": "Moje Urządzenia",
"Presence_Shortcut_Archived": "Zarchiwizowane",

View File

@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Esta é uma configuração de manutenção. Se habilitada (<code>0</code> is disabled), dispositivos marcados como <b>Novo Dispositivo</b> serão excluídos se o tempo de <b>Primeira Sessão</b> for mais antigo que as horas especificadas nesta configuração. Use esta configuração se quiser excluir automaticamente <b>Novos Dispositivos</b> após <code>X</code> horas.",
"HRS_TO_KEEP_NEWDEV_name": "Manter novos dispositivos por",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "Detalhes",
"HelpFAQ_Cat_Detail_300_head": "O que significa ",
"HelpFAQ_Cat_Detail_300_text_a": "Significa um dispositivo de rede (um dispositivo do tipo AP, Gateway, Firewall, Hypervisor, Powerline, Switch, WLAN, PLC, Roteador, Adaptador LAN USB, Adaptador Wi-Fi USB ou Internet). Tipos personalizados podem ser adicionados através da configuração <code>NETWORK_DEVICE_TYPES</code>.",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "",
"Presence_CalHead_year": "",
"Presence_CallHead_Devices": "",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "",
"Presence_Shortcut_AllDevices": "",
"Presence_Shortcut_Archived": "",

View File

@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "Это настройка обслуживания <b>УДАЛЕНИЕ устройств</b>. Если этот параметр включен (<code>0</code> отключен), устройства, помеченные как <b>Новое устройство</b>, будут удалены, если время их <b>Первого сеанса</b> было старше указанных в этой настройке часов. Используйте этот параметр, если вы хотите автоматически удалять <b>Новые устройства</b> через <code>X</code> часов.",
"HRS_TO_KEEP_NEWDEV_name": "Удалить новые устройства после",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "Подробности",
"HelpFAQ_Cat_Detail_300_head": "Что значит ",
"HelpFAQ_Cat_Detail_300_text_a": "означает сетевое устройство (типа AP, шлюз, межсетевой экран, гипервизор, Powerline, коммутатор, WLAN, PLC, маршрутизатор, USB-адаптер локальной сети, USB-адаптер Wi-Fi или Интернет). Пользовательские типы можно добавить с помощью параметра <code>NETWORK_DEVICE_TYPES</code>.",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "неделя",
"Presence_CalHead_year": "год",
"Presence_CallHead_Devices": "Устройства",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "Загрузка...",
"Presence_Shortcut_AllDevices": "Мои устройства",
"Presence_Shortcut_Archived": "Архив",

View File

@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "",
"HRS_TO_KEEP_NEWDEV_name": "",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "Detaylar",
"HelpFAQ_Cat_Detail_300_head": "",
"HelpFAQ_Cat_Detail_300_text_a": "",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "hafta",
"Presence_CalHead_year": "yıl",
"Presence_CallHead_Devices": "Cihazlar",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "Yükleniyor...",
"Presence_Shortcut_AllDevices": "Cihazlarım",
"Presence_Shortcut_Archived": "",

View File

@@ -311,6 +311,8 @@
"General_icon": "<i class=\"fa fa-gears\"></i>",
"HRS_TO_KEEP_NEWDEV_description": "这是一项维护设置。如果启用(<code>0</code> 为禁用),则标记为<b>新设备</b>的设备(如果其<b>首次会话</b>时间早于此设置中指定的小时数)将被删除。如果您想在 <code>X</code> 小时后自动删除<b>新设备</b>,请使用此设置。",
"HRS_TO_KEEP_NEWDEV_name": "保留新设备",
"HRS_TO_KEEP_OFFDEV_description": "",
"HRS_TO_KEEP_OFFDEV_name": "",
"HelpFAQ_Cat_Detail": "详细",
"HelpFAQ_Cat_Detail_300_head": "含义 ",
"HelpFAQ_Cat_Detail_300_text_a": "表示网络设备AP、网关、防火墙、虚拟机管理程序、电力线、交换机、WLAN、PLC、路由器、USB LAN 适配器、USB WIFI 适配器或 Internet 类型的设备)。可以通过 <code>NETWORK_DEVICE_TYPES</code> 设置添加自定义类型。",
@@ -547,6 +549,12 @@
"Presence_CalHead_week": "星期",
"Presence_CalHead_year": "年",
"Presence_CallHead_Devices": "设备",
"Presence_Key_OnlineNow": "",
"Presence_Key_OnlineNow_desc": "",
"Presence_Key_OnlinePast": "",
"Presence_Key_OnlinePastMiss": "",
"Presence_Key_OnlinePastMiss_desc": "",
"Presence_Key_OnlinePast_desc": "",
"Presence_Loading": "加载中...",
"Presence_Shortcut_AllDevices": "我的设备",
"Presence_Shortcut_Archived": "已归档",

View File

@@ -5,7 +5,7 @@
?>
<!-- Page ------------------------------------------------------------------ -->
<div class="content-wrapper">
<div class="content-wrapper integrations-plugins">
<!-- Content header--------------------------------------------------------- -->
<section class="content-header">

View File

@@ -1,6 +1,6 @@
# 🔌 Plugins
NetAlertX supports additional plugins to extend its functionality, each with its own settings and options. Plugins can be loaded via the General -> `LOADED_PLUGINS` setting by using Ctrl + Click. For custom plugin development, refer to the [Plugin development guide](/docs/PLUGINS_DEV.md).
NetAlertX supports additional plugins to extend its functionality, each with its own settings and options. Plugins can be loaded via the General -> `LOADED_PLUGINS` setting. For custom plugin development, refer to the [Plugin development guide](/docs/PLUGINS_DEV.md).
>[!NOTE]
> Please check this [Plugins debugging guide](https://github.com/jokob-sk/NetAlertX/blob/main/docs/DEBUG_PLUGINS.md) and the corresponding Plugin documentation in the below table if you are facing issues.
@@ -16,7 +16,6 @@ NetAlertX supports additional plugins to extend its functionality, each with its
4. Fine-tune [Notifications](/docs/NOTIFICATIONS.md)
5. [Backup your setup](/docs/BACKUPS.md)
6. Contribute and [Create custom plugins](/docs/PLUGINS_DEV.md)
7. Consider [donating](https://github.com/jokob-sk/NetAlertX?tab=readme-ov-file#-sponsors) to keep me going
## 📑 Available Plugins

View File

@@ -313,6 +313,21 @@
}
],
"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",
"mapped_to_column": "cur_MAC",

View File

@@ -33,19 +33,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},
@@ -104,7 +100,7 @@
},
{
"column": "DateTimeCreated",
"css_classes": "col-sm-2",
"css_classes": "col-sm-3",
"show": true,
"type": "label",
"default_value": "",
@@ -145,7 +141,7 @@
"options": [
{
"type": "eval",
"param": "`<a href='/report.php?guid=${value}'>${value}</a>`"
"param": "`<a href='/report.php?guid=${value}'>Link</a>`"
}
],
"localized": ["name"],

View File

@@ -33,19 +33,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -49,19 +49,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -33,19 +33,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -33,19 +33,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -33,19 +33,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -29,19 +29,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -33,19 +33,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -367,6 +367,21 @@
}
],
"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",
"mapped_to_column": "cur_MAC",

View File

@@ -205,6 +205,21 @@
}
],
"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",

View File

@@ -34,6 +34,7 @@ def main():
PLUGINS_KEEP_HIST = int(get_setting_value("PLUGINS_KEEP_HIST"))
HRS_TO_KEEP_NEWDEV = int(get_setting_value("HRS_TO_KEEP_NEWDEV"))
HRS_TO_KEEP_OFFDEV = int(get_setting_value("HRS_TO_KEEP_OFFDEV"))
DAYS_TO_KEEP_EVENTS = int(get_setting_value("DAYS_TO_KEEP_EVENTS"))
PHOLUS_DAYS_DATA = get_setting_value("PHOLUS_DAYS_DATA")
CLEAR_NEW_FLAG = get_setting_value("CLEAR_NEW_FLAG")
@@ -42,7 +43,7 @@ def main():
# Execute cleanup/upkeep
cleanup_database(fullDbPath, DAYS_TO_KEEP_EVENTS, PHOLUS_DAYS_DATA, HRS_TO_KEEP_NEWDEV, PLUGINS_KEEP_HIST, CLEAR_NEW_FLAG)
cleanup_database(fullDbPath, DAYS_TO_KEEP_EVENTS, PHOLUS_DAYS_DATA, HRS_TO_KEEP_NEWDEV, HRS_TO_KEEP_OFFDEV, PLUGINS_KEEP_HIST, CLEAR_NEW_FLAG)
mylog('verbose', [f'[{pluginName}] Cleanup complete'])
@@ -51,7 +52,7 @@ def main():
#===============================================================================
# Cleanup / upkeep database
#===============================================================================
def cleanup_database (dbPath, DAYS_TO_KEEP_EVENTS, PHOLUS_DAYS_DATA, HRS_TO_KEEP_NEWDEV, PLUGINS_KEEP_HIST, CLEAR_NEW_FLAG):
def cleanup_database (dbPath, DAYS_TO_KEEP_EVENTS, PHOLUS_DAYS_DATA, HRS_TO_KEEP_NEWDEV, HRS_TO_KEEP_OFFDEV, PLUGINS_KEEP_HIST, CLEAR_NEW_FLAG):
"""
Cleaning out old records from the tables that don't need to keep all data.
"""
@@ -143,6 +144,14 @@ def cleanup_database (dbPath, DAYS_TO_KEEP_EVENTS, PHOLUS_DAYS_DATA, HRS_TO_KEEP
query = f"""DELETE FROM Devices WHERE dev_NewDevice = 1 AND dev_FirstConnection < date('now', '-{str(HRS_TO_KEEP_NEWDEV)} hour')"""
mylog('verbose', [f'[{pluginName}] Query: {query} '])
cursor.execute (query)
# -----------------------------------------------------
# Cleanup Offline Devices
if HRS_TO_KEEP_OFFDEV != 0:
mylog('verbose', [f'[{pluginName}] Devices: Delete all New Devices older than {str(HRS_TO_KEEP_OFFDEV)} hours (HRS_TO_KEEP_OFFDEV setting)'])
query = f"""DELETE FROM Devices WHERE dev_PresentLastScan = 0 AND dev_LastConnection < date('now', '-{str(HRS_TO_KEEP_OFFDEV)} hour'))"""
mylog('verbose', [f'[{pluginName}] Query: {query} '])
cursor.execute (query)
# -----------------------------------------------------
# Clear New Flag

View File

@@ -498,6 +498,21 @@
}
],
"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",

View File

@@ -66,23 +66,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
},
{
"language_code": "de_de",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -42,19 +42,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -666,7 +666,7 @@
"description": [
{
"language_code": "en_us",
"string": "Indicates whether events related to the device should trigger alerts. The default value of the <code>Alert All Events</code> checkbox."
"string": "Indicates whether events related to the device should trigger alerts. The default value of the <code>Alert Events</code> checkbox. Down and New Device notifications are always sent unless unselected in <code>NTFPRCS_INCLUDED_SECTIONS</code>."
}
]
},

View File

@@ -390,6 +390,21 @@
}
],
"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",
"mapped_to_column": "cur_MAC",

View File

@@ -41,23 +41,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
},
{
"language_code": "de_de",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -253,6 +253,21 @@
}
],
"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",
"mapped_to_column": "cur_MAC",

View File

@@ -213,6 +213,21 @@
}
],
"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",

View File

@@ -700,7 +700,7 @@
"description": [
{
"language_code": "en_us",
"string": "Indicates whether events related to the device should trigger alerts. The default value of the <code>Alert All Events</code> checkbox."
"string": "Indicates whether events related to the device should trigger alerts. The default value of the <code>Alert Events</code> checkbox. Down and New Device notifications are always sent unless unselected in <code>NTFPRCS_INCLUDED_SECTIONS</code>."
}
]
},
@@ -863,7 +863,7 @@
{
"name": "value",
"type": "sql",
"value": "SELECT DISTINCT '' as id, '❌None' as name UNION SELECT dev_Location as id, dev_Location as name FROM (SELECT dev_Location FROM Devices where dev_Location not in (null, 'null', '') UNION SELECT 'Bathroom' UNION SELECT 'Bedroom' UNION SELECT 'Dining room' UNION SELECT 'Hall' UNION SELECT 'Kitchen' UNION SELECT 'Laundry' UNION SELECT 'Living room' UNION SELECT 'Study' UNION SELECT 'Attic' UNION SELECT 'Basement' UNION SELECT 'Garage' UNION SELECT 'Back yard' UNION SELECT 'Garden' UNION SELECT 'Terrace') AS all_devices ORDER BY id; "
"value": "SELECT DISTINCT '' AS id, '❌None' AS name UNION SELECT dev_Location AS id, dev_Location AS name FROM Devices WHERE dev_Location NOT IN ('', 'null') AND dev_Location IS NOT NULL UNION SELECT 'Bathroom' AS id, 'Bathroom' AS name UNION SELECT 'Bedroom', 'Bedroom' UNION SELECT 'Dining room', 'Dining room' UNION SELECT 'Hall', 'Hall' UNION SELECT 'Kitchen', 'Kitchen' UNION SELECT 'Laundry', 'Laundry' UNION SELECT 'Living room', 'Living room' UNION SELECT 'Study', 'Study' UNION SELECT 'Attic', 'Attic' UNION SELECT 'Basement', 'Basement' UNION SELECT 'Garage', 'Garage' UNION SELECT 'Back yard', 'Back yard' UNION SELECT 'Garden', 'Garden' UNION SELECT 'Terrace', 'Terrace' ORDER BY id;"
}
],
"localized": ["name", "description"],

View File

@@ -343,6 +343,21 @@
}
],
"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",
"mapped_to_column": "cur_MAC",

View File

@@ -74,15 +74,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -7,7 +7,7 @@ Plugin supplying settings for Notification Processing.
- `new_devices` - if a new device is detected
- `down_devices` - if a device with **Alert down** enabled (on a specific Device) disconnects
- `down_reconnected` - if a device, previously marked down and notified on, reconnects
- `events` - if an event for a device that has **Alert All Events** enabled, is triggered
- `events` - if an event for a device that has **Alert Events** enabled, is triggered
- `plugins` - if an event for a plugin, is triggered

View File

@@ -213,6 +213,21 @@
}
],
"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",

View File

@@ -447,6 +447,21 @@
}
],
"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",
"mapped_to_column": "cur_MAC",

View File

@@ -323,6 +323,21 @@
}
],
"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",
"mapped_to_column": "MAC",

View File

@@ -278,6 +278,21 @@
],
"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",
"mapped_to_column": "cur_MAC",

View File

@@ -66,19 +66,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -471,6 +471,21 @@
}
],
"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",
"mapped_to_column": "cur_MAC",

View File

@@ -458,7 +458,7 @@
"description": [
{
"language_code": "en_us",
"string": "Hide Device tiles with zero results."
"string": "Hide Tiles in the Devices pages with zero results."
}
]
},

View File

@@ -385,6 +385,21 @@
}
],
"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": "Watched_Value1",
"mapped_to_column": "cur_Name",

View File

@@ -83,25 +83,17 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
},
{
"language_code": "de_de",
"string": "N/A"
"string": "Index"
}
],
"options": [],
"show": false,
"type": "label"
]
},
{
"column": "Plugin",

View File

@@ -302,23 +302,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
},
{
"language_code": "de_de",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -57,19 +57,15 @@
{
"column": "Index",
"css_classes": "col-sm-2",
"show": false,
"type": "label",
"show": true,
"type": "none",
"default_value": "",
"options": [],
"localized": ["name"],
"name": [
{
"language_code": "en_us",
"string": "N/A"
},
{
"language_code": "es_es",
"string": "N/A"
"string": "Index"
}
]
},

View File

@@ -1,44 +1,51 @@
<!-- ----------------------------------------------------------------------- -->
<!-- Datatable -->
<link rel="stylesheet" href="lib/AdminLTE/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="lib/AdminLTE/bower_components/datatables.net/css/select.dataTables.min.css">
<script src="lib/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="lib/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
<script src="lib/AdminLTE/bower_components/datatables.net/js/dataTables.select.min.js"></script>
<!-- Main content ---------------------------------------------------------- -->
<section class="content">
<div class="plugin-filters">
<div class="input-group col-sm-4">
<label class="control-label col-sm-3"><?= lang('Plugins_Filters_Mac');?></label>
<input class="form-control col-sm-3" id="txtMacFilter" type="text" value="--" readonly>
</div>
<div class="plugin-filters">
<div class="input-group col-sm-12">
<label class="col-sm-3"><?= lang('Plugins_Filters_Mac');?></label>
<input class="col-sm-3" id="txtMacFilter" type="text" value="--" readonly>
</div>
<div class="nav-tabs-custom plugin-content" style="margin-bottom: 0px;">
<ul id="tabs-location" class="nav nav-tabs col-sm-2 ">
<!-- PLACEHOLDER -->
</ul>
<div id="tabs-content-location" class="tab-content col-sm-10">
<!-- PLACEHOLDER -->
</div>
</div>
<div class="nav-tabs-custom plugin-content" style="margin-bottom: 0px;">
<ul id="tabs-location" class="nav nav-tabs col-sm-2 ">
<!-- PLACEHOLDER -->
</ul>
<div id="tabs-content-location" class="tab-content col-sm-10">
<!-- PLACEHOLDER -->
</div>
</section>
<script defer>
<script>
// -----------------------------------------------------------------------------
// Initializes fields based on current MAC
function initFields() {
var urlParams = new URLSearchParams(window.location.search);
mac = urlParams.get ('mac');
var urlParams = new URLSearchParams(window.location.search);
mac = urlParams.get ('mac');
// if the current mac has changed, reinitialize the data
if(mac != undefined && $("#txtMacFilter").val() != mac)
{
$("#txtMacFilter").val(mac);
// if the current mac has changed, reinitialize the data
if(mac != undefined && $("#txtMacFilter").val() != mac)
{
$("#txtMacFilter").val(mac);
getData();
}
getData();
}
}
@@ -46,142 +53,145 @@ function initFields() {
// Checking if current MAC has changed and triggering an updated if needed
function updater() {
initFields()
initFields()
// loop
setTimeout(function() {
updater();
}, 500);
// loop
setTimeout(function() {
updater();
}, 500);
}
// -----------------------------------------------------------------------------
// Get form control according to the column definition from config.json > database_column_definitions
function getFormControl(dbColumnDef, value, index) {
function getFormControl(dbColumnDef, value, index) {
result = ''
result = ''
// Check if mapped_to_column_data exists and has a value to override the supplied value which is most likely `undefined`
if (dbColumnDef.mapped_to_column_data && dbColumnDef.mapped_to_column_data.value) {
value = dbColumnDef.mapped_to_column_data.value;
}
// Check if mapped_to_column_data exists and has a value to override the supplied value which is most likely `undefined`
if (dbColumnDef.mapped_to_column_data && dbColumnDef.mapped_to_column_data.value) {
value = dbColumnDef.mapped_to_column_data.value;
}
result = processColumnValue(dbColumnDef, value, index, dbColumnDef.type)
result = processColumnValue(dbColumnDef, value, index, dbColumnDef.type)
return result;
return result;
}
// -----------------------------------------------------------------------------
// Process column value
function processColumnValue(dbColumnDef, value, index, type) {
if (type.includes('.')) {
const typeParts = type.split('.');
// recursion
for (const typePart of typeParts) {
value = processColumnValue(dbColumnDef, value, index, typePart)
}
const typeParts = type.split('.');
// recursion
for (const typePart of typeParts) {
value = processColumnValue(dbColumnDef, value, index, typePart)
}
} else{
// pick form control based on the supplied type
switch(type)
{
case 'label':
value = `<span>${value}<span>`;
break;
case 'textarea_readonly':
value = `<textarea cols="70" rows="3" wrap="off" readonly style="white-space: pre-wrap;">
${value.replace(/^b'(.*)'$/gm, '$1').replace(/\\n/g, '\n').replace(/\\r/g, '\r')}
</textarea>`;
break;
case 'textbox_save':
// pick form control based on the supplied type
switch(type)
{
case 'label':
value = `<span>${value}<span>`;
break;
case 'none':
value = `${value}`;
break;
case 'textarea_readonly':
value = `<textarea cols="70" rows="3" wrap="off" readonly style="white-space: pre-wrap;">
${value.replace(/^b'(.*)'$/gm, '$1').replace(/\\n/g, '\n').replace(/\\r/g, '\r')}
</textarea>`;
break;
case 'textbox_save':
value = value == 'null' ? '' : value; // hide 'null' values
value = value == 'null' ? '' : value; // hide 'null' values
id = `${dbColumnDef.column}_${index}`
id = `${dbColumnDef.column}_${index}`
value = `<span class="form-group">
<div class="input-group">
<input class="form-control" type="text" value="${value}" id="${id}" data-my-column="${dbColumnDef.column}" data-my-index="${index}" name="${dbColumnDef.column}">
<span class="input-group-addon"><i class="fa fa-save pointer" onclick="genericSaveData('${id}');"></i></span>
</div>
<span>`;
break;
case 'url':
value = `<span><a href="${value}" target="_blank">${value}</a><span>`;
break;
case 'url_http_https':
value = `<span>
<a href="http://${value}" target="_blank">
<i class="fa fa-lock-open "></i>
</a>
/
<a href="https://${value}" target="_blank">
<i class="fa fa-lock "></i>
</a>
<span>`;
break;
case 'device_name_mac':
value = createDeviceLink(value);
break;
case 'device_mac':
value = `<span class="anonymizeMac"><a href="/deviceDetails.php?mac=${value}" target="_blank">${value}</a><span>`;
break;
case 'device_ip':
value = `<span class="anonymizeIp"><a href="#" onclick="navigateToDeviceWithIp('${value}')" >${value}</a><span>`;
break;
case 'threshold':
value = `<span class="form-group">
<div class="input-group">
<input class="form-control" type="text" value="${value}" id="${id}" data-my-column="${dbColumnDef.column}" data-my-index="${index}" name="${dbColumnDef.column}">
<span class="input-group-addon"><i class="fa fa-save pointer" onclick="genericSaveData('${id}');"></i></span>
</div>
<span>`;
break;
case 'url':
value = `<span><a href="${value}" target="_blank">${value}</a><span>`;
break;
case 'url_http_https':
value = `<span>
<a href="http://${value}" target="_blank">
<i class="fa fa-lock-open "></i>
</a>
/
<a href="https://${value}" target="_blank">
<i class="fa fa-lock "></i>
</a>
<span>`;
break;
case 'device_name_mac':
value = createDeviceLink(value);
break;
case 'device_mac':
value = `<span class="anonymizeMac"><a href="/deviceDetails.php?mac=${value}" target="_blank">${value}</a><span>`;
break;
case 'device_ip':
value = `<span class="anonymizeIp"><a href="#" onclick="navigateToDeviceWithIp('${value}')" >${value}</a><span>`;
break;
case 'threshold':
valueTmp = ''
valueTmp = ''
$.each(dbColumnDef.options, function(index, obj) {
if(Number(value) < Number(obj.maximum) && valueTmp == '')
{
valueTmp = `<div style="background-color:${obj.hexColor}">${value}</div>`
// return;
}
});
$.each(dbColumnDef.options, function(index, obj) {
if(Number(value) < Number(obj.maximum) && valueTmp == '')
{
valueTmp = `<div style="background-color:${obj.hexColor}">${value}</div>`
// return;
}
});
value = valueTmp;
value = valueTmp;
break;
case 'replace':
$.each(dbColumnDef.options, function(index, obj) {
if(value == obj.equals)
{
value = `<span title="${value}">${obj.replacement}</span>`
}
});
break;
case 'regex':
for (const option of dbColumnDef.options) {
if (option.type === type) {
const regexPattern = new RegExp(option.param);
const match = value.match(regexPattern);
if (match) {
// Return the first match
value = match[0];
}
}
}
break;
case 'eval':
for (const option of dbColumnDef.options) {
if (option.type === type) {
// console.log(option.param)
value = eval(option.param);
}
}
break;
default:
value = value + `<div style='text-align:center' title="${getString("Plugins_no_control")}"><i class='fa-solid fa-circle-question'></i></div>` ;
}
break;
case 'replace':
$.each(dbColumnDef.options, function(index, obj) {
if(value == obj.equals)
{
value = `<span title="${value}">${obj.replacement}</span>`
}
});
break;
case 'regex':
for (const option of dbColumnDef.options) {
if (option.type === type) {
const regexPattern = new RegExp(option.param);
const match = value.match(regexPattern);
if (match) {
// Return the first match
value = match[0];
}
}
}
break;
case 'eval':
for (const option of dbColumnDef.options) {
if (option.type === type) {
// console.log(option.param)
value = eval(option.param);
}
}
break;
default:
value = value + `<div style='text-align:center' title="${getString("Plugins_no_control")}"><i class='fa-solid fa-circle-question'></i></div>` ;
}
}
// Default behavior if no match is found
@@ -193,30 +203,30 @@ function processColumnValue(dbColumnDef, value, index, type) {
// -----------------------------------------------------------------------------
// Update the corresponding DB column and entry
function genericSaveData (id) {
columnName = $(`#${id}`).attr('data-my-column')
index = $(`#${id}`).attr('data-my-index')
columnValue = $(`#${id}`).val()
columnName = $(`#${id}`).attr('data-my-column')
index = $(`#${id}`).attr('data-my-index')
columnValue = $(`#${id}`).val()
console.log(columnName)
console.log(index)
console.log(columnValue)
console.log(columnName)
console.log(index)
console.log(columnValue)
$.get(`php/server/dbHelper.php?action=update&dbtable=Plugins_Objects&columnName=Index&id=${index}&columns=UserData&values=${columnValue}`, function(data) {
// var result = JSON.parse(data);
// console.log(data)
$.get(`php/server/dbHelper.php?action=update&dbtable=Plugins_Objects&columnName=Index&id=${index}&columns=UserData&values=${columnValue}`, function(data) {
// var result = JSON.parse(data);
// console.log(data)
if(sanitize(data) == 'OK')
{
showMessage('<?= lang('Gen_DataUpdatedUITakesTime');?>')
// Remove navigation prompt "Are you sure you want to leave..."
window.onbeforeunload = null;
} else
{
showMessage('<?= lang('Gen_LockedDB');?>')
}
if(sanitize(data) == 'OK')
{
showMessage('<?= lang('Gen_DataUpdatedUITakesTime');?>')
// Remove navigation prompt "Are you sure you want to leave..."
window.onbeforeunload = null;
} else
{
showMessage('<?= lang('Gen_LockedDB');?>')
}
});
});
}
@@ -228,361 +238,287 @@ pluginHistory = []
function getData(){
$.get('api/plugins.json', function(res) {
pluginDefinitions = res["data"];
// Show the loading spinner while generating
showSpinner();
$.get('api/table_plugins_events.json', function(res) {
pluginUnprocessedEvents = res["data"];
$.get('api/table_plugins_objects.json', function(res) {
pluginObjects = res["data"];
$.get('api/table_plugins_history.json', function(res) {
pluginHistory = res["data"];
generateTabs()
});
});
});
});
}
// -----------------------------------------------------------------------------
function generateTabs()
{
showSpinner()
$.get('api/plugins.json', function(res) {
activetab = 'active'
pluginDefinitions = res["data"];
// clear previous headers data
$('#tabs-location').html("");
// clear previous content data
$('#tabs-content-location').html("");
$.get('api/table_plugins_events.json', function(res) {
$.each(pluginDefinitions, function(index, pluginObj) {
pluginUnprocessedEvents = res["data"];
// console.log(pluginObj)
$.get('api/table_plugins_objects.json', function(res) {
if(pluginObj.show_ui) // hiding plugins where specified
{
prefix = pluginObj.unique_prefix;
$('#tabs-location').append(
`<li class=" left-nav ${activetab}">
<a class=" col-sm-12 " href="#${prefix}" data-plugin-prefix="${prefix}" id="${prefix}_id" data-toggle="tab" >
${getString(`${prefix}_icon`)} ${getString(`${prefix}_display_name`)}
</a>
</li>`
);
activetab = '' // only first tab is active
}
});
pluginObjects = res["data"];
$.get('api/table_plugins_history.json', function(res) {
activetab = 'active'
$.each(pluginDefinitions, function(index, pluginObj) {
pluginHistory = res["data"];
headersHtml = ""
colDefinitions = []
evRows = ""
obRows = ""
hiRows = ""
prefix = pluginObj.unique_prefix;
generateTabs()
// Generate the header
$.each(pluginObj["database_column_definitions"], function(index, colDef){
if(colDef.show == true) // select only the ones to show
{
colDefinitions.push(colDef)
headersHtml += `<th class="${colDef.css_classes}" >${getString(`${prefix}_${colDef.column}_name` )}</th>`
}
});
// Generate the event rows
var eveCount = 0;
for(i=0;i<pluginUnprocessedEvents.length;i++)
{
if(pluginUnprocessedEvents[i].Plugin == prefix)
{
clm = ""
for(j=0;j<colDefinitions.length;j++)
{
clm += '<td>'+ pluginUnprocessedEvents[i][colDefinitions[j].column] +'</td>'
}
evRows += `<tr data-my-index="${pluginUnprocessedEvents[i]["Index"]}" >${clm}</tr>`
eveCount++;
}
}
// Generate the history rows
var histCount = 0
var histCountDisplayed = 0
for(i=0;i < pluginHistory.length ;i++)
{
if(pluginHistory[i].Plugin == prefix)
{
if(histCount < 50) // only display 50 entries to optimize performance
{
clm = ""
for(j=0;j<colDefinitions.length;j++)
{
clm += '<td>'+ pluginHistory[i][colDefinitions[j].column] +'</td>'
}
hiRows += `<tr data-my-index="${pluginHistory[i]["Index"]}" >${clm}</tr>`
histCountDisplayed++;
}
histCount++; // count and display the total
}
}
// Generate the object rows
var obCount = 0;
for(var i=0;i<pluginObjects.length;i++)
{
if(pluginObjects[i].Plugin == prefix)
{
if(shouldBeShown(pluginObjects[i], pluginObj)) // filter TODO
{
clm = ""
for(var j=0;j<colDefinitions.length;j++)
{
clm += '<td>'+ getFormControl(colDefinitions[j], pluginObjects[i][colDefinitions[j].column], pluginObjects[i]["Index"], colDefinitions, pluginObjects[i]) +'</td>'
}
obRows += `<tr data-my-index="${pluginObjects[i]["Index"]}" >${clm}</tr>`
obCount++;
}
}
}
// Generate the HTML
$('#tabs-content-location').append(
`
<div id="${prefix}" class="tab-pane ${activetab}">
<div class="nav-tabs-custom" style="margin-bottom: 0px">
<ul class="nav nav-tabs">
<li class="active" >
<a href="#objectsTarget_${prefix}" data-toggle="tab" >
<i class="fa fa-cube"></i> <?= lang('Plugins_Objects');?> (${obCount})
</a>
</li>
<li >
<a href="#eventsTarget_${prefix}" data-toggle="tab" >
<i class="fa fa-bolt"></i> <?= lang('Plugins_Unprocessed_Events');?> (${eveCount})
</a>
</li>
<li >
<a href="#historyTarget_${prefix}" data-toggle="tab" >
<i class="fa fa-clock"></i> <?= lang('Plugins_History');?> (${histCountDisplayed} <?= lang('Plugins_Out_of');?> ${histCount})
</a>
</li>
<ul>
</div>
<div class="tab-content">
<div id="objectsTarget_${prefix}" class="tab-pane ${activetab}">
<table class="table table-striped" data-my-dbtable="Plugins_Objects">
<tbody>
<tr>
${headersHtml}
</tr>
${obRows}
</tbody>
</table>
<div class="plugin-obj-purge">
<button class="btn btn-primary" onclick="purgeAll('${prefix}', 'Plugins_Objects' )"><?= lang('Plugins_DeleteAll');?></button>
<button class="btn btn-danger " onclick="deleteListed('${prefix}', 'Plugins_Objects' )"><?= lang('Plugins_Obj_DeleteListed');?></button>
</div>
</div>
<div id="eventsTarget_${prefix}" class="tab-pane">
<table class="table table-striped" data-my-dbtable="Plugins_Events">
<tbody>
<tr>
${headersHtml}
</tr>
${evRows}
</tbody>
</table>
<div class="plugin-obj-purge">
<button class="btn btn-primary" onclick="purgeAll('${prefix}', 'Plugins_Events' )"><?= lang('Plugins_DeleteAll');?></button>
</div>
</div>
<div id="historyTarget_${prefix}" class="tab-pane">
<table class="table table-striped" data-my-dbtable="Plugins_History">
<tbody>
<tr>
${headersHtml}
</tr>
${hiRows}
</tbody>
</table>
<div class="plugin-obj-purge">
<button class="btn btn-primary" onclick="purgeAll('${prefix}', 'Plugins_History' )"><?= lang('Plugins_DeleteAll');?></button>
</div>
</div>
</div>
<div class='plugins-description'>
${getString(prefix + '_description')}
<span>
<a href="https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/${pluginObj.code_name}" target="_blank"><?= lang('Gen_ReadDocs');?></a>
</span>
</div>
</div>
`);
activetab = '' // only first tab is active
});
});
initTabs()
});
}
// --------------------------------------------------------
// Handle active / selected tabs
// handle first tab (objectsTarget_) display
function initTabs() {
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var target = $(e.target).attr("href").split('_').pop();
function generateTabs() {
var pref = target.includes('_') ? target.split('_')[1] : target.split('#')[1];
// Reset the tabs by clearing previous headers and content
resetTabs();
// Sort pluginDefinitions by unique_prefix alphabetically
pluginDefinitions.sort((a, b) => a.unique_prefix.localeCompare(b.unique_prefix));
// Iterate over the sorted pluginDefinitions to create tab headers and content
pluginDefinitions.forEach(pluginObj => {
if (pluginObj.show_ui) {
stats = createTabContent(pluginObj); // Create the content for each tab
createTabHeader(pluginObj, stats); // Create the header for each tab
}
});
hideSpinner()
}
function resetTabs() {
// Clear any existing tab headers and content from the DOM
$('#tabs-location').empty();
$('#tabs-content-location').empty();
}
function createTabHeader(pluginObj, stats) {
const prefix = pluginObj.unique_prefix; // Get the unique prefix for the plugin
// Determine the active class for the first tab
const activeClass = pluginDefinitions.indexOf(pluginObj) === 0 ? 'active' : '';
// Append the tab header to the tabs location
$('#tabs-location').append(`
<li class="left-nav ${activeClass} ">
<a class="col-sm-12 textOverflow" href="#${prefix}" data-plugin-prefix="${prefix}" id="${prefix}_id" data-toggle="tab">
${getString(`${prefix}_icon`)} ${getString(`${prefix}_display_name`)}
var everythingHidden = true;
if ($('#objectsTarget_' + pref) && $('#historyTarget_' + pref) && $('#eventsTarget_' + pref)) {
var isObjectsInactive = !$('#objectsTarget_' + pref).hasClass('active');
var isHistoryInactive = !$('#historyTarget_' + pref).hasClass('active');
var isEventsInactive = !$('#eventsTarget_' + pref).hasClass('active');
everythingHidden = isObjectsInactive && isHistoryInactive && isEventsInactive;
}
if (target === '#' + pref && everythingHidden) {
var objectsTarget = $('#objectsTarget_' + pref);
if (objectsTarget.length && !objectsTarget.hasClass('active')) {
objectsTarget.addClass('active');
}
}
});
// hide spinning icon
hideSpinner()
</a>
${stats.objectDataCount > 0 ? `<div class="pluginBadgeWrap"><span title="" class="badge pluginBadge" >${stats.objectDataCount}</span></div>` : ""}
</li>
`);
}
function createTabContent(pluginObj) {
const prefix = pluginObj.unique_prefix; // Get the unique prefix for the plugin
const colDefinitions = getColumnDefinitions(pluginObj); // Get column definitions for DataTables
// Get data for events, objects, and history related to the plugin
const objectData = getObjectData(prefix, colDefinitions, pluginObj);
const eventData = getEventData(prefix, colDefinitions);
const historyData = getHistoryData(prefix, colDefinitions, pluginObj);
// Append the content structure for the plugin's tab to the content location
$('#tabs-content-location').append(`
<div id="${prefix}" class="tab-pane ${pluginDefinitions.indexOf(pluginObj) === 0 ? 'active' : ''}">
${generateTabNavigation(prefix, objectData.length, eventData.length, historyData.length)} <!-- Create tab navigation -->
<div class="tab-content">
${generateDataTable(prefix, 'Objects', objectData, colDefinitions)}
${generateDataTable(prefix, 'Events', eventData, colDefinitions)}
${generateDataTable(prefix, 'History', historyData, colDefinitions)}
</div>
<div class='plugins-description'>
${getString(`${prefix}_description`)} <!-- Display the plugin description -->
<span><a href="https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/${pluginObj.code_name}" target="_blank">${getString('Gen_ReadDocs')}</a></span> <!-- Link to documentation -->
</div>
</div>
`);
// Initialize DataTables for the respective sections
initializeDataTables(prefix, objectData, eventData, historyData, colDefinitions);
return {
"objectDataCount": objectData.length,
"eventDataCount": eventData.length,
"historyDataCount": historyData.length
}
}
function getColumnDefinitions(pluginObj) {
// Filter and return only the columns that are set to show in the UI
return pluginObj["database_column_definitions"].filter(colDef => colDef.show);
}
function getEventData(prefix, colDefinitions) {
// Extract event data specific to the plugin and format it for DataTables
return pluginUnprocessedEvents
.filter(event => event.Plugin === prefix) // Filter events for the specific plugin
.map(event => colDefinitions.map(colDef => event[colDef.column] || '')); // Map to the defined columns
}
function getObjectData(prefix, colDefinitions, pluginObj) {
// Extract object data specific to the plugin and format it for DataTables
return pluginObjects
.filter(object => object.Plugin === prefix && shouldBeShown(object, pluginObj)) // Filter objects for the specific plugin
.map(object => colDefinitions.map(colDef => getFormControl(colDef, object[colDef.column], object["Index"], colDefinitions, object))); // Map to the defined columns
}
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
}
function generateTabNavigation(prefix, objectCount, eventCount, historyCount) {
// Create navigation tabs for Objects, Unprocessed Events, and History
return `
<div class="nav-tabs-custom" style="margin-bottom: 0px">
<ul class="nav nav-tabs">
<li class="active">
<a href="#objectsTarget_${prefix}" data-toggle="tab"><i class="fa fa-cube"></i> ${getString('Plugins_Objects')} (${objectCount})</a>
</li>
<li>
<a href="#eventsTarget_${prefix}" data-toggle="tab"><i class="fa fa-bolt"></i> ${getString('Plugins_Unprocessed_Events')} (${eventCount})</a>
</li>
<li>
<a href="#historyTarget_${prefix}" data-toggle="tab"><i class="fa fa-clock"></i> ${getString('Plugins_History')} (${historyCount})</a>
</li>
</ul>
</div>
`;
}
function generateDataTable(prefix, tableType, data, colDefinitions) {
// Generate HTML for a DataTable and associated buttons for a given table type
const headersHtml = colDefinitions.map(colDef => `<th class="${colDef.css_classes}">${getString(`${prefix}_${colDef.column}_name`)}</th>`).join('');
return `
<div id="${tableType.toLowerCase()}Target_${prefix}" class="tab-pane ${tableType == "Objects" ? "active":""}">
<table id="${tableType.toLowerCase()}Table_${prefix}" class="display table table-striped table-stretched" data-my-dbtable="Plugins_${tableType}">
<thead><tr>${headersHtml}</tr></thead>
</table>
<div class="plugin-obj-purge">
<button class="btn btn-primary" onclick="purgeAll('${prefix}', 'Plugins_${tableType}' )"><?= lang('Plugins_DeleteAll');?></button>
${tableType !== 'Events' ? `<button class="btn btn-danger" onclick="deleteListed('${prefix}', 'Plugins_${tableType}' )"><?= lang('Plugins_Obj_DeleteListed');?></button>` : ''}
</div>
</div>
`;
}
function initializeDataTables(prefix, objectData, eventData, historyData, colDefinitions) {
// Common settings for DataTables initialization
const commonDataTableSettings = {
orderable: false, // Disable ordering
createdRow: function(row, data) {
$(row).attr('data-my-index', data[0]); // Set data attribute for indexing
}
};
// Initialize DataTable for Objects
$(`#objectsTable_${prefix}`).DataTable({
data: objectData,
columns: colDefinitions.map(colDef => ({ title: getString(`${prefix}_${colDef.column}_name`) })), // Column titles
...commonDataTableSettings // Spread common settings
});
// Initialize DataTable for Unprocessed Events
$(`#eventsTable_${prefix}`).DataTable({
data: eventData,
columns: colDefinitions.map(colDef => ({ title: getString(`${prefix}_${colDef.column}_name`) })), // Column titles
...commonDataTableSettings // Spread common settings
});
// Initialize DataTable for History
$(`#historyTable_${prefix}`).DataTable({
data: historyData,
columns: colDefinitions.map(colDef => ({ title: getString(`${prefix}_${colDef.column}_name`) })), // Column titles
...commonDataTableSettings // Spread common settings
});
}
// --------------------------------------------------------
// Filter method that determines if an entry should be shown
function shouldBeShown(entry, pluginObj)
{
if (pluginObj.hasOwnProperty('data_filters')) {
let dataFilters = pluginObj.data_filters;
{
if (pluginObj.hasOwnProperty('data_filters')) {
let dataFilters = pluginObj.data_filters;
// Loop through 'data_filters' array and appply filters on individual plugin entries
for (let i = 0; i < dataFilters.length; i++) {
compare_field_id = dataFilters[i].compare_field_id;
compare_column = dataFilters[i].compare_column;
compare_operator = dataFilters[i].compare_operator;
compare_js_template = dataFilters[i].compare_js_template;
compare_use_quotes = dataFilters[i].compare_use_quotes;
compare_field_id_value = $(`#${compare_field_id}`).val();
// Loop through 'data_filters' array and appply filters on individual plugin entries
for (let i = 0; i < dataFilters.length; i++) {
compare_field_id = dataFilters[i].compare_field_id;
compare_column = dataFilters[i].compare_column;
compare_operator = dataFilters[i].compare_operator;
compare_js_template = dataFilters[i].compare_js_template;
compare_use_quotes = dataFilters[i].compare_use_quotes;
compare_field_id_value = $(`#${compare_field_id}`).val();
// apply filter i sthe filter field has a valid value
if(compare_field_id_value != undefined && compare_field_id_value != '--')
{
// valid value
// resolve the left and right part of the comparison
let left = compare_js_template.replace('{value}', `${compare_field_id_value}`)
let right = compare_js_template.replace('{value}', `${entry[compare_column]}`)
// apply filter i sthe filter field has a valid value
if(compare_field_id_value != undefined && compare_field_id_value != '--')
{
// valid value
// resolve the left and right part of the comparison
let left = compare_js_template.replace('{value}', `${compare_field_id_value}`)
let right = compare_js_template.replace('{value}', `${entry[compare_column]}`)
// include wrapper quotes if specified
compare_use_quotes ? quotes = '"' : quotes = ''
// include wrapper quotes if specified
compare_use_quotes ? quotes = '"' : quotes = ''
result = eval(
quotes + `${eval(left)}` + quotes +
` ${compare_operator} ` +
quotes + `${eval(right)}` + quotes
);
result = eval(
quotes + `${eval(left)}` + quotes +
` ${compare_operator} ` +
quotes + `${eval(right)}` + quotes
);
return result;
}
}
return result;
}
}
return true;
}
return true;
}
// --------------------------------------------------------
// Data cleanup/purge functionality
plugPrefix = ''
dbTable = ''
dbTable = ''
function purgeAll(callback) {
plugPrefix = arguments[0]; // plugin prefix
dbTable = arguments[1]; // DB table
dbTable = arguments[1]; // DB table
// Ask
showModalWarning('<?= lang('Gen_Purge');?>' + ' ' + plugPrefix + ' ' + dbTable , '<?= lang('Gen_AreYouSure');?>',
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', "purgeAllExecute");
'<?= lang('Gen_Cancel');?>', '<?= lang('Gen_Okay');?>', "purgeAllExecute");
}
// --------------------------------------------------------
function purgeAllExecute() {
$.ajax({
method: "POST",
url: "php/server/dbHelper.php",
data: { action: "delete", dbtable: dbTable, columnName: 'Plugin', id:plugPrefix },
success: function(data, textStatus) {
showModalOk ('Result', data );
}
})
$.ajax({
method: "POST",
url: "php/server/dbHelper.php",
data: { action: "delete", dbtable: dbTable, columnName: 'Plugin', id:plugPrefix },
success: function(data, textStatus) {
showModalOk ('Result', data );
}
})
}
// --------------------------------------------------------
function deleteListed(plugPrefix, dbTable) {
idArr = $(`#${plugPrefix} table[data-my-dbtable="${dbTable}"] tr[data-my-index]`).map(function(){return $(this).attr("data-my-index");}).get();
idArr = $(`#${plugPrefix} table[data-my-dbtable="${dbTable}"] tr[data-my-index]`).map(function(){return $(this).attr("data-my-index");}).get();
console.log(idArr);
console.log(idArr);
$.ajax({
method: "POST",
url: "php/server/dbHelper.php",
data: { action: "delete", dbtable: dbTable, columnName: 'Index', id:idArr.toString() },
success: function(data, textStatus) {
updateApi("plugins_objects")
showModalOk ('Result', data );
}
})
$.ajax({
method: "POST",
url: "php/server/dbHelper.php",
data: { action: "delete", dbtable: dbTable, columnName: 'Index', id:idArr.toString() },
success: function(data, textStatus) {
updateApi("plugins_objects")
showModalOk ('Result', data );
}
})
}

View File

@@ -170,6 +170,17 @@
<!-- box-header -->
<div class="box-header">
<h3 id="tableDevicesTitle" class="box-title text-gray">Devices</h3>
<div class="presencenceKey">
<span class="question" title="<?= lang('Presence_Key_OnlineNow_desc');?>">
<div class="presenceOnlineNow presenceKeyBoxes"></div> <?= lang('Presence_Key_OnlineNow');?>
</span>
<span class="question" title="<?= lang('Presence_Key_OnlinePast_desc');?>">
<div class="presenceOnlinePast presenceKeyBoxes"></div> <?= lang('Presence_Key_OnlinePast');?>
</span>
<span class="question" title="<?= lang('Presence_Key_OnlinePastMiss_desc');?>">
<div class="presenceOnlinePastMiss presenceKeyBoxes"></div> <?= lang('Presence_Key_OnlinePastMiss');?>
</span>
</div>
</div>
<!-- box-body -->

View File

@@ -145,10 +145,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
<section class=" settings-sticky-bottom-section col-sm-10 col-xs-12">
<div class="col-xs-8 settingsSearchWrap form-group has-success bg-white color-palette ">
<div class ="col-xs-8">
<i class="fa-solid fa-filter"></i> <?= lang("Gen_Filter");?>
</div>
<div class="col-xs-8 settingsSearchWrap has-success bg-white color-palette ">
<div class ="col-xs-12">
<input type="text" id="settingsSearch" class="form-control input-xs col-xs-12" placeholder="Filter Settings...">
@@ -800,6 +797,8 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
// Reloads the current page
// setTimeout("clearCache()", 5000);
write_notification(`[Settings] Settings saved by the user`, 'info')
clearCache()
} else{
// something went wrong

View File

@@ -146,6 +146,7 @@ def importConfigs (db, all_plugins):
conf.REPORT_DASHBOARD_URL = ccd('REPORT_DASHBOARD_URL', 'http://netalertx/' , c_d, 'NetAlertX URL', '{"dataType":"string", "elements": [{"elementType" : "input", "elementOptions" : [] ,"transformers": []}]}', '[]', 'General')
conf.DAYS_TO_KEEP_EVENTS = ccd('DAYS_TO_KEEP_EVENTS', 90 , c_d, 'Delete events days', '{"dataType":"integer", "elements": [{"elementType" : "input", "elementOptions" : [{"type": "number"}] ,"transformers": []}]}', '[]', 'General')
conf.HRS_TO_KEEP_NEWDEV = ccd('HRS_TO_KEEP_NEWDEV', 0 , c_d, 'Keep new devices for', '{"dataType":"integer", "elements": [{"elementType" : "input", "elementOptions" : [{"type": "number"}] ,"transformers": []}]}', "[]", 'General')
conf.HRS_TO_KEEP_OFFDEV = ccd('HRS_TO_KEEP_OFFDEV', 0 , c_d, 'Keep offline devices for', '{"dataType":"integer", "elements": [{"elementType" : "input", "elementOptions" : [{"type": "number"}] ,"transformers": []}]}', "[]", 'General')
conf.CLEAR_NEW_FLAG = ccd('CLEAR_NEW_FLAG', 0 , c_d, 'Clear new flag', '{"dataType":"integer", "elements": [{"elementType" : "input", "elementOptions" : [{"type": "number"}] ,"transformers": []}]}', "[]", 'General')
conf.API_CUSTOM_SQL = ccd('API_CUSTOM_SQL', 'SELECT * FROM Devices WHERE dev_PresentLastScan = 0' , c_d, 'Custom endpoint', '{"dataType":"string", "elements": [{"elementType" : "input", "elementOptions" : [] ,"transformers": []}]}', '[]', 'General')
conf.VERSION = ccd('VERSION', '' , c_d, 'Version', '{"dataType":"string", "elements": [{"elementType" : "input", "elementOptions" : [{ "readonly": "true" }] ,"transformers": []}]}', '', 'General')
@@ -369,8 +370,12 @@ def importConfigs (db, all_plugins):
conf.lastImportedConfFile = os.path.getmtime(config_file)
updateState("Config imported", conf.lastImportedConfFile, conf.lastImportedConfFile, False)
mylog('minimal', '[Config] Imported new config')
msg = '[Config] Imported new settings config'
mylog('minimal', msg)
# front end app log loggging
write_notification(msg, 'info', timeNowTZ())
return all_plugins

View File

@@ -46,7 +46,7 @@ def get_notifications (db):
# Disable reporting on events for devices where reporting is disabled based on the MAC address
sql.execute ("""UPDATE Events SET eve_PendingAlertEmail = 0
WHERE eve_PendingAlertEmail = 1 AND eve_EventType not in ('Device Down', 'Down Reconnected') AND eve_MAC IN
WHERE eve_PendingAlertEmail = 1 AND eve_EventType not in ('Device Down', 'Down Reconnected', 'New Device' ) AND eve_MAC IN
(
SELECT dev_MAC FROM Devices WHERE dev_AlertEvents = 0
)""")