From 65d39368a21a8185aef574ea1cc167df83c009cb Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Thu, 3 Dec 2020 14:46:36 -0600 Subject: [PATCH] fix: add wrn:file to console --- lerna.json | 2 +- package.json | 2 +- packages/console-app/package.json | 2 +- packages/console-app/src/components/PackageLink.js | 5 +++-- packages/console-app/src/components/QueryLink.js | 3 +++ .../src/containers/panels/registry/RegistryRecords.js | 5 +++-- packages/console-app/src/version.json | 4 ++-- packages/console-server/package.json | 4 ++-- 8 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lerna.json b/lerna.json index 7ffb659..3e19f34 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.2.3-alpha.2", + "version": "1.2.4-alpha.2", "useWorkspaces": true, "npmClient": "yarn" } diff --git a/package.json b/package.json index 5f20eba..c78cd30 100644 --- a/package.json +++ b/package.json @@ -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, diff --git a/packages/console-app/package.json b/packages/console-app/package.json index 1c9ef9c..b8c215e 100644 --- a/packages/console-app/package.json +++ b/packages/console-app/package.json @@ -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", diff --git a/packages/console-app/src/components/PackageLink.js b/packages/console-app/src/components/PackageLink.js index 7818d54..706946b 100644 --- a/packages/console-app/src/components/PackageLink.js +++ b/packages/console-app/src/components/PackageLink.js @@ -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) { diff --git a/packages/console-app/src/components/QueryLink.js b/packages/console-app/src/components/QueryLink.js index 686df90..38e264d 100644 --- a/packages/console-app/src/components/QueryLink.js +++ b/packages/console-app/src/components/QueryLink.js @@ -23,6 +23,9 @@ const QUERY = ` value { string json + reference { + id + } } } } diff --git a/packages/console-app/src/containers/panels/registry/RegistryRecords.js b/packages/console-app/src/containers/panels/registry/RegistryRecords.js index 58a55ae..ec4ac09 100644 --- a/packages/console-app/src/containers/panels/registry/RegistryRecords.js +++ b/packages/console-app/src/containers/panels/registry/RegistryRecords.js @@ -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 }) => { {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} - {displayName || service || description} + {displayName || service || fileName || description} {moment.utc(createTime).fromNow()} diff --git a/packages/console-app/src/version.json b/packages/console-app/src/version.json index b96fa89..d0ef15f 100644 --- a/packages/console-app/src/version.json +++ b/packages/console-app/src/version.json @@ -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" } } diff --git a/packages/console-server/package.json b/packages/console-server/package.json index 07e5ebd..8085893 100644 --- a/packages/console-server/package.json +++ b/packages/console-server/package.json @@ -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",