From 3ad0709b53890482ed288729892ff91d51fd6587 Mon Sep 17 00:00:00 2001 From: orbiter Date: Sat, 30 Sep 2006 22:35:59 +0000 Subject: [PATCH] added a delete button to crawl profile list. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2682 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/IndexCreate_p.html | 2 ++ htroot/IndexCreate_p.java | 14 +++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/htroot/IndexCreate_p.html b/htroot/IndexCreate_p.html index 05c374d53..1fb136b06 100644 --- a/htroot/IndexCreate_p.html +++ b/htroot/IndexCreate_p.html @@ -325,6 +325,7 @@ Fill Proxy Cache Local Indexing Remote Indexing + #{crawlProfiles}# @@ -340,6 +341,7 @@ #(storeCache)#no::yes#(/storeCache)# #(localIndexing)#no::yes#(/localIndexing)# #(remoteIndexing)#no::yes#(/remoteIndexing)# + #(deleteButton)#::
#(/deleteButton)# #{/crawlProfiles}# diff --git a/htroot/IndexCreate_p.java b/htroot/IndexCreate_p.java index 9eb74eabb..dd55a70ea 100644 --- a/htroot/IndexCreate_p.java +++ b/htroot/IndexCreate_p.java @@ -305,8 +305,6 @@ public class IndexCreate_p { } } - - if (post.containsKey("distributedcrawling")) { long newBusySleep = Integer.parseInt(env.getConfig("62_remotetriggeredcrawl_busysleep", "100")); if (post.get("dcr", "").equals("acceptCrawlMax")) { @@ -328,16 +326,20 @@ public class IndexCreate_p { //env.setConfig("crawlResponse", (crawlResponse) ? "true" : "false"); } - if (post.containsKey("pausecrawlqueue")) { switchboard.pauseCrawlJob(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL); prop.put("info", 4);//crawling paused - } + } if (post.containsKey("continuecrawlqueue")) { switchboard.continueCrawlJob(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL); prop.put("info", 5);//crawling continued - } + } + + if (post.containsKey("deleteprofile")) { + String handle = (String) post.get("handle"); + if (handle != null) switchboard.profiles.removeEntry(handle); + } } // define visible variables @@ -444,6 +446,8 @@ public class IndexCreate_p { prop.put("crawlProfiles_"+count+"_storeCache", ((profile.storeHTCache()) ? 1 : 0)); prop.put("crawlProfiles_"+count+"_localIndexing", ((profile.localIndexing()) ? 1 : 0)); prop.put("crawlProfiles_"+count+"_remoteIndexing", ((profile.remoteIndexing()) ? 1 : 0)); + prop.put("crawlProfiles_"+count+"_deleteButton", (((profile.name().equals("remote")) || (profile.name().equals("proxy"))) ? 0 : 1)); + prop.put("crawlProfiles_"+count+"_deleteButton_handle", profile.handle()); dark = !dark; count++;