various logging & error reporting improvements
authorCalin Crisan <ccrisan@gmail.com>
Sat, 12 Oct 2013 16:03:28 +0000 (19:03 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 12 Oct 2013 16:03:28 +0000 (19:03 +0300)
doc/todo.txt
src/handlers.py
static/css/ui.css
templates/main.html

index 79e2361fae8bf2a269af0f6a97ee8bfa1d73217c..e5c0277452f519843764b16e2627cf1b10eff318 100644 (file)
@@ -1,6 +1,4 @@
 
--> cache configuration
-
 -> prevent Request closed errors by stopping mjpg clients before stopping motion
 
 -> style scroll bars
index 2343c03b3c3e3c66dda69dc46ea954c684cb931a..574125f89d312f382c67b6af24f529612c4a5737 100644 (file)
@@ -142,7 +142,7 @@ class ConfigHandler(BaseHandler):
             if camera_config['@proto'] != 'v4l2':
                 def on_response(remote_ui_config):
                     if remote_ui_config is None:
-                        return self.finish_json({'error': True})
+                        return self.finish_json({'error': 'Failed to get remote camera configuration.'})
                     
                     tmp_config = self._camera_ui_to_dict(remote_ui_config)
                     tmp_config.update(camera_config)
@@ -312,7 +312,7 @@ class ConfigHandler(BaseHandler):
         if host:  # remote listing
             def on_response(cameras):
                 if cameras is None:
-                    self.finish_json({'error': True})
+                    self.finish_json({'error': 'Failed to list remote cameras.'})
                     
                 else:
                     self.finish_json({'cameras': cameras})
@@ -333,7 +333,13 @@ class ConfigHandler(BaseHandler):
             def on_response_builder(camera_id, camera_config):
                 def on_response(remote_ui_config):
                     if remote_ui_config is None:
-                        length[0] -= 1
+                        #length[0] -= 1
+                        cameras.append({
+                            'id': camera_id,
+                            'name': '&lt;error&gt;',
+                            'enabled': False,
+                            'streaming_framerate': 1
+                        })
                     
                     else:
                         remote_ui_config['id'] = camera_id
index f54b56c766726b9d34d1407b288db1e2c680d6e4..4bcbb172cd23cb2e3e0890f58ff929486108434d 100644 (file)
@@ -367,7 +367,7 @@ span.dialog-item-label {
 div.popup-message-container {
     position: fixed;
     display: none;
-    z-index: 9999;
+    z-index: 10002;
     background-color: #313131;
     border-radius: 3px;
     opacity: 0;
index e8e6894835fec5e0afc766e49dcabca335a3569e..6dc0b00d61ec62eaf54038171b81f56cb20dc730 100644 (file)
             copyright &copy; Calin Crisan 2013
         </div> 
     </div>
-    <div class="popup-message-container"></div>
     <div class="modal-glass"></div>
     <div class="modal-container"></div>
+    <div class="popup-message-container"></div>
 {% endblock %}