2015-03-03 14:53:10 +00:00
|
|
|
{% extends "base.html" %}
|
|
|
|
{% load i18n %}
|
2015-04-06 07:51:50 +00:00
|
|
|
{% load staticfiles %}
|
2015-03-03 14:53:10 +00:00
|
|
|
{% block title %}{% trans "Secrets" %} - {{ compute.name }}{% endblock %}
|
2015-03-10 14:46:52 +00:00
|
|
|
{% block style %}
|
2015-04-06 07:51:50 +00:00
|
|
|
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}" />
|
2015-03-10 14:46:52 +00:00
|
|
|
{% endblock %}
|
2015-03-03 14:53:10 +00:00
|
|
|
{% block content %}
|
2019-07-31 08:03:48 +00:00
|
|
|
<!-- Page Heading -->
|
|
|
|
<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>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- /.row -->
|
2015-03-03 14:53:10 +00:00
|
|
|
|
2019-07-31 08:03:48 +00:00
|
|
|
{% include 'errors_block.html' %}
|
2015-03-03 14:53:10 +00:00
|
|
|
|
2019-07-31 08:03:48 +00:00
|
|
|
<div class="row">
|
|
|
|
{% if not secrets_all %}
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="alert alert-warning alert-dismissable">
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
|
|
|
<i class="fa fa-exclamation-triangle"></i> <strong>{% trans "Warning:" %}</strong> {% trans "Hypervisor doesn't have any Secrets" %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="col-lg-12">
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-hover sortable-theme-bootstrap" data-sortable>
|
|
|
|
<thead>
|
|
|
|
<tr class="active">
|
|
|
|
<th>{% trans "UUID" %}</th>
|
|
|
|
<th>{% trans "Type" %}</th>
|
|
|
|
<th>{% trans "Usage" %}</th>
|
|
|
|
<th data-sortable="false" style="width:90px;">{% trans "Action" %}</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for secret in secrets_all %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ secret.uuid }}</td>
|
|
|
|
<td>{% ifequal secret.usageType 0 %}
|
|
|
|
{% trans "volume" %}
|
|
|
|
{% endifequal %}
|
|
|
|
{% ifequal secret.usageType 1 %}
|
|
|
|
{% trans "iscsi" %}
|
|
|
|
{% endifequal %}
|
|
|
|
{% ifequal secret.usageType 2 %}
|
|
|
|
{% trans "ceph" %}
|
|
|
|
{% endifequal %}
|
|
|
|
</td>
|
|
|
|
<td>{{ secret.usage }}</td>
|
|
|
|
<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>
|
|
|
|
<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>
|
|
|
|
</form>
|
2015-03-06 11:59:27 +00:00
|
|
|
|
2019-07-31 08:03:48 +00:00
|
|
|
<!-- Modal -->
|
|
|
|
<div class="modal fade" id="editSecret{{ secret.uuid }}" tabindex="-1" role="dialog"
|
|
|
|
aria-labelledby="editSecret" aria-hidden="true">
|
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</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="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>
|
2015-03-04 13:43:29 +00:00
|
|
|
</div>
|
2019-07-31 08:03:48 +00:00
|
|
|
</form>
|
|
|
|
</div> <!-- /.modal-content -->
|
|
|
|
</div> <!-- /.tab-content -->
|
|
|
|
</div> <!-- /.modal-dialog -->
|
|
|
|
</div> <!-- /.modal -->
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2015-03-03 14:53:10 +00:00
|
|
|
</div>
|
2019-07-31 08:03:48 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2015-03-10 14:46:52 +00:00
|
|
|
{% endblock %}
|
|
|
|
{% block script %}
|
2015-04-06 07:51:50 +00:00
|
|
|
<script src="{% static "js/sortable.min.js" %}"></script>
|
2015-03-03 14:53:10 +00:00
|
|
|
{% endblock %}
|