From a6a007fff222d581b8253df04e6e788cfacab238 Mon Sep 17 00:00:00 2001 From: ewuerger Date: Fri, 20 Sep 2024 12:59:47 +0200 Subject: [PATCH] fix(capella2polarion): Fix `LogicalComponent` FA template --- capella2polarion_document_config.yaml.j2 | 8 ++++++-- ...uth.html.j2 => icd-interfaces-full_authority.html.j2} | 0 .../icd-interfaces-mixed_authority.html.j2 | 9 +++++++++ .../logical-architecture/logical-common.html.j2 | 2 +- ....html.j2 => logical-component-full-authority.html.j2} | 0 .../logical-component-mixed-authority.html.j2 | 8 ++++++++ 6 files changed, 24 insertions(+), 3 deletions(-) rename jinja/document_templates/{icd-interfaces-full_auth.html.j2 => icd-interfaces-full_authority.html.j2} (100%) create mode 100644 jinja/document_templates/icd-interfaces-mixed_authority.html.j2 rename jinja/document_templates/logical-architecture/{logical-component.html.j2 => logical-component-full-authority.html.j2} (100%) create mode 100644 jinja/document_templates/logical-architecture/logical-component-mixed-authority.html.j2 diff --git a/capella2polarion_document_config.yaml.j2 b/capella2polarion_document_config.yaml.j2 index 70f277d..55fc586 100644 --- a/capella2polarion_document_config.yaml.j2 +++ b/capella2polarion_document_config.yaml.j2 @@ -3,7 +3,11 @@ full_authority: - template_directory: jinja/document_templates - template: icd-interfaces-full_auth.html.j2 + template: icd-interfaces-full_authority.html.j2 + project_id: null # None -> Defaults to Sync Project + status_allow_list: + - draft + - open heading_numbering: True work_item_layouts: componentExchange: @@ -45,7 +49,7 @@ full_authority: {%- endif -%} {% endfor %} - template_directory: jinja/document_templates/logical-architecture - template: logical-component.html.j2 + template: logical-component-full-authority.html.j2 heading_numbering: True work_item_layouts: logicalComponent: diff --git a/jinja/document_templates/icd-interfaces-full_auth.html.j2 b/jinja/document_templates/icd-interfaces-full_authority.html.j2 similarity index 100% rename from jinja/document_templates/icd-interfaces-full_auth.html.j2 rename to jinja/document_templates/icd-interfaces-full_authority.html.j2 diff --git a/jinja/document_templates/icd-interfaces-mixed_authority.html.j2 b/jinja/document_templates/icd-interfaces-mixed_authority.html.j2 new file mode 100644 index 0000000..05316b8 --- /dev/null +++ b/jinja/document_templates/icd-interfaces-mixed_authority.html.j2 @@ -0,0 +1,9 @@ +{# + Copyright DB InfraGO AG and contributors + SPDX-License-Identifier: Apache-2.0 +#} + +{% from 'icd-interfaces-common.html.j2' import render_content %} + +{% set physical_link = model.by_uuid(physical_link) %} +{{ render_content(physical_link, model, session) }} \ No newline at end of file diff --git a/jinja/document_templates/logical-architecture/logical-common.html.j2 b/jinja/document_templates/logical-architecture/logical-common.html.j2 index d87bf30..1fe4b8e 100644 --- a/jinja/document_templates/logical-architecture/logical-common.html.j2 +++ b/jinja/document_templates/logical-architecture/logical-common.html.j2 @@ -10,7 +10,7 @@ {% macro render_content(component, model, session) %} {{ heading(2, component.name, session)}} {{ heading(3, "Logical Component Context", session)}} - The figure below provides an overview of the logical subsystem and external entities that either require the functionality of {{ object.name }} (expect outputs) or enable it (provide inputs). The figure also identifies the interfaces between the subsystem and its environment. + The figure below provides an overview of the logical subsystem and external entities that either require the functionality of {{ component.name }} (expect outputs) or enable it (provide inputs). The figure also identifies the interfaces between the subsystem and its environment. {{ insert_work_item(component, session) }} {{ heading(3, "Logical interface partners of " + component.name, session) }} diff --git a/jinja/document_templates/logical-architecture/logical-component.html.j2 b/jinja/document_templates/logical-architecture/logical-component-full-authority.html.j2 similarity index 100% rename from jinja/document_templates/logical-architecture/logical-component.html.j2 rename to jinja/document_templates/logical-architecture/logical-component-full-authority.html.j2 diff --git a/jinja/document_templates/logical-architecture/logical-component-mixed-authority.html.j2 b/jinja/document_templates/logical-architecture/logical-component-mixed-authority.html.j2 new file mode 100644 index 0000000..415a827 --- /dev/null +++ b/jinja/document_templates/logical-architecture/logical-component-mixed-authority.html.j2 @@ -0,0 +1,8 @@ +{# + Copyright DB InfraGO AG and contributors + SPDX-License-Identifier: Apache-2.0 +#} +{% from 'logical-common.html.j2' import render_content %} + +{% set component = model.by_uuid(uuid) %} +{{ render_content(component, model, session) }}