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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
e7769c2f
authored
Feb 17, 2014
by
Oláh István Gergely
Committed by
Őry Máté
Feb 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix node activity
parent
db3c3c74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
circle/dashboard/templates/dashboard/node-detail.html
+1
-1
circle/dashboard/views.py
+5
-1
No files found.
circle/dashboard/templates/dashboard/node-detail.html
View file @
e7769c2f
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-4"
id=
"node-info-pane"
>
<div
class=
"col-md-4"
id=
"node-info-pane"
>
<div
id=
"node-info-data"
class=
"big"
>
<div
id=
"node-info-data"
class=
"big"
>
<span
id=
"node-status-label
"
class=
"label {% if node.state == 'Online' %}label-success
<span
id=
"node-details-state
"
class=
"label {% if node.state == 'Online' %}label-success
{% elif node.state == 'Missing' %}label-danger
{% elif node.state == 'Missing' %}label-danger
{% elif node.state == 'Disabled' %}label-warning
{% elif node.state == 'Disabled' %}label-warning
{% elif node.state == 'Offline' %}label-warning
{% elif node.state == 'Offline' %}label-warning
...
...
circle/dashboard/views.py
View file @
e7769c2f
...
@@ -35,7 +35,7 @@ from .tables import (VmListTable, NodeListTable, NodeVmListTable,
...
@@ -35,7 +35,7 @@ from .tables import (VmListTable, NodeListTable, NodeVmListTable,
TemplateListTable
,
LeaseListTable
,
GroupListTable
,)
TemplateListTable
,
LeaseListTable
,
GroupListTable
,)
from
vm.models
import
(
Instance
,
InstanceTemplate
,
InterfaceTemplate
,
from
vm.models
import
(
Instance
,
InstanceTemplate
,
InterfaceTemplate
,
InstanceActivity
,
Node
,
instance_activity
,
Lease
,
InstanceActivity
,
Node
,
instance_activity
,
Lease
,
Interface
)
Interface
,
NodeActivity
)
from
firewall.models
import
Vlan
,
Host
,
Rule
from
firewall.models
import
Vlan
,
Host
,
Rule
from
dashboard.models
import
Favourite
from
dashboard.models
import
Favourite
...
@@ -444,6 +444,10 @@ class NodeDetailView(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
...
@@ -444,6 +444,10 @@ class NodeDetailView(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
context
=
super
(
NodeDetailView
,
self
)
.
get_context_data
(
**
kwargs
)
context
=
super
(
NodeDetailView
,
self
)
.
get_context_data
(
**
kwargs
)
instances
=
Instance
.
active
.
filter
(
node
=
self
.
object
)
instances
=
Instance
.
active
.
filter
(
node
=
self
.
object
)
context
[
'table'
]
=
NodeVmListTable
(
instances
)
context
[
'table'
]
=
NodeVmListTable
(
instances
)
na
=
NodeActivity
.
objects
.
filter
(
node
=
self
.
object
,
parent
=
None
)
.
order_by
(
'-started'
)
.
select_related
()
context
[
'activities'
]
=
na
return
context
return
context
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
...
...
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