From 46e828c12d9bf1587944b257ba5428ebca950418 Mon Sep 17 00:00:00 2001 From: Angelika Schneider Date: Fri, 11 Oct 2024 10:48:17 +0200 Subject: [PATCH 1/3] Add env variables subsection --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 5c91169..fcab088 100644 --- a/README.md +++ b/README.md @@ -36,3 +36,14 @@ npm run build You can preview the production build with `npm run preview`. > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. + +## Environment variables +The following environment variables can be set to configure the UI. The values are all default values. + +``` +PUBLIC_OAUTH_AUTHORITY=http://localhost:8080 +PUBLIC_OAUTH_CLIENT_ID=dashboard +PUBLIC_OAUTH_REDIRECT_URI=http://localhost:5173/callback +PUBLIC_OAUTH_SCOPE=profile email +PUBLIC_CLOUDITOR_URL=http://localhost:8080 +``` \ No newline at end of file From e4fa5759f41cbad73fe766901fcc4d905468e8a5 Mon Sep 17 00:00:00 2001 From: Angelika Schneider Date: Thu, 17 Oct 2024 13:26:05 +0200 Subject: [PATCH 2/3] Ensure targets is always an array to prevent TypeError --- src/lib/api/orchestrator.ts | 6 +++--- src/routes/(app)/cloud/[id]/compliance/+layout.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/api/orchestrator.ts b/src/lib/api/orchestrator.ts index 3565cf7..13d98ad 100644 --- a/src/lib/api/orchestrator.ts +++ b/src/lib/api/orchestrator.ts @@ -143,7 +143,7 @@ export interface ListCertificationTargetsResponse { } export interface ListAuditScopesResponse { - auditScope: AuditScope[]; + auditScopes: AuditScope[]; } export interface ListControlsInScopeResponse { @@ -481,7 +481,7 @@ export async function listAuditScopes( fetch = window.fetch ): Promise { const apiUrl = clouditorize(`/v1/orchestrator/certification_targets/${serviceId}/audit_scopes`); - + return fetch(apiUrl, { method: 'GET', headers: { @@ -491,7 +491,7 @@ export async function listAuditScopes( .then(throwError) .then((res) => res.json()) .then((response: ListAuditScopesResponse) => { - return response.auditScope; + return response.auditScopes; }); } diff --git a/src/routes/(app)/cloud/[id]/compliance/+layout.ts b/src/routes/(app)/cloud/[id]/compliance/+layout.ts index 49d35c6..cd44f62 100644 --- a/src/routes/(app)/cloud/[id]/compliance/+layout.ts +++ b/src/routes/(app)/cloud/[id]/compliance/+layout.ts @@ -8,7 +8,7 @@ export const load = (async ({ fetch, params, parent }) => { throw error(405, 'Required parameter missing'); } - const targets = await listAuditScopes(params.id, fetch); + const targets = await listAuditScopes(params.id, fetch) || [];; const data = await parent(); const leftOverCatalogs = data.catalogs.filter((c) => { From 576b5079c1df9e8242c3260d7d49106c0a36c05b Mon Sep 17 00:00:00 2001 From: Angelika Schneider Date: Thu, 17 Oct 2024 14:25:50 +0200 Subject: [PATCH 3/3] Add icon for machine learning --- src/lib/components/DiscoveryGraph.svelte | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/DiscoveryGraph.svelte b/src/lib/components/DiscoveryGraph.svelte index bece56f..005e347 100644 --- a/src/lib/components/DiscoveryGraph.svelte +++ b/src/lib/components/DiscoveryGraph.svelte @@ -5,6 +5,7 @@