forked from cerc-io/laconic-console
Merge branch 'main' into release
This commit is contained in:
commit
198e6c2069
2
.github/workflows/release-publish.yml
vendored
2
.github/workflows/release-publish.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
|||||||
|
|
||||||
# Uncomment for NPM publishing.
|
# Uncomment for NPM publishing.
|
||||||
VERSION="`cat lerna.json | grep '"version":' | awk '{ print $2 }' | sed 's/[",]//g' | cut -d'-' -f1`"
|
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
|
yarn lerna version $VERSION --no-git-tag-version -y
|
||||||
git commit -am "v$VERSION"
|
git commit -am "v$VERSION"
|
||||||
git push
|
git push
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "1.2.0",
|
"version": "1.2.1-alpha.1",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"npmClient": "yarn"
|
"npmClient": "yarn"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dxos/console",
|
"name": "@dxos/console",
|
||||||
"version": "1.2.0-alpha.0",
|
"version": "1.2.1-alpha.0",
|
||||||
"description": "Console",
|
"description": "Console",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -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'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dxos/console-app",
|
"name": "@dxos/console-app",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1-alpha.1",
|
||||||
"description": "Kubenet Console Client",
|
"description": "Kubenet Console Client",
|
||||||
"repository": "https://github.com/dxos/console",
|
"repository": "https://github.com/dxos/console",
|
||||||
"main": "dist/es/index.js",
|
"main": "dist/es/index.js",
|
||||||
|
@ -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-16T23:27:18.585Z",
|
"buildDate": "2020-11-19T21:15:16.619Z",
|
||||||
"version": "1.2.0"
|
"version": "1.2.0-alpha.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dxos/console-server",
|
"name": "@dxos/console-server",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1-alpha.1",
|
||||||
"description": "Kubenet Console Server",
|
"description": "Kubenet Console Server",
|
||||||
"main": "dist/es/index.js",
|
"main": "dist/es/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
@ -31,7 +31,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/polyfill": "^7.8.7",
|
"@babel/polyfill": "^7.8.7",
|
||||||
"@babel/runtime": "^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",
|
"@wirelineio/wns-schema": "^0.1.1",
|
||||||
"apollo-boost": "^0.4.9",
|
"apollo-boost": "^0.4.9",
|
||||||
"apollo-server-express": "^2.13.1",
|
"apollo-server-express": "^2.13.1",
|
||||||
|
@ -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