blob: ec25c521fffbd0488867ca0b20ec65a8687cc7cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
<h3 class="image_list_heading"> {{ heading }} </h3>
{% if images %}
<table id="image_launch">
<tr>
<th>ID</th>
<th>Description</th>
<th colspan="2">Owner</th>
</tr>
{% for image in images %}
{% if image.id == ami.id %}
<td class="detail_wrapper" colspan="4">
<div id="{{ ami.id }}" class="image_detail">
<div class="column">
<div class="image_detail_item">
<span class="label">Owner: </span>
<span class="data">{{ ami.ownerId }}</span>
</div>
<div class="image_detail_item">
<span class="label">Description: </span>
<span class="data">{{ ami.description }}</span>
</div>
<div class="image_detail_item">
<span class="label">Location: </span>
<span class="data">{{ ami.location }}</span>
</div>
</div>
<div class="column">
<div class="image_detail_item">
<span class="label">ID: </span>
<span class="data">{{ ami.id }}</span>
</div>
<div class="image_detail_item">
<span class="label">Name: </span>
<span class="data">{% if ami.displayName %}{{ ami.displayName }}{%else%}{{ ami.id }}{% endif %}</span>
</div>
<div class="image_detail_item">
<span class="label">Type: </span>
<span class="data">{{ ami.type }}</span>
</div>
<div class="image_detail_item">
<span class="label">Architecture: </span>
<span class="data">{{ ami.architecture }}</span>
</div>
</div>
<div id="last" class="column">
{% if ami.is_public %}
<div id="public" class="privacy">Public Image</div>
{% else %}
<div id="private" class="privacy">Private Image</div>
{% endif %}
<a id="launch_{{ image.id }}" class="launch" href="{% url nova_images_launch project.projectname image.id %}" title="Click to launch image">Launch</a>
{% if can_modify or user.username == ami.ownerId %}
<a id="edit_image_link" href="{% url nova_images_update project.projectname ami.id %}">Edit Image</a>
{% endif %}
</div>
{% if can_modify or user.username == ami.ownerId %}
<span class="image_privacy">
<form id="privacy_{{ ami.id }}" action="{% url nova_images_privacy project.projectname ami.id %}" method="post" accept-charset="utf-8">
{% csrf_token %}
{% if ami.is_public %}
<input class="private" type="submit" value="Make Private" />
{% else %}
<input class="public" type="submit" value="Make Public" />
{% endif %}
</form>
</span>
<span class="delete">
<form id="delete_{{ ami.id }}" action="{% url nova_images_remove project.projectname ami.id %}" method="post" accept-charset="utf-8">
{% csrf_token %}
<input type="submit" value="Remove Image" />
</form>
</span>
{% endif %}
</div>
</td>
{% else %}
<tr class="{% cycle 'odd' 'even' %}">
<td class="image_id">
<a href="{% url nova_images_detail project.projectname image.id %}">{% if image.displayName %}{{ image.displayName }}{%else%}{{ image.id }}{% endif %}</a>
</td>
<td class="image_location odd">
{% if image.description %}
{{ image.description }}
{% else %}
{{ image.location }}
{% endif %}
</td>
<td class="image_owner_id">{{ image.ownerId }}</td>
<td class="image_launch_btn odd"><a id="launch_{{ image.id }}" class="launch" href="{% url nova_images_launch project.projectname image.id %}">Launch</a></td>
{#<td class="odd"><a class="ui-state-default ui-corner-all" onclick="$('#dlg_launch').dialog('open');">Launch</a></td>#}
</tr>
{% endif %}
{% endfor %}
</table>
{% else %}
<div class="ui-widget">
<div class="ui-state-highlight ui-corner-all">
<p>
<span class="ui-icon ui-icon-info"></span>
No images currently available.
</p>
</div>
</div>
{% endif %}
|