1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

bootstrap 4.5 & Bootswatch Themes

This commit is contained in:
catborise 2020-05-19 19:53:54 +03:00 committed by catborise
parent e2b7b77da0
commit 0e5840498e
230 changed files with 19531 additions and 5077 deletions

View file

@ -1,7 +1,7 @@
{% load i18n %}
{% if request.user.is_superuser %}
<a href="#AddSecret" type="button" class="btn btn-success pull-right" data-toggle="modal">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
<a href="#AddSecret" type="button" class="btn btn-success float-right" data-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span>
</a>
<!-- Modal Secret -->
@ -10,12 +10,12 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">{% trans "Create New Secret" %}</h4>
<h5 class="modal-title">{% trans "Create New Secret" %}</h5>
</div>
<div class="modal-body">
<form class="form-horizontal" method="post" action="" role="form">{% csrf_token %}
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Ephemeral" %}</label>
<form method="post" action="" role="form">{% csrf_token %}
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Ephemeral" %}</label>
<div class="col-sm-6">
<select name="ephemeral" class="form-control">
<option value="no">{% trans "no" %}</option>
@ -23,8 +23,8 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Private" %}</label>
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Private" %}</label>
<div class="col-sm-6">
<select name="private" class="form-control">
<option value="no">{% trans "no" %}</option>
@ -32,8 +32,8 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Usage" %}</label>
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Usage" %}</label>
<div class="col-sm-6">
<select name="usage_type" class="form-control">
<option value="ceph">{% trans "ceph" %}</option>
@ -43,14 +43,14 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Data" %}</label>
<label class="col-sm-3 col-form-label">{% trans "Data" %}</label>
<div class="col-sm-6">
<input type="text" name="data" class="form-control" value="" required pattern="[a-z0-9\. ]+"/>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
<button type="submit" class="btn btn-primary" name="create">{% trans "Create" %}</button>
</div>
</form>

View file

@ -10,30 +10,32 @@
<div class="row">
<div class="col-lg-12">
{% include 'create_secret_block.html' %}
<h1 class="page-header">{% trans "Secrets" %}</h1>
<ol class="breadcrumb">
<li class="active">
<i class="fa fa-dashboard"></i> <a href="{% url 'overview' compute.id %}">{% trans "Overview" %}</a>
</li>
<li>
<i class="fa fa-server"></i> <a href="{% url 'instances' compute.id %}">{% trans "Instances" %}</a>
</li>
<li>
<i class="fa fa-hdd-o"></i> <a href="{% url 'storages' compute.id %}">{% trans "Storages" %}</a>
</li>
<li>
<i class="fa fa-sitemap"></i> <a href="{% url 'networks' compute.id %}">{% trans "Networks" %}</a>
</li>
<li>
<i class="fa fa-wifi"></i> <a href="{% url 'interfaces' compute.id %}">{% trans "Interfaces" %}</a>
</li>
<li>
<i class="fa fa-filter"></i> <a href="{% url 'nwfilters' compute.id %}">{% trans "NWFilters" %}</a>
</li>
<li>
<i class="fa fa-key"></i> {% trans "Secrets" %}
</li>
</ol>
<h2 class="page-header">{% trans "Secrets" %}</h2>
<nav aria-label="breadcrumb">
<ol class="breadcrumb bg-light shadow-sm">
<li class="breadcrumb-item active">
<a href="{% url 'overview' compute.id %}"><i class="fa fa-dashboard"></i> {% trans "Overview" %}</a>
</li>
<li class="breadcrumb-item">
<a href="{% url 'instances' compute.id %}"><i class="fa fa-server"></i> {% trans "Instances" %}</a>
</li>
<li class="breadcrumb-item">
<a href="{% url 'storages' compute.id %}"><i class="fa fa-hdd-o"></i> {% trans "Storages" %}</a>
</li>
<li class="breadcrumb-item">
<a href="{% url 'networks' compute.id %}"><i class="fa fa-sitemap"></i> {% trans "Networks" %}</a>
</li>
<li class="breadcrumb-item">
<a href="{% url 'interfaces' compute.id %}"><i class="fa fa-wifi"></i> {% trans "Interfaces" %}</a>
</li>
<li class="breadcrumb-item">
<a href="{% url 'nwfilters' compute.id %}"><i class="fa fa-filter"></i> {% trans "NWFilters" %}</a>
</li>
<li class="breadcrumb-item">
<span class="font-weight-bold"><i class="fa fa-key"></i> {% trans "Secrets" %}</span>
</li>
</ol>
</nav>
</div>
</div>
<!-- /.row -->
@ -43,9 +45,9 @@
<div class="row">
{% if not secrets_all %}
<div class="col-lg-12">
<div class="alert alert-warning alert-dismissable">
<div class="alert alert-warning alert-dismissable shadow-sm">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning:" %}</strong> {% trans "Hypervisor doesn't have any Secrets" %}
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning" %}:</strong> {% trans "Hypervisor doesn't have any Secrets" %}
</div>
</div>
{% else %}
@ -54,7 +56,7 @@
<table class="table table-hover sortable-theme-bootstrap" data-sortable>
<thead>
<tr class="active">
<th>{% trans "UUID" %}</th>
<th scope="col">{% trans "UUID" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Usage" %}</th>
<th data-sortable="false" style="width:90px;">{% trans "Action" %}</th>
@ -63,7 +65,7 @@
<tbody>
{% for secret in secrets_all %}
<tr>
<td>{{ secret.uuid }}</td>
<th scope="row">{{ secret.uuid }}</th>
<td>{% ifequal secret.usageType 0 %}
{% trans "volume" %}
{% endifequal %}
@ -78,11 +80,11 @@
<td>
<form action="" method="post" role="form">{% csrf_token %}
<input type="hidden" name="uuid" value="{{ secret.uuid }}"/>
<a data-toggle="modal" href="#editSecret{{ secret.uuid }}" class="btn btn-sm btn-default" title="{% trans "Edit" %}">
<span class="glyphicon glyphicon-pencil"></span>
<a data-toggle="modal" href="#editSecret{{ secret.uuid }}" class="btn btn-sm btn-primary" title="{% trans "Edit" %}">
<span class="fa fa-pencil"></span>
</a>
<button type="submit" class="btn btn-sm btn-default" name="delete" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<span class="glyphicon glyphicon-trash"></span>
<button type="submit" class="btn btn-sm btn-danger" name="delete" title="{% trans "Delete" %}" onclick="return confirm('{% trans "Are you sure?" %}')">
<span class="fa fa-trash"></span>
</button>
</form>
@ -92,24 +94,24 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{% trans "Set secret value" %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">{% trans "Set secret value" %}</h4>
</div>
<div class="tab-content">
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
<div class="form-group">
<label class="col-sm-3 control-label">{% trans "Value" %}</label>
<div class="modal-body">
<form method="post" role="form">{% csrf_token %}
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Value" %}</label>
<input type="hidden" name="uuid" value="{{ secret.uuid }}">
<div class="col-sm-6">
<input type="hidden" name="uuid" value="{{ secret.uuid }}">
<input type="text" name="value" class="form-control" value="{{ secret.value }}" maxlength="45" required pattern="[a-zA-Z0-9]$+">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
<button type="submit" class="btn btn-primary" name="set_value">{% trans "Set" %}</button>
</div>
</form>
</div> <!-- /.modal-content -->
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
<button type="submit" class="btn btn-primary" name="set_value">{% trans "Set" %}</button>
</div>
</form>
</div> <!-- /.tab-content -->
</div> <!-- /.modal-dialog -->
</div> <!-- /.modal -->