xhiroga / aws-peacock-management-console

Browser Extension to show account alias and change color of AWS Management Console, even if AWS SSO.
MIT License
81 stars 7 forks source link

Edit the configuration in a spreadsheet / table view #46

Closed raghuvv closed 2 years ago

raghuvv commented 2 years ago

Description

(optionally) display the configuration as a editable table so that we avoid JSON syntax errors by users.

Other information

No response

Acknowledge

umireon commented 2 years ago

@xhiroga ReactでJSON Schemaをフォーム化するライブラリ:https://react-jsonschema-form.readthedocs.io/en/latest/ 上記を利用してこのアドオン用に作ったフォーム:https://codepen.io/umireon/pen/abqVRYy

できました

JSON Schema

{
  "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"
        }
      }
    }
  }
}
xhiroga commented 2 years ago

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

xhiroga commented 2 years ago

Thanks @umireon san! https://umireon.github.io/aws-peacock-management-console-config-editor/

raghuvv commented 2 years ago

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!