Changeset 5173


Ignore:
Timestamp:
Oct 30, 2009, 8:32:27 AM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1424: Cached plots should be distributed into subdirectories

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.14-stable/src/clients/web/net/sf/basedb/clients/web/extensions/plot/MAPlotFactory.java

    r4908 r5173  
    124124      // MA plot
    125125      PlotGeneratorBean maPlot = new PlotGeneratorBean();
    126       maPlot.setId("maplot." + ba.getId());
     126      int id = ba.getId();
     127      int subdir = id % 1000;
     128      maPlot.setId("maplot." + id);
    127129      maPlot.setWidth(width);
    128130      maPlot.setHeight(height);
     
    130132      maPlot.setUrl(
    131133          servletPath + "?ID=" + ID +
    132           "&bioassay_id=" + ba.getId() +
     134          "&bioassay_id=" + id +
    133135          "&type=scatter"+
    134136          "&width="+width+"&height=" + height +
    135           "&cache=overview/bioassay." + ba.getId() + "/maplot.png" +
     137          "&cache=overview/" + subdir + "/maplot-" + id + ".png" +
    136138          "&x="+A+"&y="+M+
    137139          "&xLabel="+xLabel+"&yLabel="+yLabel +
     
    144146      {
    145147        PlotGeneratorBean cfPlot = new PlotGeneratorBean();
    146         cfPlot.setId("cfplot." + ba.getId());
     148        cfPlot.setId("cfplot." + id);
    147149        cfPlot.setWidth(width);
    148150        cfPlot.setHeight(height);
     
    150152        cfPlot.setUrl(
    151153            servletPath + "?ID=" + ID +
    152             "&bioassay_id=" + ba.getId() +
     154            "&bioassay_id=" + id +
    153155            "&type=cfplot"+
    154156            "&width="+width+"&height=" + height +
    155             "&cache=overview/bioassay." + ba.getId() + "/cfplot.png" +
     157            "&cache=overview/" + subdir + "/cfplot-" + id + ".png" +
    156158            "&xLabel="+xLabel+"&yLabel="+yLabel +
    157159            "&title="+HTML.urlEncode(ba.getName())
Note: See TracChangeset for help on using the changeset viewer.