You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by li...@apache.org on 2023/01/05 10:55:53 UTC

[incubator-devlake] branch main updated: feat(config-ui): turn on zentao and tapd (#4111)

This is an automated email from the ASF dual-hosted git repository.

likyh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new b910ce5e2 feat(config-ui): turn on zentao and tapd (#4111)
b910ce5e2 is described below

commit b910ce5e25bafd70dd7299639b4678fec92471d8
Author: Warren Chen <yi...@merico.dev>
AuthorDate: Thu Jan 5 18:55:48 2023 +0800

    feat(config-ui): turn on zentao and tapd (#4111)
---
 config-ui/src/plugins/tapd/config.ts         | 48 +++++++++++++++++++++++++++-
 config-ui/src/plugins/zentao/assets/icon.svg | 23 ++-----------
 config-ui/src/plugins/zentao/config.ts       | 48 +++++++++++++++++++++++++++-
 3 files changed, 97 insertions(+), 22 deletions(-)

diff --git a/config-ui/src/plugins/tapd/config.ts b/config-ui/src/plugins/tapd/config.ts
index 054915f49..7b90cdb8e 100644
--- a/config-ui/src/plugins/tapd/config.ts
+++ b/config-ui/src/plugins/tapd/config.ts
@@ -24,6 +24,52 @@ import Icon from './assets/icon.svg';
 export const TAPDConfig: PluginConfigType = {
   plugin: Plugins.TAPD,
   name: 'TAPD',
-  type: PluginType.Pipeline,
+  type: PluginType.Connection,
   icon: Icon,
+  connection: {
+    fields: [
+      {
+        key: 'name',
+        label: 'Connection Name',
+        type: 'text',
+        required: true,
+        placeholder: 'eg. ZenTao',
+      },
+      {
+        key: 'endpoint',
+        label: 'Endpoint URL',
+        type: 'text',
+        required: true,
+        placeholder: 'eg. https://api.tapd.cn/',
+      },
+      {
+        key: 'username',
+        label: 'Username',
+        type: 'text',
+        required: true,
+        placeholder: 'eg. admin',
+      },
+      {
+        key: 'password',
+        label: 'Password',
+        type: 'password',
+        required: true,
+        placeholder: 'eg. ************',
+      },
+      {
+        key: 'proxy',
+        label: 'Proxy URL',
+        type: 'text',
+        placeholder: 'eg. http://proxy.localhost:8080',
+      },
+      {
+        key: 'rateLimitPerHour',
+        label: 'Rate Limit (per hour)',
+        type: 'numeric',
+        tooltip: 'Rate Limit requests per hour,\nEnter a numeric value > 0 to enable.',
+      },
+    ],
+  },
+  entities: ['TICKET'],
+  transformation: {},
 };
diff --git a/config-ui/src/plugins/zentao/assets/icon.svg b/config-ui/src/plugins/zentao/assets/icon.svg
index dd7d478cb..8a87d177f 100644
--- a/config-ui/src/plugins/zentao/assets/icon.svg
+++ b/config-ui/src/plugins/zentao/assets/icon.svg
@@ -1,20 +1,3 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="1024" width="1024" viewBox="0 0 1024 1024">
-    <path d="M438.857143 932.571429c-193.828571 0-347.428571-157.257143-347.428572-347.428572 0-10.971429 7.314286-18.285714 18.285715-18.285714h329.142857c10.971429 0 18.285714 7.314286 18.285714 18.285714v329.142857c0 10.971429-7.314286 18.285714-18.285714 18.285715z m-307.2-329.142858c10.971429 153.6 135.314286 277.942857 288.914286 288.914286v-288.914286h-288.914286zM512 932.571429c-10.971429 0-18.285714-7.314286-18.285714-18.285715v-329.142857c0-10.971429 7.314286-18.285714 18.28571 [...]
-    <path d="M727.771429 365.714286c-3.657143 0-7.314286 0-10.971429-3.657143l-219.428571-175.542857 21.942857-29.257143 208.457143 168.228571 215.771428-168.228571 21.942857 29.257143-226.742857 175.542857c-3.657143 3.657143-7.314286 3.657143-10.971428 3.657143z"/>
-</svg>
\ No newline at end of file
+<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M18 2.5C14.8355 2.5 11.7421 3.43838 9.11088 5.19649C6.4797 6.95459 4.42894 9.45345 3.21793 12.3771C2.00693 15.3007 1.69008 18.5177 2.30744 21.6214C2.92481 24.7251 4.44866 27.5761 6.6863 29.8137C8.92394 32.0513 11.7749 33.5752 14.8786 34.1926C17.9823 34.8099 21.1993 34.4931 24.1229 33.2821C27.0466 32.0711 29.5454 30.0203 31.3035 27.3891C33.0616 24.7579 34 21.6645 34 18.5C34 14.2565 32.3143 10.1869 29.3137 7.18629C26.3131 4.18571 22.2435 2.5 18 2.5V2.5ZM27.3675 19.085C26.4589 19.1 [...]
+</svg>
diff --git a/config-ui/src/plugins/zentao/config.ts b/config-ui/src/plugins/zentao/config.ts
index a2f2907e1..2ac9b27ba 100644
--- a/config-ui/src/plugins/zentao/config.ts
+++ b/config-ui/src/plugins/zentao/config.ts
@@ -24,6 +24,52 @@ import Icon from './assets/icon.svg';
 export const ZenTaoConfig: PluginConfigType = {
   plugin: Plugins.ZenTao,
   name: 'ZenTao',
-  type: PluginType.Pipeline,
+  type: PluginType.Connection,
   icon: Icon,
+  connection: {
+    fields: [
+      {
+        key: 'name',
+        label: 'Connection Name',
+        type: 'text',
+        required: true,
+        placeholder: 'eg. ZenTao',
+      },
+      {
+        key: 'endpoint',
+        label: 'Endpoint URL',
+        type: 'text',
+        required: true,
+        placeholder: 'eg. https://your-domain:port/api.php/v1/',
+      },
+      {
+        key: 'username',
+        label: 'Username',
+        type: 'text',
+        required: true,
+        placeholder: 'eg. admin',
+      },
+      {
+        key: 'password',
+        label: 'Password',
+        type: 'password',
+        required: true,
+        placeholder: 'eg. ************',
+      },
+      {
+        key: 'proxy',
+        label: 'Proxy URL',
+        type: 'text',
+        placeholder: 'eg. http://proxy.localhost:8080',
+      },
+      {
+        key: 'rateLimitPerHour',
+        label: 'Rate Limit (per hour)',
+        type: 'numeric',
+        tooltip: 'Rate Limit requests per hour,\nEnter a numeric value > 0 to enable.',
+      },
+    ],
+  },
+  entities: ['TICKET'],
+  transformation: {},
 };