improved the formatting

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6721 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-01-17 06:31:05 +00:00
1 parent 05d9d6341a
commit c27f873340
3 files changed
+20 -2

No files matched your search

+13
View File
@@ -1,12 +1,14 @@
package hudson;
import hudson.model.TaskListener;
import hudson.model.Hudson;
import hudson.util.IOException2;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.taskdefs.Chmod;
import org.apache.tools.ant.taskdefs.Copy;
import org.kohsuke.stapler.Stapler;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
@@ -610,6 +612,17 @@ public class Util {
return createFileSet(baseDir,includes,null);
}
/**
* Wraps with the error icon and the CSS class to render error message.
* @since 1.173
*/
public static String wrapToErrorSpan(String s) {
s = "<span class=error><img src='"+
Stapler.getCurrentRequest().getContextPath()+ Hudson.RESOURCE_PATH+
"/images/none.gif' height=16 width=1>"+s+"</span>";
return s;
}
public static final SimpleDateFormat XS_DATETIME_FORMATTER = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
// Note: RFC822 dates must not be localized!