From 693329236dab8cb9401001f0cadad39d81fab8fc Mon Sep 17 00:00:00 2001 From: nabarun Date: Mon, 5 Dec 2022 15:35:49 +0530 Subject: [PATCH 1/4] Hide unused tabs and screens --- .../console-app/src/components/Sidebar.js | 11 +-- packages/console-app/src/containers/Main.js | 22 +++--- .../containers/panels/registry/Registry.js | 10 +-- packages/console-app/src/modules.js | 72 +++++++++---------- 4 files changed, 58 insertions(+), 57 deletions(-) diff --git a/packages/console-app/src/components/Sidebar.js b/packages/console-app/src/components/Sidebar.js index 704b27a..d5f91ef 100644 --- a/packages/console-app/src/components/Sidebar.js +++ b/packages/console-app/src/components/Sidebar.js @@ -4,8 +4,8 @@ import clsx from 'clsx'; import React from 'react'; -import { useQuery } from '@apollo/react-hooks'; import { useHistory, useParams } from 'react-router'; +// import { useQuery } from '@apollo/react-hooks'; import { makeStyles } from '@material-ui/core'; import List from '@material-ui/core/List'; @@ -14,8 +14,8 @@ import ListItemIcon from '@material-ui/core/ListItemIcon'; import LinkIcon from '@material-ui/icons/ExitToApp'; import ListItemText from '@material-ui/core/ListItemText'; -import EXTENSIONS from '../gql/extensions.graphql'; -import { useQueryStatusReducer } from '../hooks'; +// import EXTENSIONS from '../gql/extensions.graphql'; +// import { useQueryStatusReducer } from '../hooks'; const useStyles = makeStyles(theme => ({ root: { @@ -48,8 +48,9 @@ const Sidebar = ({ modules: { services, settings } }) => { const history = useHistory(); const { module } = useParams(); - const { data: extensionsData } = useQueryStatusReducer(useQuery(EXTENSIONS)); - const extensions = extensionsData ? JSON.parse(extensionsData.extensions.json) : []; + // const { data: extensionsData } = useQueryStatusReducer(useQuery(EXTENSIONS)); + // const extensions = extensionsData ? JSON.parse(extensionsData.extensions.json) : []; + const extensions = []; const isSelected = path => path === `/${module}`; diff --git a/packages/console-app/src/containers/Main.js b/packages/console-app/src/containers/Main.js index 01688e5..449d639 100644 --- a/packages/console-app/src/containers/Main.js +++ b/packages/console-app/src/containers/Main.js @@ -19,15 +19,15 @@ import modules from '../modules'; import Layout from './Layout'; import ConsoleContextProvider from './ConsoleContextProvider'; -import Apps from './panels/apps/Apps'; -import Bots from './panels/bots/Bots'; -import Kubes from './panels/kubes/Kubes'; import Config from './panels/Config'; -import IPFS from './panels/ipfs/IPFS'; -import Metadata from './panels/Metadata'; -import Signaling from './panels/signal/Signaling'; -import System from './panels/system/System'; import Registry from './panels/registry/Registry'; +// import Apps from './panels/apps/Apps'; +// import Bots from './panels/bots/Bots'; +// import Kubes from './panels/kubes/Kubes'; +// import IPFS from './panels/ipfs/IPFS'; +// import Metadata from './panels/Metadata'; +// import Signaling from './panels/signal/Signaling'; +// import System from './panels/system/System'; // Global error handler. const errorHandler = new ErrorHandler(); @@ -47,15 +47,15 @@ const Main = ({ config }) => { - - - + {/* + + - + */} diff --git a/packages/console-app/src/containers/panels/registry/Registry.js b/packages/console-app/src/containers/panels/registry/Registry.js index 2702aa5..440aee1 100644 --- a/packages/console-app/src/containers/panels/registry/Registry.js +++ b/packages/console-app/src/containers/panels/registry/Registry.js @@ -9,9 +9,9 @@ import Tab from '@material-ui/core/Tab'; import Tabs from '@material-ui/core/Tabs'; import TabContext from '@material-ui/lab/TabContext'; -import LogPoller from '../../../components/LogPoller'; import Panel from '../../../components/Panel'; import Toolbar from '../../../components/Toolbar'; +// import LogPoller from '../../../components/LogPoller'; import RegistryRecords, { RecordType } from './RegistryRecords'; import RegistryLookup, { LookupType } from './RegistryLookup'; @@ -19,8 +19,8 @@ import RegistryStatus from './RegistryStatus'; const TAB_RECORDS = 'records'; const TAB_STATUS = 'status'; -const TAB_LOG = 'log'; const TAB_LOOKUP = 'lookup'; +// const TAB_LOG = 'log'; const useStyles = makeStyles(() => ({ expand: { @@ -54,7 +54,7 @@ const Registry = () => { - + {/* */} {tab === TAB_RECORDS && ( @@ -87,11 +87,11 @@ const Registry = () => { )} - {tab === TAB_LOG && ( + {/* {tab === TAB_LOG && (
- )} + )} */} ); diff --git a/packages/console-app/src/modules.js b/packages/console-app/src/modules.js index dd88383..57e3fec 100644 --- a/packages/console-app/src/modules.js +++ b/packages/console-app/src/modules.js @@ -2,55 +2,55 @@ // Copyright 2020 DXOS.org // -import AppsIcon from '@material-ui/icons/Apps'; -import BotsIcon from '@material-ui/icons/Android'; -import StatsIcon from '@material-ui/icons/Equalizer'; import RegistryIcon from '@material-ui/icons/Language'; -import IPFSIcon from '@material-ui/icons/GraphicEq'; import ConfigIcon from '@material-ui/icons/Settings'; -import SignalIcon from '@material-ui/icons/Traffic'; -import KubeIcon from '@material-ui/icons/Dns'; +// import AppsIcon from '@material-ui/icons/Apps'; +// import BotsIcon from '@material-ui/icons/Android'; +// import StatsIcon from '@material-ui/icons/Equalizer'; +// import IPFSIcon from '@material-ui/icons/GraphicEq'; +// import SignalIcon from '@material-ui/icons/Traffic'; +// import KubeIcon from '@material-ui/icons/Dns'; /** * Paths should match Main routes. */ export default { services: [ - { - path: '/system', - title: 'System', - icon: StatsIcon - }, { path: '/registry', title: 'Registry', icon: RegistryIcon - }, - { - path: '/kubes', - title: 'KUBE Nodes', - icon: KubeIcon - }, - { - path: '/apps', - title: 'Apps', - icon: AppsIcon - }, - { - path: '/bots', - title: 'Bots', - icon: BotsIcon - }, - { - path: '/signaling', - title: 'Signaling', - icon: SignalIcon - }, - { - path: '/ipfs', - title: 'IPFS', - icon: IPFSIcon } + // { + // path: '/system', + // title: 'System', + // icon: StatsIcon + // }, + // { + // path: '/kubes', + // title: 'KUBE Nodes', + // icon: KubeIcon + // }, + // { + // path: '/apps', + // title: 'Apps', + // icon: AppsIcon + // }, + // { + // path: '/bots', + // title: 'Bots', + // icon: BotsIcon + // }, + // { + // path: '/signaling', + // title: 'Signaling', + // icon: SignalIcon + // }, + // { + // path: '/ipfs', + // title: 'IPFS', + // icon: IPFSIcon + // } ], settings: [ -- 2.45.2 From 6a34a9891ee96c9bd9e1f6a852583275d7432485 Mon Sep 17 00:00:00 2001 From: nabarun Date: Mon, 5 Dec 2022 16:21:51 +0530 Subject: [PATCH 2/4] Remove dxos logo and hide system version --- packages/console-app/src/components/AppBar.js | 10 +++++++--- packages/console-app/src/containers/Main.js | 2 +- packages/console-app/src/containers/StatusBar.js | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/console-app/src/components/AppBar.js b/packages/console-app/src/components/AppBar.js index c2aae3e..6953d82 100644 --- a/packages/console-app/src/components/AppBar.js +++ b/packages/console-app/src/components/AppBar.js @@ -11,7 +11,7 @@ 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 LaconicIcon from '../icons/Laconic'; import { graphqlApi } from '../client'; const useStyles = makeStyles((theme) => ({ @@ -51,10 +51,14 @@ const AppBar = ({ config }) => { -
- + {/*
+ +
*/} +
+ Laconic
+  
{config.app.title}
diff --git a/packages/console-app/src/containers/Main.js b/packages/console-app/src/containers/Main.js index 449d639..936a424 100644 --- a/packages/console-app/src/containers/Main.js +++ b/packages/console-app/src/containers/Main.js @@ -58,7 +58,7 @@ const Main = ({ config }) => { */} - + diff --git a/packages/console-app/src/containers/StatusBar.js b/packages/console-app/src/containers/StatusBar.js index 7a12427..63100fc 100644 --- a/packages/console-app/src/containers/StatusBar.js +++ b/packages/console-app/src/containers/StatusBar.js @@ -20,7 +20,7 @@ import { ConsoleContext, useStatusReducer } from '../hooks'; import Error from '../components/Error'; -import VersionCheck from './VersionCheck'; +// import VersionCheck from './VersionCheck'; const useStyles = makeStyles((theme) => ({ root: { @@ -110,7 +110,7 @@ const StatusBar = () => {
{name} [{version} {moment(buildDate).format('L')}]
- + {/* */}
-- 2.45.2 From 55c8826ab373c72a2282dd44c780905efe8da064 Mon Sep 17 00:00:00 2001 From: nabarun Date: Mon, 5 Dec 2022 16:59:03 +0530 Subject: [PATCH 3/4] Hide record type buttons --- .../src/containers/panels/registry/Registry.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/console-app/src/containers/panels/registry/Registry.js b/packages/console-app/src/containers/panels/registry/Registry.js index 440aee1..90ad6e8 100644 --- a/packages/console-app/src/containers/panels/registry/Registry.js +++ b/packages/console-app/src/containers/panels/registry/Registry.js @@ -13,9 +13,10 @@ import Panel from '../../../components/Panel'; import Toolbar from '../../../components/Toolbar'; // import LogPoller from '../../../components/LogPoller'; -import RegistryRecords, { RecordType } from './RegistryRecords'; import RegistryLookup, { LookupType } from './RegistryLookup'; import RegistryStatus from './RegistryStatus'; +import RegistryRecords from './RegistryRecords'; +// import RegistryRecords, { RecordType } from './RegistryRecords'; const TAB_RECORDS = 'records'; const TAB_STATUS = 'status'; @@ -43,8 +44,8 @@ const useStyles = makeStyles(() => ({ const Registry = () => { const classes = useStyles(); const [tab, setTab] = useState(TAB_RECORDS); - const [type, setType] = useState(); const [scope, setScope] = useState(LookupType.default); + // const [type, setType] = useState(); return ( { {/* */} - {tab === TAB_RECORDS && ( + {/* {tab === TAB_RECORDS && ( - )} + )} */} {tab === TAB_LOOKUP && ( )} @@ -69,7 +70,8 @@ const Registry = () => { {tab === TAB_RECORDS && (
- + {/* */} +
)} -- 2.45.2 From 00b15cd2f3988e25fb73132840989bfcd91b6b0f Mon Sep 17 00:00:00 2001 From: nabarun Date: Mon, 5 Dec 2022 17:00:37 +0530 Subject: [PATCH 4/4] Hide GQL debug button --- packages/console-app/src/components/AppBar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/console-app/src/components/AppBar.js b/packages/console-app/src/components/AppBar.js index 6953d82..dbce281 100644 --- a/packages/console-app/src/components/AppBar.js +++ b/packages/console-app/src/components/AppBar.js @@ -62,7 +62,7 @@ const AppBar = ({ config }) => {
{config.app.title}
-
+ {/*
{ > -
+
*/} -- 2.45.2