From 381c6f656e40f2e105ab8a1ea437e40fb35c4967 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Thu, 12 Dec 2019 10:48:40 +0100 Subject: [PATCH] Code style of domain details card. --- musician/templates/musician/dashboard.html | 62 +++++++++++++++++----- musician/views.py | 9 ++++ 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/musician/templates/musician/dashboard.html b/musician/templates/musician/dashboard.html index aefea23..03cb6c9 100644 --- a/musician/templates/musician/dashboard.html +++ b/musician/templates/musician/dashboard.html @@ -32,22 +32,56 @@

Little description of what to be expected...

{% for domain in domains %} -
-
-

{{ domain.name }}

-
- {% for service in "123"|make_list %} -
-
-
{% cycle 'Mail' 'Mailing list' 'Databases' %}
-
- Card image cap -
-

Some quick example text to build on the card title and make up the bulk of the card's - content.

+
+
+
+
+ {{ domain.name }} +
+
+ {% trans "view configuration" %} +
+
+ {% trans "Expiration date" %}: {{ domain.expiration_date|date:"SHORT_DATE_FORMAT" }} +
+
+
+
+

{% trans "Mail" %}

+

+

+ 3 mail addresses created
+ 1 mail address left +

+
+
+

{% trans "Mail list" %}

+

+
+
+

{% trans "Databases" %}

+

+

+ 1 database created
+ 20 MB of 45MB +

+
+
+

{% trans "Software as a Service" %}

+

+

Nothing installed

+
+
+

{% trans "Disk usage" %}

+

+
+ {% include "musician/components/usage_progress_bar.html" with detail=domain.usage %} +
+
- {% endfor card %}
+ {% endfor %} + {% endblock %} diff --git a/musician/views.py b/musician/views.py index 271c753..9ce35e4 100644 --- a/musician/views.py +++ b/musician/views.py @@ -55,6 +55,15 @@ class DashboardView(CustomContextMixin, UserTokenRequiredMixin, TemplateView): 'percent': 50, }, } + + for domain in raw_domains: + domain['usage'] = { + 'usage': 300, + 'total': 650, + 'unit': 'MB', + 'percent': 50, + } + # TODO(@slamora) update when backend supports notifications notifications = []