From 53d665a92fe78f869ea10773c2bbc3e176010ee2 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 23 May 2015 10:25:16 +0300 Subject: [PATCH] added a settings option to disable adding/removing cameras --- settings_default.py | 3 +++ src/handlers.py | 1 + templates/main.html | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/settings_default.py b/settings_default.py index 69b3b27..0c14b80 100644 --- a/settings_default.py +++ b/settings_default.py @@ -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 diff --git a/src/handlers.py b/src/handlers.py index 382fd86..e33c635 100644 --- a/src/handlers.py +++ b/src/handlers.py @@ -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(), diff --git a/templates/main.html b/templates/main.html index 968a70b..71bddee 100644 --- a/templates/main.html +++ b/templates/main.html @@ -78,8 +78,8 @@
- -
+ +
Apply
{% if hostname %}
{{hostname}}
{% endif %}
-- 2.39.5