Service webgui
webgui.py
The web-based graphical user interface of mercure.
- class webgui.ExtendedUser(username: str, is_admin: bool = False)[source]
Bases:
SimpleUser
- property is_admin: bool
- async webgui.configuration(request) Response [source]
Shows the current configuration of the mercure appliance.
- async webgui.configuration_edit_post(request) Response [source]
Updates the configuration after post from editor
- async webgui.emergency_response(request) Response [source]
Shows emergency message about invalid configuration.
- async webgui.error(request)[source]
An example error. Switch the debug setting to see either tracebacks or 500 pages.
- webgui.get_nomad_logs(service, log_size: int) bytes [source]
Reads the service log when running a nomad-type installation.
- async webgui.homepage(request) Response [source]
Renders the index page that shows information about the system status.
- webgui.launch_emergency_app() None [source]
Launches a minimal application to inform the user about the incorrect configuration
- async webgui.login_post(request) Response [source]
Evaluate the submitted login information. Redirects to index page if login information valid, otherwise back to login. On the first login, the user will be directed to the settings page and asked to change the password.
- async webgui.self_test_cleanup(test_id: str, delay: int = 60) None [source]
Delete the rules and targets for this test after a delay
- async webgui.settings_edit(request) Response [source]
Shows the settings for the current user. Renders the same template as the normal user edit, but with parameter own_settings=True.
- async webgui.show_first_log(request) Response [source]
Get the first service entry and forward to corresponding log entry point.