[FIXED HUDSON-2763] Add health report in build history widget on project page.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13802 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
mindless committed 2008-12-22 19:42:11 +00:00
1 parent 1514352c02
commit 356fdbec0d
5 files changed
+81 -48

No files matched your search

+14
View File
@@ -35,6 +35,9 @@ import hudson.util.Area;
import hudson.util.Iterators;
import org.acegisecurity.providers.anonymous.AnonymousAuthenticationToken;
import org.apache.commons.jelly.JellyContext;
import org.apache.commons.jelly.JellyTagException;
import org.apache.commons.jelly.Script;
import org.apache.commons.jelly.XMLOutput;
import org.apache.commons.jexl.parser.ASTSizeFunction;
import org.apache.commons.jexl.util.Introspector;
import org.kohsuke.stapler.Ancestor;
@@ -871,6 +874,17 @@ public class Functions {
return context;
}
/**
* Evaluate a Jelly script and return output as a String.
*
* @since 1.267
*/
public static String runScript(Script script) throws JellyTagException {
StringWriter out = new StringWriter();
script.run(getCurrentJellyContext(), XMLOutput.createXMLOutput(out));
return out.toString();
}
/**
* Returns a sub-list if the given list is bigger than the specified 'maxSize'
*/