You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/08/31 08:56:08 UTC

[GitHub] [incubator-devlake] likyh commented on pull request #2886: feat: setup configuration-ui plugin registry

likyh commented on PR #2886:
URL: https://github.com/apache/incubator-devlake/pull/2886#issuecomment-1232662913

   > Wouldn't it be better to define the properties of the field like this:
   > 
   > ```
   > ...
   > {
   >     "authentication": "token",
   >     "fields": [
   >         {
   >             "name": "name",
   >             "label": "Connection Name",
   >             "placeholder": "eg.GitLab",
   >             "enable": true,
   >             "required": true,
   >             "readonly": false
   >         },
   >         {
   >             "name": "endpoint",
   >             "label": "Endpoint URL",
   >             "placeholder": "eg. https://gitlab.com/api/v4/"
   >         },
   >         {
   >             "name": "token",
   >             "label": "Access Token",
   >             "placeholder": "eg. ff9d1ad0e5c04f1f98fa"
   >         }
   >     ]
   > }
   > ...
   > ```
   > 
   > This has at least the following benefits:
   > 
   > * Focus on all properties of a field when defining fields, rather than defining them in scattered places.
   > * The form of the fileds array can solve the sorting problem of the fields, and the way of using the JSON object is likely to cause the problem of the traversal order.
   > 
   > In addition, do you need to add some other attributes to the field, such as
   > 
   > * showType, which represents front-end display components, such as input, select, checkbox, etc.
   > * validation, which represents standard validation rules, including regular validation, length validation, etc.
   > * multiple, which means that it is a multiple format, such as the PAT of the GitHub plugin, you can fill in multiple.
   > 
   > There is some information in this issue #2846
   
   I think so.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org