link hostnames, not service names #3
1 changed files with 3 additions and 3 deletions
|
@ -51,11 +51,11 @@ def render_services_per_host(host, data):
|
||||||
|
|
||||||
services_template = """
|
services_template = """
|
||||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||||
<a href="#{0}">{0}</a>
|
{}
|
||||||
<span class="badge badge-{1}">{2}</span>
|
<span class="badge badge-{}">{}</span>
|
||||||
</li>
|
</li>
|
||||||
"""
|
"""
|
||||||
services_hostname_template = """<div class="card-header d-flex justify-content-between align-items-center"><h4>{}</h4> <span class="badge badge-success">OK</span></div>"""
|
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>"""
|
||||||
|
|
||||||
for service in sorted(data['services']['results'], key=lambda x: x['attrs']['display_name']):
|
for service in sorted(data['services']['results'], key=lambda x: x['attrs']['display_name']):
|
||||||
if service['attrs']['host_name'] == host:
|
if service['attrs']['host_name'] == host:
|
||||||
|
|
Loading…
Reference in a new issue