Bug 177 - Further integration/improvements to timeline view.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1507 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-10-16 21:24:52 +00:00
parent 044450901b
commit c23abfd74d
5 changed files with 92 additions and 83 deletions

View File

@ -391,3 +391,4 @@ insert into Controls values (3,'Sony VISCA','Local','/usr/local/bin/zmcontrol-vi
INSERT INTO Controls VALUES (4,'Axis API v2','Remote','/usr/local/bin/zmcontrol-axis-v2.pl',0,0,0,1,0,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,1,1,1,1,1,0,1,0,1,-360,360,1,90,0,NULL,NULL,0,NULL,1,-360,360,1,90,0,NULL,NULL,0,NULL,0,0);
insert into Controls values (5,'KX-HCM10','Remote','/usr/local/bin/zmcontrol-kx-hcm10.pl',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
update Monitors set WebColour = concat( '#', hex(14*rand()),hex(15*rand()),hex(14*rand()),hex(15*rand()),hex(14*rand()),hex(15*rand()) );

View File

@ -84,6 +84,7 @@ switch ( $bandwidth )
define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_H_VIDEO_BITRATE ); // What the bitrate of any streamed video should be
define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_H_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be
define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_H_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_H_EVENTS_VIEW ); // What the default view of multiple events should be.
break;
}
case "medium" :
@ -98,6 +99,7 @@ switch ( $bandwidth )
define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_M_VIDEO_BITRATE ); // What the bitrate of any streamed video should be
define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_M_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be
define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_M_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_M_EVENTS_VIEW ); // What the default view of multiple events should be.
break;
}
case "low" :
@ -112,6 +114,7 @@ switch ( $bandwidth )
define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_L_VIDEO_BITRATE ); // What the bitrate of any streamed video should be
define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_L_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be
define( "ZM_WEB_IMAGE_SCALING", ZM_WEB_L_IMAGE_SCALING ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling
define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_L_EVENTS_VIEW ); // What the default view of multiple events should be.
break;
}
case "mobile" : // Very incomplete at present

View File

@ -235,6 +235,9 @@ else
<td align="center" class="smallhead"><?= $zmSlangMark ?></td>
</tr>
<?php
$events_view = ZM_WEB_EVENTS_VIEW;
$events_window = 'zm'.ucfirst(ZM_WEB_EVENTS_VIEW);
$event_count = 0;
$hour_event_count = 0;
$day_event_count = 0;
@ -294,12 +297,12 @@ foreach( $monitors as $monitor )
<?php } else { ?>
<td align="left" class="text"><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=monitor&mid=".$monitor['Id']."', 'zmMonitor', ".$jws['monitor']['w'].", ".$jws['monitor']['h']." );", "<span class=\"$dclass\">".preg_replace( '/^.*@/', '', $monitor['Host'] )."</span>", canEdit( 'Monitors' ) ) ?></td>
<?php } ?>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['EventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+hour', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['HourEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+day', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['DayEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+week', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['WeekEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+month', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['MonthEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=1', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $monitor['ArchEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['EventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+hour', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['HourEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+day', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['DayEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+week', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['WeekEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1+month', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['MonthEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&val2=1', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $monitor['ArchEventCount'], canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=zones&mid=".$monitor['Id']."', 'zmZones', ".($monitor['Width']+$jws['zones']['w']).", ".($monitor['Height']+$jws['zones']['h'])." );", $monitor['ZoneCount'], canView( 'Monitors' ) ) ?></td>
<td align="center" class="text"><input type="checkbox" name="mark_mids[]" value="<?= $monitor['Id'] ?>" onClick="configureButton( document.monitor_form, 'mark_mids' );"<?php if ( !canEdit( 'Monitors' ) || $user['MonitorIds'] ) {?> disabled<?php } ?>></td>
</tr>
@ -313,12 +316,12 @@ foreach( $monitors as $monitor )
<td colspan="2" align="center">
<input type="button" value="<?= $zmSlangAddNewMonitor ?>" class="form" onClick="javascript: newWindow( '<?= $PHP_SELF ?>?view=monitor', 'zmMonitor', <?= $jws['monitor']['w'] ?>, <?= $jws['monitor']['h'] ?>);"<?php if ( !canEdit( 'Monitors' ) || $user['MonitorIds'] ) {?> disabled<?php } ?>>
</td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=1&attr1=Archived&val1=0', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+hour', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $hour_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+day', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $day_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+week', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $week_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+month', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $month_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=1&attr1=Archived&val1=1', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $arch_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=1&attr1=Archived&val1=0', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+hour', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $hour_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+day', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $day_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+week', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $week_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+month', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $month_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=$events_view&page=1&filter=1&trms=1&attr1=Archived&val1=1', '$events_window', ".$jws[$events_view]['w'].", ".$jws[$events_view]['h']." );", $arch_event_count, canView( 'Events' ) ) ?></td>
<td align="right" class="text"><?= $zone_count ?></td>
<td align="center"><input type="submit" name="delete_btn" value="<?= $zmSlangDelete ?>" class="form" disabled></td>
</tr>

View File

@ -95,6 +95,7 @@ else
$monitor['MaxFPS'] = 0;
$monitor['FPSReportInterval'] = 1000;
$monitor['RefBlendPerc'] = 10;
$monitor['WebColour'] = 'red';
$monitor['Triggers'] = "";
}
if ( !isset( $new_monitor ) )
@ -326,6 +327,7 @@ if ( $tab != 'misc' )
<input type="hidden" name="new_monitor[MaxFPS]" value="<?= $new_monitor['MaxFPS'] ?>">
<input type="hidden" name="new_monitor[FPSReportInterval]" value="<?= $new_monitor['FPSReportInterval'] ?>">
<input type="hidden" name="new_monitor[RefBlendPerc]" value="<?= $new_monitor['RefBlendPerc'] ?>">
<input type="hidden" name="new_monitor[WebColour]" value="<?= $new_monitor['WebColour'] ?>">
<?php
}
if ( ZM_OPT_X10 && $tab != 'x10' )
@ -453,7 +455,7 @@ switch ( $tab )
{
?>
<tr><td align="left" class="text"><?= $zmSlangControllable ?></td><td align="left" class="text"><input type="checkbox" name="new_monitor[Controllable]" value="1" class="form-noborder"<?php if ( !empty($new_monitor['Controllable']) ) { ?> checked<?php } ?>></td></tr>
<tr><td align="left" class="text"><?= $zmSlangControlType ?></td><td class="text"><?= buildSelect( "new_monitor[ControlId]", $control_types, 'loadLocations( document.monitor_form )' ); ?>&nbsp;<a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=controlcaps', 'zmControlCaps', <?= $jws['controlcaps']['w'] ?>, <?= $jws['controlcaps']['h'] ?> );"><?= $zmSlangEdit ?></a></td></tr>
<tr><td align="left" class="text"><?= $zmSlangControlType ?></td><td class="text"><?= buildSelect( "new_monitor[ControlId]", $control_types, 'loadLocations( document.monitor_form )' ); ?><?php if ( canEdit( 'Control' ) ) { ?>&nbsp;<a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=controlcaps', 'zmControlCaps', <?= $jws['controlcaps']['w'] ?>, <?= $jws['controlcaps']['h'] ?> );"><?= $zmSlangEdit ?></a><?php } ?></td></tr>
<tr><td align="left" class="text"><?= $zmSlangControlDevice ?></td><td align="left" class="text"><input type="text" name="new_monitor[ControlDevice]" value="<?= $new_monitor['ControlDevice'] ?>" size="32" class="form"></td></tr>
<tr><td align="left" class="text"><?= $zmSlangControlAddress ?></td><td align="left" class="text"><input type="text" name="new_monitor[ControlAddress]" value="<?= $new_monitor['ControlAddress'] ?>" size="32" class="form"></td></tr>
<tr><td align="left" class="text"><?= $zmSlangAutoStopTimeout ?></td><td align="left" class="text"><input type="text" name="new_monitor[AutoStopTimeout]" value="<?= $new_monitor['AutoStopTimeout'] ?>" size="4" class="form"></td></tr>
@ -478,6 +480,7 @@ switch ( $tab )
<tr><td align="left" class="text"><?= $zmSlangMaximumFPS ?></td><td align="left" class="text"><input type="text" name="new_monitor[MaxFPS]" value="<?= $new_monitor['MaxFPS'] ?>" size="6" class="form"></td></tr>
<tr><td align="left" class="text"><?= $zmSlangFPSReportInterval ?></td><td align="left" class="text"><input type="text" name="new_monitor[FPSReportInterval]" value="<?= $new_monitor['FPSReportInterval'] ?>" size="6" class="form"></td></tr>
<tr><td align="left" class="text"><?= $zmSlangRefImageBlendPct ?></td><td align="left" class="text"><input type="text" name="new_monitor[RefBlendPerc]" value="<?= $new_monitor['RefBlendPerc'] ?>" size="4" class="form"></td></tr>
<tr><td align="left" class="text"><?= $zmSlangWebColour ?></td><td align="left" class="text"><input type="text" name="new_monitor[WebColour]" value="<?= $new_monitor['WebColour'] ?>" size="10" class="form" onChange="document.getElementById('Swatch').style.backgroundColor=this.value">&nbsp;&nbsp;<span id="Swatch" style="background-color: <?= $new_monitor['WebColour'] ?>; border: 1px solid black; width: 20px; height: 10px; padding: 0px;">&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr>
<?php
break;
}

View File

@ -108,7 +108,7 @@ while ( $row = mysql_fetch_assoc( $result ) )
}
$range_sql = "select min(E.StartTime) as MinTime, max(E.EndTime) as MaxTime from Events as E inner join Monitors as M on (E.MonitorId = M.Id) where not isnull(E.StartTime) and not isnull(E.EndTime)";
$events_sql = "select E.Id,E.Name,E.StartTime,E.EndTime,E.Length,E.Frames,E.MaxScore,E.MonitorId from Events as E inner join Monitors as M on (E.MonitorId = M.Id) where not isnull(StartTime)";
$events_sql = "select E.Id,E.Name,E.StartTime,E.EndTime,E.Length,E.Frames,E.MaxScore,E.Cause,E.Notes,E.MonitorId from Events as E inner join Monitors as M on (E.MonitorId = M.Id) where not isnull(StartTime)";
if ( $user['MonitorIds'] )
{
@ -655,19 +655,19 @@ function drawYGrid( $chart, $scale, $label_class, $tick_class, $grid_class )
if ( $label_class )
{
?>
<div class="<?= $label_class ?>" style="bottom: <?= $y-3 ?>px;"><?= $label ?></div>
<div class="<?= $label_class ?>" style="top: <?= $chart['graph']['height']-($y+8) ?>px;"><?= $label ?></div>
<?php
}
if ( $tick_class )
{
?>
<div class="<?= $tick_class ?>" style="bottom: <?= $y ?>px;"></div>
<div class="<?= $tick_class ?>" style="top: <?= $chart['graph']['height']-($y+2) ?>px;"></div>
<?php
}
if ( $grid_class )
{
?>
<div class="<?= $grid_class ?>" style="bottom: <?= $y ?>px;<?= $i <= 0?' border-top: solid 1px black;':'' ?>"></div>
<div class="<?= $grid_class ?>" style="top: <?= $chart['graph']['height']-($y+2) ?>px;<?= $i <= 0?' border-top: solid 1px black;':'' ?>"></div>
<?php
}
}
@ -689,7 +689,13 @@ function getSlotLoadImageBehaviour( $slot )
$image_path = $anal_image;
}
return( "\"loadEventImage( '".$image_path."', '".$monitors[$slot['event']['MonitorId']]['Name']."<br>".$slot['event']['Name'].(isset($slot['frame'])?("(".$slot['frame']['FrameId'].")"):"")."<br>".strftime( "%m/%d %H:%M:%S", strtotime($slot['event']['StartTime']) )."<br>".$slot['event']['Length']."s', '".$PHP_SELF."?view=event&eid=".$slot['event']['Id']."', ".($monitors[$slot['event']['MonitorId']]['Width']+$jws['event']['w']).", ".($monitors[$slot['event']['MonitorId']]['Height']+$jws['event']['h'])." );\"" );
$annotation = $monitors[$slot['event']['MonitorId']]['Name'].
"<br>".$slot['event']['Name'].(isset($slot['frame'])?("(".$slot['frame']['FrameId'].")"):"").
"<br>".strftime( "%y/%m/%d %H:%M:%S", strtotime($slot['event']['StartTime']) ).
" - ".$slot['event']['Length']."s".
"<br>".htmlentities($slot['event']['Cause']).
(!empty($slot['event']['Notes'])?("<br>".htmlentities($slot['event']['Notes'])):"");
return( "\"loadEventImage( '".$image_path."', '".$annotation."', '".$PHP_SELF."?view=event&eid=".$slot['event']['Id']."', ".($monitors[$slot['event']['MonitorId']]['Width']+$jws['event']['w']).", ".($monitors[$slot['event']['MonitorId']]['Height']+$jws['event']['h'])." );\"" );
}
function getSlotViewEventBehaviour( $slot )
@ -718,8 +724,6 @@ function closeWindow()
{
window.close();
}
//var width = document.screen.availWidth;
//var height = document.screen.availHeight;
window.focus();
@ -738,8 +742,7 @@ function loadEventImage( image_path, image_label, image_link, image_width, image
#ChartBox {
position: relative;
text-align: center;
vertical-align: middle;
border: 1px solid grey;
border: 1px solid #666666;
width: <?= $chart['width'] ?>px;
height: <?= $chart['height'] ?>px;
padding: 0px;
@ -755,11 +758,16 @@ function loadEventImage( image_path, image_label, image_link, image_width, image
font-weight: bold;
line-height: 20px
}
#ChartBox #List {
position: absolute;
top: 5px;
left: 20px;
height: 15;
}
#ChartBox #Close {
position: absolute;
top: 5px;
right: 20px;
margin: auto;
height: 15;
}
#ChartBox #TopPanel {
@ -769,17 +777,6 @@ function loadEventImage( image_path, image_label, image_link, image_width, image
padding: 0px;
margin: auto;
}
#ChartBox #TopPanel a {
border: 1px solid #cccccc;
background-color: #eeeeee;
padding: 5px;
}
#ChartBox #TopPanel a:link, a:visited {
text-decoration: none
}
#ChartBox #TopPanel a:hover {
text-decoration: none
}
#ChartBox #TopPanel #LeftNav {
position: absolute;
top: 40%;
@ -793,13 +790,21 @@ function loadEventImage( image_path, image_label, image_link, image_width, image
#ChartBox #TopPanel #RightNav {
text-align: left;
position: absolute;
top: 40%;
top: 50%;
left: 50%;
width: 180px;
height: 70px
padding: 0px;
margin: auto;
}
#ChartBox #TopPanel #RightNav a {
border: 1px solid #cccccc;
background-color: #eeeeee;
padding: 5px;
}
#ChartBox #TopPanel #RightNav a:link,a:visited,a:hover {
text-decoration: none
}
#ChartBox #TopPanel #Image {
position: absolute;
right: 50%;
@ -810,8 +815,7 @@ function loadEventImage( image_path, image_label, image_link, image_width, image
}
#ChartBox #TopPanel #Image img{
position: relative;
vertical-align: middle;
bottom: 0px;
top: 0px;
height: <?= $chart['image']['height'] ?>px;
background-color: #f8f8f8;
margin: auto;
@ -835,7 +839,6 @@ function loadEventImage( image_path, image_label, image_link, image_width, image
#ChartBox #TopPanel #Key {
position: absolute;
text-align: left;
vertical-align: bottom;
margin: auto;
bottom: 30px;
left: 50%;
@ -895,12 +898,11 @@ if ( $mode == "overlay" )
#ChartBox #ChartPanel #Activity {
position: absolute;
text-align: center;
vertical-align: top;
top: 0px;
left: 0px;
width: <?= $chart['graph']['width'] ?>px;
height: <?= $chart['graph']['activity_height'] ?>px;
padding: 0px;
margin: auto;
}
<?php
$top = $chart['graph']['activity_height'];
@ -911,18 +913,17 @@ if ( $mode == "overlay" )
#ChartBox #ChartPanel #Events<?= $monitor_id ?> {
position: absolute;
text-align: center;
vertical-align: middle;
top: <?= $top ?>px;
left: 0px;
width: <?= $chart['graph']['width'] ?>px;
height: <?= $chart['graph']['event_bar_height'] ?>px;
padding: 0px;
margin: auto;
background-color: #fcfcfc;
<?php
if ( $event_bar_count < count($monitor_ids) )
{
?>
border-bottom: 1px solid lightgrey;
border-bottom: 1px solid #cccccc;
<?php
}
?>
@ -968,17 +969,16 @@ elseif ( $mode == "split" )
#ChartBox #ChartPanel #Activity<?= $monitor_id ?> {
position: absolute;
text-align: center;
vertical-align: top;
top: <?= $top ?>px;
left: 0px;
width: <?= $chart['graph']['width'] ?>px;
height: <?= $chart['graph']['activity_bar_height'] ?>px;
padding: 0px;
margin: auto;
<?php
if ( $bar_count < count($monitor_ids) )
{
?>
border-bottom: 1px solid lightgrey;
border-bottom: 1px solid #cccccc;
<?php
}
?>
@ -986,12 +986,11 @@ elseif ( $mode == "split" )
#ChartBox #ChartPanel #Events<?= $monitor_id ?> {
position: absolute;
text-align: center;
vertical-align: middle;
top: <?= $top+$chart['graph']['activity_bar_height']+1 ?>px;
left: 0px;
width: <?= $chart['graph']['width'] ?>px;
height: <?= $chart['graph']['event_bar_height'] ?>px;
padding: 0px;
margin: auto;
background-color: #fcfcfc;
<?php
if ( $bar_count < count($monitor_ids) )
@ -1011,14 +1010,14 @@ elseif ( $mode == "split" )
foreach ( array_keys($monitor_ids) as $monitor_id )
{
?>
div.activity<?= $monitor_id ?> {
#ChartBox #ChartPanel #Activity<?= $mode=='split'?$monitor_id:'' ?> div.activity<?= $monitor_id ?> {
position: absolute;
bottom: 0px;
z-index: 3;
width: 1px;
background-color: <?= $monitors[$monitor_id]['WebColour'] ?>;
}
div.event<?= $monitor_id ?> {
#ChartBox #ChartPanel #Events<?= $monitor_id ?> div.event<?= $monitor_id ?> {
position: absolute;
height: <?= $chart['graph']['event_bar_height'] ?>px;
bottom: 0px;
@ -1044,7 +1043,7 @@ div.majgridx {
top: 0px;
width: 1px;
height: <?= $chart['graph']['height'] ?>px;
border-left: dotted 1px grey;
border-left: dotted 1px #cccccc;
}
div.majtickx {
position: absolute;
@ -1070,7 +1069,7 @@ div.majgridy {
left: 0px;
height: 1px;
width: <?= $chart['graph']['width'] ?>px;
border-top: dotted 1px grey;
border-top: dotted 1px #cccccc;
}
div.majticky {
position: absolute;
@ -1083,7 +1082,6 @@ div.majticky {
div.majlabely {
position: absolute;
text-align: right;
vertical-align: middle;
z-index: 0;
left: -30px;
width: 20px;
@ -1103,6 +1101,7 @@ div.zoom {
</head>
<body>
<div id="ChartBox">
<div id="List" class="text"><?= makeLink( "javascript: scrollWindow( '$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1+day', 'zmEvents', ".$jws['events']['w'].", ".$jws['events']['h']." );", $zmSlangList, canView( 'Events' ) ) ?></a></div>
<div id="Title">Event Navigator</div>
<div id="Close" class="text"><a href="javascript: closeWindow();"><?= $zmSlangClose ?></a></div>
<div id="TopPanel">