diff --git a/packages/console-app/config-testnet.yml b/packages/console-app/config-testnet.yml index 45ac94c..8da01e6 100644 --- a/packages/console-app/config-testnet.yml +++ b/packages/console-app/config-testnet.yml @@ -11,7 +11,7 @@ app: publicUrl: '/console' api: - server: 'https://apollo1.kube.moon.dxos.network' + server: 'https://alpha.kube.moon.dxos.network' path: '/api' intervalLog: 5000 pollInterval: 10000 @@ -22,19 +22,19 @@ system: services: app: prefix: '/app' - server: 'https://apollo1.kube.moon.dxos.network' + server: 'https://alpha.kube.moon.dxos.network' wns: - server: 'https://apollo1.kube.moon.dxos.network/dxos/wns/api' - webui: 'https://apollo1.kube.moon.dxos.network/dxos/wns/console' + server: 'https://alpha.kube.moon.dxos.network/dxos/wns/api' + webui: 'https://alpha.kube.moon.dxos.network/dxos/wns/console' signal: - server: 'wss://apollo1.kube.moon.dxos.network/dxos/signal' - api: 'https://apollo1.kube.moon.dxos.network/dxos/signal/api' + server: 'wss://alpha.kube.moon.dxos.network/dxos/signal' + api: 'https://alpha.kube.moon.dxos.network/dxos/signal/api' ipfs: - server: 'https://apollo1.kube.moon.dxos.network/dxos/ipfs/api' - gateway: 'https://apollo1.kube.moon.dxos.network/dxos/ipfs/gateway' + server: 'https://alpha.kube.moon.dxos.network/dxos/ipfs/api' + gateway: 'https://alpha.kube.moon.dxos.network/dxos/ipfs/gateway' wellknown: - endpoint: 'https://apollo1.kube.moon.dxos.network/.well-known/dxos' + endpoint: 'https://alpha.kube.moon.dxos.network/.well-known/dxos' diff --git a/packages/console-app/src/containers/panels/signal/SignalServers.js b/packages/console-app/src/containers/panels/signal/SignalServers.js index 1a82c9e..4f8a893 100644 --- a/packages/console-app/src/containers/panels/signal/SignalServers.js +++ b/packages/console-app/src/containers/panels/signal/SignalServers.js @@ -6,6 +6,7 @@ import React, { useContext, useRef, useEffect, useState, useCallback } from 'rea import { useQuery } from '@apollo/react-hooks'; import useComponentSize from '@rehooks/component-size'; import moment from 'moment'; +import get from 'lodash.get'; import Grid from '@material-ui/core/Grid'; 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 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') { newNode.fx = 0; newNode.fy = 0; @@ -97,9 +102,9 @@ function Row (props) { <> {row.id.slice(0, NODE_ID_LENGTH).toUpperCase()} + {system?.network?.hostname} {row.signal.topics.reduce((prev, curr) => prev + curr.peers.length, 0)} {system?.version || '-'} - {system?.nodejs?.version || '-'} {system?.memory?.used || '-'} {system?.memory?.total || '-'} {system?.time?.up ? moment(system?.time?.up).format('lll') : '-'} @@ -154,10 +159,10 @@ function SignalServers () { - Signal + ID + Hostname Peers (WebRTC) Kube version - Node.JS version Memory usage Memory total Uptime diff --git a/packages/console-app/src/gql/signal_status.graphql b/packages/console-app/src/gql/signal_status.graphql index de3869b..7c90f83 100644 --- a/packages/console-app/src/gql/signal_status.graphql +++ b/packages/console-app/src/gql/signal_status.graphql @@ -10,11 +10,17 @@ query { id kubeStatus { system { + version + memory { total used } + network { + hostname + } + time { up } diff --git a/packages/console-app/src/version.json b/packages/console-app/src/version.json index 3eada8f..31c5e76 100644 --- a/packages/console-app/src/version.json +++ b/packages/console-app/src/version.json @@ -1,7 +1,7 @@ { "build": { "name": "@dxos/console-app", - "buildDate": "2020-11-16T20:04:29.098Z", - "version": "1.1.0-beta.16" + "buildDate": "2020-11-19T21:15:16.619Z", + "version": "1.2.0-alpha.5" } } diff --git a/packages/console-server/src/resolvers/system.js b/packages/console-server/src/resolvers/system.js index 312d89c..1d1b377 100644 --- a/packages/console-server/src/resolvers/system.js +++ b/packages/console-server/src/resolvers/system.js @@ -33,6 +33,14 @@ const getVersionInfo = () => { return undefined; }; +const getCliVersionInfo = () => { + const command = 'wire'; + const args = ['version']; + + const child = spawnSync(command, args, { encoding: 'utf8' }); + return { version: child.stdout }; +}; + /** * Get system inforamtion. * https://www.npmjs.com/package/systeminformation @@ -89,6 +97,9 @@ const getSystemInfo = async () => { dxos: { kube: { version: getVersionInfo() + }, + wire: { + version: getCliVersionInfo() } } };