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 eac659ce9 fix(config-ui): error project name convert (#5987)
eac659ce9 is described below
commit eac659ce95164615ec68c89e1b4a18e4403c4675
Author: 青湛 <[email protected]>
AuthorDate: Thu Aug 31 15:18:22 2023 +1200
fix(config-ui): error project name convert (#5987)
---
config-ui/src/pages/blueprint/connection-detail/index.tsx | 6 +++++-
config-ui/src/pages/blueprint/detail/configuration-panel.tsx | 4 +++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/config-ui/src/pages/blueprint/connection-detail/index.tsx
b/config-ui/src/pages/blueprint/connection-detail/index.tsx
index 92a98708e..8147b718f 100644
--- a/config-ui/src/pages/blueprint/connection-detail/index.tsx
+++ b/config-ui/src/pages/blueprint/connection-detail/index.tsx
@@ -26,6 +26,8 @@ import { useRefreshData, useTips } from '@/hooks';
import { DataScopeSelect, getPluginScopeId } from '@/plugins';
import { operator } from '@/utils';
+import { encodeName } from '../../project/utils';
+
import * as API from './api';
import * as S from './styled';
@@ -123,7 +125,9 @@ export const BlueprintConnectionDetailPage = () => {
if (success) {
handleShowTips();
- navigate(pname ? `/projects/${pname}?tab=configuration` :
`/blueprints/${blueprint.id}?tab=configuration`);
+ navigate(
+ pname ? `/projects/${encodeName(pname)}?tab=configuration` :
`/blueprints/${blueprint.id}?tab=configuration`,
+ );
}
};
diff --git a/config-ui/src/pages/blueprint/detail/configuration-panel.tsx
b/config-ui/src/pages/blueprint/detail/configuration-panel.tsx
index c04f29432..d56714110 100644
--- a/config-ui/src/pages/blueprint/detail/configuration-panel.tsx
+++ b/config-ui/src/pages/blueprint/detail/configuration-panel.tsx
@@ -26,6 +26,8 @@ import { useConnections } from '@/hooks';
import { getPluginConfig } from '@/plugins';
import { formatTime, operator } from '@/utils';
+import { encodeName } from '../../project/utils';
+
import { BlueprintType, FromEnum } from '../types';
import { ModeEnum } from '../types';
import { validRawPlan } from '../utils';
@@ -214,7 +216,7 @@ export const ConfigurationPanel = ({ from, blueprint,
onRefresh, onChangeTab }:
to={
from === FromEnum.blueprint
? `/blueprints/${blueprint.id}/${cs.unique}`
- : `/projects/${blueprint.projectName}/${cs.unique}`
+ :
`/projects/${encodeName(blueprint.projectName)}/${cs.unique}`
}
>
Edit Data Scope and Scope Config