diff --git a/README.md b/README.md index 6b1c912..44b9f60 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Console -DXOS Network GraphQL server and console application. +DXOS Kubenet GraphQL server and console application. ![Console](./docs/images/console.png) diff --git a/lerna.json b/lerna.json index 26212bc..8a470c9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.17", + "version": "1.0.0-beta.19", "useWorkspaces": true, "npmClient": "yarn" } diff --git a/package.json b/package.json index 277378e..e094b75 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@dxos/console", "version": "1.0.0-beta.0", - "description": "DXOS Console", + "description": "Kubenet Console", "main": "index.js", "private": true, "scripts": { diff --git a/packages/console-app/app.yml b/packages/console-app/app.yml index cad5f14..9a5c06e 100644 --- a/packages/console-app/app.yml +++ b/packages/console-app/app.yml @@ -1,5 +1,5 @@ name: dxos.network/console-app -displayName: DXOS Console Client +displayName: Kubenet Console Client build: yarn dist version: 0.0.6 package: QmZpM8u7ZUfQpXLgtdB1ug7nGExUrXhebtTSfSBPrRwcLX diff --git a/packages/console-app/config-kube.yml b/packages/console-app/config-kube.yml index eecf8df..82d2bf7 100644 --- a/packages/console-app/config-kube.yml +++ b/packages/console-app/config-kube.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-app/config-local.yml b/packages/console-app/config-local.yml index cef2dab..a7262d3 100644 --- a/packages/console-app/config-local.yml +++ b/packages/console-app/config-local.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-app/config-production.yml b/packages/console-app/config-production.yml index ee81eef..ba00ec5 100644 --- a/packages/console-app/config-production.yml +++ b/packages/console-app/config-production.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=production # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-app/config-testnet.yml b/packages/console-app/config-testnet.yml index d4df7ca..2c2b4ea 100644 --- a/packages/console-app/config-testnet.yml +++ b/packages/console-app/config-testnet.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-app/package.json b/packages/console-app/package.json index 1053be8..577f84c 100644 --- a/packages/console-app/package.json +++ b/packages/console-app/package.json @@ -1,7 +1,7 @@ { "name": "@dxos/console-app", - "version": "1.0.0-beta.17", - "description": "DXOS Console Client", + "version": "1.0.0-beta.19", + "description": "Kubenet Console Client", "main": "dist/es/index.js", "files": [ "src/gql" @@ -10,10 +10,10 @@ "analyzer": "webpack --config webpack-analyzer.config.js", "build:babel": "babel ./src --out-dir ./dist/es --ignore \"**/*.test.js\" --source-maps inline", "build": "yarn dist", - "dist": "yarn clean && cp -f config-production.yml config.yml && yarn build:babel && webpack", + "dist": "yarn clean && yarn build:babel && CONFIG_FILE=config-production.yml webpack", "clean": "rm -rf dist", "lint": "semistandard 'src/**/*.js'", - "start": "cp -f ${CONFIG_FILE:-config-local.yml} config.yml && VERBOSE=true webpack-dev-server --mode development", + "start": "CONFIG_FILE=${CONFIG_FILE:-config-testnet.yml} VERBOSE=true webpack-dev-server --mode development", "test": "jest --rootDir ./src --passWithNoTests --no-cache" }, "author": "DXOS.org", diff --git a/packages/console-app/src/components/AppBar.js b/packages/console-app/src/components/AppBar.js index 7a0f337..5721065 100644 --- a/packages/console-app/src/components/AppBar.js +++ b/packages/console-app/src/components/AppBar.js @@ -11,27 +11,31 @@ import Typography from '@material-ui/core/Typography'; import blueGrey from '@material-ui/core/colors/blueGrey'; import GraphQLIcon from '@material-ui/icons/Adb'; -import DxOSIcon from '../icons/DXOS'; +import DXOSIcon from '../icons/DXOS'; import { graphqlApi } from '../client'; const useStyles = makeStyles((theme) => ({ offset: theme.mixins.denseToolbar, logo: { - paddingBottom: 2, - marginTop: 4, marginRight: theme.spacing(2), - color: '#333', + color: theme.palette.grey[800], '& svg': { - width: 64, - height: 32 + width: 100, + height: 48 } }, + logoLink: { + lineHeight: 0 + }, + title: { display: 'flex', - flex: 1 + flex: 1, + marginTop: 2, + color: theme.palette.grey[800] }, link: { @@ -46,9 +50,9 @@ const AppBar = ({ config }) => { <> - +
- +
diff --git a/packages/console-app/src/components/AppLink.js b/packages/console-app/src/components/AppLink.js index 83677f0..386cbaa 100644 --- a/packages/console-app/src/components/AppLink.js +++ b/packages/console-app/src/components/AppLink.js @@ -1,5 +1,5 @@ // -// Copyright 2020 DXOS.org.org +// Copyright 2020 DXOS.org // import React from 'react'; diff --git a/packages/console-app/src/components/PackageLink.js b/packages/console-app/src/components/PackageLink.js index 6e4a9bd..4b6ffb8 100644 --- a/packages/console-app/src/components/PackageLink.js +++ b/packages/console-app/src/components/PackageLink.js @@ -1,5 +1,5 @@ // -// Copyright 2020 DXOS.org.org +// Copyright 2020 DXOS.org // import React from 'react'; diff --git a/packages/console-app/src/components/QueryLink.js b/packages/console-app/src/components/QueryLink.js index 990c493..92199a4 100644 --- a/packages/console-app/src/components/QueryLink.js +++ b/packages/console-app/src/components/QueryLink.js @@ -1,34 +1,33 @@ // -// Copyright 2020 DXOS.org.org +// Copyright 2020 DXOS.org // import React from 'react'; -import ExitToApp from '@material-ui/icons/ExitToApp'; import Link from '@material-ui/core/Link'; +import LinkIcon from '@material-ui/icons/ExitToApp'; import { getServiceUrl } from '../util/config'; -// TODO(burdon): print actual GRAPHQL query. const QUERY = ` -query { - queryRecords(attributes: [{ key: "name", value: { string: "%NAME%" } }]) { - id - type - name - bondId - createTime - expiryTime - owners - attributes { - key - value { - string - json + query { + queryRecords(attributes: [{ key: "name", value: { string: "%NAME%" } }]) { + id + type + name + bondId + createTime + expiryTime + owners + attributes { + key + value { + string + json + } } } } -} `; /** @@ -42,20 +41,18 @@ const QueryLink = ({ config, name, text, icon = false }) => { const baseURL = getServiceUrl(config, 'wns.webui'); const query = QUERY.replace('%NAME%', name); - // TODO(burdon): This doesn't work. + // NOTE: Playground bug opens two tabs. const fullURL = encodeURI(`${baseURL}?query=${query}`); - console.log(fullURL); - - if (icon) { - return ( - - - - ); - } return ( - {text || name} + + {icon && ( + + )} + {!icon && ( + text || name + )} + ); }; diff --git a/packages/console-app/src/components/TableCell.js b/packages/console-app/src/components/TableCell.js index 7eb9c93..1f4f199 100644 --- a/packages/console-app/src/components/TableCell.js +++ b/packages/console-app/src/components/TableCell.js @@ -17,6 +17,9 @@ const useStyles = makeStyles(() => ({ }, medium: { width: 170 + }, + large: { + width: 400 } })); diff --git a/packages/console-app/src/config.js b/packages/console-app/src/config.js new file mode 100644 index 0000000..d0ac7d2 --- /dev/null +++ b/packages/console-app/src/config.js @@ -0,0 +1,8 @@ +// +// Copyright 2020 DXOS.org +// + +// See webpack-common.config.js +import config from '__CONFIG_FILE__'; + +export default config; diff --git a/packages/console-app/src/containers/Layout.js b/packages/console-app/src/containers/Layout.js index 2e224a2..63093ff 100644 --- a/packages/console-app/src/containers/Layout.js +++ b/packages/console-app/src/containers/Layout.js @@ -55,6 +55,7 @@ const Layout = ({ children }) => {
+
@@ -63,6 +64,7 @@ const Layout = ({ children }) => { {children}
+
diff --git a/packages/console-app/src/containers/panels/apps/AppRecords.js b/packages/console-app/src/containers/panels/apps/AppRecords.js index 820585b..581945f 100644 --- a/packages/console-app/src/containers/panels/apps/AppRecords.js +++ b/packages/console-app/src/containers/panels/apps/AppRecords.js @@ -30,14 +30,12 @@ const AppRecords = () => { // TODO(telackey): Does this also need an interval? const ipfsResponse = useQueryStatusReducer(useQuery(IPFS_STATUS)); - if (!appResponse || !ipfsResponse) { return null; } const appData = JSON.parse(appResponse.wns_records.json); const ipfsData = JSON.parse(ipfsResponse.ipfs_status.json); - const localRefs = new Set(ipfsData.refs.local); return ( @@ -45,23 +43,25 @@ const AppRecords = () => { Identifier - Name Version + Name Created - Downloaded + - {appData.sort(sorter).map(({ id, name, version, createTime, attributes: { displayName, publicUrl, package: hash } }) => { + {appData.sort(sorter).map(({ id, name, version, createTime, attributes: { displayName, package: hash } }) => { return ( - {displayName} + + {displayName} + {moment.utc(createTime).fromNow()} diff --git a/packages/console-app/src/containers/panels/bots/BotRecords.js b/packages/console-app/src/containers/panels/bots/BotRecords.js index 258235a..4b07c66 100644 --- a/packages/console-app/src/containers/panels/bots/BotRecords.js +++ b/packages/console-app/src/containers/panels/bots/BotRecords.js @@ -37,9 +37,9 @@ const BotRecords = () => { Identifier Version - Created Name - + Created + @@ -48,8 +48,8 @@ const BotRecords = () => { {name} {version} - {moment.utc(createTime).fromNow()} {displayName} + {moment.utc(createTime).fromNow()} ); diff --git a/packages/console-app/src/containers/panels/ipfs/IPFSNetwork.js b/packages/console-app/src/containers/panels/ipfs/IPFSNetwork.js index e71e1ab..a457c59 100644 --- a/packages/console-app/src/containers/panels/ipfs/IPFSNetwork.js +++ b/packages/console-app/src/containers/panels/ipfs/IPFSNetwork.js @@ -109,14 +109,16 @@ const IPFSStatus = () => { displayServers.push({ name: 'None' }); } + // TODO(burdon): Get Address (currenlty truncated). + return ( Identifier Description - Connected Address + Connected @@ -125,10 +127,10 @@ const IPFSStatus = () => { {name} {description} - + {ipfs.addresses} - {ipfs.addresses} + ))} diff --git a/packages/console-app/src/containers/panels/signal/SignalServers.js b/packages/console-app/src/containers/panels/signal/SignalServers.js index 7e62458..f0eeca1 100644 --- a/packages/console-app/src/containers/panels/signal/SignalServers.js +++ b/packages/console-app/src/containers/panels/signal/SignalServers.js @@ -32,7 +32,7 @@ const SignalServers = () => { Server - Peers + Peers diff --git a/packages/console-app/src/containers/panels/wns/WNSRecords.js b/packages/console-app/src/containers/panels/wns/WNSRecords.js index 502a101..d13cdc9 100644 --- a/packages/console-app/src/containers/panels/wns/WNSRecords.js +++ b/packages/console-app/src/containers/panels/wns/WNSRecords.js @@ -85,8 +85,8 @@ const WNSRecords = ({ type }) => { Type Identifier - Name Version + Name Created Package @@ -116,12 +116,12 @@ const WNSRecords = ({ type }) => { {appLink || name} - - {displayName || service || description} - {verLink || version} + + {displayName || service || description} + {moment.utc(createTime).fromNow()} diff --git a/packages/console-app/src/icons/DXOS.js b/packages/console-app/src/icons/DXOS.js index 953dc2d..0d56482 100644 --- a/packages/console-app/src/icons/DXOS.js +++ b/packages/console-app/src/icons/DXOS.js @@ -6,34 +6,9 @@ import React from 'react'; import SvgIcon from '@material-ui/core/SvgIcon'; const Icon = (props) => ( - - - - - - - - - - - - - - - - - - + + + ); diff --git a/packages/console-app/src/main.js b/packages/console-app/src/main.js index 568d3f4..1f75a14 100644 --- a/packages/console-app/src/main.js +++ b/packages/console-app/src/main.js @@ -6,7 +6,7 @@ import debug from 'debug'; import React from 'react'; import { render } from 'react-dom'; -import config from '../config.yml'; +import config from './config'; import Main from './containers/Main'; diff --git a/packages/console-app/src/theme.js b/packages/console-app/src/theme.js index feca9a0..a485371 100644 --- a/packages/console-app/src/theme.js +++ b/packages/console-app/src/theme.js @@ -14,7 +14,7 @@ export const createTheme = (theme) => createMuiTheme({ // https://stackoverflow.com/questions/60567673/reactjs-material-ui-theme-mixins-toolbar-offset-is-not-adapting-when-toolbar mixins: { denseToolbar: { - minHeight: 48 + height: 48 } }, diff --git a/packages/console-app/src/version.json b/packages/console-app/src/version.json index bd1d59a..9226535 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-07-20T18:34:32.825Z", - "version": "1.0.0-beta.17" + "buildDate": "2020-07-20T22:54:23.462Z", + "version": "1.0.0-beta.19" } } diff --git a/packages/console-app/webpack-common.config.js b/packages/console-app/webpack-common.config.js index c02bae3..eebaf48 100644 --- a/packages/console-app/webpack-common.config.js +++ b/packages/console-app/webpack-common.config.js @@ -9,8 +9,7 @@ const webpack = require('webpack'); const PUBLIC_URL = process.env.PUBLIC_URL || ''; -// TODO(burdon): Remove. -const STACK_CONFIG = process.env.CONFIG || 'default'; +const CONFIG_FILE = path.relative('./src', process.env.CONFIG_FILE || 'config-local.yml'); module.exports = { devtool: 'eval-source-map', @@ -76,8 +75,8 @@ module.exports = { // Define the build config file based on the target. // https://webpack.js.org/plugins/normal-module-replacement-plugin - new webpack.NormalModuleReplacementPlugin(/(.*)__STACK_CONFIG__/, (resource) => { - resource.request = resource.request.replace(/__STACK_CONFIG__/, STACK_CONFIG); + new webpack.NormalModuleReplacementPlugin(/(.*)__CONFIG_FILE__/, (resource) => { + resource.request = resource.request.replace(/__CONFIG_FILE__/, CONFIG_FILE); }), // https://www.npmjs.com/package/webpack-version-file-plugin diff --git a/packages/console-app/webpack.config.js b/packages/console-app/webpack.config.js index 2237412..ca31e61 100644 --- a/packages/console-app/webpack.config.js +++ b/packages/console-app/webpack.config.js @@ -15,7 +15,7 @@ module.exports = merge(commonConfig, { new HtmlWebPackPlugin({ template: './public/index.html', templateParameters: { - title: 'DXOS Console' + title: 'Kubenet Console' } }) ] diff --git a/packages/console-server/config-kube.yml b/packages/console-server/config-kube.yml index 3d934c9..86ec62e 100644 --- a/packages/console-server/config-kube.yml +++ b/packages/console-server/config-kube.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-server/config-testnet.yml b/packages/console-server/config-testnet.yml index 2cc9802..3f3cdce 100644 --- a/packages/console-server/config-testnet.yml +++ b/packages/console-server/config-testnet.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=development # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-server/config.yml b/packages/console-server/config.yml index b71e901..18b9add 100644 --- a/packages/console-server/config.yml +++ b/packages/console-server/config.yml @@ -1,11 +1,11 @@ # -# NODE_ENV === production +# NODE_ENV=production # NOTE: Set CONFIG_FILE to swap out this config file. # app: - title: 'Console' - org': 'DXOS' + title: 'Kubenet Console' + org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' publicUrl: '/console' diff --git a/packages/console-server/package.json b/packages/console-server/package.json index 0f2fd40..6ee3fe1 100644 --- a/packages/console-server/package.json +++ b/packages/console-server/package.json @@ -1,7 +1,7 @@ { "name": "@dxos/console-server", - "version": "1.0.0-beta.17", - "description": "DXOS Console Server", + "version": "1.0.0-beta.19", + "description": "Kubenet Console Server", "main": "dist/es/index.js", "bin": { "dxos-console": "bin/console.js" @@ -31,7 +31,7 @@ "dependencies": { "@babel/polyfill": "^7.8.7", "@babel/runtime": "^7.8.7", - "@dxos/console-app": "^1.0.0-beta.17", + "@dxos/console-app": "^1.0.0-beta.19", "@wirelineio/wns-schema": "^0.1.1", "apollo-boost": "^0.4.9", "apollo-server-express": "^2.13.1", diff --git a/packages/console-server/webpack.config.js b/packages/console-server/webpack.config.js index c467a8c..5c6b7f5 100644 --- a/packages/console-server/webpack.config.js +++ b/packages/console-server/webpack.config.js @@ -67,7 +67,7 @@ module.exports = { new HtmlWebPackPlugin({ template: './public/index.html', templateParameters: { - title: 'DXOS Console' + title: 'Kubenet Console' } }),