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

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

commit a71b17ddd399845c9974502e2c69850bd10465ce
Author: mintsweet <[email protected]>
AuthorDate: Wed Oct 18 20:17:23 2023 +1300

    refactor(config-ui): remove field connection type from connection
---
 config-ui/src/plugins/register/azure/config.tsx    |  2 -
 config-ui/src/plugins/register/bamboo/config.ts    |  2 -
 .../src/plugins/register/bitbucket/config.tsx      |  2 -
 config-ui/src/plugins/register/github/config.tsx   |  2 -
 config-ui/src/plugins/register/gitlab/config.tsx   |  2 -
 config-ui/src/plugins/register/jenkins/config.ts   |  2 -
 config-ui/src/plugins/register/jira/config.tsx     |  2 -
 .../src/plugins/register/pagerduty/config.tsx      |  2 -
 config-ui/src/plugins/register/sonarqube/config.ts |  2 -
 config-ui/src/plugins/register/tapd/config.tsx     |  2 -
 .../plugins/register/teambition/assets/icon.svg    |  5 --
 .../src/plugins/register/teambition/config.tsx     | 97 ----------------------
 .../register/teambition/connection-fields/index.ts | 20 -----
 .../teambition/connection-fields/styled.ts         | 32 -------
 .../teambition/connection-fields/tenant-id.tsx     | 72 ----------------
 .../teambition/connection-fields/tenant-type.tsx   | 76 -----------------
 config-ui/src/plugins/register/teambition/index.ts | 19 -----
 config-ui/src/plugins/register/webhook/config.ts   |  2 -
 config-ui/src/plugins/register/zentao/config.tsx   |  2 -
 config-ui/src/plugins/types.ts                     |  6 --
 config-ui/src/plugins/utils.ts                     |  3 +-
 21 files changed, 1 insertion(+), 353 deletions(-)

diff --git a/config-ui/src/plugins/register/azure/config.tsx 
b/config-ui/src/plugins/register/azure/config.tsx
index 500a4e389..799d15a3e 100644
--- a/config-ui/src/plugins/register/azure/config.tsx
+++ b/config-ui/src/plugins/register/azure/config.tsx
@@ -20,13 +20,11 @@ import { ExternalLink } from '@/components';
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 import { BaseURL } from './connection-fields';
 
 export const AzureConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'azuredevops',
   name: 'Azure DevOps',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/bamboo/config.ts 
b/config-ui/src/plugins/register/bamboo/config.ts
index 10ccbf44b..b2c78850c 100644
--- a/config-ui/src/plugins/register/bamboo/config.ts
+++ b/config-ui/src/plugins/register/bamboo/config.ts
@@ -19,12 +19,10 @@
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 
 export const BambooConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'bamboo',
   name: 'Bamboo',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/bitbucket/config.tsx 
b/config-ui/src/plugins/register/bitbucket/config.tsx
index 11c03bb3d..97840f382 100644
--- a/config-ui/src/plugins/register/bitbucket/config.tsx
+++ b/config-ui/src/plugins/register/bitbucket/config.tsx
@@ -19,12 +19,10 @@
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 
 export const BitBucketConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'bitbucket',
   name: 'BitBucket',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/github/config.tsx 
b/config-ui/src/plugins/register/github/config.tsx
index fc255675f..f79b56eaa 100644
--- a/config-ui/src/plugins/register/github/config.tsx
+++ b/config-ui/src/plugins/register/github/config.tsx
@@ -21,13 +21,11 @@ import { pick } from 'lodash';
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 import { Token, Graphql, GithubApp, Authentication } from 
'./connection-fields';
 
 export const GitHubConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'github',
   name: 'GitHub',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/gitlab/config.tsx 
b/config-ui/src/plugins/register/gitlab/config.tsx
index 53d11d044..74bd7f007 100644
--- a/config-ui/src/plugins/register/gitlab/config.tsx
+++ b/config-ui/src/plugins/register/gitlab/config.tsx
@@ -20,12 +20,10 @@ import { ExternalLink } from '@/components';
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 
 export const GitLabConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'gitlab',
   name: 'GitLab',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/jenkins/config.ts 
b/config-ui/src/plugins/register/jenkins/config.ts
index fc77932ac..fb08df4e7 100644
--- a/config-ui/src/plugins/register/jenkins/config.ts
+++ b/config-ui/src/plugins/register/jenkins/config.ts
@@ -19,12 +19,10 @@
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 
 export const JenkinsConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'jenkins',
   name: 'Jenkins',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/jira/config.tsx 
b/config-ui/src/plugins/register/jira/config.tsx
index 3daa049f5..ce81ecd44 100644
--- a/config-ui/src/plugins/register/jira/config.tsx
+++ b/config-ui/src/plugins/register/jira/config.tsx
@@ -19,13 +19,11 @@
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 import { Auth } from './connection-fields';
 
 export const JiraConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'jira',
   name: 'Jira',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/pagerduty/config.tsx 
b/config-ui/src/plugins/register/pagerduty/config.tsx
index 5c115711f..b7f7ab351 100644
--- a/config-ui/src/plugins/register/pagerduty/config.tsx
+++ b/config-ui/src/plugins/register/pagerduty/config.tsx
@@ -19,12 +19,10 @@
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 
 export const PagerDutyConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'pagerduty',
   name: 'PagerDuty',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/sonarqube/config.ts 
b/config-ui/src/plugins/register/sonarqube/config.ts
index db6bfe17e..c64db0837 100644
--- a/config-ui/src/plugins/register/sonarqube/config.ts
+++ b/config-ui/src/plugins/register/sonarqube/config.ts
@@ -19,12 +19,10 @@
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 
 export const SonarQubeConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'sonarqube',
   name: 'SonarQube',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/tapd/config.tsx 
b/config-ui/src/plugins/register/tapd/config.tsx
index 0625f6aab..a3a2026b3 100644
--- a/config-ui/src/plugins/register/tapd/config.tsx
+++ b/config-ui/src/plugins/register/tapd/config.tsx
@@ -20,13 +20,11 @@ import { ExternalLink } from '@/components';
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import { DataScope } from './data-scope';
 import Icon from './assets/icon.svg';
 
 export const TAPDConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'tapd',
   name: 'TAPD',
   icon: Icon,
diff --git a/config-ui/src/plugins/register/teambition/assets/icon.svg 
b/config-ui/src/plugins/register/teambition/assets/icon.svg
deleted file mode 100644
index 93d227f72..000000000
--- a/config-ui/src/plugins/register/teambition/assets/icon.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="36" height="36" viewBox="0 0 36 36" fill="none" 
xmlns="http://www.w3.org/2000/svg";>
-<path d="M24.8601 7.75227C24.8606 6.58118 25.3105 5.45494 26.1169 
4.60578C26.9234 3.75663 28.025 3.24932 29.1945 3.18845C26.7937 3.06965 24.1226 
3 21.345 3C10.6606 3 2 3.98733 2 5.20407C2 6.42082 10.6606 7.40814 21.345 
7.40814V12.3243H28.9487C28.7076 12.3059 28.4704 12.2535 28.244 12.1686C27.2724 
11.9079 26.414 11.3336 25.8021 10.5351C25.1902 9.73651 24.8591 8.7583 24.8601 
7.75227Z" fill="#BDCEFB"/>
-<path d="M21.345 7.40329C10.6606 7.40329 2 6.41596 2 5.19922V13.1757C2 14.0892 
6.86288 14.8717 13.7987 15.2241V30.9066L21.4024 32.3609L21.345 7.40329Z" 
fill="#7497F7"/>
-<path d="M29.428 12.3237C31.953 12.3237 34 10.2768 34 7.7517C34 5.22665 31.953 
3.17969 29.428 3.17969C26.9029 3.17969 24.856 5.22665 24.856 7.7517C24.856 
10.2768 26.9029 12.3237 29.428 12.3237Z" fill="#7497F7"/>
-</svg>
diff --git a/config-ui/src/plugins/register/teambition/config.tsx 
b/config-ui/src/plugins/register/teambition/config.tsx
deleted file mode 100644
index 079ca4d1a..000000000
--- a/config-ui/src/plugins/register/teambition/config.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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.
- *
- */
-
-import { DOC_URL } from '@/release';
-
-import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
-
-import Icon from './assets/icon.svg';
-import { ConnectionTenantId, ConnectionTenantType } from './connection-fields';
-
-export const TeambitionConfig: PluginConfigType = {
-  type: PluginType.Pipeline,
-  plugin: 'teambition',
-  name: 'Teambition',
-  isBeta: true,
-  icon: Icon,
-  sort: 100,
-  connection: {
-    docLink: DOC_URL.PLUGIN.TEAMBITION.BASIS,
-    initialValues: {
-      endpoint: 'https://open.teambition.com/api/',
-      tenantType: 'organization',
-    },
-    fields: [
-      'name',
-      {
-        key: 'endpoint',
-        subLabel: 'You do not need to enter the endpoint URL, because all 
versions use the same URL.',
-        disabled: true,
-      },
-      {
-        key: 'appId',
-        label: 'Application App Id',
-        subLabel: 'Your teambition application App Id.',
-      },
-      {
-        key: 'secretKey',
-        label: 'Application Secret Key',
-        subLabel: 'Your teambition application App Secret.',
-      },
-      ({ initialValues, values, errors, setValues, setErrors }: any) => (
-        <ConnectionTenantId
-          key="tenantId"
-          name="tenantId"
-          value={values.tenantId ?? ''}
-          error={errors.tenantId ?? ''}
-          setValue={(value) => setValues({ tenantId: value })}
-          setError={(value) => setErrors({ tenantId: value })}
-          initialValue={initialValues.tenantId}
-        />
-      ),
-      ({ initialValues, values, errors, setValues, setErrors }: any) => (
-        <ConnectionTenantType
-          key="tenantType"
-          name="tenantType"
-          value={values.tenantType ?? ''}
-          error={errors.tenantType ?? ''}
-          setValue={(value) => setValues({ tenantType: value })}
-          setError={(value) => setErrors({ tenantType: value })}
-          initialValue={initialValues.tenantType}
-        />
-      ),
-      'proxy',
-      {
-        key: 'rateLimitPerHour',
-        subLabel:
-          'By default, DevLake uses dynamic rate limit for optimized data 
collection for Teambition. But you can adjust the collection speed by entering 
a fixed value. Please note: the rate limit setting applies to all tokens you 
have entered above.',
-        learnMore: DOC_URL.PLUGIN.TEAMBITION.RATE_LIMIT,
-        externalInfo: 'Teambition does not specify a maximum value of rate 
limit.',
-        defaultValue: 5000,
-      },
-    ],
-  },
-  dataScope: {
-    title: '',
-  },
-  scopeConfig: {
-    entities: ['TICKET'],
-    transformation: {},
-  },
-};
diff --git 
a/config-ui/src/plugins/register/teambition/connection-fields/index.ts 
b/config-ui/src/plugins/register/teambition/connection-fields/index.ts
deleted file mode 100644
index b2481eb94..000000000
--- a/config-ui/src/plugins/register/teambition/connection-fields/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- *
- */
-
-export * from './tenant-id';
-export * from './tenant-type';
diff --git 
a/config-ui/src/plugins/register/teambition/connection-fields/styled.ts 
b/config-ui/src/plugins/register/teambition/connection-fields/styled.ts
deleted file mode 100644
index 11e47a3d0..000000000
--- a/config-ui/src/plugins/register/teambition/connection-fields/styled.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.
- *
- */
-
-import styled from 'styled-components';
-
-export const Label = styled.label`
-  font-size: 16px;
-  font-weight: 600;
-`;
-
-export const LabelInfo = styled.i`
-  color: #ff8b8b;
-`;
-
-export const LabelDescription = styled.p`
-  margin: 0;
-`;
diff --git 
a/config-ui/src/plugins/register/teambition/connection-fields/tenant-id.tsx 
b/config-ui/src/plugins/register/teambition/connection-fields/tenant-id.tsx
deleted file mode 100644
index a5d1a64d4..000000000
--- a/config-ui/src/plugins/register/teambition/connection-fields/tenant-id.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.
- *
- */
-/*
- * 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.
- *
- */
-
-import { useEffect } from 'react';
-import { FormGroup, InputGroup } from '@blueprintjs/core';
-
-import * as S from './styled';
-
-interface Props {
-  name: string;
-  initialValue: string;
-  value: string;
-  error: string;
-  setValue: (value: string) => void;
-  setError: (error: string) => void;
-}
-
-export const ConnectionTenantId = ({ initialValue, value, setValue, setError 
}: Props) => {
-  useEffect(() => {
-    setValue(initialValue);
-  }, [initialValue]);
-
-  useEffect(() => {
-    setError(value ? '' : 'TenantId is required');
-  }, [value]);
-
-  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
-    setValue(e.target.value);
-  };
-
-  return (
-    <FormGroup
-      label={<S.Label>Tenant Id</S.Label>}
-      labelInfo={<S.LabelInfo>*</S.LabelInfo>}
-      subLabel={<S.LabelDescription>Your teambition organization 
id.</S.LabelDescription>}
-    >
-      <InputGroup placeholder="Your TenantId" value={value} 
onChange={handleChange} />
-    </FormGroup>
-  );
-};
diff --git 
a/config-ui/src/plugins/register/teambition/connection-fields/tenant-type.tsx 
b/config-ui/src/plugins/register/teambition/connection-fields/tenant-type.tsx
deleted file mode 100644
index 613f48b87..000000000
--- 
a/config-ui/src/plugins/register/teambition/connection-fields/tenant-type.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * 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.
- *
- */
-/*
- * 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.
- *
- */
-
-import { useEffect } from 'react';
-import { FormGroup, InputGroup } from '@blueprintjs/core';
-
-import * as S from './styled';
-
-interface Props {
-  name: string;
-  initialValue: string;
-  value: string;
-  error: string;
-  setValue: (value: string) => void;
-  setError: (error: string) => void;
-}
-
-export const ConnectionTenantType = ({ initialValue, value, setValue, setError 
}: Props) => {
-  useEffect(() => {
-    setValue(initialValue);
-  }, [initialValue]);
-
-  useEffect(() => {
-    setError(value ? '' : 'TenantType is required');
-  }, [value]);
-
-  const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
-    setValue(e.target.value);
-  };
-
-  return (
-    <FormGroup
-      label={<S.Label>Tenant Type</S.Label>}
-      labelInfo={<S.LabelInfo>*</S.LabelInfo>}
-      subLabel={
-        <S.LabelDescription>
-          You do not need to enter the tenant type, because teambition only 
supports 'organization' type currently.
-        </S.LabelDescription>
-      }
-    >
-      <InputGroup disabled={true} placeholder="Your API Tenant Type" 
value={value} onChange={handleChange} />
-    </FormGroup>
-  );
-};
diff --git a/config-ui/src/plugins/register/teambition/index.ts 
b/config-ui/src/plugins/register/teambition/index.ts
deleted file mode 100644
index de415db39..000000000
--- a/config-ui/src/plugins/register/teambition/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * 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.
- *
- */
-
-export * from './config';
diff --git a/config-ui/src/plugins/register/webhook/config.ts 
b/config-ui/src/plugins/register/webhook/config.ts
index 25088545d..b0f74c680 100644
--- a/config-ui/src/plugins/register/webhook/config.ts
+++ b/config-ui/src/plugins/register/webhook/config.ts
@@ -17,14 +17,12 @@
  */
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import Icon from './assets/icon.svg';
 
 export const WebhookConfig: PluginConfigType = {
   plugin: 'webhook',
   name: 'Webhook',
-  type: PluginType.Connection,
   icon: Icon,
   sort: 100,
   connection: {
diff --git a/config-ui/src/plugins/register/zentao/config.tsx 
b/config-ui/src/plugins/register/zentao/config.tsx
index c5ee0ccb1..705225dc7 100644
--- a/config-ui/src/plugins/register/zentao/config.tsx
+++ b/config-ui/src/plugins/register/zentao/config.tsx
@@ -19,13 +19,11 @@
 import { DOC_URL } from '@/release';
 
 import type { PluginConfigType } from '../../types';
-import { PluginType } from '../../types';
 
 import { DBUrl } from './connection-fields';
 import Icon from './assets/icon.svg';
 
 export const ZenTaoConfig: PluginConfigType = {
-  type: PluginType.Connection,
   plugin: 'zentao',
   name: 'ZenTao',
   icon: Icon,
diff --git a/config-ui/src/plugins/types.ts b/config-ui/src/plugins/types.ts
index b79e6c7c7..941a4715e 100644
--- a/config-ui/src/plugins/types.ts
+++ b/config-ui/src/plugins/types.ts
@@ -16,13 +16,7 @@
  *
  */
 
-export enum PluginType {
-  Connection = 'connection',
-  Pipeline = 'pipeline',
-}
-
 export type PluginConfigType = {
-  type: PluginType;
   plugin: string;
   name: string;
   icon: string;
diff --git a/config-ui/src/plugins/utils.ts b/config-ui/src/plugins/utils.ts
index f58667ffd..23e7af5f4 100644
--- a/config-ui/src/plugins/utils.ts
+++ b/config-ui/src/plugins/utils.ts
@@ -19,7 +19,7 @@
 import PluginIcon from '@/images/plugin-icon.svg';
 
 import { PluginConfig } from './config';
-import { PluginConfigType, PluginType } from './types';
+import { PluginConfigType } from './types';
 
 export const getPluginScopeId = (plugin: string, scope: any) => {
   switch (plugin) {
@@ -46,7 +46,6 @@ export const getPluginConfig = (name: string): 
PluginConfigType => {
   let pluginConfig = PluginConfig.find((plugin) => plugin.plugin === name) as 
PluginConfigType;
   if (!pluginConfig) {
     pluginConfig = {
-      type: PluginType.Pipeline,
       plugin: name,
       name: name,
       icon: PluginIcon,

Reply via email to