Skip to content

Commit 947cf7b

Browse files
Merge remote-tracking branch 'upstream/copilot/refactor-console-view-table'
2 parents d0659b5 + 61137ac commit 947cf7b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

web/ajax/console.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,14 @@ function queryRequest() {
331331
// FPS and bandwidth
332332
$row['CaptureFPS'] = isset($monitor['CaptureFPS']) ? $monitor['CaptureFPS'] : '0.00';
333333
$row['AnalysisFPS'] = isset($monitor['AnalysisFPS']) ? $monitor['AnalysisFPS'] : '0.00';
334-
$row['CaptureBandwidth'] = isset($monitor['CaptureBandwidth']) ? $monitor['CaptureBandwidth'] : 0;
334+
335+
// Format bandwidth with units (bytes per second) - use human_filesize for consistency
336+
$bandwidth = isset($monitor['CaptureBandwidth']) ? $monitor['CaptureBandwidth'] : 0;
337+
if ($bandwidth > 0) {
338+
$row['CaptureBandwidth'] = human_filesize($bandwidth).'/s';
339+
} else {
340+
$row['CaptureBandwidth'] = '';
341+
}
335342
$row['Analysing'] = isset($monitor['Analysing']) ? $monitor['Analysing'] : 'None';
336343
$row['Recording'] = isset($monitor['Recording']) ? $monitor['Recording'] : 'None';
337344
$row['ONVIF_Event_Listener'] = isset($monitor['ONVIF_Event_Listener']) ? $monitor['ONVIF_Event_Listener'] : 0;

web/skins/classic/css/base/views/console.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@
6464
vertical-align: middle;
6565
}
6666

67+
.consoleTable thead th .material-icons {
68+
vertical-align: middle;
69+
line-height: inherit;
70+
}
71+
6772
.consoleTable tfoot td {
6873
padding-top: 4px;
6974
vertical-align: middle;

0 commit comments

Comments
 (0)