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 03:06:18 UTC

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

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

   Is it better for the fields of the connection?
   
   ```
   ...
   {
       "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 https://github.com/apache/incubator-devlake/issues/2846


-- 
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