Commit 51306baf by Kálmán Viktor

dashboard: remove id from lease and template lists

parent 979fe687
...@@ -139,10 +139,9 @@ class NodeVmListTable(Table): ...@@ -139,10 +139,9 @@ class NodeVmListTable(Table):
class TemplateListTable(Table): class TemplateListTable(Table):
pk = LinkColumn( name = LinkColumn(
'dashboard.views.template-detail', 'dashboard.views.template-detail',
args=[A('pk')], args=[A('pk')],
verbose_name=_("ID"),
) )
num_cores = Column( num_cores = Column(
verbose_name=_("Cores"), verbose_name=_("Cores"),
...@@ -167,16 +166,15 @@ class TemplateListTable(Table): ...@@ -167,16 +166,15 @@ class TemplateListTable(Table):
model = InstanceTemplate model = InstanceTemplate
attrs = {'class': ('table table-bordered table-striped table-hover' attrs = {'class': ('table table-bordered table-striped table-hover'
' template-list-table')} ' template-list-table')}
fields = ('pk', 'name', 'num_cores', 'ram_size', 'arch', fields = ('name', 'num_cores', 'ram_size', 'arch',
'priority', 'system', 'access_method', 'lease', 'state', 'priority', 'system', 'access_method', 'lease', 'state',
'actions', ) 'actions', )
class LeaseListTable(Table): class LeaseListTable(Table):
pk = LinkColumn( name = LinkColumn(
'dashboard.views.lease-detail', 'dashboard.views.lease-detail',
args=[A('pk')], args=[A('pk')],
verbose_name=_("ID"),
) )
suspend_in = TemplateColumn( suspend_in = TemplateColumn(
...@@ -196,4 +194,4 @@ class LeaseListTable(Table): ...@@ -196,4 +194,4 @@ class LeaseListTable(Table):
model = Lease model = Lease
attrs = {'class': ('table table-bordered table-striped table-hover' attrs = {'class': ('table table-bordered table-striped table-hover'
' lease-list-table')} ' lease-list-table')}
fields = ('pk', 'name', 'suspend_in', 'delete_in', ) fields = ('name', 'suspend_in', 'delete_in', )
...@@ -16,15 +16,45 @@ ...@@ -16,15 +16,45 @@
<h3 class="no-margin"><i class="icon-desktop"></i> {% trans "Templates" %}</h3> <h3 class="no-margin"><i class="icon-desktop"></i> {% trans "Templates" %}</h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
{% render_table table %}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<a href="{% url "dashboard.views.template-create" %}" class="pull-right btn btn-success btn-xs">
<i class="icon-plus"></i> new template
</a>
<a href="{% url "dashboard.views.lease-create" %}" class="pull-right btn btn-success btn-xs" style="margin-right: 10px;">
<i class="icon-plus"></i> new lease
</a>
<h3 class="no-margin"><i class="icon-desktop"></i> {% trans "Leases" %}</h3>
</div>
<div class="panel-body">
<div class="" style="max-width: 600px;"> <div class="" style="max-width: 600px;">
{% render_table lease_table %} {% render_table lease_table %}
</div> </div>
{% render_table table %}
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="no-margin"><i class="icon-desktop"></i> Placeholder</h3>
</div>
<div class="panel-body">
???
</div>
</div>
</div>
</div>
<style> <style>
.template-list-table td, .template-list-table th, .template-list-table td, .template-list-table th,
...@@ -32,6 +62,10 @@ ...@@ -32,6 +62,10 @@
text-align: center; text-align: center;
} }
.template-list-table td:nth-child(1), .lease-list-table td:nth-child(1) {
text-align: left;
}
.vm-list-table-thin { .vm-list-table-thin {
width: 10px; width: 10px;
} }
......
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