diff --git a/apps/routerconsole/java/src/net/i2p/router/web/FileDumpHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/FileDumpHelper.java index be7ffc3c7..3d3a10034 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/FileDumpHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/FileDumpHelper.java @@ -19,6 +19,7 @@ import java.util.jar.Manifest; import net.i2p.crypto.SHA256Generator; import net.i2p.data.DataHelper; import net.i2p.util.FileUtil; +import net.i2p.util.SystemVersion; /** * Dump info on jars and wars @@ -26,11 +27,12 @@ import net.i2p.util.FileUtil; * @since 0.8.13 */ public class FileDumpHelper extends HelperBase { - + + private static final boolean isWindows = SystemVersion.isWindows(); public String getFileSummary() { StringBuilder buf = new StringBuilder(16*1024); - buf.append("" + - ""); + buf.append("
FileSizeDateSHA 256RevisionJDKBuiltByMods
\n" + + "\n"); // jars added in wrapper.config ClassLoader loader = ClassLoader.getSystemClassLoader(); @@ -57,19 +59,31 @@ public class FileDumpHelper extends HelperBase { // our jars File dir = new File(_context.getBaseDir(), "lib"); + buf.append("\n"); dumpDir(buf, dir, ".jar"); // our wars dir = new File(_context.getBaseDir(), "webapps"); + buf.append("\n"); dumpDir(buf, dir, ".war"); // plugins File pluginDir = new File(_context.getConfigDir(), PluginStarter.PLUGIN_DIR); + buf.append(""); File[] files = pluginDir.listFiles(); if (files != null) { Arrays.sort(files); for (int i = 0; i < files.length; i++) { dir = new File(files[i], "lib"); + buf.append(""); dumpDir(buf, dir, ".jar"); dir = new File(files[i], "console/webapps"); dumpDir(buf, dir, ".war"); @@ -92,7 +106,7 @@ public class FileDumpHelper extends HelperBase { } private static void dumpFile(StringBuilder buf, File f) { - buf.append("" + + buf.append("" + "" + "\n"); + if (s != null) { + // Encase each mod in a span so we can single click select individual mods + buf.append("") + .append(s.replace(",", "
")) + .append(""); + } + buf.append("\n"); } private static byte[] sha256(File f) { diff --git a/history.txt b/history.txt index d6c1c7bbb..9d6735f89 100644 --- a/history.txt +++ b/history.txt @@ -3,6 +3,10 @@ - /debug: - Add container divs and styling markup - Add top navigation menu + - /jars: + - JARs, WARs & individual plugins separated with headers + - Filenames stripped of path info (path indicated on headers and tooltips) + - Add container divs and styling markup * I2PSnark: - Mitigate truncation of ratings dropdown in comments section (translations) - light: Reduce contrast of display text
FileSizeDateSHA 256RevisionJDKBuiltByMods
Router Jar Files: "); + buf.append(dir.getAbsolutePath()); + buf.append("
Router War Files: "); + buf.append(dir.getAbsolutePath()); + buf.append("
I2P Plugins: "); + buf.append(pluginDir.getAbsolutePath()); + buf.append("
Plugin File Location: "); + buf.append(dir.getAbsolutePath()); + buf.append("
").append(f.getAbsolutePath()).append("
").append(f.getName()).append("").append(f.length()).append(""); long mod = f.lastModified(); @@ -107,14 +121,14 @@ public class FileDumpHelper extends HelperBase { if (hash != null) { byte[] hh = new byte[16]; System.arraycopy(hash, 0, hh, 0, 16); - buf.append(""); + buf.append(""); String p1 = DataHelper.toHexString(hh); for (int i = p1.length(); i < 32; i++) { buf.append('0'); } buf.append(p1).append("
"); System.arraycopy(hash, 16, hh, 0, 16); - buf.append("").append(DataHelper.toHexString(hh)).append(""); + buf.append("").append(DataHelper.toHexString(hh)).append("
"); } Attributes att = attributes(f); if (att == null) @@ -130,9 +144,9 @@ public class FileDumpHelper extends HelperBase { // fix and uncomment if a reliable viewmtn host appears //buf.append(""); - buf.append("").append(s.substring(0, 20)).append("" + + buf.append("").append(s.substring(0, 20)).append("" + "
" + - "").append(s.substring(20)).append(""); + "").append(s.substring(20)).append("
"); //buf.append("
"); } buf.append("
"); @@ -147,11 +161,15 @@ public class FileDumpHelper extends HelperBase { s = getAtt(att, "Built-By"); if (s != null) buf.append(s); - buf.append(""); + buf.append(""); s = getAtt(att, "Workspace-Changes"); - if (s != null) - buf.append(s.replace(",", "
")); - buf.append("