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

Improve styling of platform information section

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