File tree 2 files changed +17
-1
lines changed
frontend/pipeline-console-view/pipeline-console/main
resources/io/jenkins/plugins/pipelinegraphview/consoleview/PipelineConsoleViewAction
2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,23 @@ export interface ConsoleLineProps {
10
10
heightCallback : ( height : number ) => void ;
11
11
}
12
12
13
+ declare global {
14
+ interface Window {
15
+ Behaviour : any ;
16
+ }
17
+ }
18
+
13
19
// Console output line
14
20
export const ConsoleLine = ( props : ConsoleLineProps ) => {
15
21
const ref = useRef < HTMLDivElement > ( null ) ;
16
22
useEffect ( ( ) => {
17
23
const height = ref . current ? ref . current . getBoundingClientRect ( ) . height : 0 ;
18
24
props . heightCallback ( height ) ;
25
+
26
+ // apply any behaviour selectors to the new content, e.g. for input step
27
+ window . Behaviour . applySubtree (
28
+ document . getElementById ( `${ props . stepId } -${ props . lineNumber } ` ) ,
29
+ ) ;
19
30
} , [ ] ) ;
20
31
21
32
return (
@@ -39,7 +50,10 @@ export const ConsoleLine = (props: ConsoleLineProps) => {
39
50
>
40
51
{ props . lineNumber }
41
52
</ a >
42
- < div className = "console-text" >
53
+ < div
54
+ id = { `${ props . stepId } -${ props . lineNumber } ` }
55
+ className = "console-text"
56
+ >
43
57
{ makeReactChildren (
44
58
tokenizeANSIString ( props . content ) ,
45
59
`${ props . stepId } -${ props . lineNumber } ` ,
Original file line number Diff line number Diff line change 6
6
<l : main-panel >
7
7
<p : symbols />
8
8
9
+ <j : out value =" ${h.generateConsoleAnnotationScriptAndStylesheet()}" />
10
+
9
11
<div class =" jenkins-app-bar" >
10
12
<div class =" jenkins-app-bar__content" >
11
13
<h1 >
You can’t perform that action at this time.
0 commit comments