]> www.vanbest.org Git - motioneye-debian/commitdiff
added a settings option to disable adding/removing cameras
authorCalin Crisan <ccrisan@gmail.com>
Sat, 23 May 2015 07:25:16 +0000 (10:25 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 23 May 2015 07:25:16 +0000 (10:25 +0300)
settings_default.py
src/handlers.py
templates/main.html

index 69b3b27ff122cd09fe65e421f4aca13b0c0f435c..0c14b80b6d1c9af0c0d04f26e10dd0b4f906ff5e 100644 (file)
@@ -79,3 +79,6 @@ SMTP_TIMEOUT = 60
 
 # the time to wait for zip file creation
 ZIP_TIMEOUT = 500
+
+# enable adding and removing cameras from UI
+ADD_REMOVE_CAMERAS = True
index 382fd86ca26af8f9f327dce8dd8e7593d7c99844..e33c635fdbdbad25d084f09ba50186cb9dc949ba 100644 (file)
@@ -152,6 +152,7 @@ class MainHandler(BaseHandler):
                 version=motioneye.VERSION,
                 enable_update=False,
                 enable_reboot=settings.ENABLE_REBOOT,
+                add_remove_cameras=settings.ADD_REMOVE_CAMERAS,
                 main_sections=main_sections,
                 camera_sections=camera_sections,
                 hostname=socket.gethostname(),
index 968a70b8e2b97a5d43d9e875844768d69851bc7d..71bddee4397cc17bfb32b7ba26902c73b98be63e 100644 (file)
@@ -78,8 +78,8 @@
             <div class="settings-top-bar closed">
                 <div class="button settings-button mouse-effect" title="settings"></div>
                 <div class="button logout-button mouse-effect" title="switch user"></div>
-                <select class="styled" id="cameraSelect"></select>
-                <div class="button rem-camera-button mouse-effect" id="remCameraButton" title="remove camera"></div>
+                <select class="styled" id="cameraSelect" {% if not add_remove_cameras %}style="display: none;"{% endif %}></select>
+                <div class="button rem-camera-button mouse-effect" id="remCameraButton" title="remove camera" {% if not add_remove_cameras %}style="display: none;"{% endif %}></div>
                 <div class="button apply-button" id="applyButton">Apply</div>
                 {% if hostname %}<div class="hostname">{{hostname}}</div>{% endif %}
             </div>