polish dashboards
This commit is contained in:
parent
ddcad32cb1
commit
168fbde4e5
2 changed files with 49 additions and 15 deletions
|
@ -29,7 +29,15 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for deploy in deployments %}
|
||||
{% if deploy.enabled == False %}<tr class="danger">{% else %}<tr>{% endif %}
|
||||
{% if deploy.enabled == False %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
{% if deploy.warning == True %}
|
||||
<tr class="warning">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td><a href="{{ url_for('admin.dashboard', user_pid=deploy.user_id) }}">{{ deploy.owner.email }}</a></td>
|
||||
<td>{{ deploy.machine_id }}</td>
|
||||
<td>{{ deploy.machine_alias }}</font></td>
|
||||
|
@ -63,7 +71,15 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for service in services %}
|
||||
{% if service.enabled == False %}<tr class="danger">{% else %}<tr>{% endif %}
|
||||
{% if service.enabled == False %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
{% if service.warning == True %}
|
||||
<tr class="warning">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td><a href="{{ url_for('admin.dashboard', user_pid=service.user_id) }}">{{ service.owner.email }}</a></td>
|
||||
<td>{{ service.category }}</td>
|
||||
<td>{{ service.description }}</td>
|
||||
|
@ -94,7 +110,15 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
{% for domain in domains %}
|
||||
{% if domain.enabled == False %}<tr class="danger">{% else %}<tr>{% endif %}
|
||||
{% if domain.enabled == False %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
{% if domain.warning == True %}
|
||||
<tr class="warning">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td><a href="{{ url_for('admin.dashboard', user_pid=domain.user_id) }}">{{ domain.owner.email }}</a></td>
|
||||
<td><b><a href="http://{{ domain.fqdn }}">{{ domain.fqdn }}</a></b></td>
|
||||
<td>{{ domain.date_expire }}</td>
|
||||
|
|
|
@ -138,6 +138,7 @@ addEventListener("DOMContentLoaded", function() {
|
|||
<th>HDD</th>
|
||||
<th>Network</th>
|
||||
<th>Control</th>
|
||||
<th>Remote</th>
|
||||
<th>Time Left</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -151,13 +152,14 @@ addEventListener("DOMContentLoaded", function() {
|
|||
<td data-title="Disk">{{ deploy.machine_hdd }} GB</td>
|
||||
<td data-title="Network">{% for addr in deploy.machine_addresses %} {{ addr.ip }}<br /> {% endfor %}</td>
|
||||
<td data-title="Control"> </td>
|
||||
<td data-title="Remote"> </td>
|
||||
<td data-title="Time Left"><button class="btn btn-default btn-success" onclick="window.open('/vmanager/activate/{{ deploy.machine_id }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Activate</td>
|
||||
{% else %}
|
||||
{% if deploy.warning == True %}
|
||||
<tr class="bg-warning">
|
||||
{% else %}
|
||||
{% else %}
|
||||
{% if deploy.warning == True %}
|
||||
<tr class="warning">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td data-title="Name"><a class="rrd" data-toggle="tooltip" title="ID# {{ deploy.machine_id }}<br />Deployment state: {{ status[deploy.machine_id] }}"><b>{% if status[deploy.machine_id] == 'running' %}<font color="green">{% else %}<font color="red">{% endif %}{{ deploy.machine_alias }}</font></b></a></td>
|
||||
<td data-title="CPU"><a class="rrd" data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['cpu'] }}' />">{{ deploy.machine_cpu }} Cores</a></td>
|
||||
<td data-title="Memory"><a class="rrd" data-toggle="tooltip" title="<img src='data:image/png;base64,{{ rrd[deploy.machine_id]['mem'] }}' />">{{ deploy.machine_mem }} MB</a></td>
|
||||
|
@ -172,7 +174,7 @@ addEventListener("DOMContentLoaded", function() {
|
|||
<td data-title="Remote">{% if status[deploy.machine_id] == 'running' %}
|
||||
<button class="btn btn-default btn-info" onclick="window.open('/vmanager/vmvnc/{{ deploy.machine_id }}', '_blank');"><span class="glyphicon glyphicon-console" aria-hidden="true"></span> Console</button>
|
||||
{% if deploy.warning == True %}
|
||||
<td data-title="Time Left"><button class="btn btn-default btn-success" onclick="window.open('/vmanager/activate/{{ deploy.machine_id }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Activate</button></td>
|
||||
<td data-title="Time Left"><button class="btn btn-default btn-success" onclick="window.open('/vmanager/activate/{{ deploy.machine_id }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Renew ({{ deploy.daysleft }} days left)</button></td>
|
||||
{% else %}
|
||||
<td data-title="Time Left">{{ deploy.daysleft }} day(s)</td>
|
||||
{% endif %}
|
||||
|
@ -209,15 +211,23 @@ addEventListener("DOMContentLoaded", function() {
|
|||
{% if service.enabled == False %}
|
||||
<tr class="danger">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% if service.warning == True %}
|
||||
<tr class="warning">
|
||||
{% else %}
|
||||
<tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<td data-title="Category">{{ service.category }}</td>
|
||||
<td data-title="Description" >{{ service.description }}</td>
|
||||
<td data-title="Last Charged">{{ moment(service.date_last_charge).format('lll') }} ({{ moment(service.date_last_charge).fromNow() }})</td>
|
||||
{% if service.warning == True or service.enabled == True %}
|
||||
{% if service.enabled == False %}
|
||||
<td data-title="Time Left"><button class="btn btn-default btn-success" onclick="window.open('/smanager/activate/{{ service.pid }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Activate</button></td>
|
||||
{% else %}
|
||||
{% if service.warning == True %}
|
||||
<td data-title="Time Left"><button class="btn btn-default btn-success" onclick="window.open('/smanager/activate/{{ service.pid }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Renew ({{ service.daysleft }} days left)</button></td>
|
||||
{% else %}
|
||||
<td data-title="Time Left">{{ service.daysleft }} day(s)</td>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</tr >
|
||||
{% endfor %}
|
||||
|
@ -248,14 +258,14 @@ addEventListener("DOMContentLoaded", function() {
|
|||
<tr>
|
||||
<td data-title="Domain"><b><a href="http://{{ domain.fqdn }}">{{ domain.fqdn }}</a></b></td>
|
||||
<td data-title="Expiry Date">{{ domain.date_expire }}</td>
|
||||
{% if domain.enabled == True %}
|
||||
{% if domain.enabled == False %}
|
||||
<td data-title="Time Left">EXPIRED</td>
|
||||
{% else %}
|
||||
{% if domain.warning == True %}
|
||||
<td data-title="Time Left"><button class="btn btn-default btn-success" onclick="window.open('/dmanager/activate/{{ domain.pid }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Activate</button></td>
|
||||
<td data-title="Time Left"><button class="btn btn-default btn-warning" onclick="window.open('/dmanager/activate/{{ domain.pid }}');"><span class="glyphicon glyphicon-bell" aria-hidden="true"></span> Renew </button></td>
|
||||
{% else %}
|
||||
<td data-title="Time Left">{{ domain.daysleft }} day(s)</td>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<td data-title="Time Left">EXPIRED</td>
|
||||
{% endif %}
|
||||
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue