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 bb8f62af5 fix(config-ui): no decode project name (#4512)
bb8f62af5 is described below
commit bb8f62af5a614e841ad8726f0a4e86016855e3b9
Author: 青湛 <[email protected]>
AuthorDate: Mon Feb 27 10:10:56 2023 +0800
fix(config-ui): no decode project name (#4512)
---
config-ui/src/pages/blueprint/create/bp-context.tsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/config-ui/src/pages/blueprint/create/bp-context.tsx
b/config-ui/src/pages/blueprint/create/bp-context.tsx
index 8dfded002..004f597d6 100644
--- a/config-ui/src/pages/blueprint/create/bp-context.tsx
+++ b/config-ui/src/pages/blueprint/create/bp-context.tsx
@@ -76,7 +76,9 @@ export const BPContextProvider = ({ from, projectName,
children }: Props) => {
const [showInspector, setShowInspector] = useState(false);
const [showDetail, setShowDetail] = useState(false);
- const [name, setName] = useState(from === FromEnum.project ?
`${projectName}-BLUEPRINT` : 'MY BLUEPRINT');
+ const [name, setName] = useState(
+ from === FromEnum.project ?
`${window.decodeURIComponent(projectName)}-BLUEPRINT` : 'MY BLUEPRINT',
+ );
const [mode, setMode] = useState<ModeEnum>(ModeEnum.normal);
const [rawPlan, setRawPlan] = useState(JSON.stringify([[]], null, ' '));
const [uniqueList, setUniqueList] = useState<string[]>([]);
@@ -117,7 +119,7 @@ export const BPContextProvider = ({ from, projectName,
children }: Props) => {
const payload = useMemo(() => {
const params: any = {
name,
- projectName,
+ projectName: window.decodeURIComponent(projectName),
mode,
enable: true,
cronConfig,