fix: add wrn:file to console

This commit is contained in:
Thomas E Lackey 2020-12-03 14:46:36 -06:00
parent 73c0956356
commit 65d39368a2
8 changed files with 16 additions and 11 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.2.3-alpha.2",
"version": "1.2.4-alpha.2",
"useWorkspaces": true,
"npmClient": "yarn"
}

View File

@ -1,6 +1,6 @@
{
"name": "@dxos/console",
"version": "1.2.3-alpha.0",
"version": "1.2.4-alpha.0",
"description": "Console",
"main": "index.js",
"private": true,

View File

@ -1,6 +1,6 @@
{
"name": "@dxos/console-app",
"version": "1.2.3-alpha.2",
"version": "1.2.4-alpha.2",
"description": "Kubenet Console Client",
"repository": "https://github.com/dxos/console",
"main": "dist/es/index.js",

View File

@ -17,8 +17,9 @@ import { getServiceUrl } from '../util/config';
const PackageLink = ({ config, type, pkg, text }) => {
// eslint-disable-next-line default-case
switch (type) {
// Apps
case 'wrn:app': {
// Apps and Files
case 'wrn:app':
case 'wrn:file': {
const cid = pkg['/'];
const ipfsUrl = getServiceUrl(config, 'ipfs.gateway', { path: `${cid}` });
if (!cid) {

View File

@ -23,6 +23,9 @@ const QUERY = `
value {
string
json
reference {
id
}
}
}
}

View File

@ -36,6 +36,7 @@ const types = [
{ key: 'wrn:app', label: 'App' },
{ key: 'wrn:bot', label: 'Bot' },
{ key: 'wrn:bot-factory', label: 'Bot Factory' },
{ key: 'wrn:file', label: 'File' },
{ key: 'wrn:type', label: 'Type' }
];
@ -94,7 +95,7 @@ const RegistryRecords = ({ type }) => {
<TableBody>
{records.sort(sorter)
.map((record) => {
const { id, names, createTime, attributes: { type, name: displayName, version, description, service, package: pkg } } = record;
const { id, names, createTime, attributes: { type, name: displayName, fileName, version, description, service, package: pkg } } = record;
let pkgLink;
let appLinks;
@ -125,7 +126,7 @@ const RegistryRecords = ({ type }) => {
{version}
</TableCell>
<TableCell>
{displayName || service || description}
{displayName || service || fileName || description}
</TableCell>
<TableCell>
{moment.utc(createTime).fromNow()}

View File

@ -1,7 +1,7 @@
{
"build": {
"name": "@dxos/console-app",
"buildDate": "2020-12-02T18:30:08.007Z",
"version": "1.2.3-alpha.0"
"buildDate": "2020-12-03T20:40:32.208Z",
"version": "1.2.4-alpha.2"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "@dxos/console-server",
"version": "1.2.3-alpha.2",
"version": "1.2.4-alpha.2",
"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.2.3-alpha.2",
"@dxos/console-app": "^1.2.4-alpha.2",
"@wirelineio/wns-schema": "^0.1.1",
"apollo-boost": "^0.4.9",
"apollo-server-express": "^2.13.1",