We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9185594 commit 60564e2Copy full SHA for 60564e2
src/main/frontend/pipeline-console-view/pipeline-console/main/ConsoleLogStream.tsx
@@ -73,6 +73,21 @@ export default function ConsoleLogStream(props: ConsoleLogStreamProps) {
73
return props.step.state === Result.running || props.logBuffer.startByte < 0;
74
};
75
76
+ useEffect(() => {
77
+ const hash = window.location.hash;
78
+ if (!hash.startsWith("#log-")) {
79
+ return;
80
+ }
81
+ const lineNumber = parseInt(hash.substring(5));
82
+ if (!(!isNaN(lineNumber) && virtuosoRef.current)) {
83
84
85
+ virtuosoRef.current.scrollToIndex({
86
+ index: lineNumber,
87
+ align: "center",
88
+ });
89
+ }, []);
90
+
91
return (
92
<Virtuoso
93
useWindowScroll
0 commit comments