From 446450934423c5e8c89563647605fdef4463237d Mon Sep 17 00:00:00 2001 From: Ralf Aron Date: Mon, 4 Nov 2024 06:43:20 +0100 Subject: [PATCH] in progress --- projects/aas-core/src/lib/types.ts | 9 +- .../add-endpoint-form.component.html | 19 +- .../src/app/start/start-api.service.ts | 6 +- .../aas-portal/src/app/start/start.store.ts | 6 +- .../aas-server/src/app/aas-index/aas-index.ts | 4 +- .../src/app/aas-index/lowdb/lowdb-index.ts | 13 +- .../src/app/aas-index/mysql/mysql-index.ts | 63 +++-- .../src/app/aas-index/mysql/mysql-types.ts | 1 + .../src/app/aas-provider/aas-provider.ts | 66 +++-- .../src/app/aas-provider/scan-result.ts | 6 +- .../src/app/aas-provider/worker-data.ts | 1 + .../app/controller/documents-controller.ts | 4 +- projects/aas-server/src/app/endpoint-scan.ts | 3 + .../src/app/template/template-scan.ts | 1 + .../src/app/template/template-storage.ts | 1 + projects/aas-server/src/app/variable.ts | 12 +- projects/aas-server/src/app/worker-app.ts | 7 +- .../test/aas-index/mysql/mysql-index.spec.ts | 229 ++++++++++++++++-- .../test/template/template-storage.spec.ts | 1 + projects/aasportal-index/schema.sql | 3 +- 20 files changed, 369 insertions(+), 86 deletions(-) diff --git a/projects/aas-core/src/lib/types.ts b/projects/aas-core/src/lib/types.ts index 3e1b2047..2a8c5ad1 100644 --- a/projects/aas-core/src/lib/types.ts +++ b/projects/aas-core/src/lib/types.ts @@ -45,6 +45,12 @@ export type AASAbbreviation = | 'SME' | 'SML'; +/** The schedule type. */ +export interface AASEndpointSchedule { + type: 'never' | 'once' | 'every' | 'daily' | 'weekly'; + values?: (string | number)[]; +} + /** The kind of AAS container or server. */ export type AASEndpointType = 'FileSystem' | 'AAS_API' | 'OPC_UA' | 'WebDAV'; @@ -53,6 +59,7 @@ export type AASEndpoint = { name: string; url: string; type: AASEndpointType; + schedule?: AASEndpointSchedule; version?: string; headers?: Record; }; @@ -99,7 +106,7 @@ export interface AASDocument extends AASDocumentId { } /** Represents a page of AAS documents from the total set. */ -export interface AASPage { +export interface AASPagedResult { previous: AASDocumentId | null; next: AASDocumentId | null; documents: AASDocument[]; diff --git a/projects/aas-portal/src/app/start/add-endpoint-form/add-endpoint-form.component.html b/projects/aas-portal/src/app/start/add-endpoint-form/add-endpoint-form.component.html index a42af250..96aa3e84 100644 --- a/projects/aas-portal/src/app/start/add-endpoint-form/add-endpoint-form.component.html +++ b/projects/aas-portal/src/app/start/add-endpoint-form/add-endpoint-form.component.html @@ -42,13 +42,30 @@