mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
Add logs and block for templates
This commit is contained in:
parent
55e93a9087
commit
5960e94da5
35 changed files with 183 additions and 29 deletions
|
|
@ -8,10 +8,12 @@
|
|||
{% include 'sidebar.html' %}
|
||||
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
|
||||
{% include 'create_comp_block.html' %}
|
||||
|
||||
<h1 class="page-header">{{ compute.name }}</h1>
|
||||
|
||||
{% include 'errors.html' %}
|
||||
{% include 'errors_block.html' %}
|
||||
|
||||
<h4>{% trans "Basic details" %}</h4>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,12 @@
|
|||
{% include 'sidebar.html' %}
|
||||
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
|
||||
{% include 'create_comp_block.html' %}
|
||||
|
||||
<h1 class="page-header">Computes</h1>
|
||||
|
||||
{% include 'errors.html' %}
|
||||
{% include 'errors_block.html' %}
|
||||
|
||||
<div class="row">
|
||||
{% if computes_info %}
|
||||
|
|
|
|||
5
templates/create_comp_block.html
Normal file
5
templates/create_comp_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<button type="button" class="btn btn-success pull-right">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
5
templates/create_iface_block.html
Normal file
5
templates/create_iface_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<button type="button" class="btn btn-success pull-right">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
5
templates/create_inst_block.html
Normal file
5
templates/create_inst_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<button type="button" class="btn btn-success pull-right">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
<h1 class="page-header">{{ compute.name }}</h1>
|
||||
|
||||
{% include 'errors.html' %}
|
||||
{% include 'errors_block.html' %}
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
|||
5
templates/create_net_block.html
Normal file
5
templates/create_net_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<button type="button" class="btn btn-success pull-right">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
5
templates/create_secret_block.html
Normal file
5
templates/create_secret_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<button type="button" class="btn btn-success pull-right">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
5
templates/create_stg_block.html
Normal file
5
templates/create_stg_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<button type="button" class="btn btn-success pull-right">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
5
templates/create_user_block.html
Normal file
5
templates/create_user_block.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<button type="button" class="btn btn-success pull-right">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{% if error_messages %}
|
||||
{% for error in error_messages %}
|
||||
<div class="alert alert-danger alert-dismissible" role="danger">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong>Error:</strong> {{ error }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
8
templates/errors_block.html
Normal file
8
templates/errors_block.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{% if error_messages %}
|
||||
{% for error in error_messages %}
|
||||
<div class="alert alert-danger alert-dismissible" role="danger">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<strong>Error:</strong> {{ error }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
@ -8,12 +8,12 @@
|
|||
{% include 'sidebar.html' %}
|
||||
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
{% if request.user.is_superuser %}
|
||||
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
{% endif %}
|
||||
|
||||
{% include 'create_inst_block.html' %}
|
||||
|
||||
<h1 class="page-header">{{ vname }}</h1>
|
||||
|
||||
{% include 'errors.html' %}
|
||||
{% include 'errors_block.html' %}
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,11 +8,12 @@
|
|||
{% include 'sidebar.html' %}
|
||||
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
|
||||
{% include 'create_inst_block.html' %}
|
||||
|
||||
<h1 class="page-header">Instances</h1>
|
||||
|
||||
{% include 'errors.html' %}
|
||||
|
||||
{% include 'errors_block.html' %}
|
||||
|
||||
<div class="table-responsive">
|
||||
{% if request.user.is_superuser %}
|
||||
|
|
@ -24,7 +25,7 @@
|
|||
<th>VCPU</th>
|
||||
<th>Memory</th>
|
||||
<th>Status</th>
|
||||
<th style="width:164px;">Actions</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -38,7 +39,7 @@
|
|||
<span class="glyphicon glyphicon-tasks" aria-hidden="true"></span> <a href="{% url 'compute' host.0 %}">{{ host.1 }}</a>
|
||||
</td>
|
||||
<td>{{ info.vcpu }}</td>
|
||||
<td>{{ info.memory }}</td>
|
||||
<td>{{ info.memory }} {% trans "MB" %}</td>
|
||||
<td>{% ifequal info.status 1 %}
|
||||
<span class="label label-success">{% trans "Running" %}</span>
|
||||
{% endifequal %}
|
||||
|
|
@ -115,7 +116,7 @@
|
|||
<th>VCPU</th>
|
||||
<th>Memory</th>
|
||||
<th>Status</th>
|
||||
<th style="width:164px;">Actions</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
|||
20
templates/showlogs.html
Normal file
20
templates/showlogs.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% block title %}{% trans "Logs" %}{% endblock %}
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
{% include 'sidebar.html' %}
|
||||
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
|
||||
<h1 class="page-header">{% trans "Logs" %}</h1>
|
||||
|
||||
{% include 'errors_block.html' %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
{% if request.user.is_superuser %}
|
||||
<li {% active request "^/compute" %}><a href="{% url 'computes' %}"><span class="glyphicon glyphicon-tasks" aria-hidden="true"></span></a></li>
|
||||
<li {% active request "^/user" %}><a href="{% url 'users' %}"><span class="glyphicon glyphicon-user" aria-hidden="true"></span></a></li>
|
||||
<li {% active request "^/showlogs" %}><a href="{% url 'showlogs' %}"><span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span></a></li>
|
||||
{% endif %}
|
||||
<li class="bottom-sticky">
|
||||
<a href="#"><span class="glyphicon glyphicon-cog" aria-hidden="true"></span></a>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
<h1 class="page-header">{{ user.username }}</h1>
|
||||
|
||||
{% include 'errors.html' %}
|
||||
{% include 'errors_block.html' %}
|
||||
|
||||
{{ user }}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<button type="button" class="btn btn-success pull-right"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
|
||||
<h1 class="page-header">{% trans "Accounts" %}</h1>
|
||||
|
||||
{% include 'errors.html' %}
|
||||
{% include 'errors_block.html' %}
|
||||
|
||||
{% for user in users %}
|
||||
<div id="{{ user.username }}" class="col-xs-6 col-sm-4">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue