diff --git a/htroot/Network.html b/htroot/Network.html
index aedc41c1a..c544249e9 100644
--- a/htroot/Network.html
+++ b/htroot/Network.html
@@ -193,7 +193,7 @@
-
+
diff --git a/htroot/NetworkPicture.java b/htroot/NetworkPicture.java
index 4570f5b79..d45bedcbc 100644
--- a/htroot/NetworkPicture.java
+++ b/htroot/NetworkPicture.java
@@ -59,6 +59,7 @@ public class NetworkPicture {
int passiveLimit = 300;
int potentialLimit = 300;
int maxCount = 1000;
+ String bgcolor = plasmaGrafics.COL_BACKGROUND;
boolean corona = true;
if (post != null) {
@@ -68,6 +69,7 @@ public class NetworkPicture {
potentialLimit = post.getInt("pol", 300);
maxCount = post.getInt("max", 1000);
corona = post.get("corona", "true").equals("true");
+ bgcolor = post.get("bgcolor", bgcolor);
}
//too small values lead to an error, too big to huge CPU/memory consumption, resulting in possible DOS.
@@ -78,7 +80,7 @@ public class NetworkPicture {
if (passiveLimit > 1000000) passiveLimit = 1000000;
if (potentialLimit > 1000000) potentialLimit = 1000000;
if (maxCount > 1000) maxCount = 1000;
- return plasmaGrafics.getNetworkPicture(10000, width, height, passiveLimit, potentialLimit, maxCount, corona, env.getConfig("network.unit.name", "unspecified"), env.getConfig("network.unit.description", "unspecified"));
+ return plasmaGrafics.getNetworkPicture(10000, width, height, passiveLimit, potentialLimit, maxCount, corona, env.getConfig("network.unit.name", "unspecified"), env.getConfig("network.unit.description", "unspecified"), bgcolor);
}
}
diff --git a/source/de/anomic/plasma/plasmaGrafics.java b/source/de/anomic/plasma/plasmaGrafics.java
index 40401d7bd..39276d4e5 100644
--- a/source/de/anomic/plasma/plasmaGrafics.java
+++ b/source/de/anomic/plasma/plasmaGrafics.java
@@ -64,9 +64,9 @@ public class plasmaGrafics {
private static int shortestName = 10;
private static int longestName = 12;
+ public static final String COL_BACKGROUND = "080808"; /*"FFFFE0"*/
private static final String COL_DHTCIRCLE = "400030"; /*"008020"*/
private static final long COL_HEADLINE = ymageMatrix.SUBTRACTIVE_BLACK;
- private static final String COL_BACKGROUND = "080808"; /*"FFFFE0"*/
private static final String COL_ACTIVE_DOT = "181808";
private static final String COL_ACTIVE_LINE = "604040";
private static final String COL_ACTIVE_TEXT = "b080b0";
@@ -127,7 +127,7 @@ public class plasmaGrafics {
if (primarySearches == null) return null; // this was a local search and there are no threads
// get a copy of a recent network picture
- ymageMatrix eventPicture = getNetworkPicture(120000, plasmaSwitchboard.getSwitchboard().getConfig("network.unit.name", "unspecified"), plasmaSwitchboard.getSwitchboard().getConfig("network.unit.description", "unspecified"));
+ ymageMatrix eventPicture = getNetworkPicture(120000, plasmaSwitchboard.getSwitchboard().getConfig("network.unit.name", "unspecified"), plasmaSwitchboard.getSwitchboard().getConfig("network.unit.description", "unspecified"), COL_BACKGROUND);
if (eventPicture instanceof ymageMatrix) eventPicture = (ymageMatrix) eventPicture; //new ymageMatrix((ymageMatrix) eventPicture);
// TODO: fix cloning of ymageMatrix pictures
@@ -172,18 +172,18 @@ public class plasmaGrafics {
return eventPicture;
}
- public static ymageMatrix getNetworkPicture(long maxAge, String networkName, String networkTitle) {
- return getNetworkPicture(maxAge, 640, 480, 300, 300, 1000, true, networkName, networkTitle);
+ public static ymageMatrix getNetworkPicture(long maxAge, String networkName, String networkTitle, String bgcolor) {
+ return getNetworkPicture(maxAge, 640, 480, 300, 300, 1000, true, networkName, networkTitle, bgcolor);
}
- public static ymageMatrix getNetworkPicture(long maxAge, int width, int height, int passiveLimit, int potentialLimit, int maxCount, boolean corona, String networkName, String networkTitle) {
+ public static ymageMatrix getNetworkPicture(long maxAge, int width, int height, int passiveLimit, int potentialLimit, int maxCount, boolean corona, String networkName, String networkTitle, String bgcolor) {
if ((networkPicture == null) || ((System.currentTimeMillis() - networkPictureDate) > maxAge)) {
- drawNetworkPicture(width, height, passiveLimit, potentialLimit, maxCount, corona, networkName, networkTitle);
+ drawNetworkPicture(width, height, passiveLimit, potentialLimit, maxCount, corona, networkName, networkTitle, bgcolor);
}
return networkPicture;
}
- private static void drawNetworkPicture(int width, int height, int passiveLimit, int potentialLimit, int maxCount, boolean corona, String networkName, String networkTitle) {
+ private static void drawNetworkPicture(int width, int height, int passiveLimit, int potentialLimit, int maxCount, boolean corona, String networkName, String networkTitle, String bgcolor) {
int innerradius = Math.min(width, height) / 5;
int outerradius = innerradius + innerradius * yacyCore.seedDB.sizeConnected() / 100;
@@ -191,7 +191,7 @@ public class plasmaGrafics {
if (yacyCore.seedDB == null) return; // no other peers known
- networkPicture = new ymageMatrix(width, height, COL_BACKGROUND);
+ networkPicture = new ymageMatrix(width, height, bgcolor);
networkPicture.setMode(ymageMatrix.MODE_SUB);
// draw network circle