guardicore / guardicore/monkey
Configuration UI component library
- Dominant language
- Python
- Stars
- 7.1k
- Forks
- 830
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
Currently, there's no way to customize a display component for a specific configuration input field.
We might want to be able to apply different input styles for the same type of input, for example, display one boolean field as a checkmark UI component and another as a switch.
**Describe the solution you'd like**
Add a separate file to the plugin, called UI schema. This file would contain paths to the non-default values and map them to the UI component the developer prefers.
**Describe alternatives you've considered**
Adding a field specifying UI component to the jsonschema itself - it's not a good idea because it's mixing the responsibilities of json document validation and configuration display
## Tasks
- [ ] Create a tag input component. We can create it from scratch using input fields and [MUI chip components](https://mui.com/material-ui/react-chip/#chip-array) or try to find pre-established component like https://github.com/viclafouch/mui-chips-input
- [ ] Create a UI schema for a component that will use the chips-input
- [ ] Change agent plugin service to store the UI schema
- [ ] Change agent plugin service resource to serve UI schema plugins
- [ ] Create a component library mapping that links component name to a pre-defined UI component
- [ ] Create infrastructure to extend a pre-defined UI schema with a UI schema for a plugin.
- [ ] Document the component library (maybe story-book? or manual docs)
Contributor guide
Assessment
This issue has not been assessed yet.