Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d49b38d5
authored
Sep 24, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: show node status in list
parent
1eef65b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
circle/dashboard/tables.py
+6
-5
No files found.
circle/dashboard/tables.py
View file @
d49b38d5
...
@@ -19,8 +19,7 @@ from __future__ import absolute_import
...
@@ -19,8 +19,7 @@ from __future__ import absolute_import
from
django.contrib.auth.models
import
Group
,
User
from
django.contrib.auth.models
import
Group
,
User
from
django_tables2
import
Table
,
A
from
django_tables2
import
Table
,
A
from
django_tables2.columns
import
(
TemplateColumn
,
Column
,
BooleanColumn
,
from
django_tables2.columns
import
TemplateColumn
,
Column
,
LinkColumn
LinkColumn
)
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
_
...
@@ -40,8 +39,10 @@ class NodeListTable(Table):
...
@@ -40,8 +39,10 @@ class NodeListTable(Table):
attrs
=
{
'th'
:
{
'class'
:
'node-list-table-thin'
}},
attrs
=
{
'th'
:
{
'class'
:
'node-list-table-thin'
}},
)
)
enabled
=
BooleanColumn
(
get_status_display
=
Column
(
verbose_name
=
_
(
"Status"
),
attrs
=
{
'th'
:
{
'class'
:
'node-list-table-thin'
}},
attrs
=
{
'th'
:
{
'class'
:
'node-list-table-thin'
}},
order_by
=
(
"enabled"
,
"schedule_enabled"
),
)
)
name
=
TemplateColumn
(
name
=
TemplateColumn
(
...
@@ -70,8 +71,8 @@ class NodeListTable(Table):
...
@@ -70,8 +71,8 @@ class NodeListTable(Table):
model
=
Node
model
=
Node
attrs
=
{
'class'
:
(
'table table-bordered table-striped table-hover '
attrs
=
{
'class'
:
(
'table table-bordered table-striped table-hover '
'node-list-table'
)}
'node-list-table'
)}
fields
=
(
'pk'
,
'name'
,
'host'
,
'
enabled'
,
'priority'
,
'overcommit
'
,
fields
=
(
'pk'
,
'name'
,
'host'
,
'
get_status_display'
,
'priority
'
,
'number_of_VMs'
,
)
'
overcommit'
,
'
number_of_VMs'
,
)
class
GroupListTable
(
Table
):
class
GroupListTable
(
Table
):
...
...
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