This is an automated email from the ASF dual-hosted git repository.
mintsweet pushed a commit to branch release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v1.0 by this push:
new ca7a95d96 feat: improve some description for onboard (#7840) (#7847)
ca7a95d96 is described below
commit ca7a95d96fbe9ec0d88c0f335fcd538d71bc0581
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Aug 7 13:39:32 2024 +1200
feat: improve some description for onboard (#7840) (#7847)
Co-authored-by: 青湛 <[email protected]>
---
.../src/plugins/components/connection-form/fields/token.tsx | 4 ++--
config-ui/src/routes/onboard/step-1.tsx | 13 ++++++++++++-
config-ui/src/routes/onboard/step-2.tsx | 9 ++++++++-
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/config-ui/src/plugins/components/connection-form/fields/token.tsx
b/config-ui/src/plugins/components/connection-form/fields/token.tsx
index 904569e24..ce1e84f7e 100644
--- a/config-ui/src/plugins/components/connection-form/fields/token.tsx
+++ b/config-ui/src/plugins/components/connection-form/fields/token.tsx
@@ -23,8 +23,8 @@ import { Block } from '@/components';
interface Props {
type: 'create' | 'update';
- label?: string;
- subLabel?: string;
+ label?: React.ReactNode;
+ subLabel?: React.ReactNode;
initialValue: string;
value: string;
error: string;
diff --git a/config-ui/src/routes/onboard/step-1.tsx
b/config-ui/src/routes/onboard/step-1.tsx
index 50d10a889..219db1a3f 100644
--- a/config-ui/src/routes/onboard/step-1.tsx
+++ b/config-ui/src/routes/onboard/step-1.tsx
@@ -17,10 +17,12 @@
*/
import { useState, useEffect, useContext } from 'react';
+import { Link } from 'react-router-dom';
import { Input, Flex, Button, message } from 'antd';
import API from '@/api';
import { Block, Markdown } from '@/components';
+import { PATHS } from '@/config';
import { ConnectionSelect } from '@/plugins';
import { validName } from '@/routes/project';
import { operator } from '@/utils';
@@ -87,7 +89,16 @@ export const Step1 = () => {
onChange={(e) => setProjectName(e.target.value)}
/>
</Block>
- <Block title="Data Connection" description="You can only choose one
data connection" required>
+ <Block
+ title="Data Connection"
+ description={
+ <p>
+ For self-managed GitLab/GitHub/Bitbucket, please skip the
onboarding and configure via{' '}
+ <Link to={PATHS.CONNECTIONS()}>Data Connections</Link>.
+ </p>
+ }
+ required
+ >
<ConnectionSelect
placeholder="Select a Data Connection"
options={[
diff --git a/config-ui/src/routes/onboard/step-2.tsx
b/config-ui/src/routes/onboard/step-2.tsx
index eb7afbba1..cd2eba4dc 100644
--- a/config-ui/src/routes/onboard/step-2.tsx
+++ b/config-ui/src/routes/onboard/step-2.tsx
@@ -17,10 +17,12 @@
*/
import { useState, useContext, useEffect, useMemo } from 'react';
+import { Link } from 'react-router-dom';
import { Flex, Button, Tooltip } from 'antd';
import API from '@/api';
import { Markdown } from '@/components';
+import { PATHS } from '@/config';
import { getPluginConfig } from '@/plugins';
import { ConnectionToken } from
'@/plugins/components/connection-form/fields/token';
import { ConnectionUsername } from
'@/plugins/components/connection-form/fields/username';
@@ -135,7 +137,12 @@ export const Step2 = () => {
<ConnectionToken
type="create"
label="Personal Access Token"
- subLabel={`Create a personal access token in ${config.name}`}
+ subLabel={
+ <p>
+ Create a personal access token in GitHub. For self-managed
{config.name}, please skip the onboarding
+ and configure via <Link to={PATHS.CONNECTIONS()}>Data
Connections</Link>.
+ </p>
+ }
initialValue=""
value={payload.token}
setValue={(token) => {