From 490fb40917eef7b9fc47935bc1e17f09fcc6ee36 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 14 Nov 2018 09:22:38 -0500 Subject: [PATCH 1/2] DefaultView in the past was used to control whether the watch view starts up with ptz controls visible or the events list. Isaac changed the watch view to always have the controls visible... so this setting is no longer useful. --- db/zm_create.sql.in | 1 - db/zm_update-1.32.3.sql | 2 ++ web/skins/classic/views/monitor.php | 13 ------------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 91c34163d..d19afd600 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -496,7 +496,6 @@ CREATE TABLE `Monitors` ( `TrackDelay` smallint(5) unsigned, `ReturnLocation` tinyint(3) NOT NULL default '-1', `ReturnDelay` smallint(5) unsigned, - `DefaultView` enum('Events','Control') NOT NULL default 'Events', `DefaultRate` smallint(5) unsigned NOT NULL default '100', `DefaultScale` smallint(5) unsigned NOT NULL default '100', `SignalCheckPoints` INT UNSIGNED NOT NULL default '0', diff --git a/db/zm_update-1.32.3.sql b/db/zm_update-1.32.3.sql index fe38baede..8f898de6b 100644 --- a/db/zm_update-1.32.3.sql +++ b/db/zm_update-1.32.3.sql @@ -7,3 +7,5 @@ -- INSERT INTO MonitorPresets VALUES (NULL,'D-link DCS-930L, 640x480, mjpeg','Remote','http',0,0,'http','simple','',80,'/mjpeg.cgi',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); + +ALTER TABLE Monitors DROP COLUMN DefaultView; diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index c030a151f..c2e6f357a 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -113,7 +113,6 @@ if ( ! $monitor ) { 'FPSReportInterval' => 100, 'RefBlendPerc' => 6, 'AlarmRefBlendPerc' => 6, - 'DefaultView' => 'Events', 'DefaultRate' => '100', 'DefaultScale' => '100', 'SignalCheckPoints' => '10', @@ -657,7 +656,6 @@ if ( $tab != 'misc' ) { - @@ -1010,17 +1008,6 @@ if ( $monitor->Type() == 'Local' ) { - DefaultRate() ); ?> DefaultScale() ); ?> From 4e4c7502c3a6f206009dfeb5e8c610dd4afcbd8d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 11 Dec 2018 10:37:52 -0500 Subject: [PATCH 2/2] put sql update into zm_update-1.33.0.sql --- db/zm_update-1.33.0.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 db/zm_update-1.33.0.sql diff --git a/db/zm_update-1.33.0.sql b/db/zm_update-1.33.0.sql new file mode 100644 index 000000000..2e2d227e1 --- /dev/null +++ b/db/zm_update-1.33.0.sql @@ -0,0 +1,18 @@ +-- +-- This updates a 1.32.* database to 1.33.0 +-- +-- Remove DefaultView from Monitors table. + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'DefaultView' + ) > 0, +"ALTER TABLE Monitors DROP COLUMN DefaultView" +"SELECT 'Column DefaultView no longer exists in Monitors'", +)); + +PREPARE stmt FROM @s; +EXECUTE stmt;