mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
Merge pull request #321 from cvc90/Pi.Alert-Add-New-Menu-Report
Added the new "Report" menu and various fixes for the new menu, thanks @cvc90 🙏
This commit is contained in:
@@ -234,6 +234,10 @@ if ($ENABLED_DARKMODE === True) {
|
||||
<a href="events.php"><i class="fa fa-bolt"></i> <span><?= lang('Navigation_Events');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('report.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="report.php"><i class="fa fa-bolt"></i> <span><?= lang('Navigation_Report');?></span></a>
|
||||
</li>
|
||||
|
||||
<li class=" <?php if (in_array (basename($_SERVER['SCRIPT_NAME']), array('network.php') ) ){ echo 'active'; } ?>">
|
||||
<a href="network.php"><span><i class="fa fa-fw fa-network-wired"></i> <?= lang('Navigation_Network');?></span></a>
|
||||
</li>
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"Navigation_Devices" : "Geräte",
|
||||
"Navigation_Presence" : "Anwesenheit",
|
||||
"Navigation_Events" : "Ereignisse",
|
||||
"Navigation_Report" : "Bericht",
|
||||
"Navigation_Maintenance" : "Wartung",
|
||||
"Navigation_Settings" : "Einstellung",
|
||||
"Navigation_SystemInfo" : "System info",
|
||||
@@ -317,6 +318,8 @@
|
||||
"HelpFAQ_Cat_Presence_401_text" : "Wenn dies geschieht hast du die Möglickeit, bei dem betreffenden Gerät (Detailsansicht) die Events zu löschen. Eine andere Möglichkeit wäre, das Gerät einzuschalten und zu warten, bis Pi.Alert mit dem nächsten Scan das Gerät als \"Online\" erkennt und anschließend das Gerät einfach wieder ausschalten. Nun sollte Pi.Alert mit dem nächsten Scan den Zustand des Gerätes ordentlich in der Datenbank vermerken.",
|
||||
"HelpFAQ_Cat_Network_600_head" : "Was bringt mir diese Seite?",
|
||||
"HelpFAQ_Cat_Network_600_text" : "Diese Seite soll dir die Möglichkeit bieten, die Belegung deiner Netzwerkgeräte abzubilden. Dazu kannst du einen oder mehrere Switches, WLANs, Router, etc. erstellen, sie ggf. mit einer Portanzahl versehen und bereits erkannte Geräte diesen zuordnen. Diese Zuordnung erfolgt in der Detailansicht, des zuzuordnenden Gerätes. So ist es dir möglich, schnell festzustellen an welchem Port ein Host angeschlossen und ob er online ist.",
|
||||
"REPORT_TITLE" : "Bericht",
|
||||
"REPORT_ERROR" : "Die gesuchte Seite ist vorübergehend nicht verfügbar. Bitte versuchen Sie es nach ein paar Sekunden erneut",
|
||||
"SYSTEM_TITLE" : "Systeminformationen"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
"Navigation_Devices" : "Devices",
|
||||
"Navigation_Presence" : "Presence",
|
||||
"Navigation_Events" : "Events",
|
||||
"Navigation_Report" : "Report",
|
||||
"Navigation_Network" : "Network",
|
||||
"Navigation_Plugins" : "Plugins",
|
||||
"Navigation_Maintenance" : "Maintenance",
|
||||
@@ -521,6 +522,8 @@
|
||||
"APPRISE_PAYLOAD_description" : "Select the payoad type sent to Apprise. For example <code>html</code> works well with emails, <code>text</code> with chat apps, such as Telegram.",
|
||||
"MQTT_display_name" : "MQTT",
|
||||
"MQTT_icon" : "<i class=\"fa fa-square-rss\"></i>",
|
||||
"REPORT_TITLE" : "Report",
|
||||
"REPORT_ERROR" : "The page you are looking for is temporarily unavailable, please try again after a few seconds",
|
||||
"REPORT_MQTT_name" : "Enable MQTT",
|
||||
"REPORT_MQTT_description" : "Enable sending notifications via <a target=\"_blank\" href=\"https://www.home-assistant.io/integrations/mqtt/\">MQTT</a> to your Home Assistance instance.",
|
||||
"MQTT_BROKER_name" : "MQTT broker URL",
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"Navigation_Devices" : "Dispositivos",
|
||||
"Navigation_Presence" : "Historial",
|
||||
"Navigation_Events" : "Eventos",
|
||||
"Navigation_Report" : "Reporte",
|
||||
"Navigation_Network" : "Red",
|
||||
"Navigation_Plugins" : "Plugins",
|
||||
"Navigation_Maintenance" : "Mantenimiento",
|
||||
@@ -503,6 +504,8 @@
|
||||
"APPRISE_PAYLOAD_description" : "Seleccione el tipo de carga útil enviada a Apprise. Por ejemplo, <code>html</code> funciona bien con correos electrónicos, <code>text</code> con aplicaciones de chat, como Telegram.",
|
||||
"MQTT_display_name" : "MQTT",
|
||||
"MQTT_icon" : "<i class=\"fa fa-square-rss\"></i>",
|
||||
"REPORT_TITLE" : "Reporte",
|
||||
"REPORT_ERROR" : "La página que está buscando no está disponible temporalmente, inténtelo de nuevo después de unos segundos",
|
||||
"REPORT_MQTT_name" : "Habilitar MQTT",
|
||||
"REPORT_MQTT_description" : "Habilitar el envío de notificaciones a través de <a target=\"_blank\" href=\"https://www.home-assistant.io/integrations/mqtt/\">MQTT</a> a su Home Assistance.",
|
||||
"MQTT_BROKER_name" : "URL del broker MQTT",
|
||||
|
||||
54
front/report.php
Normal file
54
front/report.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Pi.Alert #
|
||||
# Open Source Network Guard / WIFI & LAN intrusion detector #
|
||||
# #
|
||||
# report.php - Front module. Server side. Manage Devices #
|
||||
#---------------------------------------------------------------------------------#
|
||||
# Puche 2021 pi.alert.application@gmail.com GNU GPLv3 #
|
||||
# jokob-sk 2022 jokob.sk@gmail.com GNU GPLv3 #
|
||||
# leiweibau 2022 https://github.com/leiweibau GNU GPLv3 #
|
||||
# cvc90 2023 https://github.com/cvc90 GNU GPLv3 #
|
||||
#---------------------------------------------------------------------------------#
|
||||
|
||||
require 'php/templates/header.php';
|
||||
|
||||
?>
|
||||
<!-- Page ------------------------------------------------------------------ -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Content header--------------------------------------------------------- -->
|
||||
<section class="content-header">
|
||||
<?php require 'php/templates/notification.php'; ?>
|
||||
<h1 id="pageTitle">
|
||||
<?= lang('REPORT_TITLE') ;?>
|
||||
</h1>
|
||||
</section>
|
||||
|
||||
<!-- Main content ---------------------------------------------------------- -->
|
||||
<section class="content">
|
||||
|
||||
<?php
|
||||
// Check if the page exists
|
||||
if (file_exists("log/report_output.html")) {
|
||||
// Load the page
|
||||
include("log/report_output.html");
|
||||
} else {
|
||||
// Display an error message
|
||||
echo "<h2>Error</h2>";
|
||||
echo lang('REPORT_ERROR');
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- /.content -->
|
||||
<?php
|
||||
require 'php/templates/footer.php';
|
||||
?>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
<!-- ----------------------------------------------------------------------- -->
|
||||
Reference in New Issue
Block a user