Skip to content

Commit

Permalink
modules admin, core, http, mqtt and websocket: Added gui_type for boo…
Browse files Browse the repository at this point in the history
…lean parameters
  • Loading branch information
msinn committed Jul 1, 2024
1 parent fd77b41 commit 3783a79
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
6 changes: 6 additions & 0 deletions modules/admin/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ parameters:

login_autorenew:
type: bool
gui_type: yes_no
default: True
description:
de: 'Bestehendes Login-Token automatisch verlängern'
Expand All @@ -37,6 +38,7 @@ parameters:

itemtree_fullpath:
type: bool
gui_type: yes_no
default: True
description:
de: 'Im Item-Tree die Items mit vollem Pfad-Namen anzeigen'
Expand Down Expand Up @@ -81,19 +83,23 @@ parameters:
developer_mode:
type: bool
default: False
gui_type: on_off

description:
de: 'Entwickler Modus aktivieren (Ist für das Core Entwickler Team gedacht)'
en: 'Activate developer mode'

rest_dispatch_force_exception:
type: bool
gui_type: yes_no
default: False
description:
de: 'Sollen WARNINGs aus REST_dispatch_execute als EXECPTION geloggt werden?'
en: 'Activate developer mode'

click_dropdown_header:
type: bool
gui_type: yes_no
default: False
description:
de: 'Click auf Kopfeintrag von Dropdown Menüs erlauben'
Expand Down
5 changes: 4 additions & 1 deletion modules/admin/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ def REST_dispatch(self, root, resource, **params):
@cherrypy.expose
def default(self, *vpath, **params):
self.logger.info(f"RESTResource.default: *vpath={vpath}, **params={params} {type(vpath)=}")
self.set_response_headers(*vpath)
try:
self.set_response_headers(*vpath)
except Exception as ex:
self.logger.error(f"reas.py default: Exception {ex} - parameters: {vpath}")
if not vpath:
resource = None
# self.logger.info("RESTResource.default: vpath = '{}', params = '{}'".format(list(vpath), dict(**params)))
Expand Down
2 changes: 2 additions & 0 deletions modules/core/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ parameters:

use_conditional_triggers:
type: bool
gui_type: yes_no
default: False
description:
de: 'Advanced: Verwendung konditionaler Trigger zulassen'
Expand All @@ -78,6 +79,7 @@ parameters:
deprecated_warnings:
type: bool
default: False
gui_type: yes_no
description:
de: 'Advanced: Warnungen loggen, wenn Funktionen/Methoden aufgerufen werden, die als veraltet gekennzeichnet sind'
en: 'Advanced: Log warnings, if functions/methods are used which are flaged as deprecated'
Expand Down
4 changes: 4 additions & 0 deletions modules/http/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ parameters:
fr: Numéro de port pour l'accès à l'interface web si utilisation de https
use_tls:
type: bool
gui_type: yes_no
default: False
description:
de: Auf True setzen, um Zugriffe über https:// zu ermöglichen (Zertifikat muss installiert sein)
Expand Down Expand Up @@ -118,6 +119,7 @@ parameters:

showpluginlist:
type: bool
gui_type: yes_no
default: True
description:
de: Anzeige einer Liste der Plugins mit Webinterfaces unter der url /plugins
Expand All @@ -126,6 +128,7 @@ parameters:

showservicelist:
type: bool
gui_type: yes_no
default: False
description:
de: Anzeige einer Liste der Plugins mit Webservices unter der url /services
Expand Down Expand Up @@ -158,6 +161,7 @@ parameters:

showtraceback:
type: bool
gui_type: yes_no
default: False
description:
de: Traceback bei Python Exceptions in der Fehlermeldung im Browser anzeigen. (Sollte in Produktionsinstallationen False sein)
Expand Down
4 changes: 4 additions & 0 deletions modules/mqtt/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ parameters:

enabled:
type: bool
gui_type: yes_no
default: False
description:
de: 'MQTT Unterstützung aktivieren oder deaktivieren'
Expand Down Expand Up @@ -112,6 +113,7 @@ parameters:

broker_monitoring:
type: bool
gui_type: yes_no
default: False
description:
de: 'Ermöglicht das Monitoring einiger Broker Werte durch das Web Interfase.'
Expand Down Expand Up @@ -209,6 +211,7 @@ parameters:
# publish_items:
# type: bool
# default: False
# gui_type: yes_no
# description:
# de: 'Publiziere die Items'
# en: 'Publish Items'
Expand Down Expand Up @@ -245,6 +248,7 @@ parameters:

# tls: # Not yet implemented
# type: bool
# gui_type: yes_no
# default: False
# description:
# de: 'tls zur Verschlüsselung nutzen'
Expand Down
2 changes: 2 additions & 0 deletions modules/websocket/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ parameters:
# Definition of parameters to be configured in etc/module.yaml
enabled:
type: bool
gui_type: yes_no
default: True
description:
de: 'Websocket Unterstützung aktivieren oder deaktivieren'
Expand Down Expand Up @@ -46,6 +47,7 @@ parameters:
fr: Numéro de port pour l'accès à l'interface web si utilisation de wss
use_tls:
type: bool
gui_type: yes_no
default: False
description:
de: Auf True setzen, um Zugriffe über wss:// zu ermöglichen (Zertifikat muss installiert sein)
Expand Down

0 comments on commit 3783a79

Please sign in to comment.