*) 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
pull/1/head
low012 17 years ago
parent 2aed6bb3f7
commit b63cf2fc1c

@ -78,6 +78,11 @@
</tr> </tr>
#{/crawlProfiles}# #{/crawlProfiles}#
</table> </table>
#(existPassiveCrawls)#::
<form action="CrawlProfileEditor_p.html" method="post" enctype="multipart/form-data">
<input type="submit" name="deleteTerminatedProfiles" value="Delete finished crawls" />
</form>
#(/existPassiveCrawls)#
</fieldset> </fieldset>

@ -96,6 +96,14 @@ public class CrawlProfileEditor_p {
// deletion of a terminated crawl profile // deletion of a terminated crawl profile
sb.profilesPassiveCrawls.removeEntry(handle); 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 // generate handle list
@ -151,15 +159,23 @@ public class CrawlProfileEditor_p {
count++; count++;
} }
// put passive crawls into list // put passive crawls into list
boolean existPassiveCrawls = false;
it = sb.profilesPassiveCrawls.profiles(true); it = sb.profilesPassiveCrawls.profiles(true);
while (it.hasNext()) { while (it.hasNext()) {
profile = (plasmaCrawlProfile.entry) it.next(); profile = (plasmaCrawlProfile.entry) it.next();
putProfileEntry(prop, profile, false, dark, count, domlistlength); putProfileEntry(prop, profile, false, dark, count, domlistlength);
dark = !dark; dark = !dark;
count++; count++;
existPassiveCrawls = true;
} }
prop.put("crawlProfiles", count); prop.put("crawlProfiles", count);
if(existPassiveCrawls) {
prop.put("existPassiveCrawls", "1");
} else {
prop.put("existPassiveCrawls", "0");
}
// generate edit field // generate edit field
if (selentry == null) { if (selentry == null) {
prop.put("edit", "0"); prop.put("edit", "0");

Loading…
Cancel
Save