Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alexwykoff/add sentry link #55

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/console-app/src/containers/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import Metadata from './panels/Metadata';
import Signaling from './panels/signal/Signaling';
import System from './panels/system/System';
import Registry from './panels/registry/Registry';
import Sentry from './panels/sentry/Sentry';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger


// Global error handler.
const errorHandler = new ErrorHandler();
Expand Down Expand Up @@ -56,6 +57,7 @@ const Main = ({ config }) => {
<Route path='/metadata' component={Metadata} />
<Route path='/signaling' component={Signaling} />
<Route path='/system' component={System} />
<Route path='/sentry' component={Sentry} />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/logging

</Layout>
</Route>
<Redirect to='/system' />
Expand Down
64 changes: 64 additions & 0 deletions packages/console-app/src/containers/panels/sentry/Sentry.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// Copyright 2020 DXOS.org
//

import React, { useState } from 'react';
import { makeStyles } from '@material-ui/core';
import Paper from '@material-ui/core/Paper';
import Tab from '@material-ui/core/Tab';
import Tabs from '@material-ui/core/Tabs';
import TabContext from '@material-ui/lab/TabContext';

import Panel from '../../../components/Panel';
import Toolbar from '../../../components/Toolbar';

import LogPoller from '../../../components/LogPoller';

const TAB_STATUS = 'status';

const useStyles = makeStyles(() => ({
expand: {
flex: 1
},

panel: {
display: 'flex',
overflow: 'hidden',
flex: 1
},

paper: {
display: 'flex',
overflow: 'hidden',
flex: 1
}
}));

const Sentry = () => {
const classes = useStyles();
const [tab, setTab] = useState(TAB_STATUS);

//TODO(wykoff): add query tab, add commonly used info tab
return (
<Panel
Copy link
Member

@richburdon richburdon Nov 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove panel and content (don't need tabs).
Add a Toolbar with a link (see StatusBar.js)

      <Toolbar className={classes.root}>
        <div className={classes.left}>
          <Link className={classes.link} href={config.app.website} rel='noreferrer' target='_blank'>
            <PublicIcon />
          </Link>
        </div>
      </Toolbar>

toolbar={
<Toolbar>
<Tabs value={tab} onChange={(_, value) => setTab(value)}>
<Tab value={TAB_STATUS} label='Link' />
</Tabs>
</Toolbar>
}
>
<TabContext value={tab}>
{tab === TAB_STATUS && (
<Paper className={classes.paper}>
<a href="http://sentry.kube.dxos.network:9000/"><h3>Sentry</h3></a>
</Paper>
)}

</TabContext>
</Panel>
);
};

export default Sentry;
6 changes: 6 additions & 0 deletions packages/console-app/src/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ 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 SentryIcon from '@material-ui/icons/NotificationImportant';

/**
* Paths should match Main routes.
Expand Down Expand Up @@ -50,6 +51,11 @@ export default {
path: '/ipfs',
title: 'IPFS',
icon: IPFSIcon
},
{
path: '/sentry',
title: 'Sentry',
icon: SentryIcon
}
],

Expand Down
4 changes: 2 additions & 2 deletions packages/console-app/src/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"build": {
"name": "@dxos/console-app",
"buildDate": "2020-11-19T22:11:06.119Z",
"version": "1.2.1-alpha.1"
"buildDate": "2020-11-24T22:32:36.741Z",
"version": "1.2.2-alpha.3"
}
}