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 64df85f73 fix(config-ui): bp not show last pipeline info (#5407)
64df85f73 is described below
commit 64df85f737d79df728cf37207b4e2914c2e53788
Author: 青湛 <[email protected]>
AuthorDate: Fri Jun 9 14:38:31 2023 +0800
fix(config-ui): bp not show last pipeline info (#5407)
---
config-ui/src/pages/blueprint/detail/blueprint-detail.tsx | 12 ++++++------
config-ui/src/pages/pipeline/components/historical/index.tsx | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
b/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
index eb975bd67..a1602ace3 100644
--- a/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
+++ b/config-ui/src/pages/blueprint/detail/blueprint-detail.tsx
@@ -39,10 +39,10 @@ export const BlueprintDetail = ({ id, from }: Props) => {
const [activeTab, setActiveTab] = useState<TabId>(from === FromEnum.project
? 'configuration' : 'status');
const [version, setVersion] = useState(1);
- const { ready, data } = useRefreshData(
- async () => Promise.all([API.getBlueprint(id),
API.getBlueprintPipelines(id)]),
- [version],
- );
+ const { ready, data } = useRefreshData(async () => {
+ const [bpRes, pipelineRes] = await Promise.all([API.getBlueprint(id),
API.getBlueprintPipelines(id)]);
+ return [bpRes, pipelineRes.pipelines[0]];
+ }, [version]);
const handleRefresh = () => setVersion((v) => v + 1);
@@ -50,7 +50,7 @@ export const BlueprintDetail = ({ id, from }: Props) => {
return <PageLoading />;
}
- const [blueprint, pipelines] = data;
+ const [blueprint, lastPipeline] = data;
return (
<S.Wrapper>
@@ -59,7 +59,7 @@ export const BlueprintDetail = ({ id, from }: Props) => {
id="status"
title="Status"
panel={
- <StatusPanel from={from} blueprint={blueprint}
pipelineId={pipelines?.[0]?.id} onRefresh={handleRefresh} />
+ <StatusPanel from={from} blueprint={blueprint}
pipelineId={lastPipeline?.id} onRefresh={handleRefresh} />
}
/>
<Tab
diff --git a/config-ui/src/pages/pipeline/components/historical/index.tsx
b/config-ui/src/pages/pipeline/components/historical/index.tsx
index 51d346ae0..860bd2fd3 100644
--- a/config-ui/src/pages/pipeline/components/historical/index.tsx
+++ b/config-ui/src/pages/pipeline/components/historical/index.tsx
@@ -144,7 +144,7 @@ export const PipelineHistorical = ({ blueprintId }: Props)
=> {
<Table columns={columns} dataSource={data} />
{JSON && <Inspector isOpen title={`Pipeline ${JSON?.id}`} data={JSON}
onClose={() => setJSON(null)} />}
{ID && (
- <Dialog style={{ width: 720 }} isOpen title={`Pipeline ${ID}`}
footer={null} onCancel={() => setID(null)}>
+ <Dialog style={{ width: 820 }} isOpen title={`Pipeline ${ID}`}
footer={null} onCancel={() => setID(null)}>
<PipelineTasks id={ID} />
</Dialog>
)}