You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2024/08/06 07:41:24 UTC
(incubator-devlake) branch feat-onboard-description created (now 0d9561a01)
This is an automated email from the ASF dual-hosted git repository.
mintsweet pushed a change to branch feat-onboard-description
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
at 0d9561a01 feat: improve some description for onboard
This branch includes the following new commits:
new 0d9561a01 feat: improve some description for onboard
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(incubator-devlake) 01/01: feat: improve some description for onboard
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
mintsweet pushed a commit to branch feat-onboard-description
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 0d9561a01c36c1366625ca7436518d1cb010671a
Author: mintsweet <0x...@gmail.com>
AuthorDate: Tue Aug 6 19:41:08 2024 +1200
feat: improve some description for onboard
---
.../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) => {