Commit b584e851 by Guba Sándor

table listing for the commands

parent 98c460a0
...@@ -25,6 +25,7 @@ from django_tables2.columns import (TemplateColumn, Column, BooleanColumn, ...@@ -25,6 +25,7 @@ from django_tables2.columns import (TemplateColumn, Column, BooleanColumn,
from vm.models import Node, InstanceTemplate, Lease from vm.models import Node, InstanceTemplate, Lease
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django_sshkey.models import UserKey from django_sshkey.models import UserKey
from dashboard.models import ConnectCommand
class NodeListTable(Table): class NodeListTable(Table):
...@@ -250,3 +251,31 @@ class UserKeyListTable(Table): ...@@ -250,3 +251,31 @@ class UserKeyListTable(Table):
model = UserKey model = UserKey
attrs = {'class': ('table table-bordered table-striped table-hover')} attrs = {'class': ('table table-bordered table-striped table-hover')}
fields = ('name', 'fingerprint', 'created', 'actions') fields = ('name', 'fingerprint', 'created', 'actions')
class ConnectCommandListTable(Table):
access_method = Column(
verbose_name=_("Access method"),
attrs={'th': {'data-sort': "string"}}
)
application = Column(
verbose_name=_("Application"),
attrs={'th': {'data-sort': "string"}}
)
template = Column(
verbose_name=_("Template"),
attrs={'th': {'data-sort': "string"}}
)
actions = TemplateColumn(
verbose_name=_("Actions"),
template_name="dashboard/command-list/column-command-actions.html",
orderable=False,
)
class Meta:
model = ConnectCommand
attrs = {'class': ('table table-bordered table-striped table-hover')}
fields = ('access_method', 'application', 'template', 'actions')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment