/** * Renders a clickable map. */ public void doMap(StaplerRequest req, StaplerResponse rsp) throws IOException { if (req.checkIfModified(timestamp, rsp)) return; ChartRenderingInfo info = new ChartRenderingInfo(); render(req,info); rsp.setContentType("text/plain;charset=UTF-8"); rsp.getWriter().println(ChartUtilities.getImageMap( "map", info )); } }
if (req.checkIfModified(timestamp, rsp)) return;
public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException { String path = req.getRestOfPath(); if(path.length()>0) path=path.substring(1); // trim off the leading '/' Generator g = generators.get(path); if(g==null) { rsp.sendError(HttpServletResponse.SC_NOT_FOUND); return; } if(req.checkIfModified(timestamp,rsp,expiration)) return; g.doDynamic(req,rsp); } }
public void doDynamic(StaplerRequest req, StaplerResponse rsp) throws IOException { String path = req.getRestOfPath(); if(path.length()>0) path=path.substring(1); // trim off the leading '/' Generator g = generators.get(path); if(g==null) { rsp.sendError(HttpServletResponse.SC_NOT_FOUND); return; } if(req.checkIfModified(timestamp,rsp,expiration)) return; g.doDynamic(req,rsp); } }
/** * If the last build is the same, * no need to regenerate the graph. Browser should reuse it's cached image * * @param req request * @param rsp response * @return true, if new image does NOT need to be generated, false otherwise */ private boolean newGraphNotNeeded(final StaplerRequest req, StaplerResponse rsp) { Calendar t = getProject().getLastCompletedBuild().getTimestamp(); return req.checkIfModified(t, rsp); }
/** * Renders a clickable map. */ public void doMap(StaplerRequest req, StaplerResponse rsp) throws IOException { if (req.checkIfModified(timestamp, rsp)) return; ChartRenderingInfo info = new ChartRenderingInfo(); render(req,info); rsp.setContentType("text/plain;charset=UTF-8"); rsp.getWriter().println(ChartUtilities.getImageMap( "map", info )); } }
/** * Renders a clickable map. */ public void doMap(StaplerRequest req, StaplerResponse rsp) throws IOException { if (req.checkIfModified(timestamp, rsp)) return; String w = req.getParameter("width"); if(w==null) w=String.valueOf(defaultW); String h = req.getParameter("height"); if(h==null) h=String.valueOf(defaultH); ChartRenderingInfo info = new ChartRenderingInfo(); render(req,info); rsp.setContentType("text/plain;charset=UTF-8"); rsp.getWriter().println(ChartUtilities.getImageMap( "map", info )); } }
/** * Renders a clickable map. */ public void doMap(StaplerRequest req, StaplerResponse rsp) throws IOException { if (req.checkIfModified(timestamp, rsp)) return; String w = req.getParameter("width"); if(w==null) w=String.valueOf(defaultW); String h = req.getParameter("height"); if(h==null) h=String.valueOf(defaultH); ChartRenderingInfo info = new ChartRenderingInfo(); render(req,info); rsp.setContentType("text/plain;charset=UTF-8"); rsp.getWriter().println(ChartUtilities.getImageMap( "map", info )); } }
/** * Generates a clickable map HTML for {@link #doGraph(StaplerRequest, StaplerResponse)}. */ public void doGraphMap( StaplerRequest req, StaplerResponse rsp) throws IOException { if(req.checkIfModified(run.getTimestamp(),rsp)) return; ChartUtil.generateClickableMap(req,rsp,createChart(req,buildDataSet(req)),calcDefaultSize()); }
/** * Generates a clickable map HTML for {@link #doGraph(StaplerRequest, StaplerResponse)}. */ public void doGraphMap( StaplerRequest req, StaplerResponse rsp) throws IOException { if(req.checkIfModified(owner.getTimestamp(),rsp)) return; ChartUtil.generateClickableMap(req,rsp,createChart(req,buildDataSet(req)),calcDefaultSize()); }
/** * Generates a clickable map HTML for {@link #doGraph(StaplerRequest, StaplerResponse)}. */ public void doGraphMap( StaplerRequest req, StaplerResponse rsp) throws IOException { if(req.checkIfModified(owner.getTimestamp(),rsp)) return; ChartUtil.generateClickableMap(req,rsp,createChart(req,buildDataSet(req)),calcDefaultSize()); }
public void doGraphMap(StaplerRequest req, StaplerResponse rsp) throws IOException { if (req.checkIfModified(this.getOwner().getTimestamp(), rsp)) return; ChartUtil.generateClickableMap(req, rsp, createChart(req, buildDataSet()), calcDefaultSize()); }
/** * Generates a clickable map HTML for {@link #doGraph(StaplerRequest, StaplerResponse)}. */ public void doGraphMap( StaplerRequest req, StaplerResponse rsp) throws IOException { if(req.checkIfModified(owner.getTimestamp(),rsp)) return; Area defSize = calcDefaultSize(); Graph graph = new Graph(-1, defSize.width, defSize.height); graph.setYAxisLabel("count"); graph.setData(getGraphDataSet(req)); graph.doMap(req,rsp); }
/** * Generates a PNG image for the test result trend. */ public void doGraph( StaplerRequest req, StaplerResponse rsp) throws IOException { if(ChartUtil.awtProblemCause!=null) { // not available. send out error message rsp.sendRedirect2(req.getContextPath()+"/images/headless.png"); return; } if(req.checkIfModified(owner.getTimestamp(),rsp)) return; ChartUtil.generateGraph(req,rsp,createChart(req,buildDataSet(req)),calcDefaultSize()); }
/** * Generates a PNG image for the test result trend. */ public void doGraph( StaplerRequest req, StaplerResponse rsp) throws IOException { if(ChartUtil.awtProblemCause!=null) { // not available. send out error message rsp.sendRedirect2(req.getContextPath()+"/images/headless.png"); return; } if(req.checkIfModified(run.getTimestamp(),rsp)) return; ChartUtil.generateGraph(req,rsp,createChart(req,buildDataSet(req)),calcDefaultSize()); }
/** * Generates a PNG image for the test result trend. */ public void doGraph( StaplerRequest req, StaplerResponse rsp) throws IOException { if(ChartUtil.awtProblemCause!=null) { // not available. send out error message rsp.sendRedirect2(req.getContextPath()+"/images/headless.png"); return; } if(req.checkIfModified(owner.getTimestamp(),rsp)) return; ChartUtil.generateGraph(req,rsp,createChart(req,buildDataSet(req)),calcDefaultSize()); }
/** * Generates a clickable map HTML for * {@link #doGraph(StaplerRequest, StaplerResponse)}. */ public void doGraphMap(StaplerRequest req, StaplerResponse rsp) throws IOException { if (req.checkIfModified(owner.getTimestamp(), rsp)) { return; } Area defSize = calcDefaultSize(); Graph graph = new Graph(-1, defSize.width, defSize.height); graph.setYAxisLabel("count"); graph.setData(getGraphDataSet(req)); graph.doMap(req, rsp); }
public void doGraph(StaplerRequest req, StaplerResponse rsp) throws IOException { if (ChartUtil.awtProblemCause != null) { // not available. send out error message rsp.sendRedirect2(req.getContextPath() + "/images/headless.png"); return; } if (req.checkIfModified(getOwner().getTimestamp(), rsp)) return; ChartUtil.generateGraph(req, rsp, createChart(req, buildDataSet()), calcDefaultSize()); }
/** * Generates a PNG image for the test result trend. */ public void doGraph( StaplerRequest req, StaplerResponse rsp) throws IOException { if(ChartUtil.awtProblemCause!=null) { // not available. send out error message rsp.sendRedirect2(req.getContextPath()+"/images/headless.png"); return; } if(req.checkIfModified(owner.getTimestamp(),rsp)) return; Area defSize = calcDefaultSize(); Graph graph = new Graph(-1, defSize.width, defSize.height); graph.setYAxisLabel("count"); graph.setData(getGraphDataSet(req)); graph.doPng(req,rsp); //ChartUtil.generateGraph(req,rsp,createChart(req,buildDataSet(req)),calcDefaultSize()); }
public void doGraphMap(StaplerRequest req, StaplerResponse rsp) throws IOException { Calendar t = getProject().getLastCompletedBuild().getTimestamp(); if (req.checkIfModified(t, rsp)) { return; // up to date } DataSetBuilder<String, ChartUtil.NumberOnlyBuildLabel> dataSetBuilder = new DataSetBuilder<String, ChartUtil.NumberOnlyBuildLabel>(); //TODO: optimize by using cache populateDataSetBuilder(dataSetBuilder); ChartUtil.generateClickableMap(req, rsp, GraphHelper.createChart(req, dataSetBuilder.build()), getGraphWidth(), getGraphHeight()); }