nl-kat-coordination
nl-kat-coordination copied to clipboard
Plugin defaults not rendered / enabled in UI.
Describe the bug
Default settings for plugins (using the default
key in .json
schema) are not rendered in the UI and also seem not to be applied from .json
.
To Reproduce Steps to reproduce the behavior:
- Go to CVEfindingtypes boefje in interface
- Notice missing default value.
Expected behavior
- Rendering defaults from .json in UI
- Setting the default from .json in environment variables (make sure this does not clash with environment overrides from backend)
Screenshots
even though
https://github.com/minvws/nl-kat-coordination/blob/724fb127db0018447848f8540a1c5a52a85a0624/boefjes/boefjes/plugins/kat_cve_finding_types/schema.json#L10
OpenKAT version 1.10.0rc2
Additional context https://github.com/minvws/nl-kat-coordination/pull/1378#discussion_r1264985790
So, two separate issues here:
- If no setting-value is available in the katalogus for this plugin , use the schema specified default if available.
- When rendering the settings form pre-fill all fields with the schema-specified default value if available. This way they will get stored in the katalogus when enabling this plugin, and end up being used to we don't have to check in the schema again when using the plugin.