Changeset fa6d17a


Ignore:
Timestamp:
Oct 15, 2009 10:42:22 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f73b3e5
Parents:
fdc9e11
Message:
Files:
6 edited
1 moved

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java

    rfdc9e11 rfa6d17a  
    1 package net.i2p.router.peermanager;
     1package net.i2p.router.web;
    22
    33import java.io.IOException;
     
    1313import net.i2p.data.RouterInfo;
    1414import net.i2p.router.RouterContext;
     15import net.i2p.router.peermanager.DBHistory;
     16import net.i2p.router.peermanager.PeerProfile;
     17import net.i2p.router.peermanager.ProfileOrganizer;
    1518import net.i2p.stat.Rate;
    1619import net.i2p.stat.RateStat;
  • apps/routerconsole/java/src/net/i2p/router/web/ProfilesHelper.java

    rfdc9e11 rfa6d17a  
    11package net.i2p.router.web;
    22
    3 import java.io.ByteArrayOutputStream;
    43import java.io.IOException;
    5 import java.io.OutputStreamWriter;
    64
    75
     
    97    public ProfilesHelper() {}
    108   
     9    /** @return empty string, writes directly to _out */
    1110    public String getProfileSummary() {
    12         ByteArrayOutputStream baos = new ByteArrayOutputStream(16*1024);
    1311        try {
    14             _context.profileOrganizer().renderStatusHTML(new OutputStreamWriter(baos));
     12            ProfileOrganizerRenderer rend = new ProfileOrganizerRenderer(_context.profileOrganizer(), _context);
     13            rend.renderStatusHTML(_out);
    1514        } catch (IOException ioe) {
    1615            ioe.printStackTrace();
    1716        }
    18         return new String(baos.toByteArray());
     17        return "";
    1918    }
    2019   
     20    /** @return empty string, writes directly to _out */
    2121    public String getShitlistSummary() {
    22         ByteArrayOutputStream baos = new ByteArrayOutputStream(4*1024);
    2322        try {
    24             _context.shitlist().renderStatusHTML(new OutputStreamWriter(baos));
     23            _context.shitlist().renderStatusHTML(_out);
    2524        } catch (IOException ioe) {
    2625            ioe.printStackTrace();
    2726        }
    28         return new String(baos.toByteArray());
     27        return "";
    2928    }
    3029}
  • apps/routerconsole/jsp/configpeer.jsp

    rfdc9e11 rfa6d17a  
    7272 <jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
    7373 <jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
     74 <jsp:setProperty name="profilesHelper" property="writer" value="<%=out%>" />
    7475 <jsp:getProperty name="profilesHelper" property="shitlistSummary" />
    7576 <hr>
  • apps/routerconsole/jsp/profiles.jsp

    rfdc9e11 rfa6d17a  
    1010 <jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
    1111 <jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
     12 <jsp:setProperty name="profilesHelper" property="writer" value="<%=out%>" />
    1213 <jsp:getProperty name="profilesHelper" property="profileSummary" />
    1314 <br>
  • router/java/src/net/i2p/router/peermanager/PeerManager.java

    rfdc9e11 rfa6d17a  
    251251        }
    252252    }
    253 
    254     public void renderStatusHTML(Writer out) throws IOException {
    255         _organizer.renderStatusHTML(out);
    256     }
    257253}
  • router/java/src/net/i2p/router/peermanager/PeerManagerFacadeImpl.java

    rfdc9e11 rfa6d17a  
    7979    }
    8080
     81    /** @deprecated, moved to routerconsole */
    8182    public void renderStatusHTML(Writer out) throws IOException {
    82         _manager.renderStatusHTML(out);
    8383    }
    8484   
  • router/java/src/net/i2p/router/peermanager/ProfileOrganizer.java

    rfdc9e11 rfa6d17a  
    140140
    141141    public void setUs(Hash us) { _us = us; }
    142     Hash getUs() { return _us; }
     142    public Hash getUs() { return _us; }
    143143   
    144144    public double getSpeedThreshold() { return _thresholdSpeedValue; }
     
    257257        if (prof != null)
    258258            _persistenceHelper.writeProfile(prof, out);
    259     }
    260    
    261     public void renderStatusHTML(Writer out) throws IOException {
    262         ProfileOrganizerRenderer rend = new ProfileOrganizerRenderer(this, _context);
    263         rend.renderStatusHTML(out);
    264259    }
    265260   
Note: See TracChangeset for help on using the changeset viewer.