diff --git a/htroot/CrawlProfileEditor_p.html b/htroot/CrawlProfileEditor_p.html index 36341fddf..ac4559232 100644 --- a/htroot/CrawlProfileEditor_p.html +++ b/htroot/CrawlProfileEditor_p.html @@ -13,7 +13,66 @@ The profiles for remote crawls, indexing via proxy and snippet fetches cannot be altered here as they are hard-coded.

-
+ + + + +
Crawl Profile List + + + + + + + + + + + + + + + + + + + + + + + + + + + #{crawlProfiles}# + + + + + + + + + + + + + + + + + #{/crawlProfiles}# +
Crawl ThreadStart URLDepthFilterMaxAgeAuto Filter DepthAuto Filter ContentMax Page Per DomainAccept '?' URLsFill Proxy CacheLocal Text IndexingLocal Media IndexingRemote Indexing
#[name]##[startURL]##[depth]##[filter]##[crawlingIfOlder]##[crawlingDomFilterDepth]##{crawlingDomFilterContent}##[item]#
#{/crawlingDomFilterContent}#
#[crawlingDomMaxPages]##(withQuery)#no::yes#(/withQuery)##(storeCache)#no::yes#(/storeCache)##(indexText)#no::yes#(/indexText)##(indexMedia)#no::yes#(/indexMedia)##(remoteIndexing)#no::yes#(/remoteIndexing)##(deleteButton)#:: +
+
+ #(/deleteButton)# + +
+
+
+ + +
Select the profile to edit -
- - #(/deleteButton)# - - - - #{/crawlProfiles}# - - #%env/templates/footer.template%# diff --git a/htroot/WatchCrawler_p.java b/htroot/WatchCrawler_p.java index b125c67fd..362c65bbf 100644 --- a/htroot/WatchCrawler_p.java +++ b/htroot/WatchCrawler_p.java @@ -71,12 +71,6 @@ public class WatchCrawler_p { } else { prop.put("info", 0); - if (post.containsKey("deleteprofile")) { - // deletion of a crawl - String handle = (String) post.get("handle"); - if (handle != null) switchboard.profiles.removeEntry(handle); - } - if (post.containsKey("continue")) { // continue queue String queue = post.get("continue", ""); @@ -361,54 +355,6 @@ public class WatchCrawler_p { } } - // crawl profiles - int count = 0; - int domlistlength = (post == null) ? 160 : post.getInt("domlistlength", 160); - Iterator it = switchboard.profiles.profiles(true); - plasmaCrawlProfile.entry profile; - boolean dark = true; - while (it.hasNext()) { - profile = (plasmaCrawlProfile.entry) it.next(); - prop.put("crawlProfiles_"+count+"_dark", ((dark) ? 1 : 0)); - prop.put("crawlProfiles_"+count+"_name", profile.name()); - prop.put("crawlProfiles_"+count+"_startURL", profile.startURL()); - prop.put("crawlProfiles_"+count+"_handle", profile.handle()); - prop.put("crawlProfiles_"+count+"_depth", profile.generalDepth()); - prop.put("crawlProfiles_"+count+"_filter", profile.generalFilter()); - prop.put("crawlProfiles_"+count+"_crawlingIfOlder", (profile.recrawlIfOlder() == Long.MAX_VALUE) ? "no re-crawl" : ""+profile.recrawlIfOlder()); - prop.put("crawlProfiles_"+count+"_crawlingDomFilterDepth", (profile.domFilterDepth() == Integer.MAX_VALUE) ? "inactive" : Integer.toString(profile.domFilterDepth())); - - //start contrib [MN] - int i = 0; - String item; - while((i <= domlistlength) && !((item = profile.domName(true, i)).equals(""))){ - if(i == domlistlength){ - item = item + " ..."; - } - prop.put("crawlProfiles_"+count+"_crawlingDomFilterContent_"+i+"_item", item); - i++; - } - - prop.put("crawlProfiles_"+count+"_crawlingDomFilterContent", i); - //end contrib [MN] - - prop.put("crawlProfiles_"+count+"_crawlingDomMaxPages", (profile.domMaxPages() == Integer.MAX_VALUE) ? "unlimited" : ""+profile.domMaxPages()); - prop.put("crawlProfiles_"+count+"_withQuery", ((profile.crawlingQ()) ? 1 : 0)); - prop.put("crawlProfiles_"+count+"_storeCache", ((profile.storeHTCache()) ? 1 : 0)); - prop.put("crawlProfiles_"+count+"_indexText", ((profile.indexText()) ? 1 : 0)); - prop.put("crawlProfiles_"+count+"_indexMedia", ((profile.indexMedia()) ? 1 : 0)); - prop.put("crawlProfiles_"+count+"_remoteIndexing", ((profile.remoteIndexing()) ? 1 : 0)); - prop.put("crawlProfiles_"+count+"_deleteButton", (((profile.name().equals("remote")) || - (profile.name().equals("proxy")) || - (profile.name().equals("snippetText")) || - (profile.name().equals("snippetMedia")) ? 0 : 1))); - prop.put("crawlProfiles_"+count+"_deleteButton_handle", profile.handle()); - - dark = !dark; - count++; - } - prop.put("crawlProfiles", count); - // performance settings long LCbusySleep = Integer.parseInt(env.getConfig(plasmaSwitchboard.CRAWLJOB_LOCAL_CRAWL_BUSYSLEEP, "100")); int LCppm = (int) (60000L / LCbusySleep);