Updated data presentation of image attributes and some minor css tweaks.

This commit is contained in:
Krzysztof Płaczek
2018-03-23 08:34:49 +01:00
parent a26863e74f
commit d07cfe8089
5 changed files with 12 additions and 11 deletions

View File

@@ -68,7 +68,8 @@ def images_all_action(client_name):
def image_action(client_name, image_id):
if client_name in clients:
image = clients[client_name].images.get(image_id)
return render_template('image.html', image=image, client_name=client_name)
return render_template('image.html', image=image, image_attributes=json.dumps(image.attrs, indent=4),
client_name=client_name)
else:
flash('Client name \'%s\' not found' % client_name)
return redirect(url_for('index'))

View File

@@ -62,9 +62,9 @@ min-width: 140px;
table tbody tr:nth-child(2n+1) {
background-color: #f9f9f9; }
h1 { font-size: 2.75em; margin: 16px 32px 16px 32px;}
h2 { font-size: 2em; margin: 16px 32px 16px 16px;}
h3 { font-size: 1.5em; margin: 16px 32px 16px 32px;}
h1 { font-size: 2.75em; margin: 16px 32px 16px 0;}
h2 { font-size: 2em; margin: 16px 32px 16px 0;}
h3 { font-size: 1.5em; margin: 16px 32px 16px 0;}
a {color: dodgerblue; text-decoration: none; }
a:hover { text-decoration: underline; }
@@ -118,10 +118,10 @@ list-style-position: inside;
margin: 8px 8px;
}
.container_attribute {
.container_attribute, .image_attribute {
}
.container_attribute-details {
.container_attribute-details, .image_attribute-details {
white-space: pre;
line-height: 1.1em;
}

View File

@@ -2,7 +2,7 @@
{% block body %}
<h1><a href="/">Dashboard</a> &raquo; {{ client_name }} &raquo; Containers</h1>
<h1><a href="/">Dashboard</a> &raquo; {{ client_name }} &raquo; <a href="/{{ client_name }}/containers">Containers</a></h1>
<a class="button--link" href="/{{ client_name }}/containers/all">All Containers</a>

View File

@@ -6,7 +6,7 @@
}} {% endif %}</h1>
<h2>Details</h2>
<pre>
{{ image.attrs | pprint }}
</pre>
<div class="image_attribute">
<div class="image_attribute-details">{{ image_attributes }}</div>
</div>
{% endblock %}

View File

@@ -2,7 +2,7 @@
{% block body %}
<h1><a href="/">Dashboard</a> &raquo; {{ client_name }} &raquo; Images</h1>
<h1><a href="/">Dashboard</a> &raquo; {{ client_name }} &raquo; <a href="/{{ client_name }}/images">Images</a></h1>
<a class="button--link" href="/{{ client_name }}/images/dangling">Dangling Images</a>