sorting of crawl profile names in crawl profile editor, see

http://forum.yacy-websuche.de/viewtopic.php?p=20851#p20851

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7172 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 3552476fbe
commit 377f001e0d

@ -30,6 +30,7 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.kelondro.index.RowSpaceExceededException;
@ -127,17 +128,20 @@ public class CrawlProfileEditor_p {
}
}
// generate handle list
int count = 0;
// generate handle list: first sort by handle name
CrawlProfile selentry;
TreeMap<String, String> orderdHandles = new TreeMap<String, String>();
for (byte[] h: sb.crawler.profilesActiveCrawls.keySet()) {
selentry = new CrawlProfile(sb.crawler.profilesActiveCrawls.get(h));
if (ignoreNames.contains(selentry.name())) {
continue;
if (ignoreNames.contains(selentry.name())) continue;
orderdHandles.put(selentry.name(), selentry.handle());
}
prop.put("profiles_" + count + "_name", selentry.name());
prop.put("profiles_" + count + "_handle", selentry.handle());
if (handle.equals(selentry.handle())) {
// then write into pop-up menu list
int count = 0;
for (Map.Entry<String, String> NameHandle: orderdHandles.entrySet()) {
prop.put("profiles_" + count + "_name", NameHandle.getKey());
prop.put("profiles_" + count + "_handle", NameHandle.getValue());
if (handle.equals(NameHandle.getValue())) {
prop.put("profiles_" + count + "_selected", "1");
}
count++;

@ -259,8 +259,6 @@ public class NetworkGraph {
}
}
for (Hit event: yacyChannel.channels(yacyChannel.DHTSEND)) {
assert event != null;
assert event.getPubDate() != null;
if (event == null || event.getPubDate() == null) continue;
if (event.getPubDate().after(horizon)) {
//System.out.println("*** NETWORK-DHTSEND: " + event.getLink());

Loading…
Cancel
Save