delete and toggle images
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<form id="form_delete_{{image.id}}" class="form-delete" method="post">
|
||||
{% csrf_token %}
|
||||
{% for hidden in form.hidden_fields %}
|
||||
{{hidden}}
|
||||
{% endfor %}
|
||||
<input name="image_id" type="hidden" value="{{image.id}}" />
|
||||
<input id="delete_{{image.id}}" class="delete" type="submit" value="Delete" />
|
||||
</form>
|
||||
@@ -0,0 +1,46 @@
|
||||
{% load parse_date %}
|
||||
|
||||
<table class="wide">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Public</th>
|
||||
<th>Created</th>
|
||||
<th>Updated</th>
|
||||
<th colspan="2">Status</th>
|
||||
</tr>
|
||||
{% for image in images %}
|
||||
<tr class="{% cycle 'odd' 'even' %}">
|
||||
<td>{{image.id}}</td>
|
||||
<td>{{image.name}}</td>
|
||||
<td>{{image.size}}</td>
|
||||
<td>{{image.is_public}}</td>
|
||||
<td>{{image.created_at|parse_date}}</td>
|
||||
<td>{{image.updated_at|parse_date}}</td>
|
||||
<td>{{image.status|upper}}</td>
|
||||
<td id="actions">
|
||||
<ul>
|
||||
<li>{% include "_delete_image.html" with form=delete_form %}</li>
|
||||
<li>{% include "_toggle_image.html" with form=toggle_form %}</li>
|
||||
|
||||
<li><a href="{#% url syspanel_images_update image.id %#}">Edit</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="details">
|
||||
<td class="properties" colspan="9">
|
||||
<ul>
|
||||
<li><span>Location: </span>{{image.properties.image_location}}</li>
|
||||
<li><span>State: </span>{{image.properties.image_state}}</li>
|
||||
<li><span>Kernel ID: </span>{{image.properties.kernel_id}}</li>
|
||||
<li><span>Ramdisk ID: </span>{{image.properties.ramdisk_id}}</li>
|
||||
<li><span>Architecture: </span>{{image.properties.architecture}}</li>
|
||||
<li><span>Project ID: </span>{{image.container_format}}</li>
|
||||
<li><span>Container Format: </span>{{image.properties.project_id}}</li>
|
||||
<li><span>Disk Format: </span>{{image.disk_format}}</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
@@ -0,0 +1,8 @@
|
||||
<form id="form_toggle_{{image.id}}" class="form-toggle" method="post">
|
||||
{% csrf_token %}
|
||||
{% for hidden in form.hidden_fields %}
|
||||
{{hidden}}
|
||||
{% endfor %}
|
||||
<input name="image_id" type="hidden" value="{{image.id}}" />
|
||||
<input id="toggle_{{image.id}}" class="toggle" type="submit" value="Toggle Public" />
|
||||
</form>
|
||||
@@ -1,5 +1,4 @@
|
||||
{% extends 'syspanel_base.html' %}
|
||||
{% load parse_date %}
|
||||
{# list of user's instances #}
|
||||
{# standard nav, sidebar, list of instances in main #}
|
||||
|
||||
@@ -30,49 +29,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="wide">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
<th>Public</th>
|
||||
<th>Created</th>
|
||||
<th>Updated</th>
|
||||
<th colspan="2">Status</th>
|
||||
</tr>
|
||||
{% for image in images %}
|
||||
<tr class="{% cycle 'odd' 'even' %}">
|
||||
<td>{{image.id}}</td>
|
||||
<td>{{image.name}}</td>
|
||||
<td>{{image.size}}</td>
|
||||
<td>{{image.is_public}}</td>
|
||||
<td>{{image.created_at|parse_date}}</td>
|
||||
<td>{{image.updated_at|parse_date}}</td>
|
||||
<td>{{image.status|upper}}</td>
|
||||
<td id="actions">
|
||||
<ul>
|
||||
<li><a href="{#% url syspanel_images_delete image.id %#}">Delete</a></li>
|
||||
<li><a href="{#% url syspanel_images_toggle image.id %#}">Toggle Public</a></li>
|
||||
<li><a href="{#% url syspanel_images_update image.id %#}">Edit</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="details">
|
||||
<td class="properties" colspan="9">
|
||||
<ul>
|
||||
<li><span>Location: </span>{{image.properties.image_location}}</li>
|
||||
<li><span>State: </span>{{image.properties.image_state}}</li>
|
||||
<li><span>Kernel ID: </span>{{image.properties.kernel_id}}</li>
|
||||
<li><span>Ramdisk ID: </span>{{image.properties.ramdisk_id}}</li>
|
||||
<li><span>Architecture: </span>{{image.properties.architecture}}</li>
|
||||
<li><span>Project ID: </span>{{image.container_format}}</li>
|
||||
<li><span>Container Format: </span>{{image.properties.project_id}}</li>
|
||||
<li><span>Disk Format: </span>{{image.disk_format}}</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% include "_syspanel_image_list.html" %}
|
||||
|
||||
<a id="image_create_link" href="{#% url syspanel_images_upload %#}">Upload New Image >></a>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user