Commit 7b8ba624 authored by Roland Denis's avatar Roland Denis

Full description as directive attribute

To allow right display of nested nodes
parent d03c95a5
Pipeline #9673 failed with stages
in 12 seconds
...@@ -122,6 +122,7 @@ class Meso(Directive): ...@@ -122,6 +122,7 @@ class Meso(Directive):
'servicename': multiline_list(str), 'servicename': multiline_list(str),
'etptnumber': float, 'etptnumber': float,
'accesspolicy': multiline_list(str), 'accesspolicy': multiline_list(str),
'fulldescription': str,
} }
has_content = True has_content = True
...@@ -132,6 +133,8 @@ class Meso(Directive): ...@@ -132,6 +133,8 @@ class Meso(Directive):
for key in self.option_spec: for key in self.option_spec:
node[key] = self.options.get(key, None) node[key] = self.options.get(key, None)
# FIXME: nested parse of fulldescription (e.g. for url formatting)
self.state.nested_parse(self.content, self.content_offset, node) self.state.nested_parse(self.content, self.content_offset, node)
return [node] return [node]
......
...@@ -42,7 +42,6 @@ def build_meso(meso): ...@@ -42,7 +42,6 @@ def build_meso(meso):
return { return {
'name': meso['name'], 'name': meso['name'],
'options': filter_options(directives.Meso, meso), 'options': filter_options(directives.Meso, meso),
'content': meso.get('fullDescription', ''),
'cluster_list': list(map(build_cluster, meso.get('clusterList', []))), 'cluster_list': list(map(build_cluster, meso.get('clusterList', []))),
'storage_list': list(map(build_storage, meso.get('storageList', []))), 'storage_list': list(map(build_storage, meso.get('storageList', []))),
} }
...@@ -119,10 +118,6 @@ _json_mesolist_rst_template = _json_mesolist_rst_env.from_string(dedent(""" ...@@ -119,10 +118,6 @@ _json_mesolist_rst_template = _json_mesolist_rst_env.from_string(dedent("""
{{ l }} {{ l }}
{%- endfor %} {%- endfor %}
{% for l in meso["content"] | splitlines %}
{{ l }}
{%- endfor %}
.. cluster_list:: .. cluster_list::
{% for cluster in meso["cluster_list"] %} {% for cluster in meso["cluster_list"] %}
......
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
</div> </div>
{% endif %} {% endif %}
</h4> </h4>
<p> <p>{{ meso['fulldescription'] }}</p>
{% endif %}
{% if footer %}
</p>
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="plus-minus plus" onclick="$(this).closest('.card-body').find('.collapse').collapse('toggle'); $(this).toggleClass('plus minus')"></div> <div class="plus-minus plus" onclick="$(this).closest('.card-body').find('.collapse').collapse('toggle'); $(this).toggleClass('plus minus')"></div>
...@@ -70,6 +67,10 @@ ...@@ -70,6 +67,10 @@
</p> </p>
{% endif %} {% endif %}
</div> </div>
<div>
{% endif %}
{% if footer %}
</div>
</div> </div>
</div> </div>
{% endif %} {% endif %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment