]> www.vanbest.org Git - motioneye-debian/commitdiff
added a main loading progress
authorCalin Crisan <ccrisan@gmail.com>
Sat, 9 Nov 2013 11:34:17 +0000 (13:34 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 9 Nov 2013 11:34:17 +0000 (13:34 +0200)
doc/todo.txt
settings_default.py
static/css/main.css
static/img/main-loading-progress.gif [new file with mode: 0644]
static/js/main.js
templates/main.html

index c5f1c4dc0125b754be5b61bf043d24600c1e3e4c..73afdb53fd384a5b141ff1c2dd8ab80c4c5cb28f 100644 (file)
@@ -1,4 +1,3 @@
--> add a loading progress when page loads
 -> order of the cams is a bit random
 -> disk usage at bottom
 -> make camera frames positions configurable
index 6c60897ebd1fa4c97fe49d7441b779a49322f549..cce949a99f4546d147f67bddc4fb599446e3df1e 100644 (file)
@@ -37,3 +37,6 @@ CLEANUP_INTERVAL = 43200
 
 # timeout in seconds to wait for responses when contacting a remote server
 REMOTE_REQUEST_TIMEOUT = 10
+
+# timeout in seconds to wait for an access to a mjpg client before removing it
+MJPG_CLIENT_TIMEOUT = 10
index 62b5cd45c33a7dc9bb5002a6283083cded860cc5..847fc4a37954952345dc54dc140699e017aba6a5 100644 (file)
@@ -127,6 +127,12 @@ img.logo {
     vertical-align: middle;
 }
 
+img.main-loading-progress {
+    display: block;
+    margin: auto;
+    margin-top: 50px;
+}
+
 
     /* settings */
 
diff --git a/static/img/main-loading-progress.gif b/static/img/main-loading-progress.gif
new file mode 100644 (file)
index 0000000..4f7a78e
Binary files /dev/null and b/static/img/main-loading-progress.gif differ
index 66c7e39e77df6ec5b67292d67dd23e5bcb25d2b0..172dcb883ea8483a631d75e9a17c59a8a9d5802c 100644 (file)
@@ -865,7 +865,16 @@ function fetchCurrentConfig() {
                 updateConfigUi();
             }
             
-            recreateCameraFrames(cameras);
+            var mainLoadingProgressImg = $('img.main-loading-progress');
+            if (mainLoadingProgressImg.length) {
+                mainLoadingProgressImg.animate({'opacity': 0}, 200, function () {
+                    recreateCameraFrames(cameras);
+                    mainLoadingProgressImg.remove();
+                });
+            }
+            else {
+                recreateCameraFrames(cameras);
+            }
         });
     }
     
index 570d6e406eaf33ec9c507c72d0c38086f1026af9..7a8694df7524e22a00bff8110e5586e06ebe305c 100644 (file)
         </div>
         {% endif %}
         <div class="page-container">
+            <img class="main-loading-progress" src="{{STATIC_URL}}img/main-loading-progress.gif">
         </div>
         <div class="footer">
             copyright &copy; Calin Crisan 2013