Commit cd49dbc9 authored by Leo Pound Singer's avatar Leo Pound Singer

Improve styling of platform information section

parent adc5b341
...@@ -53,6 +53,12 @@ ...@@ -53,6 +53,12 @@
<input id=gracedb-host class=form-control readonly value="{{ conf.lvalert_host }}"> <input id=gracedb-host class=form-control readonly value="{{ conf.lvalert_host }}">
</div> </div>
</div> </div>
<div class="form-group col-md">
<label for=gracedb-host>GWCelery Host</label>
<div class="input-group">
<input id=gracedb-host class=form-control readonly value="{{ hostname }}">
</div> </div>
</div> </div>
</div> </div>
...@@ -290,27 +296,23 @@ ...@@ -290,27 +296,23 @@
</div> </div>
<div class="card mb-3"> <div class="card mb-3">
<div class=card-header> <div class=card-header>
Platform information Platform Information
<div class=card-body>
GWCelery host: <code>{{ hostname }}</code>
Platform: <code>{{ platform }}</code>
<div class="card mb-3">
<div class=card-header>
Installed Packages
</div> </div>
<div class=card-body> <div class=card-body>
<ul> <dl class=row>
{% for distribution in distributions %} <dt class=col-sm-3>Platform</dt>
<li><a href="{{distribution.metadata['Name']}}/">{{distribution.metadata['Name']}}</a> {{distribution.version}}</li> <dd class=col-sm-9>{{platform}}</dd>
{% endfor %} <dt class=col-sm-3>Python Version</dt>
</ul> <dd class=col-sm-9 style="white-space: pre-line">{{python_version}}</dd>
<dt class=col-sm-3>Python Packages</dt>
<dd class=col-sm-9>
<ul class=list-unstyled>
{% for distribution in distributions %}
<li><a href="{{distribution.metadata['Name']}}/">{{distribution.metadata['Name']}}</a> {{distribution.version}}</li>
{% endfor %}
</div> </div>
</div> </div>
</div> </div>
...@@ -3,6 +3,7 @@ import datetime ...@@ -3,6 +3,7 @@ import datetime
import platform import platform
import re import re
import socket import socket
import sys
try: try:
from importlib import metadata from importlib import metadata
...@@ -33,7 +34,8 @@ def index(): ...@@ -33,7 +34,8 @@ def index():
hostname=socket.getfqdn(), hostname=socket.getfqdn(),
distributions=distributions, distributions=distributions,
platform=platform.platform(), platform=platform.platform(),
versions=get_versions()) versions=get_versions(),
def take_n(n, iterable): def take_n(n, iterable):
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