diff --git a/.codedocs b/.codedocs
new file mode 100644
index 00000000..ead816de
--- /dev/null
+++ b/.codedocs
@@ -0,0 +1,76 @@
+# Hyperion.NG .codedocs Configuration File
+
+#---------------------------------------------------------------------------
+# CodeDocs Configuration
+#---------------------------------------------------------------------------
+
+# Include the Doxygen configuration from another file.
+# The file must be a relative path with respect to the root of the repository.
+
+DOXYFILE =
+
+# Specify external repository to link documentation with.
+# This is similar to Doxygen's TAGFILES option, but will automatically link to
+# tags of other repositories already using CodeDocs. List each repository to
+# link with by giving its location in the form of owner/repository.
+# For example:
+# TAGLINKS = doxygen/doxygen CodeDocs/osg
+# Note: these repositories must already be built on CodeDocs.
+
+TAGLINKS =
+
+#---------------------------------------------------------------------------
+# Doxygen Configuration
+#---------------------------------------------------------------------------
+
+# Doxygen configuration may also be placed in this file.
+# Currently, the following Doxygen configuration options are available. Refer
+# to http://doxygen.org/manual/config.html for detailed explanation of the
+# options. To request support for more options, contact support@codedocs.xyz.
+#
+# ABBREVIATE_BRIEF =
+# ALIASES =
+# ALPHABETICAL_INDEX =
+# ALWAYS_DETAILED_SEC =
+# CASE_SENSE_NAMES =
+# CLASS_DIAGRAMS =
+# DISABLE_INDEX =
+# DISTRIBUTE_GROUP_DOC =
+# EXAMPLE_PATH =
+ EXCLUDE = .ci/ \
+ assets/ \
+ bin/
+ config/ \
+ effects/ \
+ test/ \
+# EXCLUDE_PATTERNS =
+# EXCLUDE_SYMBOLS =
+# EXTENSION_MAPPING =
+# EXTRACT_LOCAL_CLASSES =
+# FILE_PATTERNS =
+# GENERATE_TAGFILE =
+# GENERATE_TREEVIEW =
+# HIDE_COMPOUND_REFERENCE =
+# HIDE_SCOPE_NAMES =
+# HIDE_UNDOC_CLASSES =
+# HIDE_UNDOC_MEMBERS =
+# HTML_TIMESTAMP =
+# INLINE_GROUPED_CLASSES =
+# INPUT_ENCODING =
+# INTERNAL_DOCS =
+# OPTIMIZE_OUTPUT_FOR_C =
+ PROJECT_BRIEF = "The successor to Hyperion aka Hyperion Next Generation"
+ PROJECT_NAME = "Hyperion.NG"
+# PROJECT_NUMBER =
+# SHORT_NAMES =
+# SHOW_FILES =
+# SHOW_INCLUDE_FILES =
+# SHOW_NAMESPACES =
+# SORT_BRIEF_DOCS =
+# SORT_BY_SCOPE_NAME =
+# SORT_MEMBER_DOCS =
+# STRICT_PROTO_MATCHING =
+# TYPEDEF_HIDES_STRUCT =
+ USE_MDFILE_AS_MAINPAGE = README.md
+# VERBATIM_HEADERS =
+#
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 189ab92d..68c7f382 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -311,7 +311,7 @@ IF ( CMAKE_CROSSCOMPILING )
ENDIF()
SET(QT_MIN_VERSION "5.5.0")
-find_package(Qt5 COMPONENTS Core Gui Network SerialPort REQUIRED)
+find_package(Qt5 COMPONENTS Core Gui Network SerialPort Sql REQUIRED)
message( STATUS "Found Qt Version: ${Qt5Core_VERSION}" )
IF ( "${Qt5Core_VERSION}" VERSION_LESS "${QT_MIN_VERSION}" )
message( FATAL_ERROR "Your Qt version is to old! Minimum required ${QT_MIN_VERSION}" )
@@ -354,9 +354,6 @@ endif ()
# Add resources directory
add_subdirectory(resources)
-# Add the doxygen generation directory
-add_subdirectory(doc)
-
# remove generated files on make cleaan too
LIST( APPEND GENERATED_QRC
${CMAKE_BINARY_DIR}/EffectEngine.qrc
diff --git a/README.md b/README.md
index b784280d..e639811a 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@
[![Azure-Pipeline](https://dev.azure.com/Hyperion-Project/Hyperion.NG/_apis/build/status/Hyperion.NG?branchName=master)](https://dev.azure.com/Hyperion-Project/Hyperion.NG/_build/latest?definitionId=7&branchName=master)
[![Travis-CI](https://travis-ci.org/hyperion-project/hyperion.ng.svg?branch=master)](https://travis-ci.org/hyperion-project/hyperion.ng)
[![LGTM](https://img.shields.io/lgtm/alerts/g/hyperion-project/hyperion.ng.svg)](https://lgtm.com/projects/g/hyperion-project/hyperion.ng/alerts/)
+[![Documentation](https://codedocs.xyz/hyperion-project/hyperion.ng.svg)](https://codedocs.xyz/hyperion-project/hyperion.ng/)
## About Hyperion
diff --git a/assets/webconfig/content/conf_general.html b/assets/webconfig/content/conf_general.html
index ff6d8011..a2014f0e 100644
--- a/assets/webconfig/content/conf_general.html
+++ b/assets/webconfig/content/conf_general.html
@@ -18,6 +18,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/webconfig/css/hyperion.css b/assets/webconfig/css/hyperion.css
index 6919f11c..e2dbaa51 100644
--- a/assets/webconfig/css/hyperion.css
+++ b/assets/webconfig/css/hyperion.css
@@ -10,11 +10,11 @@ body{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:15
padding-bottom:50px;
}
body{
- overflow-y: scroll;
+ overflow-y: scroll;
}
.btn{margin: 2px 0;}
/*
-#page-wrapper a[target=_blank]::after {
+#page-wrapper a[target=_blank]::after {
content:"\f08e";
position:relative;
font:normal normal normal 10px/1 FontAwesome;
@@ -109,7 +109,7 @@ table label{margin:0}
.colorpicker-2x .colorpicker-saturation {width: 200px;height: 200px;}
.colorpicker-2x .colorpicker-hue,.colorpicker-2x .colorpicker-alpha {width: 30px;height: 200px;}
.colorpicker-2x .colorpicker-color,.colorpicker-2x .colorpicker-color div {height: 30px;}
-
+
/*Hint*/
.info-hint{
background-color:rgb(236,236,236);
@@ -123,7 +123,7 @@ table label{margin:0}
box-shadow: 1px 1px 1px 0px rgba(0,0,0,0.25);
font-size:97%;
}
-
+
/*Support page*/
.unlink,.unlink:hover{color:#333;text-decoration:none;}
.support-container ul{padding-left:0px;list-style-type: none;}
diff --git a/assets/webconfig/i18n/de.json b/assets/webconfig/i18n/de.json
index 81f2329d..fe1bca99 100644
--- a/assets/webconfig/i18n/de.json
+++ b/assets/webconfig/i18n/de.json
@@ -33,6 +33,7 @@
"general_btn_ok": "OK",
"general_btn_cancel": "Abbrechen",
"general_btn_continue": "Fortfahren",
+ "general_btn_delete" : "Löschen",
"general_btn_save": "Speichern",
"general_btn_saverestart": "Speichern und neustarten",
"general_btn_saveandreload": "Speichern und neu laden",
@@ -99,6 +100,14 @@
"conf_general_impexp_l2": "Exportiere eine Konfiguration, indem du auf \"Exportieren\" klickst. Dein Browser startet einen Download.",
"conf_general_impexp_impbtn": "Importieren",
"conf_general_impexp_expbtn": "Exportieren",
+ "conf_general_tok_title" : "Token Management",
+ "conf_general_tok_desc" : "Tokens erlauben andere Anwendungen auf die Hyperion API zuzugreifen. Eine Anwendung kann ein Token anfordern welches von dir bestätigt werden muss oder du erstellst dir selbst ein neues Token. Diese Tokens werden nur benötigt, wenn \"API Autorisierung\" in den Netzwerkeinstellungen aktiviert ist.",
+ "conf_general_tok_cidhead" : "Beschreibung",
+ "conf_general_tok_lastuse" : "Zuletzt genutzt",
+ "conf_general_tok_comment_title" : "Token Beschreibung",
+ "conf_general_createToken_btn" : "Erstelle Token",
+ "conf_general_tok_diaTitle" : "Neues Token erstellt!",
+ "conf_general_tok_diaMsg" : "Hier ist dein neues Token, welches für den Zugriff auf die Hyperion API verwendet werden kann. Aus Sicherheitsgründen können Tokens nach der Erstellung nur einmalig eingesehen werden, notiere es dir daher jetzt.",
"conf_helptable_option": "Option",
"conf_helptable_expl": "Erklärung",
"conf_effect_path_intro": "Hier kannst du Ordner angeben, die beim Laden von Effekten berücksichtig werden sollen. Zusätzlich können Effekte anhand ihres Namens deaktiviert werden um sie aus Listen zu löschen.",
@@ -167,6 +176,7 @@
"conf_colors_color_intro": "Erstelle Kalibrierungsprofile die einzelnen Komponenten zugewisen werden können. Passe dabei Farben, Gamma, Helligkeit, Kompensation und mehr an.",
"conf_colors_smoothing_intro": "Glätte den Farbverlauf und Helligkeitsänderungen um nicht von schnellen Übergängen abgelenkt zu werden.",
"conf_colors_blackborder_intro": "Ignoriere schwarze Balken, jeder Modus nutzt einen anderen Algorithmus um diese zu erkennen. Erhöhe die Schwelle, sollte es nicht funktionieren.",
+ "conf_network_net_intro" : "Einstellungen zum Netzwerk die für alle Netzwerk-Dienste gelten",
"conf_network_json_intro": "Der JSON-RPC-Port dieser Hyperion-Instanz, wird genutzt zur Fernsteuerung.",
"conf_network_bobl_intro": "Boblight Empfänger",
"conf_network_udpl_intro": "UDP Empfänger",
@@ -575,6 +585,16 @@
"edt_conf_fw_proto_title": "Liste von Proto zielen",
"edt_conf_fw_proto_expl": "Ein Proto Ziel pro Zeile. Bestehend aus IP:PORT (Beispiel: 127.0.0.1:19401)",
"edt_conf_fw_proto_itemtitle": "Proto Ziel",
+ "edt_conf_net_heading_title" : "Network",
+ "edt_conf_net_internetAccessAPI_title":"Internet API Zugriff",
+ "edt_conf_net_internetAccessAPI_expl":"Erlaube Zugriff auf die Hyperion API/Webinterface aus dem Internet, deaktivieren für höhere Sicherheit.",
+ "edt_conf_net_ipWhitelist_title":"Erlaubte IP's",
+ "edt_conf_net_ipWhitelist_expl":"Anstatt den Zugriff für alle Verbindungen aus dem Internet zu erlauben kannst du hier Ausnahmen für zugelassene IP Adressen hinzufügen.",
+ "edt_conf_net_ip_itemtitle":"IP",
+ "edt_conf_net_apiAuth_title":"API Authentifizierung",
+ "edt_conf_net_apiAuth_expl":"Zwinge alle Anwendungen welche die Hyperion API nutzen sich zu authentifizieren. Aktivieren für höhere Sicherheit, da nun jede neue Anwendung einmalig von dir bestätigt werden muss.",
+ "edt_conf_net_localApiAuth_title" : "Lokale API Authentifizierung",
+ "edt_conf_net_localApiAuth_expl" : "Wenn aktiviert, müssen Verbindungen aus dem Heimnetzwerk mit einem Token authentifiziert werden.",
"edt_conf_js_heading_title": "JSON Server",
"edt_conf_fbs_heading_title": "Flatbuffers Server",
"edt_conf_fbs_timeout_title": "Zeitüberschreitung",
diff --git a/assets/webconfig/i18n/en.json b/assets/webconfig/i18n/en.json
index bdec0fb5..4a72979d 100644
--- a/assets/webconfig/i18n/en.json
+++ b/assets/webconfig/i18n/en.json
@@ -32,6 +32,7 @@
"general_btn_yes" : "Yes",
"general_btn_ok" : "OK",
"general_btn_cancel" : "Cancel",
+ "general_btn_delete" : "Delete",
"general_btn_continue" : "Continue",
"general_btn_save" : "Save",
"general_btn_saverestart" : "Save and restart",
@@ -99,6 +100,14 @@
"conf_general_impexp_l2" : "Export a configuration by clicking on \"Export\". Your browser starts a download.",
"conf_general_impexp_impbtn" : "Import",
"conf_general_impexp_expbtn" : "Export",
+ "conf_general_tok_title" : "Token management",
+ "conf_general_tok_desc" : "Tokens grant other applications access to the Hyperion API, an application can request a token where you need to accept it or you create them on your own below. These tokens are just required when \"API Authorization\" is enabled in network settings.",
+ "conf_general_tok_cidhead" : "Description",
+ "conf_general_tok_lastuse" : "Last use",
+ "conf_general_tok_comment_title" : "Token description",
+ "conf_general_createToken_btn" : "Create Token",
+ "conf_general_tok_diaTitle" : "New Token created!",
+ "conf_general_tok_diaMsg" : "Here is your new token which can be used to grant an application access to the Hyperion API. For security reasons you can't view it again so use/note it now.",
"conf_helptable_option" : "Option",
"conf_helptable_expl" : "Explanation",
"conf_effect_path_intro" : "Load effects from the defined paths. Additional you can disable single effects by name to hide them from all effect lists.",
@@ -167,6 +176,7 @@
"conf_colors_color_intro" : "Create one or more calibration profiles, adjust each color, brightness, linearization and more.",
"conf_colors_smoothing_intro" : "Smoothing flattens color/brightness changes to reduce annoying distraction.",
"conf_colors_blackborder_intro" : "Skip black bars wherever they are. Each mode use another detection algorithm which is tuned for special situations. Higher the threshold if it doesn't work for you.",
+ "conf_network_net_intro" : "Network related settings which are applied to all network services.",
"conf_network_json_intro" : "The JSON-RPC-Port of this Hyperion instance, used for remote control.",
"conf_network_bobl_intro" : "Receiver for Boblight",
"conf_network_udpl_intro" : "Receiver for UDP",
@@ -575,6 +585,16 @@
"edt_conf_fw_proto_title" : "List of proto clients",
"edt_conf_fw_proto_expl" : "One proto target per line. Contains IP:PORT (Example: 127.0.0.1:19401)",
"edt_conf_fw_proto_itemtitle" : "Proto target",
+ "edt_conf_net_heading_title" : "Network",
+ "edt_conf_net_internetAccessAPI_title":"Internet API Access",
+ "edt_conf_net_internetAccessAPI_expl":"Allow access to the Hyperion API/Webinterface from the internet, disable for higher security.",
+ "edt_conf_net_ipWhitelist_title":"Whitelisted IP's",
+ "edt_conf_net_ipWhitelist_expl":"You can whitelist IP addresses instead allowing all connections from internet to connect to the Hyperion API/Webinterface.",
+ "edt_conf_net_ip_itemtitle":"IP",
+ "edt_conf_net_apiAuth_title":"API Authentication",
+ "edt_conf_net_apiAuth_expl":"Enforce all applications that use the Hyperion API to authenticate themself against Hyperion. Higher security, as you control the access and revoke it at any time.",
+ "edt_conf_net_localApiAuth_title" : "Local API Authentication",
+ "edt_conf_net_localApiAuth_expl" : "When enabled, connections from your home network needs to authenticate themself against Hyperion too.",
"edt_conf_js_heading_title" : "JSON Server",
"edt_conf_fbs_heading_title" : "Flatbuffers Server",
"edt_conf_fbs_timeout_title" : "Timeout",
diff --git a/assets/webconfig/js/content_general.js b/assets/webconfig/js/content_general.js
index 614f2ba5..aad6df7c 100644
--- a/assets/webconfig/js/content_general.js
+++ b/assets/webconfig/js/content_general.js
@@ -25,6 +25,50 @@ $(document).ready( function() {
requestWriteConfig(conf_editor.getValue());
});
+ // Token handling
+ function buildTokenList()
+ {
+ console.log(tokenList)
+ $('.tktbody').html("");
+ for(var key in tokenList)
+ {
+ var lastUse = (tokenList[key].last_use) ? tokenList[key].last_use : "-";
+ var btn = '';
+ $('.tktbody').append(createTableRow([tokenList[key].comment, lastUse, btn], false, true));
+ $('#tok'+tokenList[key].id).off().on('click', handleDeleteToken);
+ }
+ }
+
+ createTable('tkthead', 'tktbody', 'tktable');
+ $('.tkthead').html(createTableRow([$.i18n('conf_general_tok_cidhead'), $.i18n('conf_general_tok_lastuse'), $.i18n('general_btn_delete')], true, true));
+ buildTokenList();
+
+ function handleDeleteToken(e)
+ {
+ var key = e.currentTarget.id.replace("tok","");
+ requestTokenDelete(key);
+ $('#tok'+key).parent().parent().remove();
+ // rm deleted token id
+ tokenList = tokenList.filter(function( obj ) {
+ return obj.id !== key;
+ });
+ }
+
+ $('#btn_create_tok').off().on('click',function() {
+ requestToken($('#tok_comment').val())
+ $('#tok_comment').val("")
+ $('#btn_create_tok').attr('disabled', true)
+ });
+ $('#tok_comment').off().on('input',function(e) {
+ (e.currentTarget.value.length >= 10) ? $('#btn_create_tok').attr('disabled', false) : $('#btn_create_tok').attr('disabled', true);
+ });
+ $(window.hyperion).off("cmd-authorize-createToken").on("cmd-authorize-createToken", function(event) {
+ var val = event.response.info;
+ showInfoDialog("newToken",$.i18n('conf_general_tok_diaTitle'),$.i18n('conf_general_tok_diaMsg')+'