From d07cfe8089b7e6fecbb288f783439dc7752bda47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20P=C5=82aczek?= Date: Fri, 23 Mar 2018 08:34:49 +0100 Subject: [PATCH] Updated data presentation of image attributes and some minor css tweaks. --- index.py | 3 ++- static/style.css | 10 +++++----- templates/containers.html | 2 +- templates/image.html | 6 +++--- templates/images.html | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/index.py b/index.py index c0f03d4..9f5c50a 100644 --- a/index.py +++ b/index.py @@ -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')) diff --git a/static/style.css b/static/style.css index 24267a8..3b02de5 100644 --- a/static/style.css +++ b/static/style.css @@ -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; } \ No newline at end of file diff --git a/templates/containers.html b/templates/containers.html index e2c42ab..3d28523 100644 --- a/templates/containers.html +++ b/templates/containers.html @@ -2,7 +2,7 @@ {% block body %} -

Dashboard » {{ client_name }} » Containers

+

Dashboard » {{ client_name }} » Containers

All Containers diff --git a/templates/image.html b/templates/image.html index 309dc29..0ed69ff 100644 --- a/templates/image.html +++ b/templates/image.html @@ -6,7 +6,7 @@ }} {% endif %}

Details

-
-    {{ image.attrs | pprint }}
-
+
+
{{ image_attributes }}
+
{% endblock %} \ No newline at end of file diff --git a/templates/images.html b/templates/images.html index cbd3528..391e462 100644 --- a/templates/images.html +++ b/templates/images.html @@ -2,7 +2,7 @@ {% block body %} -

Dashboard » {{ client_name }} » Images

+

Dashboard » {{ client_name }} » Images

Dangling Images