propagate from branch 'i2p.i2p.zzz.test' (head 1d4b529f1b52692195f1547338e186819dbd0cab)

to branch 'i2p.i2p' (head 1b8226cb70a7d72f0f674908d8213f8d29eb64eb)
This commit is contained in:
zzz
2009-06-12 12:58:33 +00:00
39 changed files with 221 additions and 142 deletions

View File

@ -75,8 +75,9 @@
<ant target="war" />
</target>
<target name="war" depends="precompilejsp">
<!-- Don't include the css in the war, the main build.xml will copy it to docs/themes/console/ -->
<war destfile="build/routerconsole.war" webxml="../jsp/web-out.xml"
basedir="../jsp/" excludes="web.xml, *.java, *.jsp, web-fragment.xml">
basedir="../jsp/" excludes="web.xml, *.css, *.java, *.jsp, web-fragment.xml">
</war>
</target>
<target name="precompilejsp" unless="precompilejsp.uptodate">

View File

@ -0,0 +1,20 @@
package net.i2p.router.web;
/**
* Copied and modded from I2PTunnel IndexBean (GPL)
* @author zzz
*/
public class CSSHelper extends HelperBase {
public CSSHelper() {}
public static final String PROP_THEME_NAME = "routerconsole.theme";
private static final String BASE = "/themes/console/";
public String getTheme() {
String url = BASE;
String theme = _context.getProperty(PROP_THEME_NAME);
if (theme != null)
url += theme + "/";
return url;
}
}

View File

@ -1,23 +0,0 @@
package net.i2p.router.web;
import net.i2p.data.DataHelper;
import net.i2p.router.RouterContext;
/**
* Simple helper to query the appropriate router for data necessary to render
* any emergency notices
*/
public class NoticeHelper extends HelperBase {
public String getSystemNotice() {
if (true) return ""; // moved to the left hand nav
if (_context.router().gracefulShutdownInProgress()) {
long remaining = _context.router().getShutdownTimeRemaining();
if (remaining > 0)
return "Graceful shutdown in " + DataHelper.formatDuration(remaining);
else
return "Graceful shutdown imminent, please be patient as state is written to disk";
} else {
return "";
}
}
}

View File

@ -3,7 +3,7 @@
<html><head>
<title>I2P Router Console - config networking</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config advanced</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config clients</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
<style type='text/css'>
button span.hide{
display:none;

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config keyring</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config logging</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<jsp:useBean class="net.i2p.router.web.ConfigLoggingHelper" id="logginghelper" scope="request" />
<jsp:setProperty name="logginghelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config peers</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config service</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config stats</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
<script type="text/javascript">
function init()
{

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config tunnels</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - config update</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -0,0 +1,20 @@
<%
/*
* This should be included inside <head>...</head>,
* as it sets the stylesheet.
*/
response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
// the above will b0rk if the servlet engine has already flushed
// the response prior to including this file, so it should be
// near the top
if (request.getParameter("i2p.contextId") != null) {
session.setAttribute("i2p.contextId", request.getParameter("i2p.contextId"));
}
%>
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="cssHelper" scope="request" />
<jsp:setProperty name="cssHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<link href="<%=cssHelper.getTheme()%>console.css" rel="stylesheet" type="text/css" />

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - graphs</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - help</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -5,7 +5,7 @@
<html><head>
<title>I2P Router Console - home</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
<link rel="shortcut icon" href="favicon.ico" />
</head><body>
<%

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - job queue</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - logs</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -1,15 +1,4 @@
<%@page import="java.io.File" %>
<% response.setHeader("Pragma", "no-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires", 0);
// the above will b0rk if the servlet engine has already flushed
// the response prior to including nav.jsp, so nav should be
// near the top
if (request.getParameter("i2p.contextId") != null) {
session.setAttribute("i2p.contextId", request.getParameter("i2p.contextId"));
}%>
<div class="logo">
<a href="index.jsp"><img src="i2plogo.png" alt="Router Console" width="187" height="35" /></a><br />
</div>
@ -35,12 +24,10 @@
<a href="graphs.jsp">Graphs</a> |
<a href="oldstats.jsp">Stats</a> <!-- |
<a href="oldconsole.jsp">Internals</a> -->
<% } %>
<% }
// the following is unused and a candidate for removal
%>
<jsp:useBean class="net.i2p.router.web.NavHelper" id="navhelper" scope="request" />
<jsp:setProperty name="navhelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<jsp:getProperty name="navhelper" property="clientAppLinks" />
</div>
<jsp:useBean class="net.i2p.router.web.NoticeHelper" id="noticehelper" scope="request" />
<jsp:setProperty name="noticehelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<b><jsp:getProperty name="noticehelper" property="systemNotice" /></b>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - network database summary</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - internals</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - statistics</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - peer connections</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - peer profiles</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>

View File

@ -50,7 +50,7 @@
}
}
%>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head>
<body style="margin: 0;">

View File

@ -4,7 +4,7 @@
<html><head>
<title>I2P Router Console - tunnel summary</title>
<link rel="stylesheet" href="default.css" type="text/css" />
<%@include file="css.jsp" %>
</head><body>
<%@include file="nav.jsp" %>