Closed raghuvv closed 2 years ago
@xhiroga ReactでJSON Schemaをフォーム化するライブラリ:https://react-jsonschema-form.readthedocs.io/en/latest/ 上記を利用してこのアドオン用に作ったフォーム:https://codepen.io/umireon/pen/abqVRYy
できました
{
"type": "array",
"items": {
"type": "object",
"required": ["env"],
"properties": {
"env": {
"title": "Environment",
"oneOf": [
{
"title": "Single Environment",
"$ref": "#/definitions/env"
},
{
"title": "Multiple Environment",
"type": "array",
"items": {
"$ref": "#/definitions/env"
}
}
]
},
"style": {
"title": "Style",
"type": "object",
"properties": {
"navigationBackgroundColor": {
"title": "Navigation Background Color",
"type": "string"
},
"accountMenuButtonBackgroundColor": {
"title": "Account Menu Button Color",
"type": "string"
}
}
}
}
},
"definitions": {
"env": {
"type": "object",
"required": ["account"],
"properties": {
"account": {
"title": "Account",
"type": "string",
"pattern": "^\\d{12}$"
},
"region": {
"title": "Region",
"type": "string"
}
}
}
}
}
Sorry, I hope to keep this repo simple. This feature will allow to import config from external, so please not implement GUI editor in this extension. https://github.com/xhiroga/aws-peacock-management-console/issues/44
Thanks @umireon san! https://umireon.github.io/aws-peacock-management-console-config-editor/
Library to form JSON Schema with React : https://react-jsonschema-form.readthedocs.io/en/latest/ Form created for this add-on using the above: https://codepen.io/umireon / pen / abqVRYy
I was able to
This looks so powerful. Thanks for sharing!
Description
(optionally) display the configuration as a editable table so that we avoid JSON syntax errors by users.
Other information
No response
Acknowledge