This is an automated email from the ASF dual-hosted git repository.
klesh 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 62eb416f9 feat: remove project name valid function (#7922)
62eb416f9 is described below
commit 62eb416f9fee3b37983bbcb622ce78b5edf28a2b
Author: 青湛 <[email protected]>
AuthorDate: Tue Aug 20 21:27:56 2024 +1200
feat: remove project name valid function (#7922)
---
config-ui/src/routes/onboard/step-1.tsx | 9 +--------
config-ui/src/routes/project/detail/settings-panel.tsx | 9 +--------
config-ui/src/routes/project/home/index.tsx | 9 +--------
3 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/config-ui/src/routes/onboard/step-1.tsx
b/config-ui/src/routes/onboard/step-1.tsx
index 219db1a3f..a6c16632a 100644
--- a/config-ui/src/routes/onboard/step-1.tsx
+++ b/config-ui/src/routes/onboard/step-1.tsx
@@ -24,7 +24,6 @@ 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';
import { Context } from './context';
@@ -43,13 +42,7 @@ export const Step1 = () => {
}, [plugin]);
const handleSubmit = async () => {
- if (!projectName || !validName(projectName)) {
- message.error('Please enter alphanumeric or underscore');
- return;
- }
-
- if (!plugin) {
- message.error('Please select a plugin');
+ if (!projectName || !plugin) {
return;
}
diff --git a/config-ui/src/routes/project/detail/settings-panel.tsx
b/config-ui/src/routes/project/detail/settings-panel.tsx
index bc09e450a..5f3ce4048 100644
--- a/config-ui/src/routes/project/detail/settings-panel.tsx
+++ b/config-ui/src/routes/project/detail/settings-panel.tsx
@@ -18,7 +18,7 @@
import { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
-import { Flex, Space, Card, Modal, Input, Checkbox, Button, message } from
'antd';
+import { Flex, Space, Card, Modal, Input, Checkbox, Button } from 'antd';
import API from '@/api';
import { Block, HelpTooltip, Message } from '@/components';
@@ -26,8 +26,6 @@ import { PATHS } from '@/config';
import { IProject } from '@/types';
import { operator } from '@/utils';
-import { validName } from '../utils';
-
import * as S from './styled';
const RegexPrIssueDefaultValue = '(?mi)(Closes)[\\s]*.*(((and )?#\\d+[ ]*)+)';
@@ -73,11 +71,6 @@ export const SettingsPanel = ({ project, onRefresh }: Props)
=> {
}, [project]);
const handleUpdate = async () => {
- if (!validName(name)) {
- message.error('Please enter alphanumeric or underscore');
- return;
- }
-
const [success] = await operator(
() =>
API.project.update(project.name, {
diff --git a/config-ui/src/routes/project/home/index.tsx
b/config-ui/src/routes/project/home/index.tsx
index bf5d2f4e6..0c52c1860 100644
--- a/config-ui/src/routes/project/home/index.tsx
+++ b/config-ui/src/routes/project/home/index.tsx
@@ -19,7 +19,7 @@
import { useState, useMemo, useRef } from 'react';
import { Link, useNavigate } from 'react-router-dom';
import { PlusOutlined, SettingOutlined } from '@ant-design/icons';
-import { Flex, Table, Button, Modal, Input, message } from 'antd';
+import { Flex, Table, Button, Modal, Input } from 'antd';
import API from '@/api';
import { PageHeader, Block, IconButton } from '@/components';
@@ -31,8 +31,6 @@ import { formatTime, operator } from '@/utils';
import { PipelineStatus } from '@/routes/pipeline';
import { IBlueprint } from '@/types';
-import { validName } from '../utils';
-
export const ProjectHomePage = () => {
const [version, setVersion] = useState(1);
const [page, setPage] = useState(1);
@@ -74,11 +72,6 @@ export const ProjectHomePage = () => {
};
const handleCreate = async () => {
- if (!validName(name)) {
- message.error('Please enter alphanumeric or underscore');
- return;
- }
-
const [success] = await operator(
async () =>
API.project.create({