set ids for intra-page-links

This commit is contained in:
Sophie Schiller 2021-01-02 14:55:04 +01:00
parent 51840f17cd
commit 596bf8f682

View file

@ -55,7 +55,11 @@ def render_services_per_host(host, data):
<span class="badge badge-{}">{}</span>
</li>
"""
services_hostname_template = """<div class="card-header d-flex justify-content-between align-items-center"><h4><a href="#{0}">{0}</a></h4> <span class="badge badge-{1}">{2}</span></div>"""
services_hostname_template = """
<div id="{0}" class="card-header d-flex justify-content-between align-items-center">
<h4><a href="#{0}">{0}</a></h4>
<span class="badge badge-{1}">{2}</span>
</div>"""
for service in sorted(data['services']['results'], key=lambda x: x['attrs']['display_name']):
if service['attrs']['host_name'] == host: