Allow custom Graph colors (#76)

This commit is contained in:
Hugo Manrique
2017-04-03 23:10:46 -04:00
committed by Cryptkeeper!
parent 42c744b9dd
commit 0955e8dbcd
6 changed files with 37 additions and 6 deletions

5
app.js
View File

@ -26,6 +26,11 @@ function pingAll() {
for (var i = 0; i < servers.length; i++) {
// Make sure we lock our scope.
(function(network) {
// Asign auto generated color if not present
if (!network.color) {
network.color = util.stringToColor(network.name);
}
var attemptedVersion = config.versions[network.type][currentVersionIndex[network.type]];
ping.ping(network.ip, network.port, network.type, config.rates.connectTimeout, function(err, res) {
// Handle our ping results, if it succeeded.