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