fix: hostnames
This commit is contained in:
parent
1e835be0c9
commit
f54e2fac80
@ -11,7 +11,7 @@ app:
|
|||||||
publicUrl: '/console'
|
publicUrl: '/console'
|
||||||
|
|
||||||
api:
|
api:
|
||||||
server: 'https://apollo1.kube.moon.dxos.network'
|
server: 'https://alpha.kube.moon.dxos.network'
|
||||||
path: '/api'
|
path: '/api'
|
||||||
intervalLog: 5000
|
intervalLog: 5000
|
||||||
pollInterval: 10000
|
pollInterval: 10000
|
||||||
@ -22,19 +22,19 @@ system:
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
prefix: '/app'
|
prefix: '/app'
|
||||||
server: 'https://apollo1.kube.moon.dxos.network'
|
server: 'https://alpha.kube.moon.dxos.network'
|
||||||
|
|
||||||
wns:
|
wns:
|
||||||
server: 'https://apollo1.kube.moon.dxos.network/dxos/wns/api'
|
server: 'https://alpha.kube.moon.dxos.network/dxos/wns/api'
|
||||||
webui: 'https://apollo1.kube.moon.dxos.network/dxos/wns/console'
|
webui: 'https://alpha.kube.moon.dxos.network/dxos/wns/console'
|
||||||
|
|
||||||
signal:
|
signal:
|
||||||
server: 'wss://apollo1.kube.moon.dxos.network/dxos/signal'
|
server: 'wss://alpha.kube.moon.dxos.network/dxos/signal'
|
||||||
api: 'https://apollo1.kube.moon.dxos.network/dxos/signal/api'
|
api: 'https://alpha.kube.moon.dxos.network/dxos/signal/api'
|
||||||
|
|
||||||
ipfs:
|
ipfs:
|
||||||
server: 'https://apollo1.kube.moon.dxos.network/dxos/ipfs/api'
|
server: 'https://alpha.kube.moon.dxos.network/dxos/ipfs/api'
|
||||||
gateway: 'https://apollo1.kube.moon.dxos.network/dxos/ipfs/gateway'
|
gateway: 'https://alpha.kube.moon.dxos.network/dxos/ipfs/gateway'
|
||||||
|
|
||||||
wellknown:
|
wellknown:
|
||||||
endpoint: 'https://apollo1.kube.moon.dxos.network/.well-known/dxos'
|
endpoint: 'https://alpha.kube.moon.dxos.network/.well-known/dxos'
|
||||||
|
@ -6,6 +6,7 @@ import React, { useContext, useRef, useEffect, useState, useCallback } from 'rea
|
|||||||
import { useQuery } from '@apollo/react-hooks';
|
import { useQuery } from '@apollo/react-hooks';
|
||||||
import useComponentSize from '@rehooks/component-size';
|
import useComponentSize from '@rehooks/component-size';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
import get from 'lodash.get';
|
||||||
|
|
||||||
import Grid from '@material-ui/core/Grid';
|
import Grid from '@material-ui/core/Grid';
|
||||||
import TableBody from '@material-ui/core/TableBody';
|
import TableBody from '@material-ui/core/TableBody';
|
||||||
@ -40,8 +41,12 @@ const buildDataGraph = (rootId, prevGraph, nodes) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const hostname = get(node, 'kubeStatus.system.network.hostname');
|
||||||
|
const shortId = node.id.slice(0, NODE_ID_LENGTH).toUpperCase();
|
||||||
|
const label = hostname || shortId;
|
||||||
|
|
||||||
const oldNode = prevGraph.nodes.find(n => n.id === node.id) || {};
|
const oldNode = prevGraph.nodes.find(n => n.id === node.id) || {};
|
||||||
const newNode = { ...oldNode, id: node.id, label: node.id.slice(0, NODE_ID_LENGTH).toUpperCase(), type, data: node };
|
const newNode = { ...oldNode, id: node.id, label, type, data: node };
|
||||||
if (type === 'root') {
|
if (type === 'root') {
|
||||||
newNode.fx = 0;
|
newNode.fx = 0;
|
||||||
newNode.fy = 0;
|
newNode.fy = 0;
|
||||||
@ -97,9 +102,9 @@ function Row (props) {
|
|||||||
<>
|
<>
|
||||||
<TableRow className={classes.root}>
|
<TableRow className={classes.root}>
|
||||||
<TableCell>{row.id.slice(0, NODE_ID_LENGTH).toUpperCase()}</TableCell>
|
<TableCell>{row.id.slice(0, NODE_ID_LENGTH).toUpperCase()}</TableCell>
|
||||||
|
<TableCell>{system?.network?.hostname}</TableCell>
|
||||||
<TableCell align='right'>{row.signal.topics.reduce((prev, curr) => prev + curr.peers.length, 0)}</TableCell>
|
<TableCell align='right'>{row.signal.topics.reduce((prev, curr) => prev + curr.peers.length, 0)}</TableCell>
|
||||||
<TableCell align='right'>{system?.version || '-'}</TableCell>
|
<TableCell align='right'>{system?.version || '-'}</TableCell>
|
||||||
<TableCell align='right'>{system?.nodejs?.version || '-'}</TableCell>
|
|
||||||
<TableCell align='right'>{system?.memory?.used || '-'}</TableCell>
|
<TableCell align='right'>{system?.memory?.used || '-'}</TableCell>
|
||||||
<TableCell align='right'>{system?.memory?.total || '-'}</TableCell>
|
<TableCell align='right'>{system?.memory?.total || '-'}</TableCell>
|
||||||
<TableCell align='right'>{system?.time?.up ? moment(system?.time?.up).format('lll') : '-'}</TableCell>
|
<TableCell align='right'>{system?.time?.up ? moment(system?.time?.up).format('lll') : '-'}</TableCell>
|
||||||
@ -154,10 +159,10 @@ function SignalServers () {
|
|||||||
<Table>
|
<Table>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell>Signal</TableCell>
|
<TableCell>ID</TableCell>
|
||||||
|
<TableCell>Hostname</TableCell>
|
||||||
<TableCell align='right'>Peers (WebRTC)</TableCell>
|
<TableCell align='right'>Peers (WebRTC)</TableCell>
|
||||||
<TableCell align='right'>Kube version</TableCell>
|
<TableCell align='right'>Kube version</TableCell>
|
||||||
<TableCell align='right'>Node.JS version</TableCell>
|
|
||||||
<TableCell align='right'>Memory usage</TableCell>
|
<TableCell align='right'>Memory usage</TableCell>
|
||||||
<TableCell align='right'>Memory total</TableCell>
|
<TableCell align='right'>Memory total</TableCell>
|
||||||
<TableCell align='right'>Uptime</TableCell>
|
<TableCell align='right'>Uptime</TableCell>
|
||||||
|
@ -10,11 +10,17 @@ query {
|
|||||||
id
|
id
|
||||||
kubeStatus {
|
kubeStatus {
|
||||||
system {
|
system {
|
||||||
|
version
|
||||||
|
|
||||||
memory {
|
memory {
|
||||||
total
|
total
|
||||||
used
|
used
|
||||||
}
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
hostname
|
||||||
|
}
|
||||||
|
|
||||||
time {
|
time {
|
||||||
up
|
up
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"build": {
|
"build": {
|
||||||
"name": "@dxos/console-app",
|
"name": "@dxos/console-app",
|
||||||
"buildDate": "2020-11-16T20:04:29.098Z",
|
"buildDate": "2020-11-19T21:15:16.619Z",
|
||||||
"version": "1.1.0-beta.16"
|
"version": "1.2.0-alpha.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,14 @@ const getVersionInfo = () => {
|
|||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getCliVersionInfo = () => {
|
||||||
|
const command = 'wire';
|
||||||
|
const args = ['version'];
|
||||||
|
|
||||||
|
const child = spawnSync(command, args, { encoding: 'utf8' });
|
||||||
|
return { version: child.stdout };
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get system inforamtion.
|
* Get system inforamtion.
|
||||||
* https://www.npmjs.com/package/systeminformation
|
* https://www.npmjs.com/package/systeminformation
|
||||||
@ -89,6 +97,9 @@ const getSystemInfo = async () => {
|
|||||||
dxos: {
|
dxos: {
|
||||||
kube: {
|
kube: {
|
||||||
version: getVersionInfo()
|
version: getVersionInfo()
|
||||||
|
},
|
||||||
|
wire: {
|
||||||
|
version: getCliVersionInfo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user