From 90ea6aa0763e8433d50045778ff0a758bd4285ac Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 9 Oct 2018 11:09:42 -0400 Subject: [PATCH 1/8] remove : from labels on monitor filters. They can be put back in css --- web/skins/classic/views/_monitor_filters.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/skins/classic/views/_monitor_filters.php b/web/skins/classic/views/_monitor_filters.php index 357c6e7d1..f37649c18 100644 --- a/web/skins/classic/views/_monitor_filters.php +++ b/web/skins/classic/views/_monitor_filters.php @@ -56,7 +56,7 @@ foreach ( Group::find() as $G ) { $groupSql = ''; if ( count($GroupsById) ) { - $html .= ''; + $html .= ''; # 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 .= ''; if ( count($ServersById) > 1 ) { - $html .= ''; + $html .= ''; $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 .= ''; + $html .= ''; $html .= htmlSelect('StorageId[]', $StorageById, (isset($_SESSION['StorageId'])?$_SESSION['StorageId']:''), array( @@ -140,7 +140,7 @@ if ( count($StorageById) > 1 ) { $html .= ''; } # end if have Storage Areas -$html .= ''; +$html .= ''; $status_options = array( 'Unknown' => translate('StatusUnknown'), 'NotRunning' => translate('StatusNotRunning'), @@ -157,7 +157,7 @@ $html .= htmlSelect( 'Status[]', $status_options, ) ); $html .= ''; - $html .= ''; + $html .= ''; $html .= ''; $html .= ''; @@ -232,7 +232,7 @@ $html .= htmlSelect( 'Status[]', $status_options, $displayMonitors[] = $monitors[$i]; } # end foreach monitor - $html .= ''; + $html .= ''; $html .= htmlSelect('MonitorId[]', $monitors_dropdown, $selected_monitor_ids, array( 'onchange'=>'this.form.submit();', From ff00f15b5814de2fa282d1594ff1bc2ca31ffe08 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 9 Oct 2018 11:10:09 -0400 Subject: [PATCH 2/8] add missing ; --- web/skins/classic/views/montagereview.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/montagereview.php b/web/skins/classic/views/montagereview.php index f57bb82f3..ff43c5397 100644 --- a/web/skins/classic/views/montagereview.php +++ b/web/skins/classic/views/montagereview.php @@ -225,7 +225,7 @@ xhtmlHeaders(__FILE__, translate('MontageReview') );
- -
+
> Date: Wed, 10 Oct 2018 14:01:36 -0400 Subject: [PATCH 4/8] Use Hostname instead of Url in test for CORS access. --- web/includes/functions.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index e610ad8dd..0f49f611c 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -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; From 63a52117897c35f8655021f95b9cc3eb6abe9b55 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 10 Oct 2018 14:03:27 -0400 Subject: [PATCH 5/8] use url instead of server_url in Monitor object --- web/skins/classic/views/js/montage.js | 6 +++--- web/skins/classic/views/js/montage.js.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/skins/classic/views/js/montage.js b/web/skins/classic/views/js/montage.js index ecee73be0..2077b1097 100644 --- a/web/skins/classic/views/js/montage.js +++ b/web/skins/classic/views/js/montage.js @@ -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 ), diff --git a/web/skins/classic/views/js/montage.js.php b/web/skins/classic/views/js/montage.js.php index 3b0c5005b..183f17648 100644 --- a/web/skins/classic/views/js/montage.js.php +++ b/web/skins/classic/views/js/montage.js.php @@ -35,7 +35,7 @@ monitorData[monitorData.length] = { 'connKey': connKey() ?>, 'width': Width() ?>, 'height':Height() ?>, - 'server_url': 'Url() ?>', + 'url': 'Url() ?>', 'onclick': function(){createPopup( '?view=watch&mid=Id() ?>', 'zmWatchId() ?>', 'watch', Width(), $monitor->PopupScale() ); ?>, Height(), $monitor->PopupScale() ); ?> );}, 'type': 'Type() ?>', 'refresh': 'Refresh() ?>' From ad70648cb3d35d8b5249b6ad91f7331bac9addf8 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 10 Oct 2018 13:10:02 -0500 Subject: [PATCH 6/8] don't build neon instructions on armel (#2246) --- src/zm_image.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index c4b76028e..0c3d8edcc 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -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 */ From c58f04399885407811b8cb71fce309ded300e79d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 10 Oct 2018 14:12:16 -0400 Subject: [PATCH 7/8] Add a mouseover tooltip saying Toggle Filters on up arrow --- web/skins/classic/views/montage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/montage.php b/web/skins/classic/views/montage.php index 9f0cf8998..a0ebdce0a 100644 --- a/web/skins/classic/views/montage.php +++ b/web/skins/classic/views/montage.php @@ -135,7 +135,7 @@ xhtmlHeaders(__FILE__, translate('Montage'));