File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
java/io/jenkins/plugins/analysis/core/model Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1212import org .kohsuke .stapler .bind .JavaScriptMethod ;
1313
1414import hudson .model .Run ;
15- import jenkins .model .Jenkins ;
1615
1716import io .jenkins .plugins .forensics .reference .ReferenceBuild ;
1817import io .jenkins .plugins .util .QualityGateStatus ;
@@ -257,7 +256,6 @@ public String getResetInfo() {
257256 json .put ("userName" , getResetBy ());
258257 json .put ("userId" , getResetUserId ());
259258 json .put ("timestamp" , getResetTimestamp ());
260- json .put ("rootURL" , Jenkins .get ().getRootUrl ());
261259 }
262260
263261 return json .toString ();
Original file line number Diff line number Diff line change @@ -16,9 +16,11 @@ const ResetQualityGateButtonHandler = function () {
1616 const resetMessage = document . createElement ( 'li' ) ;
1717 resetMessage . className = 'jenkins-!-color-grey jenkins-!-font-style-italic' ;
1818
19+ const rootURL = window . location . origin + ( window . location . pathname . split ( '/' ) . slice ( 0 , 2 ) . join ( '/' ) || '' ) ;
20+
1921 let messageHTML = ' Quality gate reset by ' ;
2022 if ( resetData . userId && resetData . userId !== 'anonymous' ) {
21- messageHTML += '<a href="' + resetData . rootURL + '/user/' + resetData . userId + '">' + resetData . userName + '</a>' ;
23+ messageHTML += '<a href="' + rootURL + '/user/' + resetData . userId + '">' + resetData . userName + '</a>' ;
2224 } else {
2325 messageHTML += resetData . userName ;
2426 }
You can’t perform that action at this time.
0 commit comments