Fix
This commit is contained in:
parent
9ea39b6088
commit
425fd757a0
@ -6,13 +6,14 @@
|
||||
app:
|
||||
title: 'Console'
|
||||
org': 'DxOS'
|
||||
theme: 'light'
|
||||
theme: 'dark'
|
||||
website: 'https://dxos.org'
|
||||
publicUrl: '/console'
|
||||
|
||||
api:
|
||||
path: '/api'
|
||||
port: 4000
|
||||
intervalLog: 5000
|
||||
pollInterval: 10000
|
||||
|
||||
system:
|
||||
|
@ -11,11 +11,14 @@ const useStyles = makeStyles(theme => ({
|
||||
root: {
|
||||
display: 'flex',
|
||||
flex: 1,
|
||||
flexDirection: 'column'
|
||||
flexDirection: 'column',
|
||||
overflow: 'hidden'
|
||||
},
|
||||
|
||||
container: {
|
||||
display: 'flex',
|
||||
// Pin to bottom (render in time order).
|
||||
flexDirection: 'column-reverse',
|
||||
flex: 1,
|
||||
overflowX: 'scroll',
|
||||
overflowY: 'scroll'
|
||||
@ -24,13 +27,13 @@ const useStyles = makeStyles(theme => ({
|
||||
log: {
|
||||
padding: theme.spacing(1),
|
||||
fontSize: 16,
|
||||
// fontFamily: 'monospace',
|
||||
fontFamily: 'monospace',
|
||||
whiteSpace: 'nowrap'
|
||||
},
|
||||
|
||||
level: {
|
||||
display: 'inline-block',
|
||||
width: 48,
|
||||
width: 60,
|
||||
marginRight: 8,
|
||||
color: theme.palette.grey[500]
|
||||
},
|
||||
|
@ -16,7 +16,7 @@ import Toolbar from '../../components/Toolbar';
|
||||
|
||||
const Status = () => {
|
||||
const { config } = useContext(ConsoleContext);
|
||||
const data = useQueryStatusReducer(useQuery(SYSTEM_STATUS, { pollInterval: config.api.pollInterval }));
|
||||
const data = useQueryStatusReducer(useQuery(SYSTEM_STATUS, { pollInterval: config.api.intervalQuery }));
|
||||
if (!data) {
|
||||
return null;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ const AppRecords = () => {
|
||||
const { config } = useContext(ConsoleContext);
|
||||
const [sorter, sortBy] = useSorter('createTime', false);
|
||||
const data = useQueryStatusReducer(useQuery(WNS_RECORDS, {
|
||||
pollInterval: config.api.pollInterval,
|
||||
pollInterval: config.api.intervalQuery,
|
||||
variables: { type: 'wrn:app' }
|
||||
}));
|
||||
|
||||
|
@ -21,7 +21,7 @@ const AppRecords = () => {
|
||||
const { config } = useContext(ConsoleContext);
|
||||
const [sorter, sortBy] = useSorter('createTime', false);
|
||||
const data = useQueryStatusReducer(useQuery(WNS_RECORDS, {
|
||||
pollInterval: config.api.pollInterval,
|
||||
pollInterval: config.api.intervalQuery,
|
||||
variables: { type: 'wrn:bot' }
|
||||
}));
|
||||
|
||||
|
@ -13,7 +13,7 @@ import Log from '../../../components/Log';
|
||||
|
||||
const WNSLog = () => {
|
||||
const { config } = useContext(ConsoleContext);
|
||||
const data = useQueryStatusReducer(useQuery(WNS_LOG, { pollInterval: config.api.pollInterval }));
|
||||
const data = useQueryStatusReducer(useQuery(WNS_LOG, { pollInterval: config.api.intervalLog }));
|
||||
if (!data) {
|
||||
return null;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ const WNSRecords = ({ type }) => {
|
||||
const { config } = useContext(ConsoleContext);
|
||||
const [sorter, sortBy] = useSorter('createTime', false);
|
||||
const data = useQueryStatusReducer(useQuery(WNS_RECORDS, {
|
||||
pollInterval: config.api.pollInterval,
|
||||
pollInterval: config.api.intervalQuery,
|
||||
variables: { type }
|
||||
}));
|
||||
|
||||
|
@ -13,7 +13,7 @@ import Json from '../../../components/Json';
|
||||
|
||||
const WNSStatus = () => {
|
||||
const { config } = useContext(ConsoleContext);
|
||||
const data = useQueryStatusReducer(useQuery(WNS_STATUS, { pollInterval: config.api.pollInterval }));
|
||||
const data = useQueryStatusReducer(useQuery(WNS_STATUS, { pollInterval: config.api.intervalQuery }));
|
||||
if (!data) {
|
||||
return null;
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ export const createResolvers = config => {
|
||||
wns_log: async () => {
|
||||
log('WNS log...');
|
||||
|
||||
// TODO(burdon): Cache and merge previous state.
|
||||
const data = await registry.getLogs();
|
||||
|
||||
return {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"build": {
|
||||
"name": "@dxos/console-client",
|
||||
"buildDate": "2020-05-26T12:54:32.629Z",
|
||||
"buildDate": "2020-05-26T17:38:45.688Z",
|
||||
"version": "1.0.0-beta.0"
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ const app = express();
|
||||
|
||||
const { app: { publicUrl } } = config;
|
||||
|
||||
// TODO(burdon): Load via WNS.
|
||||
app.get(`${publicUrl}(/:filePath)?`, (req, res) => {
|
||||
const { filePath = 'index.html' } = req.params;
|
||||
const file = path.join(__dirname, '../../../node_modules/@dxos/console-client/dist/production', filePath);
|
||||
|
Loading…
Reference in New Issue
Block a user