forked from cerc-io/laconic-console
fix: big dipper
This commit is contained in:
parent
cdccb55a84
commit
33e2fb1653
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "1.2.8-alpha.1",
|
"version": "1.2.9-alpha.0",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"npmClient": "yarn"
|
"npmClient": "yarn"
|
||||||
}
|
}
|
||||||
|
@ -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,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dxos/console-app",
|
"name": "@dxos/console-app",
|
||||||
"version": "1.2.8-alpha.1",
|
"version": "1.2.9-alpha.0",
|
||||||
"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",
|
||||||
|
@ -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>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"build": {
|
"build": {
|
||||||
"name": "@dxos/console-app",
|
"name": "@dxos/console-app",
|
||||||
"buildDate": "2020-12-16T09:52:39.755Z",
|
"buildDate": "2020-12-19T02:47:07.305Z",
|
||||||
"version": "1.2.8-alpha.0"
|
"version": "1.2.9-alpha.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dxos/console-server",
|
"name": "@dxos/console-server",
|
||||||
"version": "1.2.8-alpha.1",
|
"version": "1.2.9-alpha.0",
|
||||||
"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-alpha.1",
|
"@dxos/console-app": "^1.2.9-alpha.0",
|
||||||
"@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",
|
||||||
|
@ -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.kube.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))
|
||||||
|
Loading…
Reference in New Issue
Block a user