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
e241ad50
authored
May 09, 2016
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: check all vmdriver queues
also display the queue statuses on node detail Closes #426
parent
cb2d9cff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
circle/dashboard/templates/dashboard/node-detail.html
+5
-0
circle/dashboard/views/node.py
+8
-0
circle/vm/models/node.py
+2
-0
No files found.
circle/dashboard/templates/dashboard/node-detail.html
View file @
e241ad50
...
...
@@ -56,6 +56,11 @@
<span
class=
"label label-warning"
>
{% trans "Offline" %}
</span>
{% endif %}
</div>
<div>
{% for k, v in queues.iteritems %}
<span
class=
"label label-{% if v %}success{% else %}danger{% endif %}"
>
{{ k }}
</span>
{% endfor %}
</div>
</div>
<div
class=
"col-md-10"
id=
"node-detail-pane"
>
<div
class=
"panel panel-default"
id=
"node-detail-panel"
>
...
...
circle/dashboard/views/node.py
View file @
e241ad50
...
...
@@ -37,6 +37,7 @@ from django_tables2 import SingleTableView
from
firewall.models
import
Host
from
vm.models
import
Node
,
NodeActivity
,
Trait
from
vm.tasks.vm_tasks
import
check_queue
from
..forms
import
TraitForm
,
HostForm
,
NodeForm
from
..tables
import
NodeListTable
...
...
@@ -107,6 +108,13 @@ class NodeDetailView(LoginRequiredMixin,
context
[
'trait_form'
]
=
form
context
[
'graphite_enabled'
]
=
(
settings
.
GRAPHITE_URL
is
not
None
)
node_hostname
=
self
.
object
.
host
.
hostname
context
[
'queues'
]
=
{
'vmcelery.fast'
:
check_queue
(
node_hostname
,
"vm"
,
"fast"
),
'vmcelery.slow'
:
check_queue
(
node_hostname
,
"vm"
,
"slow"
),
'netcelery.fast'
:
check_queue
(
node_hostname
,
"net"
,
"fast"
),
}
return
context
def
post
(
self
,
request
,
*
args
,
**
kwargs
):
...
...
circle/vm/models/node.py
View file @
e241ad50
...
...
@@ -160,6 +160,8 @@ class Node(OperatedMixin, TimeStampedModel):
"""
try
:
self
.
get_remote_queue_name
(
"vm"
,
"fast"
)
self
.
get_remote_queue_name
(
"vm"
,
"slow"
)
self
.
get_remote_queue_name
(
"net"
,
"fast"
)
except
:
return
False
else
:
...
...
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