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 3b3ceea43 fix(config-ui): adjust the tab in project detail (#5632)
3b3ceea43 is described below
commit 3b3ceea433743e482f79837dd0ae019eb424e40e
Author: 青湛 <[email protected]>
AuthorDate: Thu Jul 6 14:14:20 2023 +1200
fix(config-ui): adjust the tab in project detail (#5632)
---
.../pages/blueprint/detail/blueprint-detail.tsx | 26 ++++++++++++++++------
config-ui/src/pages/project/home/index.tsx | 8 ++-----
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
b/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
index 25c3d750b..2e773d32a 100644
--- a/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
+++ b/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
@@ -45,11 +45,6 @@ export const BlueprintDetail = ({ id, from }: Props) => {
return [bpRes, pipelineRes.pipelines[0]];
}, [version]);
- const handleRefresh = () => {
- setVersion((v) => v + 1);
- setQuery({ tab: 'status' });
- };
-
if (!ready || !data) {
return <PageLoading />;
}
@@ -63,13 +58,30 @@ export const BlueprintDetail = ({ id, from }: Props) => {
id="status"
title="Status"
panel={
- <StatusPanel from={from} blueprint={blueprint}
pipelineId={lastPipeline?.id} onRefresh={handleRefresh} />
+ <StatusPanel
+ from={from}
+ blueprint={blueprint}
+ pipelineId={lastPipeline?.id}
+ onRefresh={() => {
+ setVersion((v) => v + 1);
+ setQuery({ tab: 'status' });
+ }}
+ />
}
/>
<Tab
id="configuration"
title="Configuration"
- panel={<ConfigurationPanel from={from} blueprint={blueprint}
onRefresh={handleRefresh} />}
+ panel={
+ <ConfigurationPanel
+ from={from}
+ blueprint={blueprint}
+ onRefresh={() => {
+ setVersion((v) => v + 1);
+ setQuery({ tab: 'configuration' });
+ }}
+ />
+ }
/>
</Tabs>
</S.Wrapper>
diff --git a/config-ui/src/pages/project/home/index.tsx
b/config-ui/src/pages/project/home/index.tsx
index e15a76dc3..8b371d51f 100644
--- a/config-ui/src/pages/project/home/index.tsx
+++ b/config-ui/src/pages/project/home/index.tsx
@@ -111,7 +111,7 @@ export const ProjectHomePage = () => {
dataIndex: 'name',
key: 'name',
render: (name: string) => (
- <Link to={`/projects/${encodeName(name)}?tab=configuration`}
style={{ color: '#292b3f' }}>
+ <Link to={`/projects/${encodeName(name)}`} style={{ color:
'#292b3f' }}>
{name}
</Link>
),
@@ -123,11 +123,7 @@ export const ProjectHomePage = () => {
width: 100,
align: 'center',
render: (name: any) => (
- <IconButton
- icon="cog"
- tooltip="Detail"
- onClick={() =>
navigate(`/projects/${encodeName(name)}?tab=configuration`)}
- />
+ <IconButton icon="cog" tooltip="Detail" onClick={() =>
navigate(`/projects/${encodeName(name)}`)} />
),
},
]}