mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-29 20:45:20 +00:00
In lower resolution systems, create smaller test trend chart.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9000 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
b3f8f5369b
commit
cf218bbc22
9 files changed
+499
-13
No files matched your search
@@ -26,6 +26,7 @@ import hudson.tasks.Publisher;
|
||||
import hudson.security.SecurityRealm;
|
||||
import hudson.security.AuthorizationStrategy;
|
||||
import hudson.security.Permission;
|
||||
import hudson.util.Area;
|
||||
import org.apache.commons.jexl.parser.ASTSizeFunction;
|
||||
import org.apache.commons.jexl.util.Introspector;
|
||||
import org.apache.commons.jelly.JellyContext;
|
||||
@@ -61,6 +62,7 @@ import java.util.TreeMap;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.SimpleFormatter;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
/**
|
||||
* Utility functions used in views.
|
||||
@@ -181,6 +183,17 @@ public class Functions {
|
||||
return new RunUrl( (Run) f.getObject(), head, base, rest);
|
||||
}
|
||||
|
||||
/**
|
||||
* If we know the user's screen resolution, return it. Otherwise null.
|
||||
* @since 1.213
|
||||
*/
|
||||
public static Area getScreenResolution() {
|
||||
Cookie res = Functions.getCookie(Stapler.getCurrentRequest(),"screenResolution");
|
||||
if(res!=null)
|
||||
return Area.parse(res.getValue());
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* URL decomposed for easier computation of relevant URLs.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user