Files
i2p.i2p/apps/routerconsole/jsp/graph.jsp
zzz 4bcb1d27e4 Servlets: Close output stream on redirect,
instead of flushing buffer, to force commitment
2018-03-09 21:02:00 +00:00

36 lines
1.3 KiB
Plaintext

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<%@include file="css.jsi" %>
<%=intl.title("graphs")%>
<jsp:useBean class="net.i2p.router.web.helpers.GraphHelper" id="graphHelper" scope="request" />
<jsp:setProperty name="graphHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
<% /* GraphHelper sets the defaults in setContextId, so setting the properties must be after the context */ %>
<jsp:setProperty name="graphHelper" property="*" />
<%
graphHelper.storeWriter(out);
%>
<script src="/js/ajax.js" type="text/javascript"></script>
<%@include file="summaryajax.jsi" %>
</head><body onload="initAjax()">
<%@include file="summary.jsi" %>
<%
// needs to be after the summary bar is rendered, so
// that the restart button is processed
String stat = request.getParameter("stat");
if (stat == null) {
// probably because restart or shutdown was clicked
response.setStatus(307);
response.setHeader("Location", "/graphs");
// force commitment
response.getOutputStream().close();
return;
}
%>
<h1><%=intl._t("I2P Performance Graphs")%></h1>
<div class="main" id="graph_single">
<jsp:getProperty name="graphHelper" property="singleStat" />
</div></body></html>