added os in config
This commit is contained in:
parent
1fed5892e9
commit
e5769c4b58
@ -13,24 +13,28 @@ var nodes = [
|
||||
{
|
||||
name: 'instance 1',
|
||||
type: 'C++',
|
||||
os: 'linux',
|
||||
rpcHost: '54.173.252.182',
|
||||
rpcPort: '8080'
|
||||
},
|
||||
{
|
||||
name: 'instance 2',
|
||||
type: 'C++',
|
||||
os: 'linux',
|
||||
rpcHost: '54.209.133.248',
|
||||
rpcPort: '8080'
|
||||
},
|
||||
{
|
||||
name: 'instance 3',
|
||||
type: 'C++',
|
||||
os: 'linux',
|
||||
rpcHost: '54.174.67.126',
|
||||
rpcPort: '8080'
|
||||
},
|
||||
{
|
||||
name: 'local',
|
||||
type: 'C++',
|
||||
os: 'OS X',
|
||||
rpcHost: 'localhost',
|
||||
rpcPort: '8080'
|
||||
}
|
||||
|
@ -4,8 +4,15 @@ require('es6-promise').polyfill();
|
||||
|
||||
var Node = function Node(options, id)
|
||||
{
|
||||
this.info = options;
|
||||
this.info.geo = geoip.lookup(this.info.rpcHost);
|
||||
this.options = options;
|
||||
this.info = {
|
||||
name: options.name,
|
||||
ip: options.rpcHost,
|
||||
type: options.type,
|
||||
os: options.os
|
||||
};
|
||||
|
||||
this.info.geo = geoip.lookup(this.info.ip);
|
||||
this.info.id = parseInt(id);
|
||||
this.info.stats = {
|
||||
active: false,
|
||||
@ -30,7 +37,7 @@ var Node = function Node(options, id)
|
||||
|
||||
Node.prototype.update = function()
|
||||
{
|
||||
var sock = new this.web3.providers.HttpSyncProvider('http://' + this.info.rpcHost + ':' + this.info.rpcPort);
|
||||
var sock = new this.web3.providers.HttpSyncProvider('http://' + this.options.rpcHost + ':' + this.options.rpcPort);
|
||||
this.web3.setProvider(sock);
|
||||
|
||||
var eth = this.web3.eth;
|
||||
|
@ -76,8 +76,9 @@ block content
|
||||
tr(ng-repeat='node in nodes', class="{{ node.stats | mainClass : bestBlock }}")
|
||||
td(rel="{{node.id}}")
|
||||
span(data-toggle="tooltip", data-placement="top", data-original-title="{{node.geo | geoTooltip}}") {{node.name}}
|
||||
div.small {{node.rpcHost}}
|
||||
div.small {{node.ip}}
|
||||
td {{node.type}}
|
||||
div.small {{node.os}}
|
||||
td(class="{{ node.stats.peers | peerClass }}") {{node.stats.peers}}
|
||||
td(class="{{ node.stats.mining | miningClass }}")
|
||||
i(class="{{ node.stats.mining | miningIconClass }}")
|
||||
|
Loading…
Reference in New Issue
Block a user