diff --git a/packages/console-client/src/containers/StatusBar.js b/packages/console-client/src/containers/StatusBar.js
index 3bd0e13..1a8da72 100644
--- a/packages/console-client/src/containers/StatusBar.js
+++ b/packages/console-client/src/containers/StatusBar.js
@@ -40,6 +40,14 @@ const useStyles = makeStyles((theme) => ({
flex: 1,
textAlign: 'center'
},
+ info: {
+ display: 'flex',
+ fontFamily: 'monospace',
+ fontSize: 'large',
+ '& div': {
+ margin: 4
+ }
+ },
icon: {
margin: '0 2px'
},
@@ -54,12 +62,6 @@ const useStyles = makeStyles((theme) => ({
},
loading: {
color: theme.palette.primary.dark
- },
- info: {
- display: 'flex',
- '& div': {
- margin: 4
- }
}
}));
diff --git a/packages/console-client/src/containers/VersionCheck.js b/packages/console-client/src/containers/VersionCheck.js
index 1d12aeb..a5fc6f2 100644
--- a/packages/console-client/src/containers/VersionCheck.js
+++ b/packages/console-client/src/containers/VersionCheck.js
@@ -45,9 +45,7 @@ const VersionCheck = () => {
}
});
- if (latest !== current) {
- setUpgrade({ current, latest });
- }
+ setUpgrade({ current, latest: latest !== current ? latest : undefined });
}
}, [status, data]);
diff --git a/packages/console-client/src/containers/panels/apps/AppRecords.js b/packages/console-client/src/containers/panels/apps/AppRecords.js
index 9b7b6f4..d0b43fa 100644
--- a/packages/console-client/src/containers/panels/apps/AppRecords.js
+++ b/packages/console-client/src/containers/panels/apps/AppRecords.js
@@ -18,10 +18,11 @@ import { getServiceUrl } from '../../../util/config';
import Table from '../../../components/Table';
import TableCell from '../../../components/TableCell';
+import moment from 'moment';
const AppRecords = () => {
const { config } = useContext(ConsoleContext);
- const [sorter, sortBy] = useSorter('id');
+ const [sorter, sortBy] = useSorter('createTime', false);
const data = useQueryStatusReducer(useQuery(WNS_RECORDS, {
pollInterval: config.api.pollInterval,
variables: { type: 'wrn:app' }
@@ -54,20 +55,22 @@ const AppRecords = () => {
- ID
+ Identifier
Version
+ Created
Name
Link
- {records.sort(sorter).map(({ id, name, version, attributes: { displayName, publicUrl } }) => {
+ {records.sort(sorter).map(({ id, name, version, createTime, attributes: { displayName, publicUrl } }) => {
const link = getAppUrl({ id, name, version, publicUrl });
return (
{name}
{version}
+ {moment.utc(createTime).fromNow()}
{displayName}
{link && (
diff --git a/packages/console-client/src/containers/panels/bots/BotRecords.js b/packages/console-client/src/containers/panels/bots/BotRecords.js
index 0609b7c..3c501ea 100644
--- a/packages/console-client/src/containers/panels/bots/BotRecords.js
+++ b/packages/console-client/src/containers/panels/bots/BotRecords.js
@@ -15,10 +15,11 @@ import TableBody from '@material-ui/core/TableBody';
import Table from '../../../components/Table';
import TableCell from '../../../components/TableCell';
+import moment from 'moment';
const AppRecords = () => {
const { config } = useContext(ConsoleContext);
- const [sorter, sortBy] = useSorter('id');
+ const [sorter, sortBy] = useSorter('createTime', false);
const data = useQueryStatusReducer(useQuery(WNS_RECORDS, {
pollInterval: config.api.pollInterval,
variables: { type: 'wrn:bot' }
@@ -34,19 +35,22 @@ const AppRecords = () => {
- ID
+ Identifier
Version
+ Created
Name
- {records.sort(sorter).map(({ id, name, version, attributes: { displayName } }) => {
+ {records.sort(sorter).map(({ id, name, version, createTime, attributes: { displayName } }) => {
return (
{name}
{version}
+ {moment.utc(createTime).fromNow()}
{displayName}
+
);
})}
diff --git a/packages/console-client/src/containers/panels/wns/WNSRecords.js b/packages/console-client/src/containers/panels/wns/WNSRecords.js
index e982411..adda768 100644
--- a/packages/console-client/src/containers/panels/wns/WNSRecords.js
+++ b/packages/console-client/src/containers/panels/wns/WNSRecords.js
@@ -64,7 +64,7 @@ export const WNSRecordType = ({ type = types[0].key, onChanged }) => {
const WNSRecords = ({ type }) => {
const { config } = useContext(ConsoleContext);
- const [sorter, sortBy] = useSorter('id');
+ const [sorter, sortBy] = useSorter('createTime', false);
const data = useQueryStatusReducer(useQuery(WNS_RECORDS, {
pollInterval: config.api.pollInterval,
variables: { type }
@@ -81,11 +81,11 @@ const WNSRecords = ({ type }) => {
Type
- ID
+ Identifier
Version
+ Created
Name
Package Hash
- Created
@@ -95,13 +95,13 @@ const WNSRecords = ({ type }) => {
{type}
{name}
{version}
+ {moment.utc(createTime).fromNow()}
{displayName}
{pkg && (
)}
- {moment.utc(createTime).fromNow()}
))}
diff --git a/packages/console-client/src/hooks/sorter.js b/packages/console-client/src/hooks/sorter.js
index 6e7e03c..85c2b7a 100644
--- a/packages/console-client/src/hooks/sorter.js
+++ b/packages/console-client/src/hooks/sorter.js
@@ -6,8 +6,8 @@ import get from 'lodash.get';
import { useState } from 'react';
// TODO(burdon): Enable multiple sort order (e.g., id, version).
-export const useSorter = (initial) => {
- const [{ sort, ascend }, setSort] = useState({ sort: initial, ascend: true });
+export const useSorter = (initSort, initAscend) => {
+ const [{ sort, ascend }, setSort] = useState({ sort: initSort, ascend: initAscend });
const sorter = (item1, item2) => {
const a = get(item1, sort);
diff --git a/packages/console-client/src/modules.js b/packages/console-client/src/modules.js
index d47f2a6..72d3e4e 100644
--- a/packages/console-client/src/modules.js
+++ b/packages/console-client/src/modules.js
@@ -34,8 +34,8 @@ export default {
icon: BotsIcon
},
{
- path: '/signal',
- title: 'Signal Server',
+ path: '/signaling',
+ title: 'Signaling',
icon: SignalIcon
},
{
diff --git a/packages/console-client/version.json b/packages/console-client/version.json
index 8f6e049..474e144 100644
--- a/packages/console-client/version.json
+++ b/packages/console-client/version.json
@@ -1,7 +1,7 @@
{
"build": {
"name": "@dxos/console-client",
- "buildDate": "2020-05-26T01:16:30.514Z",
+ "buildDate": "2020-05-26T12:54:32.629Z",
"version": "1.0.0-beta.0"
}
}
diff --git a/packages/console-server/src/resolvers.js b/packages/console-server/src/resolvers.js
index ace506a..a7364e2 100644
--- a/packages/console-server/src/resolvers.js
+++ b/packages/console-server/src/resolvers.js
@@ -35,14 +35,17 @@ export const createResolvers = config => ({
// System
//
- system_status: () => ({
- timestamp: timestamp(),
- json: JSON.stringify({
- dxos: {
- image: '0.0.1'
- }
- })
- }),
+ // TODO(burdon): System calls.
+ system_status: () => {
+ return {
+ timestamp: timestamp(),
+ json: JSON.stringify({
+ dxos: {
+ image: '0.0.1'
+ }
+ })
+ };
+ },
//
// IPFS