chore:PHOLUS removal

This commit is contained in:
jokob-sk
2024-11-22 20:32:49 +11:00
parent e776c3ac41
commit 0e438ffd57
29 changed files with 64 additions and 3191 deletions

View File

@@ -15,6 +15,7 @@
<?php
require 'php/templates/header.php';
require 'php/components/graph_online_history.php';
// check permissions
$dbPath = "../db/app.db";
@@ -55,6 +56,7 @@
<div class="box-body">
<div class="chart">
<script src="lib/AdminLTE/bower_components/chart.js/Chart.js?v=<?php include 'php/templates/version.php'; ?>"></script>
<!-- The online history chart is rendered here -->
<canvas id="OnlineChart" style="width:100%; height: 150px; margin-bottom: 15px;"></canvas>
</div>
</div>
@@ -62,40 +64,6 @@
</div>
</div>
</div>
<script src="js/graph_online_history.js"></script>
<script>
$.get('api/table_online_history.json?nocache=' + Date.now(), function(res) {
// Extracting data from the JSON response
var timeStamps = [];
var onlineCounts = [];
var downCounts = [];
var offlineCounts = [];
var archivedCounts = [];
res.data.forEach(function(entry) {
var dateObj = new Date(entry.Scan_Date);
var formattedTime = dateObj.toLocaleTimeString([], {hour: '2-digit', minute: '2-digit', hour12: false});
timeStamps.push(formattedTime);
onlineCounts.push(entry.Online_Devices);
downCounts.push(entry.Down_Devices);
offlineCounts.push(entry.Offline_Devices);
archivedCounts.push(entry.Archived_Devices);
});
// Call your presenceOverTime function after data is ready
presenceOverTime(
timeStamps,
onlineCounts,
offlineCounts,
archivedCounts,
downCounts
);
}).fail(function() {
// Handle any errors in fetching the data
console.error('Error fetching online history data.');
});
</script>
<!-- datatable ------------------------------------------------------------- -->
<div class="row">