]> www.vanbest.org Git - motioneye-debian/commitdiff
hostname appears in the top bar now
authorCalin Crisan <ccrisan@gmail.com>
Sun, 29 Jun 2014 10:18:09 +0000 (13:18 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 29 Jun 2014 10:18:09 +0000 (13:18 +0300)
src/handlers.py
static/css/main.css
templates/main.html

index 8e35d790ccfa0c75bbe3f55d78246a68ad7c80c5..e29c8b627c80fa1008df428699f42f95f48c276a 100644 (file)
@@ -19,6 +19,7 @@ import base64
 import json
 import logging
 import os
+import socket
 
 from tornado.web import RequestHandler, HTTPError, asynchronous
 
@@ -142,7 +143,8 @@ class NotFoundHandler(BaseHandler):
 class MainHandler(BaseHandler):
     @BaseHandler.auth()
     def get(self):
-        self.render('main.html')
+        self.render('main.html',
+                hostname=socket.gethostname())
 
 
 class ConfigHandler(BaseHandler):
index 702d5e22a6df817e88cd86ef465d2236457362b4..62b5e04fe3c6bf2fdceef8a4d5819f02acb9bd17 100644 (file)
@@ -178,6 +178,12 @@ div.add-camera-message {
     margin-top: 30px;
 }
 
+div.hostname {
+    vertical-align: middle;
+    display: inline-block;
+    font-size: 27px;
+}
+
 
     /* settings */
 
@@ -755,6 +761,10 @@ img.camera-progress {
         box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
         background-color: rgba(40, 40, 40, 0.9);
     }
+    
+    div.hostname {
+        display: none;
+    }
 }
 
 @media all and (max-width: 400px) {
index 8f18eaf3ce41c21e6a5b30f70d78d1eb5910c94a..dd541e9e1c27657b21cb44f0e33b224b0636894a 100644 (file)
@@ -21,6 +21,7 @@
                 <select class="video-device styled" id="videoDeviceSelect"></select>
                 <div class="button rem-camera-button mouse-effect" id="remCameraButton" title="remove camera"></div>
                 <div class="button apply-button" id="applyButton">Apply</div>
+                {% if hostname %}<div class="hostname">{{hostname}}</div>{% endif %}
             </div>
             {% endif %}
             <div class="logo">