display ethereum node name and embark version in available services
This commit is contained in:
parent
f337ffd418
commit
4989876135
|
@ -25,10 +25,19 @@ ServicesMonitor.prototype.check = function() {
|
|||
web3.setProvider(new web3.providers.HttpProvider(web3Endpoint));
|
||||
callback(null, web3, []);
|
||||
},
|
||||
function addEmbarkVersion(web3, result, callback) {
|
||||
self.logger.trace('addEmbarkVersion');
|
||||
result.push('Embark 2.1.0'.green);
|
||||
callback(null, web3, result);
|
||||
},
|
||||
function checkEthereum(web3, result, callback) {
|
||||
self.logger.trace('checkEthereum');
|
||||
var service = 'geth (Ethereum)';
|
||||
service = (web3.isConnected()) ? service.green : service.red;
|
||||
var service;
|
||||
if (web3.isConnected()) {
|
||||
service = (web3.version.node.split("/")[0] + " (Ethereum)").green;
|
||||
} else {
|
||||
service = "No Blockchain node found".red;
|
||||
}
|
||||
result.push(service);
|
||||
callback(null, web3, result);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue