Skip to content

Commit 43f4603

Browse files
fixed graph rendering issue
1 parent aef3630 commit 43f4603

File tree

4 files changed

+37
-26
lines changed

4 files changed

+37
-26
lines changed

src/ui/layouts/pipelines/RunDetail/useService.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@ export const useService = (): ServiceInterface => {
1919
useEffect(() => {
2020
if (!isMounted) {
2121
setFetching(true);
22-
dispatch(
23-
runsActions.graphForRun({
24-
runId: id,
25-
onSuccess: () => setFetching(false),
26-
onFailure: () => setFetching(false),
27-
}),
28-
);
22+
2923
dispatch(
3024
runsActions.runForId({
3125
pipelineId: pipelineId,
3226
runId: id,
33-
onSuccess: () => setFetching(false),
27+
onSuccess: () =>
28+
dispatch(
29+
runsActions.graphForRun({
30+
runId: id,
31+
onSuccess: () => setFetching(false),
32+
onFailure: () => setFetching(false),
33+
}),
34+
),
3435
onFailure: () => setFetching(false),
3536
}),
3637
);

src/ui/layouts/runs/RunDetail/useService.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,18 @@ export const useService = (): ServiceInterface => {
1919
useEffect(() => {
2020
if (!isMounted) {
2121
setFetching(true);
22+
2223
dispatch(
23-
runsActions.graphForRun({
24+
runsActions.runForId({
2425
runId: runId,
25-
onSuccess: () => setFetching(false),
26+
onSuccess: () =>
27+
dispatch(
28+
runsActions.graphForRun({
29+
runId: runId,
30+
onSuccess: () => setFetching(false),
31+
onFailure: () => setFetching(false),
32+
}),
33+
),
2634
onFailure: () => setFetching(false),
2735
}),
2836
);

src/ui/layouts/stackComponents/RunDetail/useService.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@ export const useService = (): ServiceInterface => {
2424
runsActions.runForId({
2525
stackComponentId: stackComponentId,
2626
runId: id,
27-
onSuccess: () => setFetching(false),
28-
onFailure: () => setFetching(false),
29-
}),
30-
);
31-
dispatch(
32-
runsActions.graphForRun({
33-
runId: id,
34-
onSuccess: () => setFetching(false),
27+
onSuccess: () =>
28+
dispatch(
29+
runsActions.graphForRun({
30+
runId: id,
31+
onSuccess: () => setFetching(false),
32+
onFailure: () => setFetching(false),
33+
}),
34+
),
3535
onFailure: () => setFetching(false),
3636
}),
3737
);
38+
3839
setIsMounted(true);
3940
}
4041
// eslint-disable-next-line react-hooks/exhaustive-deps

src/ui/layouts/stacks/RunDetail/useService.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,18 @@ export const useService = (): ServiceInterface => {
2323
runsActions.runForId({
2424
stackId: stackId,
2525
runId: id,
26-
onSuccess: () => setFetching(false),
27-
onFailure: () => setFetching(false),
28-
}),
29-
);
30-
dispatch(
31-
runsActions.graphForRun({
32-
runId: id,
33-
onSuccess: () => setFetching(false),
26+
onSuccess: () =>
27+
dispatch(
28+
runsActions.graphForRun({
29+
runId: id,
30+
onSuccess: () => setFetching(false),
31+
onFailure: () => setFetching(false),
32+
}),
33+
),
3434
onFailure: () => setFetching(false),
3535
}),
3636
);
37+
3738
setIsMounted(true);
3839
}
3940
// eslint-disable-next-line react-hooks/exhaustive-deps

0 commit comments

Comments
 (0)