~devcamcar/horizon/trunk

« back to all changes in this revision

Viewing changes to django-openstack/src/django_openstack/templates/django_openstack/nova/keypairs/index.html

  • Committer: Devin Carlen
  • Date: 2011-06-18 05:59:37 UTC
  • Revision ID: devin.carlen@gmail.com-20110618055937-aobwm0buvviijz3o
Moved codebase to GitHub

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{% extends "django_openstack/nova/keypairs/base.html" %}
2
 
{% load i18n %}
3
 
 
4
 
{% block title %} - Cloud Computing{% endblock %}
5
 
 
6
 
{% block headerjs %}
7
 
{{ block.super }}
8
 
<script type="text/javascript" src="/media/dashboard/js/jquery.form.js"></script>
9
 
{% endblock %}
10
 
 
11
 
{% block content %}
12
 
  <div id="page_head">
13
 
    <h2 id="page_heading">{% trans "Keys" %}</h2>
14
 
    <p id="page_description">{% trans "Key pairs are ssh credentials which are injected into images when they are launched. Creating a new key pair registers the public key and downloads the private key (a pem file). <em>Protect and use the key as a normal private key.</em>" %}</p>
15
 
  </div>
16
 
 
17
 
  {% include "django_openstack/_messages.html" %}
18
 
 
19
 
  <div id="instances">
20
 
  {% include "django_openstack/nova/keypairs/_list.html" %}
21
 
  </div>
22
 
 
23
 
  <div class="dash_block first">
24
 
    <form id="frm_key_create" action="{% url nova_keypairs_add project.projectname %}" method="post">
25
 
      {% csrf_token %}
26
 
      <input id="js" name="js" type="hidden" value="0" />
27
 
      <fieldset>
28
 
        <h3>Create New Keypair</h3>
29
 
        {% include "django_openstack/nova/keypairs/_create_form.html" %}
30
 
        <input id="keypair_create" class="create" type="submit" value="Create" />
31
 
      </fieldset>
32
 
    </form>
33
 
  </div>
34
 
 
35
 
  <div id="dlg_confirm" title="Confirm Termination">
36
 
    <p>{% trans "Are you sure you wish to delete key" %} <span id="spn_delete_key_name"></span>?</p>
37
 
  </div>
38
 
{% endblock %}
39
 
 
40
 
{% block footerjs %}
41
 
{{ block.super }}
42
 
<script type="text/javascript">
43
 
  $(function() { $('#js').val('1'); });
44
 
 
45
 
  {% if download_key %}
46
 
  $(function() { window.location = '{% url nova_keypairs_download project.projectname download_key %}'; });
47
 
  {% endif %}
48
 
 
49
 
  $(function() {
50
 
    $('.form-key-delete').submit(function() {
51
 
      _key_name = $(this).children(':first').val()
52
 
      $('#spn_delete_key_name').text(_key_name);
53
 
      $('#dlg_confirm').dialog('open');
54
 
      return false;
55
 
    });
56
 
 
57
 
    $('#dlg_confirm').dialog({
58
 
      buttons: {
59
 
       'Ok': onConfirmOK,
60
 
       'Cancel': function() { $(this).dialog('close'); }
61
 
      },
62
 
        autoOpen: false,
63
 
        resizable: false,
64
 
        width: 500,
65
 
        height: 200
66
 
      });
67
 
 
68
 
  });
69
 
 
70
 
  var _terminateID = null;
71
 
 
72
 
  function onConfirmOK() {
73
 
    $(this).dialog('close');
74
 
    form = document.getElementById('form_key_delete_' + _key_name);
75
 
    if(form) form.submit();
76
 
  }
77
 
</script>
78
 
{% endblock %}