From ec95dfa2e6318b9ea8b7801b564b0cafcf4b6321 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Wed, 8 Oct 2014 18:48:57 +0200 Subject: [PATCH] fixed crawl profile xml result which did not show the correct crawl status. --- htroot/CrawlProfileEditor_p.xml | 2 +- source/net/yacy/crawler/data/CrawlProfile.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htroot/CrawlProfileEditor_p.xml b/htroot/CrawlProfileEditor_p.xml index 69530b5fb..8d23bec3f 100644 --- a/htroot/CrawlProfileEditor_p.xml +++ b/htroot/CrawlProfileEditor_p.xml @@ -3,7 +3,7 @@ #{crawlProfiles}# #[name]# - #(status)#terminated::active#(/status)# + #(status)#terminated::active::system#(/status)# #[depth]# #[mustmatch]# #[mustnotmatch]# diff --git a/source/net/yacy/crawler/data/CrawlProfile.java b/source/net/yacy/crawler/data/CrawlProfile.java index 5d94b5253..4fb782f60 100644 --- a/source/net/yacy/crawler/data/CrawlProfile.java +++ b/source/net/yacy/crawler/data/CrawlProfile.java @@ -622,12 +622,14 @@ public class CrawlProfile extends ConcurrentHashMap implements M final boolean dark, final int count, final int domlistlength) { - + boolean terminateButton = active && !CrawlSwitchboard.DEFAULT_PROFILES.contains(this.name()); + boolean deleteButton = !active; prop.put(CRAWL_PROFILE_PREFIX + count + "_dark", dark ? "1" : "0"); prop.put(CRAWL_PROFILE_PREFIX + count + "_name", this.collectionName()); - prop.put(CRAWL_PROFILE_PREFIX + count + "_terminateButton", (!active || CrawlSwitchboard.DEFAULT_PROFILES.contains(this.name())) ? "0" : "1"); + prop.put(CRAWL_PROFILE_PREFIX + count + "_status", terminateButton ? 1 : deleteButton ? 0 : 2); + prop.put(CRAWL_PROFILE_PREFIX + count + "_terminateButton", terminateButton); prop.put(CRAWL_PROFILE_PREFIX + count + "_terminateButton_handle", this.handle()); - prop.put(CRAWL_PROFILE_PREFIX + count + "_deleteButton", (active) ? "0" : "1"); + prop.put(CRAWL_PROFILE_PREFIX + count + "_deleteButton", deleteButton); prop.put(CRAWL_PROFILE_PREFIX + count + "_deleteButton_handle", this.handle()); prop.put(CRAWL_PROFILE_PREFIX + count + "_handle", this.handle()); prop.put(CRAWL_PROFILE_PREFIX + count + "_depth", this.depth());