Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ZoneMinder/zoneminder
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jun 17, 2024
2 parents c24f61e + 70c5d87 commit acbc994
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 16 deletions.
30 changes: 22 additions & 8 deletions web/skins/classic/views/js/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -1219,12 +1219,16 @@ function getStat() {

//switch ( ( eventData[key] && eventData[key].length ) ? key : 'n/a') {
switch (key) {
case 'Frames':
tdString = '<a href="?view=frames&amp;eid=' + eventData.Id + '">' + eventData[key] + '</a>';
case 'Name':
tdString = eventData[key] + ' (Id:' + eventData['Id'] + ')';
break;
case 'AlarmFrames':
case 'Frames':
tdString = '<a href="?view=frames&amp;eid=' + eventData.Id + '">' + eventData[key] + '</a>';
tdString += ' Alarm:' + '<a href="?view=frames&amp;eid=' + eventData.Id + '">' + eventData['AlarmFrames'] + '</a>';
break;
//case 'AlarmFrames':
// tdString = '<a href="?view=frames&amp;eid=' + eventData.Id + '">' + eventData[key] + '</a>';
// break;
case 'Location':
tdString = eventData.Latitude + ', ' + eventData.Longitude;
break;
Expand All @@ -1247,21 +1251,31 @@ function getStat() {
tdString = eventData[key];
}
break;
case 'MaxScore':
tdString = '<a href="?view=frame&amp;eid=' + eventData.Id + '&amp;fid=0">' + eventData[key] + '</a>';
//case 'MaxScore':
// tdString = '<a href="?view=frame&amp;eid=' + eventData.Id + '&amp;fid=0">' + eventData[key] + '</a>';
// break;
case 'Score':
tdString = 'Total:' + eventData['TotScore'] + ' '+ '<a href="?view=frame&amp;eid=' + eventData.Id + '&amp;fid=0">' + 'Max:' + eventData['MaxScore'] + '</a>' + ' Avg:' + eventData['AvgScore'];
break;
case 'n/a':
tdString = 'n/a';
break;
case 'Resolution':
tdString = eventData.Width + 'x' + eventData.Height;
break;
case 'DiskSpace':
tdString = eventData[key] + ' on ' + eventData['Storage'];
break;
case 'Path':
tdString = '<a href="?view=files&amp;path='+eventData.Path+'">'+eventData.Path+'</a>';
break;
case 'Archived':
case 'Emailed':
tdString = eventData[key] ? yesStr : noStr;
//case 'Archived':
//case 'Emailed':
// tdString = eventData[key] ? yesStr : noStr;
// break;
case 'Info':
tdString = translate["Archived"] + ':' + (eventData['Archived'] ? yesStr : noStr);
tdString += ', ' + translate["Emailed"] + ':' + (eventData['Emailed'] ? yesStr : noStr);
break;
case 'Length':
const date = new Date(0); // Have to init it fresh. setSeconds seems to add time, not set it.
Expand Down
21 changes: 13 additions & 8 deletions web/skins/classic/views/js/event.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
var noStr = '<?php echo translate('No') ?>';

var eventDataStrings = {
Id: '<?php echo translate('EventId') ?>',
<!--Id: '<?php echo translate('EventId') ?>',-->
Name: '<?php echo translate('Name') ?>',
MonitorId: '<?php echo translate('AttrMonitorId') ?>',
MonitorName: '<?php echo translate('Monitor') ?>',
Expand All @@ -65,16 +65,18 @@
EndDateTimeFormatted: '<?php echo translate('AttrEndTime') ?>',
Length: '<?php echo translate('Duration') ?>',
Frames: '<?php echo translate('AttrFrames') ?>',
AlarmFrames: '<?php echo translate('AttrAlarmFrames') ?>',
TotScore: '<?php echo translate('AttrTotalScore') ?>',
AvgScore: '<?php echo translate('AttrAvgScore') ?>',
MaxScore: '<?php echo translate('AttrMaxScore') ?>',
<!--AlarmFrames: '<?php echo translate('AttrAlarmFrames') ?>',-->
<!--TotScore: '<?php echo translate('AttrTotalScore') ?>',-->
<!--AvgScore: '<?php echo translate('AttrAvgScore') ?>',-->
<!--MaxScore: '<?php echo translate('AttrMaxScore') ?>',-->
Score: '<?php echo translate('Score') ?>',
Resolution: '<?php echo translate('Resolution') ?>',
DiskSpace: '<?php echo translate('DiskSpace') ?>',
Storage: '<?php echo translate('Storage') ?>',
<!--Storage: '<?php echo translate('Storage') ?>',-->
Path: '<?php echo translate('Path') ?>',
Archived: '<?php echo translate('Archived') ?>',
Emailed: '<?php echo translate('Emailed') ?>'
<!--Archived: '<?php echo translate('Archived') ?>',-->
<!--Emailed: '<?php echo translate('Emailed') ?>'-->
Info: '<?php echo translate('Info') ?>'
};
if ( parseInt(ZM_OPT_USE_GEOLOCATION) ) {
eventDataStrings.Location = '<?php echo translate('Location') ?>';
Expand Down Expand Up @@ -113,4 +115,7 @@
"Live": "<?php echo translate('Live') ?>",
"Edit": "<?php echo translate('Edit') ?>",
"All Events": "<?php echo translate('All Events') ?>",
"Info": "<?php echo translate('Info') ?>",
"Archived": "<?php echo translate('Archived') ?>",
"Emailed": "<?php echo translate('Emailed') ?>",
};

0 comments on commit acbc994

Please sign in to comment.