From 73c12dde145e854f256ae433f011116fa0480adb Mon Sep 17 00:00:00 2001 From: ewuerger Date: Fri, 20 Sep 2024 17:30:14 +0200 Subject: [PATCH] fix(capella2polarion): Try to fix the jinja descriptions --- capella2polarion_document_config.yaml.j2 | 20 ------------------- jinja/element_templates/common_macros.html.j2 | 2 -- .../component_exchange.html.j2 | 5 ++--- .../logical_component.html.j2 | 4 +--- 4 files changed, 3 insertions(+), 28 deletions(-) diff --git a/capella2polarion_document_config.yaml.j2 b/capella2polarion_document_config.yaml.j2 index 0107d14..e152602 100644 --- a/capella2polarion_document_config.yaml.j2 +++ b/capella2polarion_document_config.yaml.j2 @@ -55,22 +55,12 @@ full_authority: logicalComponent: fields_at_start: - id - fields_at_end: - - context_diagram - - allocated_functions logicalActor: fields_at_start: - id - fields_at_end: - - context_diagram - - allocated_functions componentExchange: fields_at_start: - id - fields_at_end: - - context_diagram - - allocated_functional_exchanges - - exchange_items exchangeItem: show_title: False instances: @@ -92,22 +82,12 @@ mixed_authority: logicalComponent: fields_at_start: - id - fields_at_end: - - context_diagram - - allocated_functions logicalActor: fields_at_start: - id - fields_at_end: - - context_diagram - - allocated_functions componentExchange: fields_at_start: - id - fields_at_end: - - context_diagram - - allocated_functional_exchanges - - exchange_items exchangeItem: show_title: False sections: diff --git a/jinja/element_templates/common_macros.html.j2 b/jinja/element_templates/common_macros.html.j2 index 5f3522c..5bfdcf7 100644 --- a/jinja/element_templates/common_macros.html.j2 +++ b/jinja/element_templates/common_macros.html.j2 @@ -126,8 +126,6 @@ {% macro description(obj) %} {% if obj.description %}

{{ obj.description | safe }}

- {% else %} -

No description available.

{% endif %} {% endmacro %} diff --git a/jinja/element_templates/component_exchange.html.j2 b/jinja/element_templates/component_exchange.html.j2 index 3018fc5..d049158 100644 --- a/jinja/element_templates/component_exchange.html.j2 +++ b/jinja/element_templates/component_exchange.html.j2 @@ -14,13 +14,12 @@ The {{ source | link_work_item }} shall provide {{ object | link_work_item }} to {{ target | link_work_item }} so that the {{ target | link_work_item }} could {{ target_function | link_work_item }}. {% endmacro %} -

Logical Interface {{ object.name }}

-

Interface Partners

+Interface Partners

This logical interface connects between {{ object.source.owner | link_work_item}} and {{ object.target.owner | link_work_item}}.

The need for the interface is explained and requirements are provided so that the interface partners could find an appropriate interface definition (solution).

Enabled interactions

The figure below provides an overview of the behaviors that depend on this interface:

-{{ object.context_diagram.as_svg | safe }} +{{ object.context_diagram.as_html_img | safe }}

This interface enables the following interactions:

diff --git a/jinja/element_templates/logical_component.html.j2 b/jinja/element_templates/logical_component.html.j2 index 3c8fd12..c324869 100644 --- a/jinja/element_templates/logical_component.html.j2 +++ b/jinja/element_templates/logical_component.html.j2 @@ -5,15 +5,13 @@ {% from 'common_macros.html.j2' import show_other_attributes, description %} -

{{ object.name }}

- {{ description(object) | safe }}

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.

-{{- object.context_diagram.as_svg | safe -}} +{{- object.context_diagram.as_html_img | safe -}} {%- for fnc in object.allocated_functions -%}