Merge branch 'storageareas' of github.com:connortechnology/ZoneMinder into tesla

pull/2077/head
Isaac Connor 2018-01-26 12:54:56 -08:00
commit 30404203ea
5 changed files with 17 additions and 4 deletions

View File

@ -644,11 +644,11 @@ CREATE INDEX `Monitors_ServerId_idx` ON `Monitors` (`ServerId`);
DROP TABLE IF EXISTS `Monitor_Status`;
CREATE TABLE `Monitor_Status` (
`Id` int(10) unsigned NOT NULL,
`MonitorId` int(10) unsigned NOT NULL,
`Status` enum('Unknown','NotRunning','Running','NoSignal','Signal') NOT NULL default 'Unknown',
`CaptureFPS` DECIMAL(10,2) NOT NULL default 0,
`AnalysisFPS` DECIMAL(5,2) NOT NULL default 0,
PRIMARY KEY (`Id`)
PRIMARY KEY (`MonitorId`)
) ENGINE=MEMORY;
--
-- Table structure for table `States`

8
db/zm_update-1.31.29.sql Normal file
View File

@ -0,0 +1,8 @@
DROP TABLE IF EXISTS `Monitor_Status`;
CREATE TABLE `Monitor_Status` (
`MonitorId` int(10) unsigned NOT NULL,
`Status` enum('Unknown','NotRunning','Running','NoSignal','Signal') NOT NULL default 'Unknown',
`CaptureFPS` DECIMAL(10,2) NOT NULL default 0,
`AnalysisFPS` DECIMAL(5,2) NOT NULL default 0,
PRIMARY KEY (`MonitorId`)
) ENGINE=MEMORY;

View File

@ -230,6 +230,10 @@ MAIN: while( $loop ) {
Debug("Weird non digit characters in $monitor");
next;
}
if ( $monitor_id and ( $monitor_id != $monitor ) ) {
Debug("Skipping monitor $monitor because we are only interested in monitor $monitor_id");
next;
}
Debug( "Found filesystem monitor '$monitor'" );
$fs_monitors->{$monitor} = {} if ! $fs_monitors->{$monitor};
@ -811,6 +815,7 @@ yet.
-c, --continuous - Run continuously
-f, --force - Run even if pid file exists
-i, --interactive - Ask before applying any changes
-m, --monitor_id - Only consider the given monitor
-r, --report - Just report don't actually do anything
-s, --storage_id - Specify a storage area to audit instead of all
-v, --version - Print the installed version of ZoneMinder

@ -1 +1 @@
Subproject commit ca91b87fda8e006e4fca2ed870f24f9a29c2905d
Subproject commit 7108489f218c54d36d235d3af91d6da2f8311237

View File

@ -89,7 +89,7 @@ if ( ! is_array( $selected_monitor_ids ) ) {
$values += $ids;
}
$sql = 'SELECT *,S.Status AS Status, S.CaptureFPS AS CaptureFPS FROM Monitors AS M LEFT JOIN Monitor_Status AS S ON S.Id=M.Id ' . ( count($conditions) ? ' WHERE ' . implode(' AND ', $conditions ) : '' ).' ORDER BY Sequence ASC';
$sql = 'SELECT *,S.Status AS Status, S.CaptureFPS AS CaptureFPS FROM Monitors AS M LEFT JOIN Monitor_Status AS S ON MonitorId=Id ' . ( count($conditions) ? ' WHERE ' . implode(' AND ', $conditions ) : '' ).' ORDER BY Sequence ASC';
$monitors = dbFetchAll( $sql, null, $values );
$displayMonitors = array();
$monitors_dropdown = array();