Commit f5c999dc by Barnabás Czémán

simplify tables

parent 95698a75
...@@ -105,7 +105,7 @@ class NodeListTable(Table): ...@@ -105,7 +105,7 @@ class NodeListTable(Table):
class Meta: class Meta:
model = Node model = Node
attrs = {'class': ('table table-bordered table-striped table-hover ' attrs = {'class': ('table table-striped table-hover '
'node-list-table')} 'node-list-table')}
fields = ('pk', 'name', 'host', 'get_status_display', 'priority', fields = ('pk', 'name', 'host', 'get_status_display', 'priority',
'minion_online', 'overcommit', 'number_of_VMs', ) 'minion_online', 'overcommit', 'number_of_VMs', )
...@@ -146,7 +146,7 @@ class GroupListTable(Table): ...@@ -146,7 +146,7 @@ class GroupListTable(Table):
class Meta: class Meta:
model = Group model = Group
attrs = {'class': ('table table-bordered table-striped table-hover ' attrs = {'class': ('table table-striped table-hover '
'group-list-table')} 'group-list-table')}
fields = ('pk', 'name', ) fields = ('pk', 'name', )
order_by = ('pk', ) order_by = ('pk', )
...@@ -174,7 +174,7 @@ class UserListTable(Table): ...@@ -174,7 +174,7 @@ class UserListTable(Table):
class Meta: class Meta:
model = User model = User
template = "django_tables2/with_pagination.html" template = "django_tables2/with_pagination.html"
attrs = {'class': ('table table-bordered table-striped table-hover')} attrs = {'class': ('table table-striped table-hover')}
fields = ('username', 'last_name', 'first_name', 'profile__org_id', fields = ('username', 'last_name', 'first_name', 'profile__org_id',
'email', 'is_active', 'is_superuser') 'email', 'is_active', 'is_superuser')
order_by = ('username', ) order_by = ('username', )
...@@ -225,7 +225,7 @@ class TemplateListTable(Table): ...@@ -225,7 +225,7 @@ class TemplateListTable(Table):
class Meta: class Meta:
model = InstanceTemplate model = InstanceTemplate
attrs = {'class': ('table table-bordered table-striped table-hover' attrs = {'class': ('table table-striped table-hover'
' template-list-table')} ' template-list-table')}
fields = ('name', 'resources', 'system', 'access_method', 'lease', fields = ('name', 'resources', 'system', 'access_method', 'lease',
'owner', 'created', 'running', 'actions', ) 'owner', 'created', 'running', 'actions', )
...@@ -255,7 +255,7 @@ class LeaseListTable(Table): ...@@ -255,7 +255,7 @@ class LeaseListTable(Table):
class Meta: class Meta:
model = Lease model = Lease
attrs = {'class': ('table table-bordered table-striped table-hover' attrs = {'class': ('table table-striped table-hover'
' lease-list-table')} ' lease-list-table')}
fields = ('name', 'suspend_interval_seconds', fields = ('name', 'suspend_interval_seconds',
'delete_interval_seconds', ) 'delete_interval_seconds', )
...@@ -289,7 +289,7 @@ class UserKeyListTable(Table): ...@@ -289,7 +289,7 @@ class UserKeyListTable(Table):
class Meta: class Meta:
model = UserKey model = UserKey
attrs = {'class': ('table table-bordered table-striped table-hover'), attrs = {'class': ('table table-striped table-hover'),
'id': "profile-key-list-table"} 'id': "profile-key-list-table"}
fields = ('name', 'fingerprint', 'created', 'actions') fields = ('name', 'fingerprint', 'created', 'actions')
prefix = "key-" prefix = "key-"
...@@ -319,7 +319,7 @@ class ConnectCommandListTable(Table): ...@@ -319,7 +319,7 @@ class ConnectCommandListTable(Table):
class Meta: class Meta:
model = ConnectCommand model = ConnectCommand
attrs = {'class': ('table table-bordered table-striped table-hover'), attrs = {'class': ('table table-striped table-hover'),
'id': "profile-command-list-table"} 'id': "profile-command-list-table"}
fields = ('name', 'access_method', 'template', 'actions') fields = ('name', 'access_method', 'template', 'actions')
prefix = "cmd-" prefix = "cmd-"
...@@ -347,7 +347,7 @@ class DiskListTable(Table): ...@@ -347,7 +347,7 @@ class DiskListTable(Table):
class Meta: class Meta:
model = Disk model = Disk
attrs = {'class': "table table-bordered table-striped table-hover", attrs = {'class': "table table-striped table-hover",
'id': "disk-list-table"} 'id': "disk-list-table"}
fields = ("pk", "appliance", "filename", "size", "is_ready") fields = ("pk", "appliance", "filename", "size", "is_ready")
prefix = "disk-" prefix = "disk-"
...@@ -366,7 +366,7 @@ class MessageListTable(Table): ...@@ -366,7 +366,7 @@ class MessageListTable(Table):
class Meta: class Meta:
template = "django_tables2/with_pagination.html" template = "django_tables2/with_pagination.html"
model = Message model = Message
attrs = {'class': "table table-bordered table-striped table-hover", attrs = {'class': "table table-striped table-hover",
'id': "disk-list-table"} 'id': "disk-list-table"}
order_by = ("-pk", ) order_by = ("-pk", )
fields = ('pk', 'message', 'enabled', 'effect') fields = ('pk', 'message', 'enabled', 'effect')
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
{% endif %} {% endif %}
</h3> </h3>
<form action="" method="post">{% csrf_token %} <form action="" method="post">{% csrf_token %}
<table class="table table-striped table-with-form-fields table-bordered" id="group-detail-user-table"> <table class="table table-striped table-with-form-fields" id="group-detail-user-table">
<tbody> <tbody>
<thead><tr><th></th><th>{% trans "Who" %}</th><th>{% trans "Remove" %}</th></tr></thead> <thead><tr><th></th><th>{% trans "Who" %}</th><th>{% trans "Remove" %}</th></tr></thead>
{% for i in users %} {% for i in users %}
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
<hr /> <hr />
<script type="text/javascript" src="/static/admin/js/vendor/jquery/jquery.min.js"></script> <script type="text/javascript" src="/static/admin/js/vendor/jquery/jquery.min.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.init.js"></script> <script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
<script type="text/javascript" src="/static/autocomplete_light/jquery.init.js"></script> <script type="text/javascript" src="/static/autocomplete_light/jquery.init.js"></script>
<script type="text/javascript" src="/static/autocomplete_light/vendor/select2/dist/js/select2.js"></script> <script type="text/javascript" src="/static/autocomplete_light/vendor/select2/dist/js/select2.js"></script>
{{ group_perm_form.media }} {{ group_perm_form.media }}
......
...@@ -105,7 +105,7 @@ class SmallRuleTable(Table): ...@@ -105,7 +105,7 @@ class SmallRuleTable(Table):
class Meta: class Meta:
model = Rule model = Rule
attrs = {'class': 'table table-striped table-bordered table-condensed', attrs = {'class': 'table table-striped table-condensed',
'id': "small_rule_table"} 'id': "small_rule_table"}
fields = ('rule', 'action', ) fields = ('rule', 'action', )
...@@ -118,7 +118,7 @@ class SmallGroupRuleTable(Table): ...@@ -118,7 +118,7 @@ class SmallGroupRuleTable(Table):
class Meta: class Meta:
model = Rule model = Rule
attrs = {'class': 'table table-striped table-bordered table-condensed'} attrs = {'class': 'table table-striped table-condensed'}
fields = ('rule', ) fields = ('rule', )
...@@ -168,7 +168,7 @@ class SmallRecordTable(Table): ...@@ -168,7 +168,7 @@ class SmallRecordTable(Table):
class Meta: class Meta:
model = Record model = Record
attrs = {'class': 'table table-striped table-bordered'} attrs = {'class': 'table table-striped'}
fields = ('type', 'fqdn', 'host', 'address', ) fields = ('type', 'fqdn', 'host', 'address', )
sequence = ('type', 'fqdn', ) sequence = ('type', 'fqdn', )
# order_by = '-type' # order_by = '-type'
...@@ -242,7 +242,7 @@ class HostRecordsTable(Table): ...@@ -242,7 +242,7 @@ class HostRecordsTable(Table):
class Meta: class Meta:
model = Record model = Record
attrs = { attrs = {
'class': "table table-striped table-bordered", 'class': "table table-striped",
'id': "host-detail-records-table", 'id': "host-detail-records-table",
} }
fields = ("type", "fqdn") fields = ("type", "fqdn")
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<h1>{% trans "Latest modifications" %}</h1> <h1>{% trans "Latest modifications" %}</h1>
</div> </div>
<table class="table table-striped table-bordered"> <table class="table table-striped">
<tr> <tr>
<th>{% trans "Action" %}</th> <th>{% trans "Action" %}</th>
<th>{% trans "Model" %}</th> <th>{% trans "Model" %}</th>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<h1>{% trans "Latest blacklists" %}</h1> <h1>{% trans "Latest blacklists" %}</h1>
</div> </div>
<table class="table table-striped table-bordered"> <table class="table table-striped">
<tr> <tr>
<th>{% trans "IP" %}</th> <th>{% trans "IP" %}</th>
<th>{% trans "Reason" %}</th> <th>{% trans "Reason" %}</th>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<h3>{% trans "Ethernet Devices" %}</h3> <h3>{% trans "Ethernet Devices" %}</h3>
<hr /> <hr />
{% if devices %} {% if devices %}
<table class="table table-condensed table-bordered ethernet-devices-mini-table"> <table class="table table-condensed ethernet-devices-mini-table">
{% for i in devices %} {% for i in devices %}
<tr> <tr>
<td>{{ i }}</td> <td>{{ i }}</td>
......
...@@ -47,7 +47,7 @@ class RequestTable(Table): ...@@ -47,7 +47,7 @@ class RequestTable(Table):
class Meta: class Meta:
model = Request model = Request
template = "django_tables2/with_pagination.html" template = "django_tables2/with_pagination.html"
attrs = {'class': ('table table-bordered table-striped table-hover'), attrs = {'class': ('table table-striped table-hover'),
'id': "request-list-table"} 'id': "request-list-table"}
fields = ("pk", "status", "type", "created", "user", ) fields = ("pk", "status", "type", "created", "user", )
order_by = ("-pk", ) order_by = ("-pk", )
...@@ -65,7 +65,7 @@ class LeaseTypeTable(Table): ...@@ -65,7 +65,7 @@ class LeaseTypeTable(Table):
class Meta: class Meta:
model = LeaseType model = LeaseType
attrs = {'class': "table table-bordered table-striped table-hover"} attrs = {'class': "table table-striped table-hover"}
fields = ('pk', 'name', 'lease', ) fields = ('pk', 'name', 'lease', )
prefix = "lease-" prefix = "lease-"
template = "django_tables2/with_pagination.html" template = "django_tables2/with_pagination.html"
...@@ -84,7 +84,7 @@ class TemplateAccessTypeTable(Table): ...@@ -84,7 +84,7 @@ class TemplateAccessTypeTable(Table):
class Meta: class Meta:
model = TemplateAccessType model = TemplateAccessType
attrs = {'class': "table table-bordered table-striped table-hover"} attrs = {'class': "table table-striped table-hover"}
fields = ('pk', 'name', 'templates', ) fields = ('pk', 'name', 'templates', )
prefix = "template-" prefix = "template-"
template = "django_tables2/with_pagination.html" template = "django_tables2/with_pagination.html"
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