Skip to content

Commit

Permalink
sorting of crawl profile names in crawl profile editor, see
Browse files Browse the repository at this point in the history
  • Loading branch information
orbiter committed Sep 20, 2010
1 parent 3552476 commit 377f001
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 12 additions & 8 deletions htroot/CrawlProfileEditor_p.java
Expand Up @@ -30,6 +30,7 @@
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;
Expand Down Expand Up @@ -127,17 +128,20 @@ public static serverObjects respond(final RequestHeader header, final serverObje
}
}

// 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;
}
prop.put("profiles_" + count + "_name", selentry.name());
prop.put("profiles_" + count + "_handle", selentry.handle());
if (handle.equals(selentry.handle())) {
if (ignoreNames.contains(selentry.name())) continue;
orderdHandles.put(selentry.name(), 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++;
Expand Down
2 changes: 0 additions & 2 deletions source/de/anomic/yacy/graphics/NetworkGraph.java
Expand Up @@ -259,8 +259,6 @@ private static RasterPlotter drawNetworkPicture(final yacySeedDB seedDB, final i
}
}
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());
Expand Down

0 comments on commit 377f001

Please sign in to comment.