From 2beccb0912d6f781b0f2e4dc3c1266b5bca1d43e Mon Sep 17 00:00:00 2001 From: redPanther Date: Wed, 7 Sep 2016 20:10:37 +0200 Subject: [PATCH] Webui: extend led hardware config + connection lost page (#226) * split content and js tune leds config * implement connection lost page * split js/html in huebridge * add js action for connection lost * extend led config make connection loss nicer * tune led code add menu entry for grabber * more tuning of webui * switch back to botstrap textarea add v4l to components * add icon * extend schema for jsoneditor * implement ledcolors streaming with 4fps * implement component state --- assets/webconfig/content/connection_lost.html | 33 +++++- assets/webconfig/content/dashboard.html | 14 +-- assets/webconfig/content/generalconf.html | 93 +-------------- assets/webconfig/content/grabber.html | 20 ++++ assets/webconfig/content/leds.html | 110 ++++++++++++++---- .../webconfig/content/remote_components.html | 49 +++++++- assets/webconfig/css/hyperion.css | 2 +- assets/webconfig/index.html | 11 +- assets/webconfig/js/content_generalconf.js | 83 +++++++++++++ assets/webconfig/js/content_grabber.js | 58 +++++++++ assets/webconfig/js/content_index.js | 10 ++ assets/webconfig/js/content_leds.js | 82 ++++++------- assets/webconfig/js/hyperion.js | 14 ++- include/hyperion/ComponentRegister.h | 28 +++++ include/hyperion/Hyperion.h | 6 + include/hyperion/MessageForwarder.h | 2 + include/utils/Components.h | 16 +++ libsrc/boblightserver/BoblightServer.cpp | 13 ++- libsrc/hyperion/CMakeLists.txt | 2 + libsrc/hyperion/ComponentRegister.cpp | 27 +++++ libsrc/hyperion/GrabberWrapper.cpp | 40 ++++--- libsrc/hyperion/Hyperion.cpp | 5 + libsrc/hyperion/LinearColorSmoothing.cpp | 7 +- libsrc/hyperion/LinearColorSmoothing.h | 2 +- libsrc/hyperion/MessageForwarder.cpp | 5 + libsrc/hyperion/hyperion.schema.json | 67 +++++++---- libsrc/jsonserver/JsonClientConnection.cpp | 78 ++++++++++--- libsrc/jsonserver/JsonClientConnection.h | 6 +- .../jsonserver/schema/schema-ledcolors.json | 2 +- libsrc/kodivideochecker/KODIVideoChecker.cpp | 13 ++- libsrc/protoserver/ProtoServer.cpp | 10 +- libsrc/udplistener/UDPListener.cpp | 19 +-- libsrc/utils/Components.cpp | 1 + .../utils/jsonschema/QJsonSchemaChecker.cpp | 3 +- src/hyperiond/hyperiond.cpp | 23 +++- 35 files changed, 675 insertions(+), 279 deletions(-) create mode 100644 assets/webconfig/content/grabber.html create mode 100644 assets/webconfig/js/content_generalconf.js create mode 100644 assets/webconfig/js/content_grabber.js create mode 100644 include/hyperion/ComponentRegister.h create mode 100644 libsrc/hyperion/ComponentRegister.cpp create mode 100644 libsrc/utils/Components.cpp diff --git a/assets/webconfig/content/connection_lost.html b/assets/webconfig/content/connection_lost.html index 030a3732..fa883b28 100644 --- a/assets/webconfig/content/connection_lost.html +++ b/assets/webconfig/content/connection_lost.html @@ -1,16 +1,39 @@
-
- connection lost: reconnect + + +
+
+
Connection to Hyperion Service lost!
+ +
+ + + diff --git a/assets/webconfig/content/dashboard.html b/assets/webconfig/content/dashboard.html index 86dc848d..391afe1a 100644 --- a/assets/webconfig/content/dashboard.html +++ b/assets/webconfig/content/dashboard.html @@ -52,19 +52,7 @@ Status - - - Kodi Watch - - - - Blackborder - - - - Booteffect - - +
diff --git a/assets/webconfig/content/generalconf.html b/assets/webconfig/content/generalconf.html index 94201f57..86137c35 100644 --- a/assets/webconfig/content/generalconf.html +++ b/assets/webconfig/content/generalconf.html @@ -7,7 +7,7 @@
-
+
@@ -16,93 +16,4 @@ - + diff --git a/assets/webconfig/content/grabber.html b/assets/webconfig/content/grabber.html new file mode 100644 index 00000000..f8eee33d --- /dev/null +++ b/assets/webconfig/content/grabber.html @@ -0,0 +1,20 @@ + +
+
+
+

Capturing Hardware

+
+

You can edit the general configuration here.

+
+
+
+ +
+ +
+
+
+
+ + + diff --git a/assets/webconfig/content/leds.html b/assets/webconfig/content/leds.html index 6540861d..1b64225d 100644 --- a/assets/webconfig/content/leds.html +++ b/assets/webconfig/content/leds.html @@ -5,24 +5,36 @@ vertical-align:middle; padding:4px; border-radius:2px;} .led_num {display:none; position:relative; color:black; background-color: white; border-radius:2px; padding:1px; vertical-align:middle; text-align:center; font-size:0.8em;} - #leds_controls {white-space:nowrap; margin-top:530px;} + #leds_controls {white-space:nowrap; margin-top:500px;} - -

Led Configuration

+
+

LED Hardware

- +
diff --git a/assets/webconfig/content/remote_components.html b/assets/webconfig/content/remote_components.html index e8a5765b..2c0542e1 100644 --- a/assets/webconfig/content/remote_components.html +++ b/assets/webconfig/content/remote_components.html @@ -6,14 +6,17 @@

The components remote enables you to disable and enable certain components of Hyperion during runtime. Keep in mind this persist just until the next reboot! To enable/disable components permament, use the configuration section.


-
+
+
+
diff --git a/assets/webconfig/css/hyperion.css b/assets/webconfig/css/hyperion.css index 064f8b54..92cae3d4 100644 --- a/assets/webconfig/css/hyperion.css +++ b/assets/webconfig/css/hyperion.css @@ -13,7 +13,7 @@ body{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15 table.borderless td,table.borderless th{border: none !important;} /*Header*/ -.navbar-brand{padding: 5px;height:90px;} +.navbar-brand{padding: 5px;padding-left:20px;height:60px;} .sidebar{margin-top:91px;} .dropdown{font-size:18px;} @media (max-width: 767px) {.sidebar{margin-top:0px;}} diff --git a/assets/webconfig/index.html b/assets/webconfig/index.html index 01f6099e..0031d2b4 100644 --- a/assets/webconfig/index.html +++ b/assets/webconfig/index.html @@ -92,7 +92,7 @@ - Redefine ambient light! + Redefine ambient light! @@ -202,9 +202,10 @@
  • Configuration
  • @@ -237,7 +238,7 @@ -