improve history graph

- JS optimized to avoid duplicate code
- Page redesigned with the help of the frameworks provides by AdminLTE
- Modification of the chart for a better presentation
- Headlines changed
This commit is contained in:
leiweibau
2022-07-14 18:43:38 +02:00
parent dee25ff2e9
commit 2e970d0289
9 changed files with 264 additions and 267 deletions

View File

@@ -1,11 +1,10 @@
<?php
$Pia_Graph_Device_Time = array();
$Pia_Graph_Device_All = array();
$Pia_Graph_Device_Online = array();
$Pia_Graph_Device_Down = array();
$db = new SQLite3('../db/pialert.db');
$results = $db->query('SELECT * FROM Online_History ORDER BY Scan_Date DESC LIMIT 40');
$results = $db->query('SELECT * FROM Online_History ORDER BY Scan_Date DESC LIMIT 144');
while ($row = $results->fetchArray()) {
$time_raw = explode(' ', $row['Scan_Date']);
$time = explode(':', $time_raw[1]);
@@ -21,5 +20,5 @@ function pia_graph_devices_data($Pia_Graph_Array) {
echo ",";
}
}
$db->close();
?>

View File

@@ -15,6 +15,8 @@ $pia_lang['Device_Shortcut_NewDevices'] = 'Neue Geräte';
$pia_lang['Device_Shortcut_DownAlerts'] = 'Down Meldung';
$pia_lang['Device_Shortcut_Archived'] = 'Archiviert';
$pia_lang['Device_Shortcut_Devices'] = 'Geräte';
$pia_lang['Device_Shortcut_OnlineChart_a'] = 'Netzwerkaktivität über die letzten';
$pia_lang['Device_Shortcut_OnlineChart_b'] = 'Stunden';
$pia_lang['Device_TableHead_Name'] = 'Name';
$pia_lang['Device_TableHead_Owner'] = 'Eigentümer';
$pia_lang['Device_TableHead_Type'] = 'Typ';

View File

@@ -15,6 +15,8 @@ $pia_lang['Device_Shortcut_NewDevices'] = 'New Devices';
$pia_lang['Device_Shortcut_DownAlerts'] = 'Down Alerts';
$pia_lang['Device_Shortcut_Archived'] = 'Archived';
$pia_lang['Device_Shortcut_Devices'] = 'Devices';
$pia_lang['Device_Shortcut_OnlineChart_a'] = 'Network activity over last';
$pia_lang['Device_Shortcut_OnlineChart_b'] = 'hours';
$pia_lang['Device_TableHead_Name'] = 'Name';
$pia_lang['Device_TableHead_Owner'] = 'Owner';
$pia_lang['Device_TableHead_Type'] = 'Type';