Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-74013] Extract inline JavaScript event handler from SubversionSCMSource.java #322

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -938,10 +938,7 @@ public FormValidation doCheckCredentialsId(StaplerRequest req, @AncestorInPath I
} catch (SVNException e) {
LOGGER.log(Level.INFO, "Failed to access subversion repository "+url,e);
String message = hudson.scm.subversion.Messages.SubversionSCM_doCheckRemote_exceptionMsg1(
Util.escape(url), Util.escape(e.getErrorMessage().getFullMessage()),
"javascript:document.getElementById('svnerror').style.display='block';"
+ "document.getElementById('svnerrorlink').style.display='none';"
+ "return false;")
Util.escape(url), Util.escape(e.getErrorMessage().getFullMessage()))
+ "<br/><pre id=\"svnerror\" style=\"display:none\">"
+ Util.xmlEscape(Functions.printThrowable(e)) + "</pre>";
return FormValidation.errorWithMarkup(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SubversionSCM.doCheckRemote.badPath=\
SubversionSCM.doCheckRemote.badPathSuggest=\
"{0}/{1}" doesn''t exist in the repository. Maybe you meant "{0}{2}"?
SubversionSCM.doCheckRemote.exceptionMsg1=\
Unable to access {0} : {1} <a href="#" id="svnerrorlink" onclick="{2}">(show details)</a>
Unable to access {0} : {1} <a href="#" id="svnerrorlink">(show details)</a>
SubversionSCM.doCheckRemote.exceptionMsg2=\
(Maybe you need to <a href="{0}" target="_blank">enter credential</a>?)
SubversionSCM.doCheckRemote.invalidUrl=Invalid URL syntax
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SubversionSCM.doCheckRemote.badPath=\
SubversionSCM.doCheckRemote.badPathSuggest=\
"{0}/{1}" existiert nicht im Repository. Meinten Sie vielleicht "{0}{2}"?
SubversionSCM.doCheckRemote.exceptionMsg1=\
Kein Zugriff auf {0} : {1} <a href="#" id="svnerrorlink" onclick="{2}">(Details)</a>
Kein Zugriff auf {0} : {1} <a href="#" id="svnerrorlink">(Details)</a>
SubversionSCM.doCheckRemote.exceptionMsg2=\
(Vielleicht m�ssen Sie sich zuvor <a href="{0}" target="_blank">authentifizieren</a>?)
SubversionSCM.doCheckRemote.invalidUrl=\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SubversionTagAction.DisplayName.HasNoTag=Etiquetar esta ejecuci
SubversionSCM.doCheckRemote.badPath={0} no existe en el repositorio

SubversionSCM.doCheckRemote.exceptionMsg1=\
Acceso imposible a {0} : {1} <a href="#" id="svnerrorlink" onclick="{2}">(ver detalles)</a>
Acceso imposible a {0} : {1} <a href="#" id="svnerrorlink">(ver detalles)</a>

SubversionTagAction.DisplayName.HasTags=Etiquetas
SubversionTagAction.Tooltip=Etiquetado
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SubversionSCM.doCheckRemote.badPath=\
SubversionSCM.doCheckRemote.badPathSuggest=\
"{0}/{1}" n''existe pas dans le d\u00e9p\u00f4t. Vous pensiez peut-\u00eatre \u00e0 "{0}{2}" ?
SubversionSCM.doCheckRemote.exceptionMsg1=\
Impossible d''acc\u00e9der \u00e0 {0} : {1} <a href="#" id="svnerrorlink" onclick="{2}">(voir les d\u00e9tails)</a>
Impossible d''acc\u00e9der \u00e0 {0} : {1} <a href="#" id="svnerrorlink">(voir les d\u00e9tails)</a>
SubversionSCM.doCheckRemote.exceptionMsg2=\
(Vous avez peut-\u00eatre besoin de <a href="{0}" target="_blank">saisir des identifiants</a> ?)
SubversionSCM.doCheckRemote.invalidUrl=\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SubversionSCM.doCheckRemote.badPath=\
SubversionSCM.doCheckRemote.badPathSuggest=\
"{0}/{1}" \u306f\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u5b58\u5728\u3057\u307e\u305b\u3093\u3002"{0}{2}"\u3067\u306f\u306a\u3044\u3067\u3059\u304b?
SubversionSCM.doCheckRemote.exceptionMsg1=\
{0}\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002 : {1} <a href="#" id="svnerrorlink" onclick="{2}">(\u8a73\u7d30)</a>
{0}\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093\u3002 : {1} <a href="#" id="svnerrorlink">(\u8a73\u7d30)</a>
SubversionSCM.doCheckRemote.exceptionMsg2=\
(<a href="{0}" target="_blank">\u8a8d\u8a3c\u3092\u5165\u529b</a>\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093)
SubversionSCM.doCheckRemote.invalidUrl=\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SubversionSCM.doCheckRemote.badPath=\
SubversionSCM.doCheckRemote.badPathSuggest=\
\u5132\u5b58\u5eab\u88e1\u6c92\u6709 "{0}/{1}"\u3002\u60a8\u6307\u7684\u662f "{0}{2}" \u55ce?
SubversionSCM.doCheckRemote.exceptionMsg1=\
\u7121\u6cd5\u5b58\u53d6 {0} : {1} <a href="#" id="svnerrorlink" onclick="{2}">(\u986f\u793a\u8a73\u7d30\u8cc7\u6599)</a>
\u7121\u6cd5\u5b58\u53d6 {0} : {1} <a href="#" id="svnerrorlink">(\u986f\u793a\u8a73\u7d30\u8cc7\u6599)</a>
SubversionSCM.doCheckRemote.exceptionMsg2=\
(\u6216\u8a31\u60a8\u8a72<a href="{0}" target="_blank">\u8f38\u5165\u6191\u8b49</a> \u4e86?)
SubversionSCM.doCheckRemote.invalidUrl=\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:c="/lib/credentials">
<st:adjunct includes="jenkins.scm.impl.subversion.SubversionSCMSource.resource"/>
<f:entry title="${%Project Repository Base}" field="remoteBase">
<f:textbox/>
</f:entry>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Behaviour.specify("#svnerrorlink", "SubversionSCMSource_showDetails", 0, (element) => {
element.addEventListener("click", (event) => {
event.preventDefault();

document.getElementById("svnerror").style.display = "block";
event.target.style.display = "none";
});
});