diff --git a/lerna.json b/lerna.json index 0a6827f..db17ebe 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.8", + "version": "1.2.9-alpha.1", "useWorkspaces": true, "npmClient": "yarn" } diff --git a/package.json b/package.json index 59242c2..900926a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dxos/console", - "version": "1.2.8-alpha.0", + "version": "1.2.9-alpha.0", "description": "Console", "main": "index.js", "private": true, diff --git a/packages/console-app/package.json b/packages/console-app/package.json index 3d1e6ed..a3f8065 100644 --- a/packages/console-app/package.json +++ b/packages/console-app/package.json @@ -1,6 +1,6 @@ { "name": "@dxos/console-app", - "version": "1.2.8", + "version": "1.2.9-alpha.1", "description": "Kubenet Console Client", "repository": "https://github.com/dxos/console", "main": "dist/es/index.js", diff --git a/packages/console-app/src/components/Sidebar.js b/packages/console-app/src/components/Sidebar.js index 663662b..704b27a 100644 --- a/packages/console-app/src/components/Sidebar.js +++ b/packages/console-app/src/components/Sidebar.js @@ -68,14 +68,21 @@ const Sidebar = ({ modules: { services, settings } }) => { const Extensions = ({ extensions }) => ( - {extensions.map(({ url, title }) => ( - { window.location = url; return true; }}> - - - - - - ))} + {extensions.map(({ url, title }) => { + url = url + .replace('%HOST%', window.location.host) + .replace('%PORT%', window.location.port) + .replace('%PROTOCOL%', window.location.protocol); + return ( + { window.location = url; return true; }}> + + + + + + ); + } + )} ); diff --git a/packages/console-app/src/version.json b/packages/console-app/src/version.json index 5b6d32e..0e28404 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-12-16T18:15:21.116Z", - "version": "1.2.8-alpha.0" + "buildDate": "2020-12-19T02:47:07.305Z", + "version": "1.2.9-alpha.0" } } diff --git a/packages/console-server/package.json b/packages/console-server/package.json index 3e3b6e8..62b57c3 100644 --- a/packages/console-server/package.json +++ b/packages/console-server/package.json @@ -1,6 +1,6 @@ { "name": "@dxos/console-server", - "version": "1.2.8", + "version": "1.2.9-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.8", + "@dxos/console-app": "^1.2.9-alpha.1", "@wirelineio/wns-schema": "^0.1.1", "apollo-boost": "^0.4.9", "apollo-server-express": "^2.13.1", diff --git a/packages/console-server/src/resolvers/extensions.js b/packages/console-server/src/resolvers/extensions.js index 75c1118..1183f6d 100644 --- a/packages/console-server/src/resolvers/extensions.js +++ b/packages/console-server/src/resolvers/extensions.js @@ -5,6 +5,24 @@ import childProcess from 'child_process'; // 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 = () => { try { const result = childProcess.execSync('docker ps -f "ancestor=dxos/radicle-seed-node" -q'); @@ -31,6 +49,7 @@ export const extensionResolvers = { return { timestamp: new Date().toUTCString(), json: JSON.stringify([ + ifBigDipper(), ifRadicle(), ifSentry() ].filter(x => x))