spacing and fixes

This commit is contained in:
Isaac Connor 2017-11-09 15:03:23 -05:00
parent 821717b06e
commit 57a53f6fdd
7 changed files with 23 additions and 9 deletions

View File

@ -593,6 +593,7 @@ bool EventStream::sendFrame( int delta_us ) {
FILE *fdj = NULL;
// This needs to be abstracted. If we are saving jpgs, then load the capture file. If we are only saving analysis frames, then send that.
// // This is also wrong, need to have this info stored in the event! FIXME
if ( monitor->GetOptSaveJPEGs() & 1 ) {
snprintf( filepath, sizeof(filepath), staticConfig.capture_file_format, event_data->path, curr_frame_id );
} else if ( monitor->GetOptSaveJPEGs() & 2 ) {

View File

@ -55,9 +55,9 @@ class MonitorStream : public StreamBase {
bool sendFrame( const char *filepath, struct timeval *timestamp );
bool sendFrame( Image *image, struct timeval *timestamp );
void processCommand( const CmdMsg *msg );
void SingleImage( int scale=100 );
void SingleImageRaw( int scale=100 );
void SingleImageZip( int scale=100 );
void SingleImage( int scale=100 );
void SingleImageRaw( int scale=100 );
void SingleImageZip( int scale=100 );
public:
MonitorStream() : playback_buffer( 0 ), delayed( false ), frame_count( 0 ) {

View File

@ -14,6 +14,7 @@ private $defaults = array(
'Width' => null,
'Height' => null,
'Orientation' => null,
'AnalysisFPSLimit' => null,
);
private $control_fields = array(
'Name' => '',

View File

@ -68,11 +68,7 @@ th {
color: #016A9d;
}
a:link {
color: #7f7fb2;
text-decoration: none;
}
a:link,
a:visited {
color: #7f7fb2;
text-decoration: none;

View File

@ -25,6 +25,7 @@
var popupOptions = "resizable,scrollbars,status=no,toolbar=yes";
function checkSize() {
if ( 0 ) {
if (window.outerHeight) {
var w = window.outerWidth;
var prevW = w;
@ -37,6 +38,7 @@ function checkSize() {
if (w != prevW || h != prevH)
window.resizeTo(w, h);
}
}
}
// Deprecated

View File

@ -84,6 +84,7 @@ if ( !empty($page) ) {
$eventsSql .= ' limit 0, '.$limit;
}
if ( 0 ) {
$maxWidth = 0;
$maxHeight = 0;
$archived = false;
@ -103,6 +104,7 @@ foreach ( dbFetchAll( $eventsSql ) as $event_row ) {
else
$unarchived = true;
}
}
$maxShortcuts = 5;
$pagination = getPagination( $pages, $page, $maxShortcuts, $filterQuery.$sortQuery.'&limit='.$limit );
@ -160,7 +162,12 @@ if ( $pagination ) {
$count = 0;
$disk_space_total = 0;
foreach ( $events as $event ) {
$results = dbQuery( $eventsSql );
while ( $event_row = dbFetchNext( $results ) ) {
$event = new Event( $event_row );
#foreach ( dbFetchAll( $eventsSql ) as $event_row ) {
#$events[] = $event = new Event( $event_row );
#foreach ( $events as $event ) {
if ( ($count++%ZM_WEB_EVENTS_PER_PAGE) == 0 ) {
?>
<tr>

View File

@ -91,8 +91,11 @@ function Monitor( monitorData ) {
console.error( respObj.message );
// Try to reload the image stream.
if ( stream ) {
if ( stream.src ) {
console.log('Reloading stream: ' + stream.src );
stream.src = stream.src.replace(/rand=\d+/i, 'rand='+Math.floor((Math.random() * 1000000) ));
} else {
}
} else {
console.log( 'No stream to reload?' );
}
@ -118,6 +121,9 @@ function Monitor( monitorData ) {
this.onFailure = function( xhr ) {
console.log('onFailure: ' );
console.log(xhr );
// Requeue
var streamCmdTimeout = statusRefreshTimeout;
this.streamCmdTimer = this.streamCmdQuery.delay( streamCmdTimeout, this );
};
this.streamCmdReq = new Request.JSON( {
@ -246,6 +252,7 @@ function changeSize() {
Cookie.write( 'zmMontageScale', '', { duration: 10*365 } );
Cookie.write( 'zmMontageWidth', width, { duration: 10*365 } );
Cookie.write( 'zmMontageHeight', height, { duration: 10*365 } );
selectLayout('#zmMontageLayout');
} // end function changeSize()
function changeScale() {