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();
?>