From d96af1ef1be7ec7786ceb9a033516e14347e5223 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Jul 2020 15:20:36 -0500 Subject: [PATCH 1/6] DXOS Console -> Kubenet Console. Fix console-app to honor CONFIG_FILE. --- README.md | 2 +- package.json | 2 +- packages/console-app/app.yml | 2 +- packages/console-app/config-kube.yml | 6 +++--- packages/console-app/config-local.yml | 6 +++--- packages/console-app/config-production.yml | 6 +++--- packages/console-app/config-testnet.yml | 6 +++--- packages/console-app/package.json | 6 +++--- packages/console-app/src/components/AppLink.js | 2 +- packages/console-app/src/components/PackageLink.js | 2 +- packages/console-app/src/components/QueryLink.js | 2 +- packages/console-app/src/config.js | 8 ++++++++ packages/console-app/src/main.js | 2 +- packages/console-app/src/version.json | 4 ++-- packages/console-app/webpack-common.config.js | 7 +++---- packages/console-app/webpack.config.js | 2 +- packages/console-server/config-kube.yml | 6 +++--- packages/console-server/config-testnet.yml | 6 +++--- packages/console-server/config.yml | 6 +++--- packages/console-server/package.json | 2 +- packages/console-server/webpack.config.js | 2 +- 21 files changed, 47 insertions(+), 40 deletions(-) create mode 100644 packages/console-app/src/config.js 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/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..7df27e1 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: 'Kubnet 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..b65c0f5 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: 'Kubnet 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..f9946ab 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", + "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 && CONFIG_FILE=config-production.yml yarn build:babel && 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/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 19e44cf..72ba73a 100644 --- a/packages/console-app/src/components/QueryLink.js +++ b/packages/console-app/src/components/QueryLink.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/config.js b/packages/console-app/src/config.js new file mode 100644 index 0000000..3bbf89c --- /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; \ No newline at end of file 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/version.json b/packages/console-app/src/version.json index 0db70c4..10087f1 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-20T17:06:29.786Z", - "version": "1.0.0-beta.16" + "buildDate": "2020-07-20T20:15:46.769Z", + "version": "1.0.0-beta.17" } } 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..e080818 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", + "description": "Kubenet Console Server", "main": "dist/es/index.js", "bin": { "dxos-console": "bin/console.js" 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' } }), From dd98f54e0a9ed4f555fd8b7b7b30c166d5bc8164 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Jul 2020 15:33:06 -0500 Subject: [PATCH 2/6] New logo. --- packages/console-app/config-kube.yml | 2 +- packages/console-app/config-local.yml | 2 +- packages/console-app/src/components/AppBar.js | 22 +++++++------ packages/console-app/src/containers/Layout.js | 2 ++ packages/console-app/src/icons/DXOS.js | 31 ++----------------- packages/console-app/src/theme.js | 2 +- packages/console-app/src/version.json | 2 +- 7 files changed, 22 insertions(+), 41 deletions(-) diff --git a/packages/console-app/config-kube.yml b/packages/console-app/config-kube.yml index 7df27e1..82d2bf7 100644 --- a/packages/console-app/config-kube.yml +++ b/packages/console-app/config-kube.yml @@ -4,7 +4,7 @@ # app: - title: 'Kubnet Console' + title: 'Kubenet Console' org': 'DXOS.org' theme: 'dark' website: 'https://dxos.org' diff --git a/packages/console-app/config-local.yml b/packages/console-app/config-local.yml index b65c0f5..a7262d3 100644 --- a/packages/console-app/config-local.yml +++ b/packages/console-app/config-local.yml @@ -4,7 +4,7 @@ # app: - title: 'Kubnet Console' + title: 'Kubenet Console' org': 'DXOS.org' theme: 'dark' website: 'https://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/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/icons/DXOS.js b/packages/console-app/src/icons/DXOS.js index 953dc2d..b5a3449 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/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 10087f1..f210d67 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-20T20:15:46.769Z", + "buildDate": "2020-07-20T20:24:59.591Z", "version": "1.0.0-beta.17" } } From b3871cf91fb7508e02659458c7c23399394f7485 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Jul 2020 15:45:50 -0500 Subject: [PATCH 3/6] Fix quotes in the SVG. --- packages/console-app/src/config.js | 2 +- packages/console-app/src/icons/DXOS.js | 4 ++-- packages/console-app/src/version.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/console-app/src/config.js b/packages/console-app/src/config.js index 3bbf89c..d0ac7d2 100644 --- a/packages/console-app/src/config.js +++ b/packages/console-app/src/config.js @@ -5,4 +5,4 @@ // See webpack-common.config.js import config from '__CONFIG_FILE__'; -export default config; \ No newline at end of file +export default config; diff --git a/packages/console-app/src/icons/DXOS.js b/packages/console-app/src/icons/DXOS.js index b5a3449..0d56482 100644 --- a/packages/console-app/src/icons/DXOS.js +++ b/packages/console-app/src/icons/DXOS.js @@ -7,8 +7,8 @@ import SvgIcon from '@material-ui/core/SvgIcon'; const Icon = (props) => ( - - + + ); diff --git a/packages/console-app/src/version.json b/packages/console-app/src/version.json index f210d67..c6a77c4 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-20T20:24:59.591Z", + "buildDate": "2020-07-20T20:45:04.335Z", "version": "1.0.0-beta.17" } } From 30fd7ae8cd53f2f4cc9e6b0852f9c6bb76ade60a Mon Sep 17 00:00:00 2001 From: DXOS Date: Mon, 20 Jul 2020 20:48:45 +0000 Subject: [PATCH 4/6] v1.0.0-beta.18 --- lerna.json | 2 +- packages/console-app/package.json | 2 +- packages/console-server/package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lerna.json b/lerna.json index 26212bc..37c954e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.17", + "version": "1.0.0-beta.18", "useWorkspaces": true, "npmClient": "yarn" } diff --git a/packages/console-app/package.json b/packages/console-app/package.json index f9946ab..07e1213 100644 --- a/packages/console-app/package.json +++ b/packages/console-app/package.json @@ -1,6 +1,6 @@ { "name": "@dxos/console-app", - "version": "1.0.0-beta.17", + "version": "1.0.0-beta.18", "description": "Kubenet Console Client", "main": "dist/es/index.js", "files": [ diff --git a/packages/console-server/package.json b/packages/console-server/package.json index e080818..41f73c1 100644 --- a/packages/console-server/package.json +++ b/packages/console-server/package.json @@ -1,6 +1,6 @@ { "name": "@dxos/console-server", - "version": "1.0.0-beta.17", + "version": "1.0.0-beta.18", "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.0.0-beta.17", + "@dxos/console-app": "^1.0.0-beta.18", "@wirelineio/wns-schema": "^0.1.1", "apollo-boost": "^0.4.9", "apollo-server-express": "^2.13.1", From 08faf18cea552928322cf86984a36123a4d180f2 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 20 Jul 2020 15:56:34 -0500 Subject: [PATCH 5/6] New scheme needs CONFIG_FILE for webpack, not babel. --- packages/console-app/package.json | 2 +- packages/console-app/src/version.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/console-app/package.json b/packages/console-app/package.json index f9946ab..ba1c89e 100644 --- a/packages/console-app/package.json +++ b/packages/console-app/package.json @@ -10,7 +10,7 @@ "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 && CONFIG_FILE=config-production.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": "CONFIG_FILE=${CONFIG_FILE:-config-testnet.yml} VERBOSE=true webpack-dev-server --mode development", diff --git a/packages/console-app/src/version.json b/packages/console-app/src/version.json index c6a77c4..608d691 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-20T20:45:04.335Z", + "buildDate": "2020-07-20T20:55:14.656Z", "version": "1.0.0-beta.17" } } From f91b2ae8ef118dc63dfc989d17bc6a9cc70f842d Mon Sep 17 00:00:00 2001 From: DXOS Date: Mon, 20 Jul 2020 20:59:57 +0000 Subject: [PATCH 6/6] v1.0.0-beta.19 --- lerna.json | 2 +- packages/console-app/package.json | 2 +- packages/console-server/package.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lerna.json b/lerna.json index 37c954e..8a470c9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-beta.18", + "version": "1.0.0-beta.19", "useWorkspaces": true, "npmClient": "yarn" } diff --git a/packages/console-app/package.json b/packages/console-app/package.json index 0295f3e..577f84c 100644 --- a/packages/console-app/package.json +++ b/packages/console-app/package.json @@ -1,6 +1,6 @@ { "name": "@dxos/console-app", - "version": "1.0.0-beta.18", + "version": "1.0.0-beta.19", "description": "Kubenet Console Client", "main": "dist/es/index.js", "files": [ diff --git a/packages/console-server/package.json b/packages/console-server/package.json index 41f73c1..6ee3fe1 100644 --- a/packages/console-server/package.json +++ b/packages/console-server/package.json @@ -1,6 +1,6 @@ { "name": "@dxos/console-server", - "version": "1.0.0-beta.18", + "version": "1.0.0-beta.19", "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.0.0-beta.18", + "@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",