Company Name | Status | Actions |
---|---|---|
<div>I own you</div> | Connected | Send Query |
From d84c8fb03e18294dad45b84e1475aaf67b4748c4 Mon Sep 17 00:00:00 2001 From: "Robert M. Learney" <39194639+rmlearney-digicatapult@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:24:11 +0000 Subject: [PATCH 1/2] Shrink docker image from 530MB -> 250MB (#242) --- Dockerfile | 12 +++++------- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16da64c3..d8c6c910 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.11 -FROM node:current-alpine AS builder +FROM node:lts-alpine AS builder WORKDIR /veritable-ui @@ -32,20 +32,18 @@ ENV NODE_ENV=${NODE_ENV} RUN npx playwright install --with-deps - CMD ["npm", "run", "test:playwright"] - -# service -FROM node:current-alpine AS service +# Service +FROM node:lts-alpine AS service WORKDIR /veritable-ui -RUN apk add --update coreutils curl +RUN apk add --no-cache coreutils curl RUN npm -g install npm@10.x.x COPY package*.json ./ -RUN npm ci --omit-dev +RUN npm ci --omit=dev COPY public ./public COPY knexfile.js ./ diff --git a/package-lock.json b/package-lock.json index 47e1cc20..ff77b812 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "veritable-ui", - "version": "0.14.16", + "version": "0.14.17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "veritable-ui", - "version": "0.14.16", + "version": "0.14.17", "license": "Apache-2.0", "dependencies": { "@digicatapult/tsoa-oauth-express": "^0.1.69", diff --git a/package.json b/package.json index fa973f2a..9ac3dde2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "veritable-ui", - "version": "0.14.16", + "version": "0.14.17", "description": "UI for Veritable", "main": "src/index.ts", "type": "module", From 31beb0bcddf4bf9f1596c59568d5aef32d8630bb Mon Sep 17 00:00:00 2001 From: Ellenn-A <58051865+Ellenn-A@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:49:44 +0000 Subject: [PATCH 2/2] Feat/fixing inconsistencies (#240) Co-authored-by: dc-autobot[bot] <181364585+dc-autobot[bot]@users.noreply.github.com> --- package-lock.json | 4 ++-- package.json | 2 +- public/styles/shared.css | 4 +++- .../credentials/__tests__/index.test.ts | 6 +++--- src/controllers/credentials/index.ts | 2 +- .../connection/__tests__/connection.test.ts.snap | 8 ++++---- src/views/connection/connection.tsx | 4 ++-- src/views/credentials/__tests__/fixtures.ts | 8 ++++---- .../credentials/__tests__/index.test.ts.snap | 10 +++++----- src/views/credentials/index.tsx | 16 ++++++++++++---- .../homepage/__tests__/homepage.test.ts.snap | 2 +- src/views/homepage/homepage.tsx | 2 +- 12 files changed, 39 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index ff77b812..06a17d9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "veritable-ui", - "version": "0.14.17", + "version": "0.14.18", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "veritable-ui", - "version": "0.14.17", + "version": "0.14.18", "license": "Apache-2.0", "dependencies": { "@digicatapult/tsoa-oauth-express": "^0.1.69", diff --git a/package.json b/package.json index 9ac3dde2..5d250800 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "veritable-ui", - "version": "0.14.17", + "version": "0.14.18", "description": "UI for Veritable", "main": "src/index.ts", "type": "module", diff --git a/public/styles/shared.css b/public/styles/shared.css index 91fab54b..c96bc9e9 100644 --- a/public/styles/shared.css +++ b/public/styles/shared.css @@ -154,7 +154,9 @@ background-repeat: no-repeat; background-position: center; } - +#connection-search-input { + min-width: 210px; +} .search-window { border-color: var(--text-color-sub); border-radius: 5px; diff --git a/src/controllers/credentials/__tests__/index.test.ts b/src/controllers/credentials/__tests__/index.test.ts index 941cd339..6f51e1a7 100644 --- a/src/controllers/credentials/__tests__/index.test.ts +++ b/src/controllers/credentials/__tests__/index.test.ts @@ -23,7 +23,7 @@ describe('CredentialsController', () => { const result = await controller.listCredentials(req).then(toHTMLString) expect(result).to.equal( - 'listCredentials_issuer-done-DIGITAL CATAPULT-Supplier credentials-holder-done-DIGITAL CATAPULT-Supplier credentials-issuer-done-CARE ONUS LTD-Supplier credentials-holder-done-CARE ONUS LTD-Supplier credentials_listCredentials' + 'listCredentials_issuer-done-DIGITAL CATAPULT-Supplier credential-holder-done-DIGITAL CATAPULT-Supplier credential-issuer-done-CARE ONUS LTD-Supplier credential-holder-done-CARE ONUS LTD-Supplier credential_listCredentials' ) }) @@ -103,7 +103,7 @@ describe('CredentialsController', () => { const res = await controller.listCredentials(req, '').then(toHTMLString) expect(res).to.equal( - 'listCredentials_issuer-done-CARE ONUS LTD-Supplier credentials-holder-done-CARE ONUS LTD-Supplier credentials_listCredentials' + 'listCredentials_issuer-done-CARE ONUS LTD-Supplier credential-holder-done-CARE ONUS LTD-Supplier credential_listCredentials' ) }) @@ -114,7 +114,7 @@ describe('CredentialsController', () => { const res = await controller.listCredentials(req, '').then(toHTMLString) expect(res).to.equal( - 'listCredentials_issuer-done-DIGITAL CATAPULT-Supplier credentials-holder-done-DIGITAL CATAPULT-Supplier credentials_listCredentials' + 'listCredentials_issuer-done-DIGITAL CATAPULT-Supplier credential-holder-done-DIGITAL CATAPULT-Supplier credential_listCredentials' ) }) }) diff --git a/src/controllers/credentials/index.ts b/src/controllers/credentials/index.ts index 5547cce6..1d10a526 100644 --- a/src/controllers/credentials/index.ts +++ b/src/controllers/credentials/index.ts @@ -56,7 +56,7 @@ export class CredentialsController extends HTMLController { const result = { companyName: connection.company_name, - type: 'Supplier credentials' as const, + type: 'Supplier credential' as const, ...credential, } req.log.debug('Credential found %s: %j', credential.id, result) diff --git a/src/views/connection/__tests__/connection.test.ts.snap b/src/views/connection/__tests__/connection.test.ts.snap index 871e7ef9..8edfc742 100644 --- a/src/views/connection/__tests__/connection.test.ts.snap +++ b/src/views/connection/__tests__/connection.test.ts.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ConnectionTemplates listPage should escape html in name 1`] = `"
Company Name | Status | Actions |
---|---|---|
<div>I own you</div> | Connected | Send Query |
Company Name | Status | Actions |
---|---|---|
<div>I own you</div> | Connected | Send Query |
Company Name | Status | Actions |
---|---|---|
Company A | Disconnected | Disconnected |
Company B | Invite Sent | Waiting for Response |
Company C | Verification Code Required | Complete Verification |
Company D | Connected | Send Query |
Company E | Verification Code Required | Complete Verification |
Company F | Waiting for Response | Waiting for Response |
Company Name | Status | Actions |
---|---|---|
Company A | Disconnected | Disconnected |
Company B | Invite Sent | Waiting for Response |
Company C | Verification Code Required | Complete Verification |
Company D | Connected | Send Query |
Company E | Verification Code Required | Complete Verification |
Company F | Waiting for Response | Waiting for Response |
Company Name | Status | Actions |
---|---|---|
Company A | Disconnected | Disconnected |
Company Name | Status | Actions |
---|---|---|
Company A | Disconnected | Disconnected |
Company Name | Credential Type | Direction | Crendetial status | Actions |
---|---|---|---|---|
DIGITAL CATAPULT | Supplier credentials | Given | Completed | View Credential |
CARE ONUS LTD | Supplier credentials | Received | Completed | View Credential |
Company Name | Credential Type | Relationship | Status | Actions |
---|---|---|---|---|
DIGITAL CATAPULT | Supplier credential | Sender | Completed | View Credential |
CARE ONUS LTD | Supplier credential | Recipient | Completed | View Credential |
Company Name | Credential Type | Direction | Crendetial status | Actions |
---|---|---|---|---|
DIGITAL CATAPULT | Supplier credentials | Given | Completed | View Credential |
CARE ONUS LTD | Supplier credentials | Received | Completed | View Credential |
Company Name | Credential Type | Relationship | Status | Actions |
---|---|---|---|---|
DIGITAL CATAPULT | Supplier credential | Sender | Completed | View Credential |
CARE ONUS LTD | Supplier credential | Recipient | Completed | View Credential |
Company Name | Credential Type | Direction | Crendetial status | Actions |
---|---|---|---|---|
DIGITAL CATAPULT | Supplier credentials | Given | Completed | View Credential |
CARE ONUS LTD | Supplier credentials | Received | Completed | View Credential |
Company Name | Credential Type | Relationship | Status | Actions |
---|---|---|---|---|
DIGITAL CATAPULT | Supplier credential | Sender | Completed | View Credential |
CARE ONUS LTD | Supplier credential | Recipient | Completed | View Credential |
Company Name | Credential Type | Direction | Crendetial status | Actions |
---|---|---|---|---|
CARE ONUS LTD | Supplier credentials | Given | Completed | View Credential |
DIGITAL CATAPULT | Supplier credentials | Received | Completed | View Credential |
Company Name | Credential Type | Relationship | Status | Actions |
---|---|---|---|---|
CARE ONUS LTD | Supplier credential | Sender | Completed | View Credential |
DIGITAL CATAPULT | Supplier credential | Recipient | Completed | View Credential |
Received
+ returnRecipient
case 'issuer': - returnGiven
+ returnSender
default: returnunknown
} @@ -31,6 +31,14 @@ export default class CredentialListTemplates { } public listPage = (credentials: ExtendedCredential[], search: string = '') => { + // function adjustInputWidth(input: any) { + // const span = document.getElementById('width-span') + + // // span.textContent = input.value || input.placeholder + + // return '200px' + // } + return (