From 270fb38674ff5f505ed14d45aa8234239f67390b Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 5 Mar 2010 15:41:15 +0000 Subject: [PATCH] - fixed some bugs in Table viewer - added 'select all' feature in Tables_p - enhanced ViewFile.html: has now an input field to load arbitrary resources from the web and analyze them (!!!) - included the ViewFile servlet into the Index Administration menu - show in ViewFile if ressource is in url-db and/or in Web cache - bugfixes to BEncodedHeap and Tables management git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6713 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/Table_API_p.html | 18 +++------ htroot/Tables_p.html | 18 +++++++-- htroot/Tables_p.java | 8 ++-- htroot/ViewFile.html | 24 ++++++++--- htroot/ViewFile.java | 40 ++++++++++++------- .../templates/submenuIndexControl.template | 1 + .../net/yacy/kelondro/blob/BEncodedHeap.java | 2 +- source/net/yacy/kelondro/blob/Tables.java | 11 ++++- 8 files changed, 81 insertions(+), 41 deletions(-) diff --git a/htroot/Table_API_p.html b/htroot/Table_API_p.html index 857eb6ee1..5d9322147 100644 --- a/htroot/Table_API_p.html +++ b/htroot/Table_API_p.html @@ -8,22 +8,16 @@ #%env/templates/metas.template%# + + #%env/templates/header.template%# @@ -39,7 +33,7 @@ - + @@ -57,8 +51,6 @@
Date Type Comment

- -     

diff --git a/htroot/Tables_p.html b/htroot/Tables_p.html index 2f497b39c..393675daa 100644 --- a/htroot/Tables_p.html +++ b/htroot/Tables_p.html @@ -6,6 +6,17 @@ #(/showtable)# #%env/templates/metas.template%# + #%env/templates/header.template%# @@ -28,12 +39,12 @@ #(showtable)#:: -
+
- + #{columns}# @@ -41,7 +52,7 @@ #{list}# - + #{columns}# @@ -51,6 +62,7 @@
  PK#[header]#
#[pk]##[cell]#

+      diff --git a/htroot/Tables_p.java b/htroot/Tables_p.java index 70ba9f384..babaaf073 100644 --- a/htroot/Tables_p.java +++ b/htroot/Tables_p.java @@ -69,8 +69,8 @@ public class Tables_p { if (post != null && post.get("deleterows", "").length() > 0) { for (Map.Entry entry: post.entrySet()) { - if (entry.getKey().startsWith("mark_") && entry.getValue().equals("on")) try { - sb.tables.delete(table, entry.getKey().substring(5).getBytes()); + if (entry.getValue().startsWith("mark_")) try { + sb.tables.delete(table, entry.getValue().substring(5).getBytes()); } catch (IOException e) { Log.logException(e); } @@ -125,7 +125,8 @@ public class Tables_p { row = mapIterator.next(); if (row == null) continue; prop.put("showtable_list_" + count + "_dark", ((dark) ? 1 : 0) ); dark=!dark; - prop.put("showtable_list_" + count + "_pk", new String(row.getPK())); + prop.put("showtable_list_" + count + "_pk", new String(row.getPK())); + prop.put("showtable_list_" + count + "_count", count); for (int i = 0; i < columns.size(); i++) { cell = row.from(columns.get(i)); prop.putHTML("showtable_list_" + count + "_columns_" + i + "_cell", cell == null ? "" : new String(cell)); @@ -138,6 +139,7 @@ public class Tables_p { Log.logException(e); } prop.put("showtable_list", count); + prop.put("showtable_num", count); } if (post != null && table != null && post.containsKey("editrow")) { diff --git a/htroot/ViewFile.html b/htroot/ViewFile.html index e1026877b..bebcf7b0f 100644 --- a/htroot/ViewFile.html +++ b/htroot/ViewFile.html @@ -9,17 +9,29 @@ #%env/templates/simpleheader.template%# :: #%env/templates/header.template%# + #%env/templates/submenuIndexControl.template%# :: #%env/templates/embeddedheader.template%# #(/display)#

View URL Content

+ +
Get URL Viewer +
+
URL:
 
+ +
+ +
+ #(error)#
-
View URL Content +
URL Metadata
URL:
#[url]#
Hash:
#[hash]#
+
In URL-DB:
#(inurldb)#no::yes#(/inurldb)#
+
In Cache:
#(incache)#no::yes#(/incache)#
Word Count:
#[wordCount]#
Description:
#[desc]#
Size:
#[size]# Bytes
#(mimeTypeAvailable)#:: @@ -40,10 +52,10 @@ +
:: -No URL hash submitted. :: Unable to find URL Entry in DB :: @@ -61,25 +73,25 @@

#(viewMode)# :: -

Plain Resource Content +
Plain Content

#[plainText]#

:: -
Parsed Resource Content +
Parsed Content

#[parsedText]#

:: -
Parsed Resource Sentences +
Parsed Sentences
    #{sentences}#
  1. #[text]#
  2. #{/sentences}#
:: -
Original Resource Content +
Original Content