From 0a9981980b69e0acc156e9be9757d68e18f7b632 Mon Sep 17 00:00:00 2001 From: Thomas Chopitea Date: Fri, 2 Feb 2024 11:03:36 +0100 Subject: [PATCH] Feat: Support DFIQ objects (#140) Corresponding PR in yeti has been merged --- docker/dev/Dockerfile | 2 - src/components/EditDFIQObject.vue | 99 ++++++++++ src/components/EditObject.vue | 7 +- src/components/ObjectList.vue | 14 +- src/components/RelatedObjects.vue | 12 +- src/components/YetiDFIQApproachTemplate.vue | 207 ++++++++++++++++++++ src/definitions/dfiqDefinitions.js | 63 ++++++ src/layouts/default/AppBar.vue | 1 + src/plugins/vuetify.ts | 22 ++- src/router/index.ts | 90 ++++++--- src/views/DFIQSearch.vue | 128 ++++++++++++ src/views/ObjectDetails.vue | 125 ++++++++---- 12 files changed, 679 insertions(+), 91 deletions(-) create mode 100644 src/components/EditDFIQObject.vue create mode 100644 src/components/YetiDFIQApproachTemplate.vue create mode 100644 src/definitions/dfiqDefinitions.js create mode 100644 src/views/DFIQSearch.vue diff --git a/docker/dev/Dockerfile b/docker/dev/Dockerfile index e6a7d38d..71f4add6 100644 --- a/docker/dev/Dockerfile +++ b/docker/dev/Dockerfile @@ -4,8 +4,6 @@ RUN apt update && apt install \ python3 \ git -RUN npm install -g n && n 16 - ADD . /app WORKDIR /app diff --git a/src/components/EditDFIQObject.vue b/src/components/EditDFIQObject.vue new file mode 100644 index 00000000..f21d3997 --- /dev/null +++ b/src/components/EditDFIQObject.vue @@ -0,0 +1,99 @@ + + + + + + + diff --git a/src/components/EditObject.vue b/src/components/EditObject.vue index 2c789e0e..0d5ba84b 100644 --- a/src/components/EditObject.vue +++ b/src/components/EditObject.vue @@ -30,6 +30,7 @@ import axios from "axios"; import { ENTITY_TYPES } from "@/definitions/entityDefinitions.js"; import { INDICATOR_TYPES } from "@/definitions/indicatorDefinitions.js"; import { OBSERVABLE_TYPES } from "@/definitions/observableDefinitions.js"; +import { DFIQ_TYPES } from "@/definitions/dfiqDefinitions.js"; import ObjectFields from "@/components/ObjectFields.vue"; import { objectTypeAnnotation } from "@babel/types"; @@ -55,7 +56,8 @@ export default { typeToEndpointMapping: { entity: "entities", observable: "observables", - indicator: "indicators" + indicator: "indicators", + dfiq: "dfiq" } }; }, @@ -101,7 +103,8 @@ export default { return ( ENTITY_TYPES.find(t => t.type === this.object.type) || INDICATOR_TYPES.find(t => t.type === this.object.type) || - OBSERVABLE_TYPES.find(t => t.type === this.object.type) + OBSERVABLE_TYPES.find(t => t.type === this.object.type) || + DFIQ_TYPES.find(t => t.type === this.object.type) ); }, editableFields() { diff --git a/src/components/ObjectList.vue b/src/components/ObjectList.vue index 4452f6a0..c4e877fb 100644 --- a/src/components/ObjectList.vue +++ b/src/components/ObjectList.vue @@ -16,13 +16,7 @@