create capsul and capsuls list page working

This commit is contained in:
2020-05-11 15:13:20 -05:00
parent 452f236c6b
commit 231d1ed7c0
11 changed files with 210 additions and 124 deletions

View File

@ -1,10 +1,16 @@
{% extends 'console-base.html' %}
{% extends 'base.html' %}
{% block title %}Console{% endblock %}
{% block consoletitle %}Console{% endblock %}
{% block consolecontent %}
{% if vms[0] is defined %}
{% block content %}
<div class="third-margin">
<h1>Capsuls</h1>
</div>
<div class="third-margin">
{% if has_vms %}
<div class="row third-margin justify-end">
<a href="/console/create">Create Capsul</a>
</div>
<table>
<thead>
<tr>
@ -17,21 +23,20 @@
</thead>
<tbody>
{% for vm in vms %}
<a href="/console/{{ vm['id'] }}">
<tr>
<td>{{ vm["id"] }}</td>
<td><a href="/console/{{ vm['id'] }}">{{ vm["id"] }}</a></td>
<td>{{ vm["size"] }}</td>
<td>{{ vm["ipv4"] }}</td>
<td class="{{ vm['ipv4_status'] }}">{{ vm["ipv4"] }}</td>
<td>{{ vm["os"] }}</td>
<td>{{ vm["created"] }}</td>
</tr>
</a>
{% endfor %}
</tbody>
</table>
{% else %}
You don't have any Capsuls running. <a href="/console/create">Create one</a> today!
{% endif %}
</div>
{% endblock %}
{% block pagesource %}/templates/capsuls.html{% endblock %}