Skip to content

Commit

Permalink
fix(capella2polarion): Try to fix the jinja descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ewuerger committed Sep 20, 2024
1 parent 5c29980 commit 73c12dd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 28 deletions.
20 changes: 0 additions & 20 deletions capella2polarion_document_config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 0 additions & 2 deletions jinja/element_templates/common_macros.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@
{% macro description(obj) %}
{% if obj.description %}
<p>{{ obj.description | safe }}</p>
{% else %}
<p style="color:red">No description available.</p>
{% endif %}
{% endmacro %}

Expand Down
5 changes: 2 additions & 3 deletions jinja/element_templates/component_exchange.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

<h1>Logical Interface {{ object.name }}</h1>
<h2>Interface Partners</h2>
<span style="font-weight: bold;font-size: 12pt;line-height: 1.5;">Interface Partners</span>
<p>This logical interface connects between {{ object.source.owner | link_work_item}} and {{ object.target.owner | link_work_item}}.</p>
<p>The need for the interface is explained and requirements are provided so that the interface partners could find an appropriate interface definition (solution).</p>
<h2>Enabled interactions</h2>
<p>The figure below provides an overview of the behaviors that depend on this interface:</p>
{{ object.context_diagram.as_svg | safe }}
{{ object.context_diagram.as_html_img | safe }}
<p>This interface enables the following interactions:</p>
<table {{table_attributes}}>
<thead>
Expand Down
4 changes: 1 addition & 3 deletions jinja/element_templates/logical_component.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@

{% from 'common_macros.html.j2' import show_other_attributes, description %}

<h1>{{ object.name }}</h1>

{{ description(object) | safe }}

<p>
The figure below provides an overview of the logical subsystem and external entities that either require the functionality of <b>{{ object.name }}</b> (expect outputs) or enable it (provide inputs). The figure also identifies the interfaces between the subsystem and its environment.
</p>

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


{%- for fnc in object.allocated_functions -%}
Expand Down

0 comments on commit 73c12dd

Please sign in to comment.