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 dc0b3e37b fix(config-ui): adjust the text and link for connection 
(#4533)
dc0b3e37b is described below

commit dc0b3e37bd0255c7b230c9d10110eb653d2bea88
Author: 青湛 <[email protected]>
AuthorDate: Tue Feb 28 11:02:12 2023 +0800

    fix(config-ui): adjust the text and link for connection (#4533)
    
    * fix(config-ui): adjust the text and link for connection
    
    * fix(config-ui): adjust the default value from 10000 to 1000 for bitbucket
---
 config-ui/src/error/components/bp-upgrade/api.ts                  | 2 +-
 config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts       | 2 +-
 .../pages/blueprint/components/advanced-editor/example/index.ts   | 2 +-
 .../src/plugins/components/connection-form/fields/endpoint.tsx    | 7 ++++---
 config-ui/src/plugins/components/data-scope/index.tsx             | 4 ++--
 config-ui/src/plugins/components/transformation/index.tsx         | 6 +++---
 config-ui/src/plugins/components/transformation/misc.ts           | 2 +-
 config-ui/src/plugins/config.ts                                   | 4 ++--
 config-ui/src/plugins/register/github/config.tsx                  | 6 +++---
 config-ui/src/plugins/register/github/connection-fields/token.tsx | 5 ++---
 config-ui/src/plugins/register/gitlab/config.tsx                  | 2 ++
 config-ui/src/plugins/register/jira/config.tsx                    | 8 ++++----
 config-ui/src/plugins/register/jira/connection-fields/auth.tsx    | 2 +-
 config-ui/src/plugins/register/jira/data-scope.tsx                | 2 +-
 config-ui/src/plugins/register/jira/transformation.tsx            | 2 +-
 config-ui/src/plugins/register/sonarqube/config.ts                | 8 ++++----
 config-ui/src/plugins/register/tapd/config.tsx                    | 2 +-
 config-ui/src/plugins/register/zentao/config.ts                   | 7 +++++--
 18 files changed, 39 insertions(+), 34 deletions(-)

diff --git a/config-ui/src/error/components/bp-upgrade/api.ts 
b/config-ui/src/error/components/bp-upgrade/api.ts
index 7d5c65e8d..01c1010c2 100644
--- a/config-ui/src/error/components/bp-upgrade/api.ts
+++ b/config-ui/src/error/components/bp-upgrade/api.ts
@@ -36,7 +36,7 @@ export const getGitHub = (prefix: string, owner: string, 
repo: string) => reques
 
 export const getGitLab = (prefix: string, id: ID) => 
request(`${prefix}/projects/${id}`);
 
-export const getJIRA = (prefix: string, id: ID) => 
request(`${prefix}/agile/1.0/board/${id}`);
+export const getJira = (prefix: string, id: ID) => 
request(`${prefix}/agile/1.0/board/${id}`);
 
 export const updateDataScope = (plugin: string, connectionId: ID, repoId: ID, 
payload: any) =>
   request(`/plugins/${plugin}/connections/${connectionId}/scopes/${repoId}`, {
diff --git a/config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts 
b/config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts
index 0a79d9990..3a1a5f1de 100644
--- a/config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts
+++ b/config-ui/src/error/components/bp-upgrade/use-bp-upgrade.ts
@@ -77,7 +77,7 @@ export const useBPUpgrade = ({ id, onResetError }: 
UseBPUpgradeProps) => {
     }
 
     if (plugin === 'jira') {
-      const res = await API.getJIRA(prefix, options.boardId);
+      const res = await API.getJira(prefix, options.boardId);
       return {
         connectionId,
         boardId: res.id,
diff --git 
a/config-ui/src/pages/blueprint/components/advanced-editor/example/index.ts 
b/config-ui/src/pages/blueprint/components/advanced-editor/example/index.ts
index e4c36e6bf..454afea12 100644
--- a/config-ui/src/pages/blueprint/components/advanced-editor/example/index.ts
+++ b/config-ui/src/pages/blueprint/components/advanced-editor/example/index.ts
@@ -57,7 +57,7 @@ export const EXAMPLE_CONFIG = [
   },
   {
     id: 'jira',
-    name: 'Load JIRA Configuration',
+    name: 'Load Jira Configuration',
     config: jira,
   },
   {
diff --git 
a/config-ui/src/plugins/components/connection-form/fields/endpoint.tsx 
b/config-ui/src/plugins/components/connection-form/fields/endpoint.tsx
index 1c76f09c3..59bd64354 100644
--- a/config-ui/src/plugins/components/connection-form/fields/endpoint.tsx
+++ b/config-ui/src/plugins/components/connection-form/fields/endpoint.tsx
@@ -100,8 +100,7 @@ export const ConnectionEndpoint = ({
         </RadioGroup>
         {version === 'cloud' && (
           <p style={{ margin: 0 }}>
-            If you are using {name} Cloud, you do not need to enter the 
endpoint URL, which is
-            {multipleVersions.cloud}.
+            If you are using {name} Cloud, you do not need to enter the 
endpoint URL, which is {multipleVersions.cloud}.
           </p>
         )}
         {version === 'server' && (
@@ -109,7 +108,9 @@ export const ConnectionEndpoint = ({
             label={<S.Label>Endpoint URL</S.Label>}
             labelInfo={<S.LabelInfo>*</S.LabelInfo>}
             subLabel={
-              <S.LabelDescription>If you are using {name} Server, please enter 
the endpoint URL.</S.LabelDescription>
+              <S.LabelDescription>
+                {subLabel ?? `If you are using ${name} Server, please enter 
the endpoint URL.`}
+              </S.LabelDescription>
             }
           >
             <InputGroup placeholder="Your Endpoint URL" value={value} 
onChange={handleChangeValue} />
diff --git a/config-ui/src/plugins/components/data-scope/index.tsx 
b/config-ui/src/plugins/components/data-scope/index.tsx
index 790f5bd61..b71c5a115 100644
--- a/config-ui/src/plugins/components/data-scope/index.tsx
+++ b/config-ui/src/plugins/components/data-scope/index.tsx
@@ -21,7 +21,7 @@ import { ButtonGroup, Button, Intent } from 
'@blueprintjs/core';
 
 import { transformEntities } from '@/config';
 import { GitHubDataScope } from '@/plugins/register/github';
-import { JIRADataScope } from '@/plugins/register/jira';
+import { JiraDataScope } from '@/plugins/register/jira';
 import { GitLabDataScope } from '@/plugins/register/gitlab';
 import { JenkinsDataScope } from '@/plugins/register/jenkins';
 import { BitbucketDataScope } from '@/plugins/register/bitbucket';
@@ -52,7 +52,7 @@ export const DataScope = ({ plugin, connectionId, entities, 
onCancel, ...props }
         )}
 
         {plugin === 'jira' && (
-          <JIRADataScope connectionId={connectionId} 
selectedItems={selectedScope} onChangeItems={onChangeScope} />
+          <JiraDataScope connectionId={connectionId} 
selectedItems={selectedScope} onChangeItems={onChangeScope} />
         )}
 
         {plugin === 'gitlab' && (
diff --git a/config-ui/src/plugins/components/transformation/index.tsx 
b/config-ui/src/plugins/components/transformation/index.tsx
index 959ad2e3b..6905d9e5a 100644
--- a/config-ui/src/plugins/components/transformation/index.tsx
+++ b/config-ui/src/plugins/components/transformation/index.tsx
@@ -22,16 +22,16 @@ import { RadioGroup, Radio, InputGroup, ButtonGroup, 
Button, Intent } from '@blu
 import { ExternalLink, Divider, Selector, MultiSelector } from '@/components';
 
 import { GitHubTransformation } from '@/plugins/register/github';
-import { JIRATransformation } from '@/plugins/register/jira';
+import { JiraTransformation } from '@/plugins/register/jira';
 import { GitLabTransformation } from '@/plugins/register/gitlab';
 import { JenkinsTransformation } from '@/plugins/register/jenkins';
+import { BitbucketTransformation } from '@/plugins/register/bitbucket';
 
 import type { TransformationType, RuleItem } from './types';
 import { TIPS_MAP } from './misc';
 import type { UseTransformationProps } from './use-transformation';
 import { useTransformation } from './use-transformation';
 import * as S from './styled';
-import {BitbucketTransformation} from "@/plugins/register/bitbucket";
 
 interface Props extends Omit<UseTransformationProps, 'name' | 'selectedRule' | 
'setSelectedScope'> {
   from: 'create' | 'update';
@@ -151,7 +151,7 @@ export const Transformation = ({ from, plugin, 
connectionId, onCancel, ...props
             )}
 
             {plugin === 'jira' && (
-              <JIRATransformation
+              <JiraTransformation
                 connectionId={connectionId}
                 transformation={transformation}
                 setTransformation={onChangeTransformation}
diff --git a/config-ui/src/plugins/components/transformation/misc.ts 
b/config-ui/src/plugins/components/transformation/misc.ts
index 92462f00b..cd2ecaf0a 100644
--- a/config-ui/src/plugins/components/transformation/misc.ts
+++ b/config-ui/src/plugins/components/transformation/misc.ts
@@ -22,7 +22,7 @@ export const TIPS_MAP: Record<string, { name: string; link: 
string }> = {
     link: 
'https://devlake.apache.org/docs/UserManuals/ConfigUI/GitHub#step-3---adding-transformation-rules-optional',
   },
   jira: {
-    name: 'JIRA',
+    name: 'Jira',
     link: 
'https://devlake.apache.org/docs/UserManuals/ConfigUI/Jira#step-3---adding-transformation-rules-optional',
   },
 };
diff --git a/config-ui/src/plugins/config.ts b/config-ui/src/plugins/config.ts
index 7b85417a0..6cf92c667 100644
--- a/config-ui/src/plugins/config.ts
+++ b/config-ui/src/plugins/config.ts
@@ -29,7 +29,7 @@ import { GitHubConfig } from './register/github';
 import { GitHubGraphqlConfig } from './register/github_graphql';
 import { GitLabConfig } from './register/gitlab';
 import { JenkinsConfig } from './register/jenkins';
-import { JIRAConfig } from './register/jira';
+import { JiraConfig } from './register/jira';
 import { RefDiffConfig } from './register/refdiff';
 import { SonarQubeConfig } from './register/sonarqube';
 import { StarRocksConfig } from './register/starrocks';
@@ -50,7 +50,7 @@ export const PluginConfig: PluginConfigType[] = [
   GitHubGraphqlConfig,
   GitLabConfig,
   JenkinsConfig,
-  JIRAConfig,
+  JiraConfig,
   RefDiffConfig,
   SonarQubeConfig,
   StarRocksConfig,
diff --git a/config-ui/src/plugins/register/github/config.tsx 
b/config-ui/src/plugins/register/github/config.tsx
index 53ea92f2f..512941114 100644
--- a/config-ui/src/plugins/register/github/config.tsx
+++ b/config-ui/src/plugins/register/github/config.tsx
@@ -31,7 +31,7 @@ export const GitHubConfig: PluginConfigType = {
   icon: Icon,
   sort: 1,
   connection: {
-    docLink: 'https://devlake.apache.org/docs/UserManuals/ConfigUI/GitHub',
+    docLink: 'https://devlake.apache.org/docs/Configuration/GitHub',
     initialValues: {
       endpoint: 'https://api.github.com/',
       enableGraphql: true,
@@ -69,8 +69,8 @@ export const GitHubConfig: PluginConfigType = {
       {
         key: 'rateLimitPerHour',
         subLabel:
-          'By default, DevLake uses dynamic rate limit for optimized data 
collection for GitHub. But you can adjust the collection speed by entering a 
fixed value. Learn more',
-        learnMore: 
'https://devlake.apache.org/docs/UserManuals/ConfigUI/GitHub/#fixed-rate-limit-optional',
+          'By default, DevLake uses dynamic rate limit for optimized data 
collection for GitHub. 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: 
'https://devlake.apache.org/docs/Configuration/GitHub/#fixed-rate-limit-optional',
         externalInfo:
           'Rate Limit Value Reference\nGitHub: 0-5,000 requests/hour\nGitHub 
Enterprise: 0-15,000 requests/hour',
         defaultValue: 4500,
diff --git a/config-ui/src/plugins/register/github/connection-fields/token.tsx 
b/config-ui/src/plugins/register/github/connection-fields/token.tsx
index 6b292a82b..00e488eda 100644
--- a/config-ui/src/plugins/register/github/connection-fields/token.tsx
+++ b/config-ui/src/plugins/register/github/connection-fields/token.tsx
@@ -18,7 +18,6 @@
 
 import React, { useEffect, useState } from 'react';
 import { FormGroup, InputGroup, Button, Intent } from '@blueprintjs/core';
-import { pick } from 'lodash';
 
 import { ExternalLink } from '@/components';
 
@@ -111,8 +110,8 @@ export const Token = ({ endpoint, proxy, initialValue, 
value, error, setValue, s
       subLabel={
         <S.LabelDescription>
           Add one or more personal token(s) for authentication from you and 
your organization members. Multiple tokens
-          can help speed up the data collection process.{' '}
-          <ExternalLink 
link="https://devlake.apache.org/docs/UserManuals/ConfigUI/GitHub/#auth-tokens";>
+          (from different GitHub accounts, NOT from one account) can help 
speed up the data collection process.
+          <ExternalLink 
link="https://devlake.apache.org/docs/Configuration/GitHub/#auth-tokens";>
             Learn how to create a personal access token
           </ExternalLink>
         </S.LabelDescription>
diff --git a/config-ui/src/plugins/register/gitlab/config.tsx 
b/config-ui/src/plugins/register/gitlab/config.tsx
index 82cac3353..5a3d06d1f 100644
--- a/config-ui/src/plugins/register/gitlab/config.tsx
+++ b/config-ui/src/plugins/register/gitlab/config.tsx
@@ -44,6 +44,8 @@ export const GitLabConfig: PluginConfigType = {
           cloud: 'https://gitlab.com/api/v4/',
           server: '',
         },
+        subLabel:
+          'If you are using GitLab Cloud, you do not need to enter the 
endpoint URL, which is https://gitlab.com/api/v4/.',
       },
       {
         key: 'token',
diff --git a/config-ui/src/plugins/register/jira/config.tsx 
b/config-ui/src/plugins/register/jira/config.tsx
index b62651a9e..86c24bb4d 100644
--- a/config-ui/src/plugins/register/jira/config.tsx
+++ b/config-ui/src/plugins/register/jira/config.tsx
@@ -24,10 +24,10 @@ import { PluginType } from '@/plugins';
 import Icon from './assets/icon.svg';
 import { Auth } from './connection-fields';
 
-export const JIRAConfig: PluginConfigType = {
+export const JiraConfig: PluginConfigType = {
   type: PluginType.Connection,
   plugin: 'jira',
-  name: 'JIRA',
+  name: 'Jira',
   icon: Icon,
   sort: 3,
   connection: {
@@ -37,7 +37,7 @@ export const JIRAConfig: PluginConfigType = {
       {
         key: 'endpoint',
         subLabel:
-          'Provide the Jira instance API endpoint. For Jira Cloud, e.g. 
https://your-company.atlassian.net/rest/',
+          'Provide the Jira instance API endpoint. For Jira Cloud, e.g. 
https://your-company.atlassian.net/rest/. For Jira Server v8+, e.g. 
https://your-company.atlassian.net/rest/. Please note: The endpoint URL should 
end with /.',
       },
       ({ initialValues, values, errors, setValues, setErrors }: any) => {
         const initialValue = useMemo(
@@ -75,7 +75,7 @@ export const JIRAConfig: PluginConfigType = {
       {
         key: 'rateLimitPerHour',
         subLabel:
-          'By default, DevLake uses dynamic rate limit for optimized data 
collection. But you can adjust the collection speed by setting up your 
desirable rate limit.',
+          'By default, DevLake uses dynamic rate limit for optimized data 
collection for Jira. But you can adjust the collection speed by setting up your 
desirable rate limit.',
         learnMore: 
'https://devlake.apache.org/docs/Configuration/Jira/#fixed-rate-limit-optional',
         externalInfo:
           'Jira Cloud does not specify a maximum value of rate limit. For Jira 
Server, please contact your admin for more information.',
diff --git a/config-ui/src/plugins/register/jira/connection-fields/auth.tsx 
b/config-ui/src/plugins/register/jira/connection-fields/auth.tsx
index 3e3287e91..72e403aae 100644
--- a/config-ui/src/plugins/register/jira/connection-fields/auth.tsx
+++ b/config-ui/src/plugins/register/jira/connection-fields/auth.tsx
@@ -92,7 +92,7 @@ export const Auth = ({ initialValue, value, error, setValue, 
setError }: Props)
             <InputGroup placeholder="Your Username/e-mail" 
value={value.username} onChange={handleChangeUsername} />
           </FormGroup>
           <FormGroup
-            label={<S.Label>Password</S.Label>}
+            label={<S.Label>Token/Password</S.Label>}
             labelInfo={<S.LabelInfo>*</S.LabelInfo>}
             subLabel={
               <S.LabelDescription>
diff --git a/config-ui/src/plugins/register/jira/data-scope.tsx 
b/config-ui/src/plugins/register/jira/data-scope.tsx
index de8a3c384..0d5a45f07 100644
--- a/config-ui/src/plugins/register/jira/data-scope.tsx
+++ b/config-ui/src/plugins/register/jira/data-scope.tsx
@@ -28,7 +28,7 @@ interface Props {
   onChangeItems: (selectedItems: ScopeItemType[]) => void;
 }
 
-export const JIRADataScope = ({ connectionId, selectedItems, onChangeItems }: 
Props) => {
+export const JiraDataScope = ({ connectionId, selectedItems, onChangeItems }: 
Props) => {
   return (
     <>
       <h3>Boards *</h3>
diff --git a/config-ui/src/plugins/register/jira/transformation.tsx 
b/config-ui/src/plugins/register/jira/transformation.tsx
index 76a9e45cd..a39c475f2 100644
--- a/config-ui/src/plugins/register/jira/transformation.tsx
+++ b/config-ui/src/plugins/register/jira/transformation.tsx
@@ -38,7 +38,7 @@ interface Props {
   setTransformation: React.Dispatch<React.SetStateAction<any>>;
 }
 
-export const JIRATransformation = ({ connectionId, transformation, 
setTransformation }: Props) => {
+export const JiraTransformation = ({ connectionId, transformation, 
setTransformation }: Props) => {
   const [requirements, setRequirements] = useState<string[]>([]);
   const [bugs, setBugs] = useState<string[]>([]);
   const [incidents, setIncidents] = useState<string[]>([]);
diff --git a/config-ui/src/plugins/register/sonarqube/config.ts 
b/config-ui/src/plugins/register/sonarqube/config.ts
index 216c429e3..fe7df9604 100644
--- a/config-ui/src/plugins/register/sonarqube/config.ts
+++ b/config-ui/src/plugins/register/sonarqube/config.ts
@@ -28,7 +28,7 @@ export const SonarQubeConfig: PluginConfigType = {
   icon: Icon,
   sort: 7,
   connection: {
-    docLink: '',
+    docLink: 'https://devlake.apache.org/docs/Configuration/SonarQube',
     fields: [
       'name',
       'endpoint',
@@ -37,10 +37,10 @@ export const SonarQubeConfig: PluginConfigType = {
       {
         key: 'rateLimitPerHour',
         subLabel:
-          'By default, DevLake uses 18,000 requests/hour for data collection 
for Azure DevOps. But you can adjust the collection speed by setting up your 
desirable rate limit.',
+          'By default, DevLake uses 10,000 requests/hour for data collection 
for SonarQube. But you can adjust the collection speed by setting up your 
desirable rate limit. Learn more',
         learnMore: 
'https://devlake.apache.org/docs/UserManuals/ConfigUI/AzureDevOps/#custom-rate-limit-optional',
-        externalInfo: 'Azure DevOps does not specify a maximum value of rate 
limit.',
-        defaultValue: 18000,
+        externalInfo: 'SonarQube does not specify a maximum value of rate 
limit.',
+        defaultValue: 10000,
       },
     ],
   },
diff --git a/config-ui/src/plugins/register/tapd/config.tsx 
b/config-ui/src/plugins/register/tapd/config.tsx
index d8418f176..8b299c797 100644
--- a/config-ui/src/plugins/register/tapd/config.tsx
+++ b/config-ui/src/plugins/register/tapd/config.tsx
@@ -67,7 +67,7 @@ export const TAPDConfig: PluginConfigType = {
         key: 'rateLimitPerHour',
         subLabel:
           'By default, DevLake uses 3,000 requests/hour for data collection 
for TAPD. But you can adjust the collection speed by setting up your desirable 
rate limit.',
-        learnMore: 
'https://devlake.apache.org/docs/Configuration/Tapdt#fixed-rate-limit-optional',
+        learnMore: 
'https://devlake.apache.org/docs/Configuration/Tapd#fixed-rate-limit-optional',
         externalInfo: 'The maximum rate limit of TAPD is 3,600 requests/hour.',
         defaultValue: 3000,
       },
diff --git a/config-ui/src/plugins/register/zentao/config.ts 
b/config-ui/src/plugins/register/zentao/config.ts
index 1593feca2..b3f99b8fe 100644
--- a/config-ui/src/plugins/register/zentao/config.ts
+++ b/config-ui/src/plugins/register/zentao/config.ts
@@ -32,7 +32,10 @@ export const ZenTaoConfig: PluginConfigType = {
     docLink: 'https://devlake.apache.org/docs/Configuration/Zentao',
     fields: [
       'name',
-      'endpoint',
+      {
+        key: 'endpoint',
+        subLabel: 'Provide the Zentao instance API endpoint. E.g. 
https://YOUR_DOMAIN:YOUR_PORT/',
+      },
       'username',
       'password',
       'proxy',
@@ -41,7 +44,7 @@ export const ZenTaoConfig: PluginConfigType = {
         subLabel:
           'By default, DevLake uses 10,000 requests/hour for data collection 
for ZenTao. But you can adjust the collection speed by setting up your 
desirable rate limit.',
         learnMore: 
'https://devlake.apache.org/docs/Configuration/Zentao/#custom-rate-limit-optional',
-        externalInfo: 'Jenkins does not specify a maximum value of rate 
limit.',
+        externalInfo: 'ZenTao does not specify a maximum value of rate limit.',
         defaultValue: 10000,
       },
     ],

Reply via email to