From 9037073895c309a616ae62a2ae7a4ded684077f5 Mon Sep 17 00:00:00 2001 From: Stig Ofstad Date: Wed, 8 May 2024 13:57:15 +0200 Subject: [PATCH] fix: same datasource and app folder structure as DM-Apps --- .../WorkflowDS/Blueprints/AzureContainer.json | 7 + .../data/WorkflowDS/Blueprints/Container.json | 31 +++++ .../WorkflowDS/Blueprints/ContainerImage.json | 40 ++++++ .../data/WorkflowDS/Blueprints/CronJob.json | 35 +++++ .../app/data/WorkflowDS/Blueprints/Job.json | 93 +++++++++++++ .../WorkflowDS/Blueprints/JobHandler.json | 27 ++++ .../data/WorkflowDS/Blueprints/JobStatus.json | 25 ++++ .../WorkflowDS/Blueprints/LocalContainer.json | 13 ++ .../app/data/WorkflowDS/Blueprints/Radix.json | 20 +++ .../WorkflowDS/Blueprints/RecurringJob.json | 23 ++++ .../Blueprints/RecurringJobHandler.json | 6 + .../Blueprints/ReverseDescription.json | 6 + .../app/data/WorkflowDS/Blueprints/Shell.json | 13 ++ .../data/WorkflowDS/Blueprints/package.json | 17 +++ .../app/data/system/SIMOS/Application.json | 28 ++++ example/app/data/system/SIMOS/Blob.json | 25 ++++ example/app/data/system/SIMOS/Blueprint.json | 70 ++++++++++ .../data/system/SIMOS/BlueprintAttribute.json | 72 ++++++++++ example/app/data/system/SIMOS/Dependency.json | 32 +++++ example/app/data/system/SIMOS/Entity.json | 44 +++++++ example/app/data/system/SIMOS/Enum.json | 35 +++++ example/app/data/system/SIMOS/File.json | 44 +++++++ .../system/SIMOS/InlineRecipeViewConfig.json | 12 ++ example/app/data/system/SIMOS/Meta.json | 54 ++++++++ .../app/data/system/SIMOS/NamedEntity.json | 15 +++ example/app/data/system/SIMOS/PDF.json | 42 ++++++ example/app/data/system/SIMOS/Package.json | 21 +++ example/app/data/system/SIMOS/RecipeLink.json | 67 ++++++++++ example/app/data/system/SIMOS/Reference.json | 25 ++++ .../system/SIMOS/ReferenceViewConfig.json | 18 +++ example/app/data/system/SIMOS/Role.json | 26 ++++ .../data/system/SIMOS/StorageAttribute.json | 56 ++++++++ .../app/data/system/SIMOS/StorageRecipe.json | 30 +++++ .../app/data/system/SIMOS/UiAttribute.json | 123 ++++++++++++++++++ .../data/system/SIMOS/UiAttributeOption.json | 13 ++ example/app/data/system/SIMOS/UiRecipe.json | 49 +++++++ example/app/data/system/SIMOS/Url.json | 20 +++ example/app/data/system/SIMOS/ViewConfig.json | 50 +++++++ .../data/system/SIMOS/enums/ActionTypes.json | 7 + .../system/SIMOS/enums/AttributeTypes.json | 7 + .../data/system/SIMOS/enums/StatusEnum.json | 21 +++ .../data/system/SIMOS/enums/StorageTypes.json | 7 + .../system/SIMOS/recipe_links/blueprint.json | 49 +++++++ .../system/SIMOS/recipe_links/default.json | 19 +++ .../system/SIMOS/recipe_links/entity.json | 12 ++ .../data/system/SIMOS/recipe_links/file.json | 10 ++ .../SIMOS/recipe_links/package_recipe.json | 26 ++++ .../data/system/SIMOS/recipe_links/pdf.json | 13 ++ example/app/data_sources/WorkflowDS.json | 16 +++ example/app/data_sources/system_DS.json | 15 +++ example/docker-compose.yaml | 2 +- example/reset-app.sh | 35 +++-- 52 files changed, 1557 insertions(+), 9 deletions(-) create mode 100644 example/app/data/WorkflowDS/Blueprints/AzureContainer.json create mode 100644 example/app/data/WorkflowDS/Blueprints/Container.json create mode 100644 example/app/data/WorkflowDS/Blueprints/ContainerImage.json create mode 100644 example/app/data/WorkflowDS/Blueprints/CronJob.json create mode 100644 example/app/data/WorkflowDS/Blueprints/Job.json create mode 100644 example/app/data/WorkflowDS/Blueprints/JobHandler.json create mode 100644 example/app/data/WorkflowDS/Blueprints/JobStatus.json create mode 100644 example/app/data/WorkflowDS/Blueprints/LocalContainer.json create mode 100644 example/app/data/WorkflowDS/Blueprints/Radix.json create mode 100644 example/app/data/WorkflowDS/Blueprints/RecurringJob.json create mode 100644 example/app/data/WorkflowDS/Blueprints/RecurringJobHandler.json create mode 100644 example/app/data/WorkflowDS/Blueprints/ReverseDescription.json create mode 100644 example/app/data/WorkflowDS/Blueprints/Shell.json create mode 100644 example/app/data/WorkflowDS/Blueprints/package.json create mode 100644 example/app/data/system/SIMOS/Application.json create mode 100644 example/app/data/system/SIMOS/Blob.json create mode 100644 example/app/data/system/SIMOS/Blueprint.json create mode 100644 example/app/data/system/SIMOS/BlueprintAttribute.json create mode 100644 example/app/data/system/SIMOS/Dependency.json create mode 100644 example/app/data/system/SIMOS/Entity.json create mode 100644 example/app/data/system/SIMOS/Enum.json create mode 100644 example/app/data/system/SIMOS/File.json create mode 100644 example/app/data/system/SIMOS/InlineRecipeViewConfig.json create mode 100644 example/app/data/system/SIMOS/Meta.json create mode 100644 example/app/data/system/SIMOS/NamedEntity.json create mode 100644 example/app/data/system/SIMOS/PDF.json create mode 100644 example/app/data/system/SIMOS/Package.json create mode 100644 example/app/data/system/SIMOS/RecipeLink.json create mode 100644 example/app/data/system/SIMOS/Reference.json create mode 100644 example/app/data/system/SIMOS/ReferenceViewConfig.json create mode 100644 example/app/data/system/SIMOS/Role.json create mode 100644 example/app/data/system/SIMOS/StorageAttribute.json create mode 100644 example/app/data/system/SIMOS/StorageRecipe.json create mode 100644 example/app/data/system/SIMOS/UiAttribute.json create mode 100644 example/app/data/system/SIMOS/UiAttributeOption.json create mode 100644 example/app/data/system/SIMOS/UiRecipe.json create mode 100644 example/app/data/system/SIMOS/Url.json create mode 100644 example/app/data/system/SIMOS/ViewConfig.json create mode 100644 example/app/data/system/SIMOS/enums/ActionTypes.json create mode 100644 example/app/data/system/SIMOS/enums/AttributeTypes.json create mode 100644 example/app/data/system/SIMOS/enums/StatusEnum.json create mode 100644 example/app/data/system/SIMOS/enums/StorageTypes.json create mode 100644 example/app/data/system/SIMOS/recipe_links/blueprint.json create mode 100644 example/app/data/system/SIMOS/recipe_links/default.json create mode 100644 example/app/data/system/SIMOS/recipe_links/entity.json create mode 100644 example/app/data/system/SIMOS/recipe_links/file.json create mode 100644 example/app/data/system/SIMOS/recipe_links/package_recipe.json create mode 100644 example/app/data/system/SIMOS/recipe_links/pdf.json create mode 100644 example/app/data_sources/WorkflowDS.json create mode 100644 example/app/data_sources/system_DS.json diff --git a/example/app/data/WorkflowDS/Blueprints/AzureContainer.json b/example/app/data/WorkflowDS/Blueprints/AzureContainer.json new file mode 100644 index 000000000..c247c13ab --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/AzureContainer.json @@ -0,0 +1,7 @@ +{ + "name": "AzureContainer", + "type": "CORE:Blueprint", + "description": "Description of a executable job running as an Azure Container Instance", + "extends": ["Container"], + "attributes": [] +} diff --git a/example/app/data/WorkflowDS/Blueprints/Container.json b/example/app/data/WorkflowDS/Blueprints/Container.json new file mode 100644 index 000000000..811c51ea0 --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/Container.json @@ -0,0 +1,31 @@ +{ + "name": "Container", + "type": "CORE:Blueprint", + "description": "A container job", + "extends": ["JobHandler"], + "attributes": [ + { + "name": "label", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "image", + "type": "CORE:BlueprintAttribute", + "attributeType": "ContainerImage" + }, + { + "name": "customCommand", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true, + "dimensions": "*" + }, + { + "name": "name", + "type": "CORE:BlueprintAttribute", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/ContainerImage.json b/example/app/data/WorkflowDS/Blueprints/ContainerImage.json new file mode 100644 index 000000000..020856311 --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/ContainerImage.json @@ -0,0 +1,40 @@ +{ + "name": "ContainerImage", + "type": "CORE:Blueprint", + "description": "Container image used as job runner for a task. Full container image name is name/subName", + "attributes": [ + { + "name": "type", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "label": "Type", + "default": "", + "optional": false + }, + { + "name": "description", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "default": "", + "optional": true, + "label": "Description" + }, + { + "name": "imageName", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "version", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "default": "latest" + }, + { + "name": "registryName", + "type": "CORE:BlueprintAttribute", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/CronJob.json b/example/app/data/WorkflowDS/Blueprints/CronJob.json new file mode 100644 index 000000000..3ebfddbb8 --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/CronJob.json @@ -0,0 +1,35 @@ +{ + "name": "CronJob", + "type": "CORE:Blueprint", + "description": "Blueprint for a job triggered by a time schedule", + "attributes": [ + { + "name": "type", + "type": "CORE:BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "cron", + "type": "CORE:BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "startDate", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "endDate", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "runs", + "type": "CORE:BlueprintAttribute", + "attributeType": "./Job", + "dimensions": "*" + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/Job.json b/example/app/data/WorkflowDS/Blueprints/Job.json new file mode 100644 index 000000000..92cc8ca6e --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/Job.json @@ -0,0 +1,93 @@ +{ + "name": "Job", + "type": "CORE:Blueprint", + "attributes": [ + { + "name": "type", + "type": "CORE:BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "uid", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "name", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "label", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "triggeredBy", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "status", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": false, + "default": "not started", + "enumType": "./JobStatus" + }, + { + "name": "applicationInput", + "type": "CORE:BlueprintAttribute", + "description": "Input entity to a job", + "attributeType": "object", + "label": "Input", + "contained": false, + "optional": true + }, + { + "name": "started", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "ended", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "outputTarget", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "result", + "type": "CORE:BlueprintAttribute", + "attributeType": "object", + "contained": false, + "optional": true + }, + { + "name": "runner", + "type": "CORE:BlueprintAttribute", + "description": "JobRunner that will handle this job", + "attributeType": "JobHandler", + "label": "Runner", + "optional": true + }, + { + "name": "referenceTarget", + "type": "CORE:BlueprintAttribute", + "description": "Dotted id to an analysis entity's job result. Should be on the format: entityId.jobs.*index*.result. Must be generated at run time since the index can vary.", + "attributeType": "string", + "label": "Reference target", + "optional": true + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/JobHandler.json b/example/app/data/WorkflowDS/Blueprints/JobHandler.json new file mode 100644 index 000000000..47fe754b2 --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/JobHandler.json @@ -0,0 +1,27 @@ +{ + "name": "JobHandler", + "type": "CORE:Blueprint", + "description": "Base jobHandler type. Other jobHandlers should extend from this one", + "attributes": [ + { + "name": "type", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": false + }, + { + "name": "name", + "type": "CORE:BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "environmentVariables", + "type": "CORE:BlueprintAttribute", + "description": "a list of strings on format 'myVar=myValue'", + "attributeType": "string", + "dimensions": "*", + "optional": true + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/JobStatus.json b/example/app/data/WorkflowDS/Blueprints/JobStatus.json new file mode 100644 index 000000000..6fedf62fb --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/JobStatus.json @@ -0,0 +1,25 @@ +{ + "name": "JobStatus", + "type": "CORE:Enum", + "description": "String enum for valid job statuses", + "values": [ + "registered", + "not started", + "starting", + "running", + "failed", + "completed", + "removed", + "unknown" + ], + "labels": [ + "Registered", + "Not Started", + "Starting", + "Running", + "Failed", + "Completed", + "Removed", + "Unknown" + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/LocalContainer.json b/example/app/data/WorkflowDS/Blueprints/LocalContainer.json new file mode 100644 index 000000000..a262c3535 --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/LocalContainer.json @@ -0,0 +1,13 @@ +{ + "name": "LocalContainer", + "type": "CORE:Blueprint", + "description": "Description of a executable job running as a Container in a local Docker network", + "extends": ["Container"], + "attributes": [ + { + "name": "network", + "type": "CORE:BlueprintAttribute", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/Radix.json b/example/app/data/WorkflowDS/Blueprints/Radix.json new file mode 100644 index 000000000..a346e925a --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/Radix.json @@ -0,0 +1,20 @@ +{ + "name": "Radix", + "type": "CORE:Blueprint", + "description": "Description of a executable job running as an Radix job", + "extends": ["JobHandler"], + "attributes": [ + { + "name": "jobName", + "type": "CORE:BlueprintAttribute", + "description": "The name defined in the radixconfig.yaml file", + "attributeType": "string" + }, + { + "name": "schedulerPort", + "type": "CORE:BlueprintAttribute", + "description": "The schedulerPort defined in the radixconfig.yaml file", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/RecurringJob.json b/example/app/data/WorkflowDS/Blueprints/RecurringJob.json new file mode 100644 index 000000000..4c3b26d85 --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/RecurringJob.json @@ -0,0 +1,23 @@ +{ + "name": "RecurringJob", + "type": "CORE:Blueprint", + "extends": ["./Job"], + "attributes": [ + { + "name": "applicationInput", + "type": "CORE:BlueprintAttribute", + "description": "Job entity to run on a schedule", + "attributeType": "./Job", + "label": "Job template", + "contained": true, + "optional": true + }, + { + "name": "schedule", + "type": "CORE:BlueprintAttribute", + "description": "Schedule for a cronjob", + "attributeType": "CronJob", + "label": "Schedule" + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/RecurringJobHandler.json b/example/app/data/WorkflowDS/Blueprints/RecurringJobHandler.json new file mode 100644 index 000000000..36e46f43d --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/RecurringJobHandler.json @@ -0,0 +1,6 @@ +{ + "name": "RecurringJobHandler", + "type": "CORE:Blueprint", + "description": "", + "extends": ["JobHandler"] +} diff --git a/example/app/data/WorkflowDS/Blueprints/ReverseDescription.json b/example/app/data/WorkflowDS/Blueprints/ReverseDescription.json new file mode 100644 index 000000000..c95f5daa0 --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/ReverseDescription.json @@ -0,0 +1,6 @@ +{ + "name": "ReverseDescription", + "type": "CORE:Blueprint", + "description": "A job that takes an input of any type, and outputs a copy with the description reversed", + "extends": ["JobHandler"] +} diff --git a/example/app/data/WorkflowDS/Blueprints/Shell.json b/example/app/data/WorkflowDS/Blueprints/Shell.json new file mode 100644 index 000000000..08ada8d70 --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/Shell.json @@ -0,0 +1,13 @@ +{ + "name": "Shell", + "type": "CORE:Blueprint", + "description": "Description of a shell-job. That is a job that will run in the shell. Only for testing.", + "extends": ["CORE:NamedEntity", "JobHandler"], + "attributes": [ + { + "name": "script", + "type": "CORE:BlueprintAttribute", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/WorkflowDS/Blueprints/package.json b/example/app/data/WorkflowDS/Blueprints/package.json new file mode 100644 index 000000000..5a6a6298d --- /dev/null +++ b/example/app/data/WorkflowDS/Blueprints/package.json @@ -0,0 +1,17 @@ +{ + "name": "Blueprints", + "type": "CORE:Package", + "_meta_": { + "type": "CORE:Meta", + "version": "0.0.1", + "dependencies": [ + { + "type": "CORE:Dependency", + "alias": "CORE", + "address": "system/SIMOS", + "version": "0.0.1", + "protocol": "dmss" + } + ] + } +} diff --git a/example/app/data/system/SIMOS/Application.json b/example/app/data/system/SIMOS/Application.json new file mode 100644 index 000000000..00656f468 --- /dev/null +++ b/example/app/data/system/SIMOS/Application.json @@ -0,0 +1,28 @@ +{ + "name": "Application", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes an application", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "label", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "dataSources", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "dimensions": "*", + "optional": false + }, + { + "name": "roles", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/Role", + "optional": true, + "dimensions": "*" + } + ] +} diff --git a/example/app/data/system/SIMOS/Blob.json b/example/app/data/system/SIMOS/Blob.json new file mode 100644 index 000000000..63a68a8c6 --- /dev/null +++ b/example/app/data/system/SIMOS/Blob.json @@ -0,0 +1,25 @@ +{ + "name": "Blob", + "type": "dmss://system/SIMOS/Blueprint", + "description": "Reference to a BLOB", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "_blob_id", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "id for the raw blob", + "attributeType": "string", + "optional": true, + "contained": true + }, + { + "name": "size", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Size of the blob in bytes", + "attributeType": "integer", + "default": 0, + "optional": true, + "contained": true + } + ] +} diff --git a/example/app/data/system/SIMOS/Blueprint.json b/example/app/data/system/SIMOS/Blueprint.json new file mode 100644 index 000000000..6dcb5146b --- /dev/null +++ b/example/app/data/system/SIMOS/Blueprint.json @@ -0,0 +1,70 @@ +{ + "name": "Blueprint", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes a blueprint", + "_meta_": { + "type": "dmss://system/SIMOS/Meta", + "version": "0.0.1" + }, + "attributes": [ + { + "name": "_meta_", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/Meta", + "contained": true, + "optional": true + }, + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "extends", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "default": [], + "optional": true, + "dimensions": "*" + }, + { + "name": "description", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "default": "", + "optional": true + }, + { + "name": "attributes", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/BlueprintAttribute", + "dimensions": "*", + "default": [ + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "description", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + } + ], + "contained": true, + "optional": true + } + ] +} diff --git a/example/app/data/system/SIMOS/BlueprintAttribute.json b/example/app/data/system/SIMOS/BlueprintAttribute.json new file mode 100644 index 000000000..f911beac2 --- /dev/null +++ b/example/app/data/system/SIMOS/BlueprintAttribute.json @@ -0,0 +1,72 @@ +{ + "name": "BlueprintAttribute", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes a blueprint attribute", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "label": "Type", + "default": "dmss://system/SIMOS/BlueprintAttribute", + "optional": false + }, + { + "name": "attributeType", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": false, + "default": "string" + }, + { + "name": "dimensions", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "ensureUID", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "If true, DMSS will ensure every complex child governed by this attribute, has a UUID", + "attributeType": "boolean", + "optional": true, + "default": false + }, + { + "name": "label", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "default", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "any", + "optional": true + }, + { + "name": "optional", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "default": false, + "optional": true + }, + { + "name": "contained", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "default": true, + "optional": true + }, + { + "name": "enumType", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + } + ] +} diff --git a/example/app/data/system/SIMOS/Dependency.json b/example/app/data/system/SIMOS/Dependency.json new file mode 100644 index 000000000..ba3296758 --- /dev/null +++ b/example/app/data/system/SIMOS/Dependency.json @@ -0,0 +1,32 @@ +{ + "name": "Dependency", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes a blueprint", + "attributes": [ + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "version", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "alias", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "protocol", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "address", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/system/SIMOS/Entity.json b/example/app/data/system/SIMOS/Entity.json new file mode 100644 index 000000000..afc641d00 --- /dev/null +++ b/example/app/data/system/SIMOS/Entity.json @@ -0,0 +1,44 @@ +{ + "name": "Entity", + "type": "dmss://system/SIMOS/Blueprint", + "description": "Blueprint for an entity.", + "attributes": [ + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "optional": true, + "attributeType": "string", + "label": "Name" + }, + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "label": "Type", + "default": "", + "optional": false + }, + { + "name": "description", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "default": "", + "optional": true, + "label": "Description" + }, + { + "name": "label", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "default": "", + "optional": true, + "label": "Label" + }, + { + "name": "_meta_", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/Meta", + "optional": true + } + ] +} diff --git a/example/app/data/system/SIMOS/Enum.json b/example/app/data/system/SIMOS/Enum.json new file mode 100644 index 000000000..d0023d02e --- /dev/null +++ b/example/app/data/system/SIMOS/Enum.json @@ -0,0 +1,35 @@ +{ + "name": "Enum", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes an enum", + "attributes": [ + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "description", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "labels", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "dimensions": "*" + }, + { + "name": "values", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "dimensions": "*" + } + ] +} diff --git a/example/app/data/system/SIMOS/File.json b/example/app/data/system/SIMOS/File.json new file mode 100644 index 000000000..6a44521ff --- /dev/null +++ b/example/app/data/system/SIMOS/File.json @@ -0,0 +1,44 @@ +{ + "name": "File", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes a file", + "attributes": [ + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "author", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "date", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "size", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "integer" + }, + { + "name": "filetype", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "content", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "binary", + "optional": true + } + ] +} diff --git a/example/app/data/system/SIMOS/InlineRecipeViewConfig.json b/example/app/data/system/SIMOS/InlineRecipeViewConfig.json new file mode 100644 index 000000000..55e6e8d96 --- /dev/null +++ b/example/app/data/system/SIMOS/InlineRecipeViewConfig.json @@ -0,0 +1,12 @@ +{ + "name": "InlineRecipeViewConfig", + "type": "dmss://system/SIMOS/Blueprint", + "extends": ["dmss://system/SIMOS/ViewConfig"], + "attributes": [ + { + "name": "recipe", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/UiRecipe" + } + ] +} diff --git a/example/app/data/system/SIMOS/Meta.json b/example/app/data/system/SIMOS/Meta.json new file mode 100644 index 000000000..db8feb416 --- /dev/null +++ b/example/app/data/system/SIMOS/Meta.json @@ -0,0 +1,54 @@ +{ + "name": "Meta", + "type": "dmss://system/SIMOS/Blueprint", + "description": "Meta information for the entity", + "attributes": [ + { + "name": "dependencies", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/Dependency", + "dimensions": "*", + "optional": true + }, + { + "name": "version", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "versionNote", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "createdBy", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "createdTimestamp", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "lastModifiedBy", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "lastModifiedTimestamp", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + } + ] +} diff --git a/example/app/data/system/SIMOS/NamedEntity.json b/example/app/data/system/SIMOS/NamedEntity.json new file mode 100644 index 000000000..b801558e9 --- /dev/null +++ b/example/app/data/system/SIMOS/NamedEntity.json @@ -0,0 +1,15 @@ +{ + "name": "NamedEntity", + "type": "dmss://system/SIMOS/Blueprint", + "description": "Blueprint for an entity which MUST have a name", + "extends": ["dmss://system/SIMOS/Entity"], + "attributes": [ + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "optional": false, + "attributeType": "string", + "label": "Name" + } + ] +} diff --git a/example/app/data/system/SIMOS/PDF.json b/example/app/data/system/SIMOS/PDF.json new file mode 100644 index 000000000..11fc8d7e7 --- /dev/null +++ b/example/app/data/system/SIMOS/PDF.json @@ -0,0 +1,42 @@ +{ + "name": "PDF", + "type": "dmss://system/SIMOS/Blueprint", + "description": "Contains metadata for a PDF, and a Blob type for the blob data", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "blob", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "id for the data blob", + "attributeType": "dmss://system/SIMOS/Blob", + "contained": true + }, + { + "name": "size", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Size of the PDF in bytes", + "attributeType": "integer", + "default": 0, + "optional": true, + "contained": true + }, + { + "name": "tags", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "List of tags used for indexing", + "attributeType": "string", + "dimensions": "*", + "optional": true, + "contained": true + }, + { + "name": "author", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Author of the PDF", + "attributeType": "string", + "default": "", + "contained": true, + "optional": true + } + ] +} diff --git a/example/app/data/system/SIMOS/Package.json b/example/app/data/system/SIMOS/Package.json new file mode 100644 index 000000000..1ba59421f --- /dev/null +++ b/example/app/data/system/SIMOS/Package.json @@ -0,0 +1,21 @@ +{ + "name": "Package", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This is a blueprint for a package that contains documents and other packages", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "isRoot", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean" + }, + { + "name": "content", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "object", + "contained": true, + "dimensions": "*", + "optional": false + } + ] +} diff --git a/example/app/data/system/SIMOS/RecipeLink.json b/example/app/data/system/SIMOS/RecipeLink.json new file mode 100644 index 000000000..64eabb950 --- /dev/null +++ b/example/app/data/system/SIMOS/RecipeLink.json @@ -0,0 +1,67 @@ +{ + "name": "RecipeLink", + "type": "dmss://system/SIMOS/Blueprint", + "description": "Blueprint for a RecipeLink. Used to associate types with a set of Storage- and UiRecipes", + "attributes": [ + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "contained": true, + "optional": false + }, + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "contained": true, + "optional": true + }, + { + "name": "description", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "contained": true, + "optional": true + }, + { + "name": "_blueprintPath_", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "contained": true, + "optional": false + }, + { + "name": "extends", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "default": [], + "optional": true, + "dimensions": "*" + }, + { + "name": "initialUiRecipe", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/UiRecipe", + "contained": true, + "optional": true, + "dimensions": "" + }, + { + "name": "uiRecipes", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/UiRecipe", + "contained": true, + "optional": true, + "dimensions": "*" + }, + { + "name": "storageRecipes", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/StorageRecipe", + "contained": true, + "optional": true, + "dimensions": "*" + } + ] +} diff --git a/example/app/data/system/SIMOS/Reference.json b/example/app/data/system/SIMOS/Reference.json new file mode 100644 index 000000000..01f1809af --- /dev/null +++ b/example/app/data/system/SIMOS/Reference.json @@ -0,0 +1,25 @@ +{ + "name": "Reference", + "type": "dmss://system/SIMOS/Blueprint", + "description": "Can be of type link, pointer or storage.", + "attributes": [ + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "referenceType", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": false, + "default": "link" + }, + { + "name": "address", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": false + } + ] +} diff --git a/example/app/data/system/SIMOS/ReferenceViewConfig.json b/example/app/data/system/SIMOS/ReferenceViewConfig.json new file mode 100644 index 000000000..bbba01e52 --- /dev/null +++ b/example/app/data/system/SIMOS/ReferenceViewConfig.json @@ -0,0 +1,18 @@ +{ + "name": "ReferenceViewConfig", + "type": "dmss://system/SIMOS/Blueprint", + "extends": ["dmss://system/SIMOS/ViewConfig"], + "attributes": [ + { + "name": "recipe", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "config", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "object", + "optional": true + } + ] +} diff --git a/example/app/data/system/SIMOS/Role.json b/example/app/data/system/SIMOS/Role.json new file mode 100644 index 000000000..ef957315a --- /dev/null +++ b/example/app/data/system/SIMOS/Role.json @@ -0,0 +1,26 @@ +{ + "name": "Role", + "type": "dmss://system/SIMOS/Blueprint", + "attributes": [ + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "label", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "authServerRoleName", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/system/SIMOS/StorageAttribute.json b/example/app/data/system/SIMOS/StorageAttribute.json new file mode 100644 index 000000000..630c24d85 --- /dev/null +++ b/example/app/data/system/SIMOS/StorageAttribute.json @@ -0,0 +1,56 @@ +{ + "name": "StorageAttribute", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes a storage recipe attribute", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Which attribute this StorageAttribute applies to.", + "attributeType": "string", + "default": "root" + }, + { + "name": "contained", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "WARNING: Change how the entity is stored. Changing this value will make current entities unavailable. If True, storageTypeAffinity will have no effect", + "attributeType": "boolean", + "optional": true, + "default": true + }, + { + "name": "storageAffinity", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Will be used to decide how the data will be stored", + "attributeType": "string", + "default": "default", + "enumType": "dmss://system/SIMOS/enums/StorageTypes", + "optional": true + }, + { + "name": "label", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Friendly name visible to user", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "description", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Description for the StoreAttribute", + "attributeType": "string", + "default": "", + "optional": true + }, + { + "name": "dimensions", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "dimensions", + "attributeType": "string", + "default": "", + "optional": true + } + ] +} diff --git a/example/app/data/system/SIMOS/StorageRecipe.json b/example/app/data/system/SIMOS/StorageRecipe.json new file mode 100644 index 000000000..20a83f419 --- /dev/null +++ b/example/app/data/system/SIMOS/StorageRecipe.json @@ -0,0 +1,30 @@ +{ + "name": "StorageRecipe", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes a storage recipe", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "name", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "default": "default" + }, + { + "name": "storageAffinity", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Will be used to decide how the data will be stored", + "attributeType": "string", + "default": "default", + "enumType": "dmss://system/SIMOS/enums/StorageTypes", + "optional": true + }, + { + "name": "attributes", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/StorageAttribute", + "dimensions": "*", + "contained": true + } + ] +} diff --git a/example/app/data/system/SIMOS/UiAttribute.json b/example/app/data/system/SIMOS/UiAttribute.json new file mode 100644 index 000000000..9ebe782f4 --- /dev/null +++ b/example/app/data/system/SIMOS/UiAttribute.json @@ -0,0 +1,123 @@ +{ + "name": "UiAttribute", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes an ui recipe attribute", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "attributeType", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "default": "dmss://system/SIMOS/BlueprintAttribute", + "optional": true + }, + { + "name": "label", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "uiRecipe", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "default": "", + "optional": true + }, + { + "name": "dimensions", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "arrayField", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "enumType", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "field", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "widget", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "Widget for this property", + "attributeType": "string", + "optional": true, + "enumType": "DMT-Internal/DMT/plugins/ui/edit/WidgetEnum", + "default": "" + }, + { + "name": "default", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "options", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "dmss://system/SIMOS/UiAttributeOption", + "dimensions": "*", + "contained": true, + "optional": true + }, + { + "name": "optional", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "optional": true, + "default": false + }, + { + "name": "contained", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "optional": true, + "default": true + }, + { + "name": "disabled", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "default": false, + "optional": true + }, + { + "name": "required", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "", + "attributeType": "boolean", + "default": false, + "optional": true + }, + { + "name": "mapping", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "collapsible", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "optional": true, + "default": false + } + ] +} diff --git a/example/app/data/system/SIMOS/UiAttributeOption.json b/example/app/data/system/SIMOS/UiAttributeOption.json new file mode 100644 index 000000000..a5a796054 --- /dev/null +++ b/example/app/data/system/SIMOS/UiAttributeOption.json @@ -0,0 +1,13 @@ +{ + "name": "UiAttributeOption", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes an ui recipe attribute option", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "value", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/system/SIMOS/UiRecipe.json b/example/app/data/system/SIMOS/UiRecipe.json new file mode 100644 index 000000000..e79386406 --- /dev/null +++ b/example/app/data/system/SIMOS/UiRecipe.json @@ -0,0 +1,49 @@ +{ + "name": "UiRecipe", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This describes uiRecipes", + "extends": ["dmss://system/SIMOS/NamedEntity"], + "attributes": [ + { + "name": "plugin", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": false + }, + { + "name": "showRefreshButton", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "optional": true, + "default": false + }, + { + "name": "category", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + }, + { + "name": "roles", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "dimensions": "*" + }, + { + "name": "config", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "object", + "contained": true, + "optional": true + }, + { + "name": "dimensions", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "" + } + ] +} diff --git a/example/app/data/system/SIMOS/Url.json b/example/app/data/system/SIMOS/Url.json new file mode 100644 index 000000000..ed7016f00 --- /dev/null +++ b/example/app/data/system/SIMOS/Url.json @@ -0,0 +1,20 @@ +{ + "name": "Url", + "type": "dmss://system/SIMOS/Blueprint", + "description": "This an object containing a url, ie. 'https://example.com'.", + "extends": ["dmss://system/SIMOS/Entity"], + "attributes": [ + { + "name": "value", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "This is the url string, ie. 'https://example.com'.", + "attributeType": "string" + }, + { + "name": "label", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "description": "The label for the url, will often be what is seen by the user instead of the url string itself.", + "attributeType": "string" + } + ] +} diff --git a/example/app/data/system/SIMOS/ViewConfig.json b/example/app/data/system/SIMOS/ViewConfig.json new file mode 100644 index 000000000..aab904072 --- /dev/null +++ b/example/app/data/system/SIMOS/ViewConfig.json @@ -0,0 +1,50 @@ +{ + "name": "ViewConfig", + "type": "dmss://system/SIMOS/Blueprint", + "attributes": [ + { + "name": "type", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string" + }, + { + "name": "scope", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true, + "default": "self" + }, + { + "name": "resolve", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "optional": true, + "default": true + }, + { + "name": "label", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "eds_icon", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "optional": true + }, + { + "name": "roles", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "string", + "dimensions": "*", + "optional": true + }, + { + "name": "showRefreshButton", + "type": "dmss://system/SIMOS/BlueprintAttribute", + "attributeType": "boolean", + "optional": true + } + ] +} diff --git a/example/app/data/system/SIMOS/enums/ActionTypes.json b/example/app/data/system/SIMOS/enums/ActionTypes.json new file mode 100644 index 000000000..301225a14 --- /dev/null +++ b/example/app/data/system/SIMOS/enums/ActionTypes.json @@ -0,0 +1,7 @@ +{ + "name": "ActionTypes", + "type": "dmss://system/SIMOS/Enum", + "description": "Different valid action types", + "values": ["separateResultFile", "resultInEntity"], + "labels": ["Separate Result File", "Result In Entity"] +} diff --git a/example/app/data/system/SIMOS/enums/AttributeTypes.json b/example/app/data/system/SIMOS/enums/AttributeTypes.json new file mode 100644 index 000000000..229fa42d3 --- /dev/null +++ b/example/app/data/system/SIMOS/enums/AttributeTypes.json @@ -0,0 +1,7 @@ +{ + "name": "AttributeTypes", + "type": "dmss://system/SIMOS/Enum", + "description": "This describes a list of attribute types", + "values": ["string", "integer", "number", "boolean", "blueprint"], + "labels": ["String", "Integer", "Number", "Boolean", "Blueprint"] +} diff --git a/example/app/data/system/SIMOS/enums/StatusEnum.json b/example/app/data/system/SIMOS/enums/StatusEnum.json new file mode 100644 index 000000000..a46099fd9 --- /dev/null +++ b/example/app/data/system/SIMOS/enums/StatusEnum.json @@ -0,0 +1,21 @@ +{ + "name": "StatusEnum", + "type": "dmss://system/SIMOS/Enum", + "description": "Valid Status values", + "labels": [ + "Not Started", + "Running", + "Canceled", + "Exited with error(s)", + "Completed with errors(s)", + "Complete" + ], + "values": [ + "notStarted", + "running", + "canceled", + "exitedWithErrors", + "completedWithErrors", + "complete" + ] +} diff --git a/example/app/data/system/SIMOS/enums/StorageTypes.json b/example/app/data/system/SIMOS/enums/StorageTypes.json new file mode 100644 index 000000000..01b402dfd --- /dev/null +++ b/example/app/data/system/SIMOS/enums/StorageTypes.json @@ -0,0 +1,7 @@ +{ + "name": "StorageTypes", + "type": "dmss://system/SIMOS/Enum", + "description": "Will be used to decide in which repository the data will be stored", + "values": ["default", "blob", "video", "large", "veryLarge"], + "labels": ["Default", "Blob data", "Video", "Large", "Very Large"] +} diff --git a/example/app/data/system/SIMOS/recipe_links/blueprint.json b/example/app/data/system/SIMOS/recipe_links/blueprint.json new file mode 100644 index 000000000..8d53507ae --- /dev/null +++ b/example/app/data/system/SIMOS/recipe_links/blueprint.json @@ -0,0 +1,49 @@ +{ + "type": "dmss://system/SIMOS/RecipeLink", + "_blueprintPath_": "dmss://system/SIMOS/Blueprint", + "uiRecipes": [ + { + "name": "Yaml", + "type": "dmss://system/SIMOS/UiRecipe", + "plugin": "@development-framework/dm-core-plugins/yaml" + }, + { + "name": "Edit", + "type": "dmss://system/SIMOS/UiRecipe", + "description": "Default blueprint edit", + "plugin": "@development-framework/dm-core-plugins/blueprint" + }, + { + "name": "Diagram", + "type": "dmss://system/SIMOS/UiRecipe", + "plugin": "blueprint-hierarchy" + } + ], + "storageRecipes": [ + { + "name": "DefaultStorageRecipe", + "type": "dmss://system/SIMOS/StorageRecipe", + "description": "", + "attributes": [ + { + "name": "attributes", + "type": "dmss://system/SIMOS/StorageAttribute", + "dimensions": "*", + "contained": true + }, + { + "name": "storageRecipes", + "type": "dmss://system/SIMOS/StorageAttribute", + "dimensions": "*", + "contained": true + }, + { + "name": "uiRecipes", + "type": "dmss://system/SIMOS/StorageAttribute", + "dimensions": "*", + "contained": true + } + ] + } + ] +} diff --git a/example/app/data/system/SIMOS/recipe_links/default.json b/example/app/data/system/SIMOS/recipe_links/default.json new file mode 100644 index 000000000..61bf90c26 --- /dev/null +++ b/example/app/data/system/SIMOS/recipe_links/default.json @@ -0,0 +1,19 @@ +{ + "type": "dmss://system/SIMOS/RecipeLink", + "_blueprintPath_": "_default_", + "uiRecipes": [ + { + "name": "Yaml", + "type": "dmss://system/SIMOS/UiRecipe", + "plugin": "@development-framework/dm-core-plugins/yaml", + "roles": ["dmss-admin"], + "category": "view" + }, + { + "name": "Edit", + "type": "dmss://system/SIMOS/UiRecipe", + "plugin": "@development-framework/dm-core-plugins/form", + "category": "edit" + } + ] +} diff --git a/example/app/data/system/SIMOS/recipe_links/entity.json b/example/app/data/system/SIMOS/recipe_links/entity.json new file mode 100644 index 000000000..93e6156e4 --- /dev/null +++ b/example/app/data/system/SIMOS/recipe_links/entity.json @@ -0,0 +1,12 @@ +{ + "type": "dmss://system/SIMOS/RecipeLink", + "_blueprintPath_": "dmss://system/SIMOS/Entity", + "uiRecipes": [ + { + "name": "DEFAULT_CREATE", + "type": "dmss://system/SIMOS/UiRecipe", + "description": "", + "plugin": "@development-framework/dm-core-plugins/form" + } + ] +} diff --git a/example/app/data/system/SIMOS/recipe_links/file.json b/example/app/data/system/SIMOS/recipe_links/file.json new file mode 100644 index 000000000..ac4c1af9b --- /dev/null +++ b/example/app/data/system/SIMOS/recipe_links/file.json @@ -0,0 +1,10 @@ +{ + "type": "dmss://system/SIMOS/RecipeLink", + "_blueprintPath_": "dmss://system/SIMOS/File", + "initialUiRecipe": { + "name": "Edit", + "type": "dmss://system/SIMOS/UiRecipe", + "description": "", + "plugin": "@development-framework/dm-core-plugins/yaml" + } +} diff --git a/example/app/data/system/SIMOS/recipe_links/package_recipe.json b/example/app/data/system/SIMOS/recipe_links/package_recipe.json new file mode 100644 index 000000000..084b29b3c --- /dev/null +++ b/example/app/data/system/SIMOS/recipe_links/package_recipe.json @@ -0,0 +1,26 @@ +{ + "type": "dmss://system/SIMOS/RecipeLink", + "_blueprintPath_": "dmss://system/SIMOS/Package", + "storageRecipes": [ + { + "name": "DEFAULT", + "type": "dmss://system/SIMOS/StorageRecipe", + "description": "", + "attributes": [ + { + "name": "content", + "type": "dmss://system/SIMOS/StorageAttribute", + "contained": false + } + ] + } + ], + "uiRecipes": [ + { + "name": "DEFAULT_CREATE", + "type": "dmss://system/SIMOS/UiRecipe", + "description": "", + "plugin": "@development-framework/dm-core-plugins/form" + } + ] +} diff --git a/example/app/data/system/SIMOS/recipe_links/pdf.json b/example/app/data/system/SIMOS/recipe_links/pdf.json new file mode 100644 index 000000000..25f421389 --- /dev/null +++ b/example/app/data/system/SIMOS/recipe_links/pdf.json @@ -0,0 +1,13 @@ +{ + "type": "dmss://system/SIMOS/RecipeLink", + "_blueprintPath_": "dmss://system/SIMOS/PDF", + "extends": ["dmss://system/SIMOS/NamedEntity", "_default_"], + "uiRecipes": [ + { + "name": "PDFView", + "type": "dmss://system/SIMOS/UiRecipe", + "description": "Embedded PDF View", + "plugin": "'@development-framework/dm-core-plugins/pdf" + } + ] +} diff --git a/example/app/data_sources/WorkflowDS.json b/example/app/data_sources/WorkflowDS.json new file mode 100644 index 000000000..257651673 --- /dev/null +++ b/example/app/data_sources/WorkflowDS.json @@ -0,0 +1,16 @@ +{ + "name": "WorkflowDS", + "repositories": { + "forecastDB": { + "type": "mongo-db", + "host": "db", + "port": 27017, + "username": "maf", + "password": "maf", + "tls": false, + "database": "workflowDS", + "collection": "default", + "data_types": [] + } + } +} diff --git a/example/app/data_sources/system_DS.json b/example/app/data_sources/system_DS.json new file mode 100644 index 000000000..d009ece86 --- /dev/null +++ b/example/app/data_sources/system_DS.json @@ -0,0 +1,15 @@ +{ + "name": "system", + "repositories": { + "a": { + "type": "mongo-db", + "host": "db", + "port": 27017, + "username": "maf", + "password": "maf", + "tls": false, + "database": "DMSS-core", + "collection": "DMSS-core" + } + } +} diff --git a/example/docker-compose.yaml b/example/docker-compose.yaml index 0b9cf4c30..fa3db9926 100644 --- a/example/docker-compose.yaml +++ b/example/docker-compose.yaml @@ -8,7 +8,7 @@ services: REDIS_PASSWORD: maf MONGO_PASSWORD: maf ENVIRONMENT: ${ENVIRONMENT:-local} -# RESET_DATA_SOURCE: off + RESET_DATA_SOURCE: off SECRET_KEY: sg9aeUM5i1JO4gNN8fQadokJa3_gXQMLBjSGGYcfscs= # Don't reuse this in production... # volumes: # - ../../data-modelling-storage-service/src:/code/src diff --git a/example/reset-app.sh b/example/reset-app.sh index 3d81b60d3..52bbb1686 100755 --- a/example/reset-app.sh +++ b/example/reset-app.sh @@ -42,16 +42,35 @@ service_is_ready() { service_is_ready main () { - if [ "$MODE" == "local" ]; then - echo "Upload Job API blueprints to DMSS" - eval $compose run --rm job-api dm --url http://dmss:5000 reset ../app - else - eval $compose run --rm job-api dm --token "$TOKEN" --url $VITE_DMSS_URL reset ../app - fi + for ds_file in ./app/data_sources/*; do + dm --url "$VITE_DMSS_URL" --token "$TOKEN" --force ds import $ds_file + done + + echo "Upload DMSS core blueprints to DMSS" + dm --token "$TOKEN" --url "$VITE_DMSS_URL" --force entities import --no-validate app/data/system/SIMOS system/ + echo "Creating DMSS lookup" + dm --token "$TOKEN" --url $VITE_DMSS_URL create-lookup DMSS "system/SIMOS/recipe_links" + + echo "Uploading application data" + for DS_NAME in ./app/data/*; do + if [ "$(basename $DS_NAME)" == "system" ]; then + echo "Skipping re-uploading CORE SIMOS package" + continue + fi + for ROOT_PACKAGE in $DS_NAME/*; do + dm --token "$TOKEN" --force --url $VITE_DMSS_URL entities import --no-validate "$ROOT_PACKAGE" "$(basename $DS_NAME)" + done + done echo "Upload plugins blueprints to DMSS" dm --token "$TOKEN" --url $VITE_DMSS_URL import-plugin-blueprints ../node_modules/@development-framework/dm-core-plugins - echo "Upload app/ to DMSS" - dm --force --token "$TOKEN" --url $VITE_DMSS_URL reset app + + # The entities contain cross DS references, and most therefore be validated after all entities in all DSs has been uploaded + for DS_NAME in ./app/data/*; do + for ROOT_PACKAGE in $DS_NAME/*; do + dm --token "$TOKEN" --url $VITE_DMSS_URL entities validate "$(basename $DS_NAME)/$(basename $ROOT_PACKAGE)" + done + done + echo "Creating lookup table" dm --token "$TOKEN" --url $VITE_DMSS_URL create-lookup exampleApplication DemoDataSource/recipes }