Merge branch 'master' into storageareas

This commit is contained in:
Isaac Connor 2018-10-10 14:13:27 -04:00
commit 2881d2af3f
8 changed files with 33 additions and 25 deletions

View File

@ -3317,11 +3317,11 @@ __attribute__((noinline)) void std_fastblend(const uint8_t* col1, const uint8_t*
}
/* FastBlend Neon for AArch32 */
#if (defined(__arm__) && !defined(ZM_STRIP_NEON))
#if (defined(__arm__) && !defined(__armel__) && !defined(ZM_STRIP_NEON))
__attribute__((noinline,__target__("fpu=neon")))
#endif
void neon32_armv7_fastblend(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count, double blendpercent) {
#if (defined(__arm__) && !defined(ZM_STRIP_NEON))
#if (defined(__arm__) && !defined(__armel__) && !defined(ZM_STRIP_NEON))
static int8_t divider = 0;
static double current_blendpercent = 0.0;
@ -3708,11 +3708,11 @@ __attribute__((noinline)) void std_delta8_abgr(const uint8_t* col1, const uint8_
}
/* Grayscale Neon for AArch32 */
#if (defined(__arm__) && !defined(ZM_STRIP_NEON))
#if (defined(__arm__) && !defined(__armel__) && !defined(ZM_STRIP_NEON))
__attribute__((noinline,__target__("fpu=neon")))
#endif
void neon32_armv7_delta8_gray8(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count) {
#if (defined(__arm__) && !defined(ZM_STRIP_NEON))
#if (defined(__arm__) && !defined(__armel__) && !defined(ZM_STRIP_NEON))
/* Q0(D0,D1) = col1+0 */
/* Q1(D2,D3) = col1+16 */
@ -3784,11 +3784,11 @@ __attribute__((noinline)) void neon64_armv8_delta8_gray8(const uint8_t* col1, co
}
/* RGB32 Neon for AArch32 */
#if (defined(__arm__) && !defined(ZM_STRIP_NEON))
#if (defined(__arm__) && !defined(__armel__) && !defined(ZM_STRIP_NEON))
__attribute__((noinline,__target__("fpu=neon")))
#endif
void neon32_armv7_delta8_rgb32(const uint8_t* col1, const uint8_t* col2, uint8_t* result, unsigned long count, uint32_t multiplier) {
#if (defined(__arm__) && !defined(ZM_STRIP_NEON))
#if (defined(__arm__) && !defined(__armel__) && !defined(ZM_STRIP_NEON))
/* Q0(D0,D1) = col1+0 */
/* Q1(D2,D3) = col1+16 */

View File

@ -40,15 +40,16 @@ function CORSHeaders() {
# The following is left for future reference/use.
$valid = false;
$servers = dbFetchAll('SELECT * FROM Servers');
if ( sizeof($servers) <= 1 ) {
$Servers = Server::find();
if ( sizeof($Servers) <= 1 ) {
# Only need CORSHeaders in the event that there are multiple servers in use.
# ICON: Might not be true. multi-port?
return;
}
foreach( $servers as $row ) {
$Server = new Server($row);
if ( preg_match('/^'.preg_quote($Server->Url(),'/').'/', $_SERVER['HTTP_ORIGIN']) ) {
foreach( $Servers as $Server ) {
if ( preg_match('/^(https?:\/\/)?'.preg_quote($Server->Hostname(),'/').'/', $_SERVER['HTTP_ORIGIN']) ) {
$valid = true;
Logger::Debug("Setting Access-Controll-Allow-Origin from " . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
header('Access-Control-Allow-Headers: x-requested-with,x-request');
break;

View File

@ -124,6 +124,7 @@ echo output_link_if_exists( array(
jQuery("#flip").click(function(){
jQuery("#panel").slideToggle("slow");
jQuery("#flip").toggleClass('glyphicon-menu-down').toggleClass('glyphicon-menu-up');
Cookie.write( 'zmHeaderFlip', jQuery('#flip').hasClass('glyphicon-menu-up') ? 'up' : 'down', { duration: 10*365 } );
});
});
</script>
@ -303,7 +304,7 @@ if (isset($_REQUEST['filter']['Query']['terms']['attr'])) {
}
?>
<li><a href="?view=report_event_audit"<?php echo $view=='report_event_audit'?' class="selected"':''?>><?php echo translate('ReportEventAudit') ?></a></li>
<li><a href="#"><span id="flip" class="glyphicon glyphicon-menu-up pull-right"></span></a></li>
<li><a href="#"><span id="flip" class="glyphicon glyphicon-menu-<?php echo ( isset($_COOKIE['zmHeaderFlip']) and $_COOKIE['zmHeaderFlip'] == 'down') ? 'down' : 'up' ?> pull-right"></span></a></li>
</ul>
<?php } // end if canView('Monitors') ?>
@ -321,7 +322,7 @@ if (isset($_REQUEST['filter']['Query']['terms']['attr'])) {
</div>
</div><!-- End .navbar-collapse -->
</div> <!-- End .container-fluid -->
<div id="panel">
<div id="panel"<?php echo ( isset($_COOKIE['zmHeaderFlip']) and $_COOKIE['zmHeaderFlip'] == 'down' ) ? 'style="display:none;"' : '' ?>>
<?php
}//end reload null. Runs on full page load

View File

@ -56,7 +56,7 @@ foreach ( Group::find() as $G ) {
$groupSql = '';
if ( count($GroupsById) ) {
$html .= '<span id="groupControl"><label>'. translate('Group') .':</label>';
$html .= '<span id="groupControl"><label>'. translate('Group') .'</label>';
# This will end up with the group_id of the deepest selection
$group_id = isset($_SESSION['Group']) ? $_SESSION['Group'] : null;
$html .= Group::get_group_dropdown();
@ -114,7 +114,7 @@ $html .= htmlSelect('Function[]', $Functions,
$html .= '</span>';
if ( count($ServersById) > 1 ) {
$html .= '<span class="ServerFilter"><label>'. translate('Server').':</label>';
$html .= '<span class="ServerFilter"><label>'. translate('Server').'</label>';
$html .= htmlSelect('ServerId[]', $ServersById,
(isset($_SESSION['ServerId'])?$_SESSION['ServerId']:''),
array(
@ -128,7 +128,7 @@ if ( count($ServersById) > 1 ) {
} # end if have Servers
if ( count($StorageById) > 1 ) {
$html .= '<span class="StorageFilter"><label>'.translate('Storage').':</label>';
$html .= '<span class="StorageFilter"><label>'.translate('Storage').'</label>';
$html .= htmlSelect('StorageId[]', $StorageById,
(isset($_SESSION['StorageId'])?$_SESSION['StorageId']:''),
array(
@ -140,7 +140,7 @@ if ( count($StorageById) > 1 ) {
$html .= '</span>';
} # end if have Storage Areas
$html .= '<span class="StatusFilter"><label>'. translate('Status') . ':</label>';
$html .= '<span class="StatusFilter"><label>'. translate('Status') . '</label>';
$status_options = array(
'Unknown' => translate('StatusUnknown'),
'NotRunning' => translate('StatusNotRunning'),
@ -157,7 +157,7 @@ $html .= htmlSelect( 'Status[]', $status_options,
) );
$html .= '</span>';
$html .= '<span class="SourceFilter"><label>'.translate('Source').':</label>';
$html .= '<span class="SourceFilter"><label>'.translate('Source').'</label>';
$html .= '<input type="text" name="Source" value="'.(isset($_SESSION['Source'])?$_SESSION['Source']:'').'" onkeydown="if(event&&event.keyCode==13){this.form.submit();}" placeholder="text or regular expression"/>';
$html .= '</span>';
@ -232,7 +232,7 @@ $html .= htmlSelect( 'Status[]', $status_options,
$displayMonitors[] = $monitors[$i];
} # end foreach monitor
$html .= '<span class="MonitorFilter"><label>'.translate('Monitor').':</label>';
$html .= '<span class="MonitorFilter"><label>'.translate('Monitor').'</label>';
$html .= htmlSelect('MonitorId[]', $monitors_dropdown, $selected_monitor_ids,
array(
'onchange'=>'this.form.submit();',

View File

@ -217,7 +217,7 @@ ob_start();
echo '<th class="colEvents">'. $j .'</th>';
}
?>
<th class="colZones"><a href="<?php echo $_SERVER['PHP_SELF'] ?>?view=zones_overview"><?php echo translate('Zones') ?></a></th>
<th class="colZones"><?php echo translate('Zones') ?></th>
<?php if ( canEdit('Monitors') ) { ?>
<th class="colMark"><input type="checkbox" name="toggleCheck" value="1" onclick="toggleCheckbox(this, 'markMids[]');setButtonStates(this);"/> <?php echo translate('All') ?></th>
<?php } ?>

View File

@ -3,11 +3,11 @@ var requestQueue = new Request.Queue( { concurrent: monitorData.length, stopOnFa
function Monitor( monitorData ) {
this.id = monitorData.id;
this.connKey = monitorData.connKey;
this.server_url = monitorData.server_url;
this.url = monitorData.url;
this.status = null;
this.alarmState = STATE_IDLE;
this.lastAlarmState = STATE_IDLE;
this.streamCmdParms = this.server_url+'?view=request&request=stream&connkey='+this.connKey;
this.streamCmdParms = '?view=request&request=stream&connkey='+this.connKey;
this.onclick = monitorData.onclick;
if ( auth_hash )
this.streamCmdParms += '&auth='+auth_hash;
@ -153,7 +153,7 @@ function Monitor( monitorData ) {
if ( this.type != 'WebSite' ) {
this.streamCmdReq = new Request.JSON( {
url: this.server_url,
url: this.url,
method: 'get',
timeout: 1000+AJAX_TIMEOUT,
onSuccess: this.getStreamCmdResponse.bind( this ),
@ -400,8 +400,14 @@ function initPage() {
jQuery("#hdrbutton").click(function(){
jQuery("#flipMontageHeader").slideToggle("slow");
jQuery("#hdrbutton").toggleClass('glyphicon-menu-down').toggleClass('glyphicon-menu-up');
Cookie.write( 'zmMontageHeaderFlip', jQuery('#hdrbutton').hasClass('glyphicon-menu-up') ? 'up' : 'down', { duration: 10*365 } );
});
});
if ( Cookie.read('zmMontageHeaderFlip') == 'down' ) {
// The chosen dropdowns require the selects to be visible, so once chosen has initialized, we can hide the header
jQuery("#flipMontageHeader").slideToggle("fast");
jQuery("#hdrbutton").toggleClass('glyphicon-menu-down').toggleClass('glyphicon-menu-up');
}
for ( var i = 0; i < monitorData.length; i++ ) {
monitors[i] = new Monitor(monitorData[i]);

View File

@ -35,7 +35,7 @@ monitorData[monitorData.length] = {
'connKey': <?php echo $monitor->connKey() ?>,
'width': <?php echo $monitor->Width() ?>,
'height':<?php echo $monitor->Height() ?>,
'server_url': '<?php echo $monitor->Url() ?>',
'url': '<?php echo $monitor->Url() ?>',
'onclick': function(){createPopup( '?view=watch&mid=<?php echo $monitor->Id() ?>', 'zmWatch<?php echo $monitor->Id() ?>', 'watch', <?php echo reScale( $monitor->Width(), $monitor->PopupScale() ); ?>, <?php echo reScale( $monitor->Height(), $monitor->PopupScale() ); ?> );},
'type': '<?php echo $monitor->Type() ?>',
'refresh': '<?php echo $monitor->Refresh() ?>'

View File

@ -135,7 +135,7 @@ xhtmlHeaders(__FILE__, translate('Montage'));
<div id="page">
<?php echo getNavBarHTML() ?>
<div id="header">&nbsp;&nbsp;
<a href="#"><span id="hdrbutton" class="glyphicon glyphicon-menu-up pull-right"></span></a>
<a href="#"><span id="hdrbutton" class="glyphicon glyphicon-menu-up pull-right" title="Toggle Filters"></span></a>
<div id="flipMontageHeader">
<div id="headerButtons">
<?php