Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added a delete button to crawl profile list.

orbiter3ad0709b5389
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 @@
<td><strong>Fill Proxy Cache</strong></td>
<td><strong>Local Indexing</strong></td>
<td><strong>Remote Indexing</strong></td>
+ <td></td>
</tr>
#{crawlProfiles}#
<tr class="TableCell#(dark)#Light::Dark#(/dark)#">
@@ -340,6 +341,7 @@
<td>#(storeCache)#no::yes#(/storeCache)#</td>
<td>#(localIndexing)#no::yes#(/localIndexing)#</td>
<td>#(remoteIndexing)#no::yes#(/remoteIndexing)#</td>
+ <td>#(deleteButton)#::<form action="IndexCreate_p.html" method="get" enctype="multipart/form-data"><input type="hidden" name="handle" value="#[handle]#" /><input type="submit" name="deleteprofile" value="Delete" /></form>#(/deleteButton)#</td>
</tr>
#{/crawlProfiles}#
</table>
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++;