finishing port for keypairs
This commit is contained in:
@@ -4,5 +4,6 @@
|
||||
<li><a {% if current_sidebar == "overview" %} class="active" {% endif %} href="{% url dash_overview %}">Overview</a></li>
|
||||
<li><a {% if current_sidebar == "instances" %} class="active" {% endif %} href="{% url dash_instances request.user.tenant %}">Instances</a></li>
|
||||
<li><a {% if current_sidebar == "images" %} class="active" {% endif %} href="{% url dash_images request.user.tenant %}">Images</a></li>
|
||||
<li><a {% if current_sidebar == "keypairs" %} class="active" {% endif %} href="{% url dash_keypairs request.user.tenant %}">Keypairs</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<form id="form_delete_{{keypair.id}}" class="form-delete" method="post">
|
||||
<form id="form_delete_{{keypair.name}}" class="form-delete" method="post">
|
||||
{% csrf_token %}
|
||||
{% for hidden in form.hidden_fields %}
|
||||
{{hidden}}
|
||||
{% endfor %}
|
||||
<input name="keypair_id" type="hidden" value="{{keypair.id}}" />
|
||||
<input id="delete_{{keypair.id}}" class="delete" type="submit" value="Delete" />
|
||||
<input name="keypair_id" type="hidden" value="{{keypair.name}}" />
|
||||
<input id="delete_{{keypair.name}}" class="delete" type="submit" value="Delete" />
|
||||
</form>
|
||||
|
||||
10
openstack-dashboard/dashboard/templates/_keypair_form.html
Normal file
10
openstack-dashboard/dashboard/templates/_keypair_form.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<form id="keypair_form" method="post">
|
||||
{% csrf_token %}
|
||||
{% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
|
||||
{% for field in form.visible_fields %}
|
||||
{{ field.label_tag }}
|
||||
{{ field.errors }}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
<input type="submit" value="Create Keypair" class="large-rounded" />
|
||||
</form>
|
||||
@@ -1,12 +1,10 @@
|
||||
<table id="images" style="width: 100%">
|
||||
<table id="keypairs" style="width: 100%">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Created</th>
|
||||
<th>Updated</th>
|
||||
<th colspan="2">Status</th>
|
||||
<th>Fingerprint</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{% for image in images %}
|
||||
{% for keypair in keypairs %}
|
||||
<tr class="{% cycle 'odd' 'even' %}">
|
||||
<td>{{ keypair.name }}</td>
|
||||
<td>{{ keypair.fingerprint }}</td>
|
||||
|
||||
@@ -29,75 +29,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include '_kepair_list.html' %}
|
||||
{% include '_keypair_list.html' %}
|
||||
|
||||
{% endif %}
|
||||
<a id="keypairs_create_link" href="{% url dash_keypairs_create request.user.tenant %}">Create New Keypair >></a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% extends 'base.html' %}
|
||||
{% load sidebar_tags %}
|
||||
|
||||
{% block nav_pages %}
|
||||
{% sidebar_select keypairs %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
{% block main_content %}
|
||||
<div id='page_header'>
|
||||
<h2><span>Compute:</span> Keypairs</h2>
|
||||
<p class='desc'><span>—</span> Keypairs blah blah.</p>
|
||||
</div>
|
||||
{% include "_messages.html" %}
|
||||
{% if keypairs %}
|
||||
<div class='main_content'>
|
||||
<div class='table_title wide'>
|
||||
<h3>Keypairs</h3>
|
||||
<div class='search'>
|
||||
<form action='' method='post'>
|
||||
<fieldset>
|
||||
<label for='table_search'>Search</label>
|
||||
<input id='table_search' name='search' type='text' value='' />
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<table id='keypairs' class='wide'>
|
||||
<tr id='headings'>
|
||||
<th>Name</th>
|
||||
<th>Fingerprint</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tbody class='main'>
|
||||
{% for keypair in keypairs %}
|
||||
<tr class="{% cycle 'odd' 'even' %}">
|
||||
<td>{{ keypair.name }}</td>
|
||||
<td>{{ keypair.fingerprint }}</td>
|
||||
<td id="actions">
|
||||
<ul>
|
||||
<li>
|
||||
<form id="form_keypair_{{ keypair.name }}" class="form-keypair-delete" method="post" action="{% url novaO_keypair_delete keypair.name %}" >
|
||||
{% csrf_token %}
|
||||
<input name="name" type="hidden" value="{{ keypair.name }}" />
|
||||
<input id="delete_{{keypair.name}}" title="keypair: {{keypair.name}}" class="terminate delete_link" type="submit" value="Delete" />
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<div class="status_box info">
|
||||
<h2>Info</h2>
|
||||
<p>There are currently no keypairs.<br/><br/>You can create a keypair here <a href='{% url novaO_images %}'>Images Page.</a></p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<a id="keypair_create_link" href="{% url novaO_keypair_create %}">Create New Keypair>></a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock main_content %}
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{% extends 'dash_base.html' %}
|
||||
{# list of user's instances #}
|
||||
{# standard nav, sidebar, list of instances in main #}
|
||||
|
||||
{% block sidebar %}
|
||||
{% with current_sidebar="keypairs" %}
|
||||
{{block.super}}
|
||||
{% endwith %}
|
||||
{% endblock %}
|
||||
|
||||
{% block headerjs %}
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$(function(){
|
||||
$(".dash_block .left h3").hide()
|
||||
$("form input[type='submit']").click(function(e){
|
||||
$("form").hide("fast")
|
||||
$(".dash_block h3").show("fast")
|
||||
console.log($(this).parent().submit());
|
||||
e.preventDefault()
|
||||
})
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block main %}
|
||||
<div id='page_header'>
|
||||
<h2><span>Dashboard:</span> Keypairs </h2>
|
||||
<p class='desc'><span>—</span> Create a keypair </p>
|
||||
</div>
|
||||
|
||||
{% include "_messages.html" %}
|
||||
|
||||
|
||||
<div class="main_content">
|
||||
<div class="dash_block wide form">
|
||||
<div class='title_block'>
|
||||
<h3>Create User</h3>
|
||||
</div>
|
||||
<div class="left">
|
||||
<h3>Your private key is being downloaded.</h3>
|
||||
{% include '_keypair_form.html' with form=create_form %}
|
||||
<h3><a href="{% url dash_keypairs request.user.tenant %}"><< Return to keypairs list</a></h3>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<h3>Description:</h3>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus vitae est urna. Phasellus sagittis, sem posuere hendrerit mattis, velit risus viverra enim, tempus dapibus sem turpis ac erat.</p>
|
||||
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed mollis ligula nec lacus mollis eu laoreet lectus porta. </p>
|
||||
<p>Sed iaculis mauris et est consectetur egestas. Praesent dolor libero, semper sed aliquet</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user