Remove image_type column from images/snaps tables

Removes the column from the projects dashboard, but
leaves it in the admin dashboard, since there is no
split between images/snapshots there.

Part of blueprint organised-images-display.

Change-Id: Ia94798a4b0cc13a9b37831bf638e429dd29c3993
This commit is contained in:
Kieran Spear 2013-01-30 16:48:24 +11:00
parent b6dac7c6c4
commit bdc645476b
2 changed files with 4 additions and 1 deletions

View File

@ -130,6 +130,9 @@ class ImagesTable(tables.DataTable):
row_class = UpdateRow row_class = UpdateRow
status_columns = ["status"] status_columns = ["status"]
verbose_name = _("Images") verbose_name = _("Images")
# Hide the image_type column. Done this way so subclasses still get
# all the columns by default.
columns = ["name", "status", "public", "disk_format"]
table_actions = (CreateImage, DeleteImage,) table_actions = (CreateImage, DeleteImage,)
row_actions = (LaunchImage, EditImage, DeleteImage,) row_actions = (LaunchImage, EditImage, DeleteImage,)
pagination_param = "image_marker" pagination_param = "image_marker"

View File

@ -50,7 +50,7 @@ class DeleteSnapshot(DeleteImage):
class SnapshotsTable(ImagesTable): class SnapshotsTable(ImagesTable):
class Meta: class Meta(ImagesTable.Meta):
name = "snapshots" name = "snapshots"
verbose_name = _("Instance Snapshots") verbose_name = _("Instance Snapshots")
table_actions = (DeleteSnapshot,) table_actions = (DeleteSnapshot,)