File tree 2 files changed +13
-13
lines changed
src/main/frontend/pipeline-console-view/pipeline-console/main
2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
3
3
export interface StageNodeLinkProps {
4
- agent : string ;
4
+ agent : string ;
5
5
}
6
6
7
7
function getAgentUrl ( name : string ) {
8
- // Wrap built-in in brackets
9
- const id = name == "built-in" ? "(built-in)" : name ;
10
- const rootPath = document . head . dataset . rooturl
11
- return `${ rootPath } /computer/${ id } /` ;
8
+ // Wrap built-in in brackets
9
+ const id = name == "built-in" ? "(built-in)" : name ;
10
+ const rootPath = document . head . dataset . rooturl ;
11
+ return `${ rootPath } /computer/${ id } /` ;
12
12
}
13
13
14
- const StageNodeLink = ( { agent} : StageNodeLinkProps ) => {
15
- const agentName = agent == "built-in" ? "Jenkins" : agent ;
16
- const href = getAgentUrl ( agent ) ;
17
- return < >
18
- Running on < a href = { href } > { agentName } </ a >
14
+ const StageNodeLink = ( { agent } : StageNodeLinkProps ) => {
15
+ const agentName = agent == "built-in" ? "Jenkins" : agent ;
16
+ const href = getAgentUrl ( agent ) ;
17
+ return (
18
+ < >
19
+ Running on < a href = { href } > { agentName } </ a >
19
20
</ >
21
+ ) ;
20
22
} ;
21
23
22
24
export default StageNodeLink ;
Original file line number Diff line number Diff line change @@ -92,9 +92,7 @@ const StageSummary = (props: StageSummaryProps) => (
92
92
className = "detail-icon"
93
93
key = { `stage-detail-agent-icon-${ props . stage . id } ` }
94
94
/>
95
- < span
96
- key = { `stage-detail-agent-text-${ props . stage . id } ` }
97
- >
95
+ < span key = { `stage-detail-agent-text-${ props . stage . id } ` } >
98
96
< StageNodeLink agent = { props . stage . agent } />
99
97
</ span >
100
98
</ div >
You can’t perform that action at this time.
0 commit comments