tiny text under event name, add emailed column

This commit is contained in:
Andrew Bauer 2020-08-16 14:41:50 -05:00
parent ee31761627
commit 94d666b296
2 changed files with 31 additions and 23 deletions

View File

@ -149,6 +149,7 @@ while ( $event_row = dbFetchNext($results) ) {
<th data-sortable="true" data-field="Id"><?php echo translate('Id') ?></th> <th data-sortable="true" data-field="Id"><?php echo translate('Id') ?></th>
<th data-sortable="true" data-field="Name"><?php echo translate('Name') ?></th> <th data-sortable="true" data-field="Name"><?php echo translate('Name') ?></th>
<th data-sortable="true" data-field="Archived"><?php echo translate('Archived') ?></th> <th data-sortable="true" data-field="Archived"><?php echo translate('Archived') ?></th>
<th data-sortable="true" data-field="Emailed"><?php echo translate('Emailed') ?></th>
<th data-sortable="true" data-field="Monitor"><?php echo translate('Monitor') ?></th> <th data-sortable="true" data-field="Monitor"><?php echo translate('Monitor') ?></th>
<th data-sortable="true" data-field="Cause"><?php echo translate('Cause') ?></th> <th data-sortable="true" data-field="Cause"><?php echo translate('Cause') ?></th>
<th data-sortable="true" data-field="AttrStartTime"><?php echo translate('AttrStartTime') ?></th> <th data-sortable="true" data-field="AttrStartTime"><?php echo translate('AttrStartTime') ?></th>
@ -186,21 +187,26 @@ while ( $event_row = dbFetchNext($results) ) {
<tr<?php echo ( $event->Archived() ) ? ' class="archived"' : '' ?>> <tr<?php echo ( $event->Archived() ) ? ' class="archived"' : '' ?>>
<td data-checkbox="true"></td> <td data-checkbox="true"></td>
<td><a href="?view=event&amp;eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&amp;page=1">'.$event->Id() ?></a></td> <td><a href="?view=event&amp;eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&amp;page=1">'.$event->Id() ?></a></td>
<td><a href="?view=event&amp;eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&amp;page=1">'.validHtmlStr($event->Name()).($event->Archived()?'*':'') ?></a><br/>
<?php <td><a href="?view=event&amp;eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&amp;page=1">'.validHtmlStr($event->Name()).($event->Archived()?'*':'') ?></a>
if ( $event->Emailed() ) <?php
echo 'Emailed '; $archived = ( $event->Archived() ) ? translate('Archived') : '';
?> $emailed = ( $event->Emailed() ) ? translate('Emailed') : '';
echo '<br/><div class="small text-nowrap text-muted">'.$emailed.' '.$archived.'</div>';
?>
</td> </td>
<td><?php echo ( $event->Archived() ) ? 'Yes' : 'No' ?></td>
<td class="text-center"><?php echo ( $event->Archived() ) ? 'Yes' : 'No' ?></td>
<td class="text-center"><?php echo ( $event->Emailed() ) ? 'Yes' : 'No' ?></td>
<td><?php echo makePopupLink( '?view=monitor&amp;mid='.$event->MonitorId(), 'zmMonitor'.$event->MonitorId(), 'monitor', $event->MonitorName(), canEdit( 'Monitors' ) ) ?></td> <td><?php echo makePopupLink( '?view=monitor&amp;mid='.$event->MonitorId(), 'zmMonitor'.$event->MonitorId(), 'monitor', $event->MonitorName(), canEdit( 'Monitors' ) ) ?></td>
<td><?php echo makePopupLink( '?view=eventdetail&amp;eid='.$event->Id(), 'zmEventDetail', 'eventdetail', validHtmlStr($event->Cause()), canEdit( 'Events' ), 'title="'.htmlspecialchars($event->Notes()).'"' ) ?> <td><?php echo makePopupLink( '?view=eventdetail&amp;eid='.$event->Id(), 'zmEventDetail', 'eventdetail', validHtmlStr($event->Cause()), canEdit( 'Events' ), 'title="'.htmlspecialchars($event->Notes()).'"' ) ?>
<?php <?php
# display notes as small text # display notes as small text
if ( $event->Notes() ) { if ( $event->Notes() ) {
# if notes include detection objects, then link it to objdetect.jpg # if notes include detection objects, then link it to objdetect.jpg
if ( strpos($event->Notes(), 'detected:') !== false ) { if ( strpos($event->Notes(), 'detected:') !== false ) {
# make a link # make a link
echo makePopupLink( '?view=image&amp;eid='.$event->Id().'&amp;fid=objdetect', 'zmImage', echo makePopupLink( '?view=image&amp;eid='.$event->Id().'&amp;fid=objdetect', 'zmImage',
array('image', reScale($event->Width(), $scale), reScale($event->Height(), $scale)), array('image', reScale($event->Width(), $scale), reScale($event->Height(), $scale)),
'<div class="small text-nowrap text-muted"><u>'.$event->Notes().'</u></div>'); '<div class="small text-nowrap text-muted"><u>'.$event->Notes().'</u></div>');
@ -208,8 +214,9 @@ while ( $event_row = dbFetchNext($results) ) {
echo '<br/><div class="small text-nowrap text-muted">'.$event->Notes().'</div>'; echo '<br/><div class="small text-nowrap text-muted">'.$event->Notes().'</div>';
} }
} }
?> ?>
</td> </td>
<td><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->StartTime())) ?></td> <td><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->StartTime())) ?></td>
<td><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->EndTime()) ) ?></td> <td><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->EndTime()) ) ?></td>
<td><?php echo gmdate("H:i:s", $event->Length() ) ?></td> <td><?php echo gmdate("H:i:s", $event->Length() ) ?></td>

View File

@ -40,6 +40,7 @@ function initPage() {
$j('#eventTable').bootstrapTable(); $j('#eventTable').bootstrapTable();
table.bootstrapTable('hideColumn', 'Archived'); table.bootstrapTable('hideColumn', 'Archived');
table.bootstrapTable('hideColumn', 'Emailed');
table.on('check.bs.table uncheck.bs.table ' + table.on('check.bs.table uncheck.bs.table ' +
'check-all.bs.table uncheck-all.bs.table', 'check-all.bs.table uncheck-all.bs.table',
function() { function() {