Merge branch 'main' into release

This commit is contained in:
Thomas E Lackey 2020-12-18 21:04:00 -06:00
commit 2f589cd2ff
7 changed files with 41 additions and 15 deletions

View File

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

View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "@dxos/console-app", "name": "@dxos/console-app",
"version": "1.2.8", "version": "1.2.9-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",

View File

@ -68,14 +68,21 @@ const Sidebar = ({ modules: { services, settings } }) => {
const Extensions = ({ extensions }) => ( const Extensions = ({ extensions }) => (
<List aria-label='items' className={classes.list}> <List aria-label='items' className={classes.list}>
{extensions.map(({ url, title }) => ( {extensions.map(({ url, title }) => {
<ListItem button key={url} onClick={() => { window.location = url; return true; }}> url = url
<ListItemIcon classes={{ root: classes.icon }}> .replace('%HOST%', window.location.host)
<LinkIcon className={clsx(classes.icon)} /> .replace('%PORT%', window.location.port)
</ListItemIcon> .replace('%PROTOCOL%', window.location.protocol);
<ListItemText primary={title} /> return (
</ListItem> <ListItem button key={url} onClick={() => { window.location = url; return true; }}>
))} <ListItemIcon classes={{ root: classes.icon }}>
<LinkIcon className={clsx(classes.icon)} />
</ListItemIcon>
<ListItemText primary={title} />
</ListItem>
);
}
)}
</List> </List>
); );

View File

@ -1,7 +1,7 @@
{ {
"build": { "build": {
"name": "@dxos/console-app", "name": "@dxos/console-app",
"buildDate": "2020-12-16T18:15:21.116Z", "buildDate": "2020-12-19T02:47:07.305Z",
"version": "1.2.8-alpha.0" "version": "1.2.9-alpha.0"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@dxos/console-server", "name": "@dxos/console-server",
"version": "1.2.8", "version": "1.2.9-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.8", "@dxos/console-app": "^1.2.9-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",

View File

@ -5,6 +5,24 @@
import childProcess from 'child_process'; import childProcess from 'child_process';
// TODO(telackey): Make pluggable. // TODO(telackey): Make pluggable.
const ifBigDipper = () => {
try {
const result = childProcess.execSync('docker ps -f "ancestor=big-dipper_app" -q');
if (result && result.toString()) {
return {
title: 'Block Explorer',
url: 'http://%HOST%:3080/'
};
} else {
return {
title: 'Block Explorer',
url: 'http://blockexplorer.moon.dxos.network:3080/'
};
}
} catch (e) {}
};
const ifRadicle = () => { const ifRadicle = () => {
try { try {
const result = childProcess.execSync('docker ps -f "ancestor=dxos/radicle-seed-node" -q'); const result = childProcess.execSync('docker ps -f "ancestor=dxos/radicle-seed-node" -q');
@ -31,6 +49,7 @@ export const extensionResolvers = {
return { return {
timestamp: new Date().toUTCString(), timestamp: new Date().toUTCString(),
json: JSON.stringify([ json: JSON.stringify([
ifBigDipper(),
ifRadicle(), ifRadicle(),
ifSentry() ifSentry()
].filter(x => x)) ].filter(x => x))