From b63cf2fc1c3755f15b59a7f8167e46f3c6e22a1d Mon Sep 17 00:00:00 2001 From: low012 Date: Sun, 30 Mar 2008 15:15:56 +0000 Subject: [PATCH] *) added button to Crawl Profile Editor to delete all terminated crawl jobs (only visible if there are terminated crawl jobs) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4620 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/CrawlProfileEditor_p.html | 5 +++++ htroot/CrawlProfileEditor_p.java | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/htroot/CrawlProfileEditor_p.html b/htroot/CrawlProfileEditor_p.html index 226857b8d..1c8ca6c40 100644 --- a/htroot/CrawlProfileEditor_p.html +++ b/htroot/CrawlProfileEditor_p.html @@ -78,6 +78,11 @@ #{/crawlProfiles}# +#(existPassiveCrawls)#:: +
+ +
+#(/existPassiveCrawls)# diff --git a/htroot/CrawlProfileEditor_p.java b/htroot/CrawlProfileEditor_p.java index 7b61f6973..178499760 100644 --- a/htroot/CrawlProfileEditor_p.java +++ b/htroot/CrawlProfileEditor_p.java @@ -96,6 +96,14 @@ public class CrawlProfileEditor_p { // deletion of a terminated crawl profile sb.profilesPassiveCrawls.removeEntry(handle); } + if (post.containsKey("deleteTerminatedProfiles")) { + Iterator profiles = sb.profilesPassiveCrawls.profiles(false); + while (profiles.hasNext()) { + profiles.next(); + profiles.remove(); + profiles = sb.profilesPassiveCrawls.profiles(false); + } + } } // generate handle list @@ -151,15 +159,23 @@ public class CrawlProfileEditor_p { count++; } // put passive crawls into list + boolean existPassiveCrawls = false; it = sb.profilesPassiveCrawls.profiles(true); while (it.hasNext()) { profile = (plasmaCrawlProfile.entry) it.next(); putProfileEntry(prop, profile, false, dark, count, domlistlength); dark = !dark; count++; + existPassiveCrawls = true; } prop.put("crawlProfiles", count); + if(existPassiveCrawls) { + prop.put("existPassiveCrawls", "1"); + } else { + prop.put("existPassiveCrawls", "0"); + } + // generate edit field if (selentry == null) { prop.put("edit", "0");