Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
51306baf
authored
Jan 08, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: remove id from lease and template lists
parent
979fe687
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
8 deletions
+40
-8
circle/dashboard/tables.py
+4
-6
circle/dashboard/templates/dashboard/template-list.html
+36
-2
No files found.
circle/dashboard/tables.py
View file @
51306baf
...
@@ -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'
,
)
circle/dashboard/templates/dashboard/template-list.html
View file @
51306baf
...
@@ -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
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment