update config_readme.md

This commit is contained in:
Ross Mountjoy 2020-02-08 11:22:20 -05:00
parent fb621ae66d
commit 25c530e5fc
2 changed files with 22 additions and 1 deletions

View File

@ -1,6 +1,11 @@
#### Config.ini Readme #### Config.ini Readme
##### Settings ##### Settings
This is the configuration entry for DashMachine's settings. DashMachine will not work if
this is missing. As for all config entries, [Settings] can only appear once in the config.
If you change the config.ini file, you either have to restart the container
(or python script) or click the save button in the config section of settings for the
config to be applied.
```ini ```ini
[Settings] [Settings]
theme = dark theme = dark
@ -19,6 +24,8 @@ background = static/images/backgrounds/background.png
| settings_access_groups | No | Define which access groups can access the /settings page | Groups defined in your config. If not defined, default is admin_only | | settings_access_groups | No | Define which access groups can access the /settings page | Groups defined in your config. If not defined, default is admin_only |
##### Apps ##### Apps
These entries are the cards that you see one the home page, as well as the sidenav. Entries
must be unique. They are displayed in the order that they appear in config.ini
```ini ```ini
[App Name] [App Name]
prefix = https:// prefix = https://
@ -42,11 +49,17 @@ data_sources = None
| data_sources | No | Data sources to be included on the app's card.*Note: you must have a data source set up in the config above this application entry. | comma separated string | | data_sources | No | Data sources to be included on the app's card.*Note: you must have a data source set up in the config above this application entry. | comma separated string |
##### Access Groups ##### Access Groups
You can create access groups to control what user roles can access parts of the ui. Each
application can have an access group, if the user's role is not in the group, the app will be hidden.
Also, in the settings entry you can specify `home_access_groups` and `settings_access_groups` to control
which groups can access /home and /settings
```ini ```ini
[public] [public]
roles = admin, user, public_user roles = admin, user, public_user
``` ```
> **Note:** if no access groups are defined in the config, the application will create a default group called 'admin_only' with 'roles = admin'
| Variable | Required | Description | Options | | Variable | Required | Description | Options |
|--------------|----------|--------------------------------------------------------------------------------|----------------------------------------------------------------------------------| |--------------|----------|--------------------------------------------------------------------------------|----------------------------------------------------------------------------------|
| [Group Name] | Yes | Name for access group. | [Group Name] | | [Group Name] | Yes | Name for access group. | [Group Name] |
@ -65,6 +78,7 @@ permanent, submit a pull request for it to be added by default!
`data_source = variable_name` `data_source = variable_name`
##### ping ##### ping
Check if a service is online.
```ini ```ini
[variable_name] [variable_name]
platform = ping platform = ping
@ -79,6 +93,7 @@ resource = 192.168.1.1
| resource | Yes | Url of whatever you want to ping | url | | resource | Yes | Url of whatever you want to ping | url |
##### rest ##### rest
Make a call on a REST API and display the results as a jinja formatted string.
```ini ```ini
[variable_name] [variable_name]
platform = rest platform = rest

View File

@ -43,7 +43,13 @@ def settings():
users = User.query.all() users = User.query.all()
config_readme = markdown_path( config_readme = markdown_path(
os.path.join(root_folder, "config_readme.md"), os.path.join(root_folder, "config_readme.md"),
extras=["tables", "fenced-code-blocks", "break-on-newline", "header-ids"], extras=[
"tables",
"fenced-code-blocks",
"break-on-newline",
"header-ids",
"code-friendly",
],
) )
return render_template( return render_template(
"settings_system/settings.html", "settings_system/settings.html",