Lay out database component.

This commit is contained in:
Santiago Lamora 2019-11-20 11:04:35 +01:00
parent 98c5482f5b
commit 85f1d433a3
1 changed files with 39 additions and 21 deletions

View File

@ -5,30 +5,48 @@
<h1>{{ service.verbose_name }}</h1> <h1>{{ service.verbose_name }}</h1>
<p>{{ service.description }}</p> <p>{{ service.description }}</p>
<table class="table table-hover">
<thead class="thead-dark">
<tr> {% for database in object_list %}
{% for field_name in service.fields %} <div class="card">
<th scope="col">{{ field_name }}</th> <div class="card-header row">
{% endfor %} <div class="col-md-8">
</tr> <strong>{{ database.name }}</strong>
</thead> </div>
<tbody> <div class="col-md">
{% for resource in object_list %} Type: <strong>{{ database.type }}</strong>
<tr> </div>
<td>{{ resource.name }}</td> <div class="col-md text-right">
<td>{{ resource.type }}</td> associated to: <strong>{{ database.domain|default:"-" }}</strong>
<td> <div class="card-collapse-button d-inline-block nav-item dropdown">
<button class="btn dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
</button>
</div>
</div>
</div><!-- /card-header-->
<div class="card-body row">
<div class="col-md-4">
<h4>Database users</h4>
<ul>
{% for user in resource.users %} {% for user in resource.users %}
{{ user.username }} <li>{{ user.username }}</li>
{% empty %} {% empty %}
No users for this database. <li>No users for this database.</li>
{% endfor %} {% endfor %}
</td> </ul>
</tr> </div>
<div class="col-md-2 border-left border-right">
<h4>Database usage</h4>
<div class="progress">
<div class="progress-bar w-75" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100">75%</div>
</div>
</div>
<div class="col-md-6 text-right">
<a class="btn btn-secondary" href="#open-phpmyadmin">Open database manager</a>
</div>
</div>
</div>
{% endfor %} {% endfor %}
</tbody>
{% include "musician/components/table_paginator.html" %} {% include "musician/components/table_paginator.html" %}
</table>
{% endblock %} {% endblock %}