mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-26 16:15:25 +00:00
83 lines
3.4 KiB
HTML
83 lines
3.4 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
{% load icons %}
|
|
{% block title %}{% trans "User Profile" %} - {{ user }}{% endblock %}
|
|
{% block content %}
|
|
<!-- Page Heading -->
|
|
<div class="row">
|
|
<div class="col-lg-12">
|
|
<a href="{% url 'user_instance_create' user.id %}" class="btn btn-success btn-header float-right">
|
|
{% icon 'plus' %}
|
|
</a>
|
|
<h2 class="page-header">{% trans "User Profile" %}: {{ user }}</h2>
|
|
</div>
|
|
</div>
|
|
<!-- /.row -->
|
|
|
|
{% include 'errors_block.html' %}
|
|
|
|
<ul class="nav nav-tabs">
|
|
<li class="nav-item">
|
|
<a class="nav-link active" data-toggle="tab" href="#instances">{% trans "Instances" %}</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-toggle="tab" href="#public-keys">{% trans "Public Keys" %}</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
<div class="tab-pane active" id="instances">
|
|
<table class="table table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">#</th>
|
|
<th scope="col">{% trans "Instance" %}</th>
|
|
<th scope="col">{% trans "VNC" %}</th>
|
|
<th scope="col">{% trans "Resize" %}</th>
|
|
<th scope="col">{% trans "Delete" %}</th>
|
|
<th scope="colgroup" colspan="2">{% trans "Action" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for inst in user_insts %}
|
|
<tr>
|
|
<td>{{ forloop.counter }}</td>
|
|
<td><a href="{% url 'instances:instance' inst.instance.id %}">{{ inst.instance.name }}</a></td>
|
|
<td>{{ inst.is_vnc }}</td>
|
|
<td>{{ inst.is_change }}</td>
|
|
<td>{{ inst.is_delete }}</td>
|
|
<td style="width:5px;">
|
|
<a href="{% url 'user_instance_update' inst.id %}" class="btn btn-sm btn-secondary" title="{% trans "edit" %}">
|
|
{% icon 'pencil' %}
|
|
</a>
|
|
</td>
|
|
<td style="width:5px;">
|
|
<a class="btn btn-sm btn-secondary" href="{% url 'user_instance_delete' inst.id %}" title="{% trans "Delete" %}">
|
|
{% icon 'trash' %}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="tab-pane fade" id="public-keys">
|
|
<table class="table table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">{% trans "Key name" %}</th>
|
|
<th scope="col">{% trans "Public key" %}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for publickey in publickeys %}
|
|
<tr>
|
|
<td>{{ publickey.keyname }}</td>
|
|
<td title="{{ publickey.keypublic }}">{{ publickey.keypublic|truncatechars:64 }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|