diff --git a/core/pom.xml b/core/pom.xml index aeddd7c512..8b76f66220 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -236,7 +236,7 @@ org.kohsuke.stapler stapler - 1.22 + 1.23-SNAPSHOT org.kohsuke diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index f5a5f0c9e5..0296fd5f0d 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -328,10 +328,23 @@ public class Functions { return Util.encode(s); } - public void adminCheck(StaplerRequest req, StaplerResponse rsp,boolean required) throws IOException, ServletException { + public static void adminCheck(StaplerRequest req, StaplerResponse rsp,boolean required) throws IOException, ServletException { if(required && !Hudson.adminCheck(req,rsp)) { // check failed throw new ServletException("Unauthorized access"); } } + + /** + * Infers the hudson installation URL from the given request. + */ + public static String inferHudsonURL(StaplerRequest req) { + StringBuilder buf = new StringBuilder(); + buf.append(req.getScheme()).append("://"); + buf.append(req.getServerName()); + if(req.getLocalPort()!=80) + buf.append(':').append(req.getLocalPort()); + buf.append('/').append(req.getContextPath()); + return buf.toString(); + } } diff --git a/core/src/main/resources/lib/hudson/buildProgressBar.jelly b/core/src/main/resources/lib/hudson/buildProgressBar.jelly index 4bcc41ce04..17f473e607 100644 --- a/core/src/main/resources/lib/hudson/buildProgressBar.jelly +++ b/core/src/main/resources/lib/hudson/buildProgressBar.jelly @@ -7,10 +7,5 @@ - + Started ${build.timestampString} ago<br> Estimated remaining time: ${build.executor.estimatedRemainingTime} diff --git a/core/src/main/resources/lib/hudson/queue.jelly b/core/src/main/resources/lib/hudson/queue.jelly index 729b313432..f4d58173ec 100644 --- a/core/src/main/resources/lib/hudson/queue.jelly +++ b/core/src/main/resources/lib/hudson/queue.jelly @@ -30,12 +30,7 @@ ${item.project.name} - + ${item.why} diff --git a/core/src/main/resources/lib/hudson/tooltip.jelly b/core/src/main/resources/lib/hudson/tooltip.jelly new file mode 100644 index 0000000000..199bc34e70 --- /dev/null +++ b/core/src/main/resources/lib/hudson/tooltip.jelly @@ -0,0 +1,21 @@ + + + + \ No newline at end of file