diff --git a/web/skins/bootstrap/js/controllers.js b/web/skins/bootstrap/js/controllers.js index c12715bda..514db3a0a 100644 --- a/web/skins/bootstrap/js/controllers.js +++ b/web/skins/bootstrap/js/controllers.js @@ -46,11 +46,50 @@ ZoneMinder.controller('EventController', function($scope, $location, Event) { }); }); -ZoneMinder.controller('MonitorController', function($scope) { - $scope.sourceType = 'Local'; - $scope.RefBlendPerc = 6; - $scope.AlarmRefBlendPerc = 6; - $scope.Function = 'Monitor'; +ZoneMinder.controller('MonitorController', function($scope, $http) { + $scope.monitor = {}; + $scope.monitor.sourceType = 'Remote'; + $scope.monitor.RefBlendPerc = 6; + $scope.monitor.AlarmRefBlendPerc = 6; + $scope.monitor.Function = 'Monitor'; + $scope.monitor.ImageBufferCount = 100; + $scope.monitor.WarmupCount = 25; + $scope.monitor.PreEventCount = 50; + $scope.monitor.PostEventCount = 50; + $scope.monitor.StreamReplayBuffer = 1000; + $scope.monitor.AlarmFrameCount = 1; + $scope.monitor.LabelFormat = '%N - %d/%m/%y %H:%M:%S'; + $scope.monitor.LabelX = 0; + $scope.monitor.LabelY = 0; + $scope.monitor.Colours = 3; + $scope.monitor.Orientation = 0; + $scope.monitor.Enabled = true; + $scope.monitor.Protocol = 'http'; + $scope.monitor.SectionLength = 600; + $scope.monitor.EventPrefix = 'Event-'; + $scope.monitor.FrameSkip = 0; + $scope.monitor.MotionFrameSkip = 0; + $scope.monitor.FPSReportInterval = 1000; + $scope.monitor.DefaultView = 'Events'; + $scope.monitor.DefaultRate = 100; + $scope.monitor.DefaultScale = 100; + $scope.monitor.SignalCheckColour = '#0000c0'; + var color = '#' + (Math.random() * 0xFFFFFF << 0).toString(16); + $scope.monitor.WebColour = color; + + + $scope.submitMonitor = function() { + $http({ + method : 'POST', + url : '/api/monitors.json', + data : $.param($scope.monitor), + headers : { 'Content-Type': 'application/x-www-form-urlencoded' } // set the headers so angular passing info as form data (not request payload) + }) + .success(function(data) { + console.log(data); + window.location = "/index.php?view=console"; + }); + }; }); ZoneMinder.controller('ConsoleController', function($scope, Console) { diff --git a/web/skins/bootstrap/views/monitor.php b/web/skins/bootstrap/views/monitor.php index b9f5f5bb1..c6f61f644 100644 --- a/web/skins/bootstrap/views/monitor.php +++ b/web/skins/bootstrap/views/monitor.php @@ -426,12 +426,10 @@ xhtmlHeaders(__FILE__, $SLANG['Monitor']." - ".validHtmlStr($monitor['Name']) ); -

- ()

-
- -
+
+
-
+ +
diff --git a/web/skins/bootstrap/views/tab-monitor-buffers.php b/web/skins/bootstrap/views/tab-monitor-buffers.php index eb72ae8d5..d77492a0b 100644 --- a/web/skins/bootstrap/views/tab-monitor-buffers.php +++ b/web/skins/bootstrap/views/tab-monitor-buffers.php @@ -1,26 +1,26 @@
- +
- +
- +
- +
- +
- +
diff --git a/web/skins/bootstrap/views/tab-monitor-curl.php b/web/skins/bootstrap/views/tab-monitor-curl.php index 67486f399..f06d824f2 100644 --- a/web/skins/bootstrap/views/tab-monitor-curl.php +++ b/web/skins/bootstrap/views/tab-monitor-curl.php @@ -1,4 +1,14 @@ - - - - +
+
+ + +
+
+ + +
+
+ + +
+
diff --git a/web/skins/bootstrap/views/tab-monitor-ffmpeg-vlc.php b/web/skins/bootstrap/views/tab-monitor-ffmpeg-vlc.php index a0a9927b8..35f4b0b2c 100644 --- a/web/skins/bootstrap/views/tab-monitor-ffmpeg-vlc.php +++ b/web/skins/bootstrap/views/tab-monitor-ffmpeg-vlc.php @@ -1,4 +1,17 @@ +
+
+ + +
- - -  () +
+ + +
+ + +
+ + +
+
diff --git a/web/skins/bootstrap/views/tab-monitor-file.php b/web/skins/bootstrap/views/tab-monitor-file.php index e554c95c3..93d3ab70c 100644 --- a/web/skins/bootstrap/views/tab-monitor-file.php +++ b/web/skins/bootstrap/views/tab-monitor-file.php @@ -1,2 +1,6 @@ - - +
+
+ + +
+
diff --git a/web/skins/bootstrap/views/tab-monitor-general.php b/web/skins/bootstrap/views/tab-monitor-general.php index 09d2ef9a6..89be75cf7 100644 --- a/web/skins/bootstrap/views/tab-monitor-general.php +++ b/web/skins/bootstrap/views/tab-monitor-general.php @@ -6,11 +6,11 @@
- +
- @@ -21,7 +21,7 @@
- @@ -32,7 +32,7 @@
@@ -42,60 +42,64 @@ ?>
-
+
-
+
- +
- +
-
+
- +
-
+
- +
- +
- +
- +
- +
@@ -103,6 +107,8 @@ + +
diff --git a/web/skins/bootstrap/views/tab-monitor-local.php b/web/skins/bootstrap/views/tab-monitor-local.php index 604ada7b0..07574ccd8 100644 --- a/web/skins/bootstrap/views/tab-monitor-local.php +++ b/web/skins/bootstrap/views/tab-monitor-local.php @@ -1,8 +1,8 @@ -
+
- +
@@ -16,17 +16,17 @@
- +
- +
- +
- +
- +
- +
@@ -71,6 +71,6 @@
- +
diff --git a/web/skins/bootstrap/views/tab-monitor-misc.php b/web/skins/bootstrap/views/tab-monitor-misc.php index 4f5172073..6c8a7eb9a 100644 --- a/web/skins/bootstrap/views/tab-monitor-misc.php +++ b/web/skins/bootstrap/views/tab-monitor-misc.php @@ -1,12 +1,12 @@ -
+
-
-
-
-
-
-
+
+
+
+
+
-
-
- -
    
- -
    
+
+
+
    
+
+ + +
- -
> +
"; ?> - checked="checked"/>  + checked="checked"/>  +
-
- - - - -
- +
- +
- +
diff --git a/web/skins/bootstrap/views/tab-monitor-timestamp.php b/web/skins/bootstrap/views/tab-monitor-timestamp.php index 9b76a4f80..ec7a08257 100644 --- a/web/skins/bootstrap/views/tab-monitor-timestamp.php +++ b/web/skins/bootstrap/views/tab-monitor-timestamp.php @@ -1,14 +1,14 @@
- +
- +
- +