Merge branch 'main' into release

This commit is contained in:
Thomas E Lackey 2020-11-19 15:33:20 -06:00
commit 198e6c2069
10 changed files with 43 additions and 21 deletions

View File

@ -28,7 +28,7 @@ jobs:
# Uncomment for NPM publishing.
VERSION="`cat lerna.json | grep '"version":' | awk '{ print $2 }' | sed 's/[",]//g' | cut -d'-' -f1`"
git push --delete origin "v$VERSION"
git push --delete origin "v$VERSION" || true
yarn lerna version $VERSION --no-git-tag-version -y
git commit -am "v$VERSION"
git push

View File

@ -1,5 +1,5 @@
{
"version": "1.2.0",
"version": "1.2.1-alpha.1",
"useWorkspaces": true,
"npmClient": "yarn"
}

View File

@ -1,6 +1,6 @@
{
"name": "@dxos/console",
"version": "1.2.0-alpha.0",
"version": "1.2.1-alpha.0",
"description": "Console",
"main": "index.js",
"private": true,

View File

@ -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'

View File

@ -1,6 +1,6 @@
{
"name": "@dxos/console-app",
"version": "1.2.0",
"version": "1.2.1-alpha.1",
"description": "Kubenet Console Client",
"repository": "https://github.com/dxos/console",
"main": "dist/es/index.js",

View File

@ -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) {
<>
<TableRow className={classes.root}>
<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'>{system?.version || '-'}</TableCell>
<TableCell align='right'>{system?.nodejs?.version || '-'}</TableCell>
<TableCell align='right'>{system?.memory?.used || '-'}</TableCell>
<TableCell align='right'>{system?.memory?.total || '-'}</TableCell>
<TableCell align='right'>{system?.time?.up ? moment(system?.time?.up).format('lll') : '-'}</TableCell>
@ -154,10 +159,10 @@ function SignalServers () {
<Table>
<TableHead>
<TableRow>
<TableCell>Signal</TableCell>
<TableCell>ID</TableCell>
<TableCell>Hostname</TableCell>
<TableCell align='right'>Peers (WebRTC)</TableCell>
<TableCell align='right'>Kube version</TableCell>
<TableCell align='right'>Node.JS version</TableCell>
<TableCell align='right'>Memory usage</TableCell>
<TableCell align='right'>Memory total</TableCell>
<TableCell align='right'>Uptime</TableCell>

View File

@ -10,11 +10,17 @@ query {
id
kubeStatus {
system {
version
memory {
total
used
}
network {
hostname
}
time {
up
}

View File

@ -1,7 +1,7 @@
{
"build": {
"name": "@dxos/console-app",
"buildDate": "2020-11-16T23:27:18.585Z",
"version": "1.2.0"
"buildDate": "2020-11-19T21:15:16.619Z",
"version": "1.2.0-alpha.5"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@dxos/console-server",
"version": "1.2.0",
"version": "1.2.1-alpha.1",
"description": "Kubenet Console Server",
"main": "dist/es/index.js",
"bin": {
@ -31,7 +31,7 @@
"dependencies": {
"@babel/polyfill": "^7.8.7",
"@babel/runtime": "^7.8.7",
"@dxos/console-app": "^1.2.0",
"@dxos/console-app": "^1.2.1-alpha.1",
"@wirelineio/wns-schema": "^0.1.1",
"apollo-boost": "^0.4.9",
"apollo-server-express": "^2.13.1",

View File

@ -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()
}
}
};