Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
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
0a778b39
authored
Sep 24, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix VmMigrateView
parent
e3519af3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
circle/dashboard/templates/dashboard/_vm-migrate.html
+2
-0
circle/dashboard/views/vm.py
+1
-1
circle/vm/models/node.py
+2
-2
No files found.
circle/dashboard/templates/dashboard/_vm-migrate.html
View file @
0a778b39
...
...
@@ -18,6 +18,8 @@ Choose a compute node to migrate {{obj}} to.
<li
class=
"panel panel-default"
><div
class=
"panel-body"
>
<label
for=
"migrate-to-{{n.pk}}"
>
<strong>
{{ n }}
</strong>
<div
class=
"label label-primary"
><i
class=
"fa {{n.get_status_icon}}"
></i>
{{n.get_status_display}}
</div>
{% if current == n.pk %}
<div
class=
"label label-info"
>
{% trans "current" %}
</div>
{% endif %}
{% if selected == n.pk %}
<div
class=
"label label-success"
>
{% trans "recommended" %}
</div>
{% endif %}
</label>
...
...
circle/dashboard/views/vm.py
View file @
0a778b39
...
...
@@ -395,7 +395,7 @@ class VmMigrateView(VmOperationView):
def
get_context_data
(
self
,
**
kwargs
):
ctx
=
super
(
VmMigrateView
,
self
)
.
get_context_data
(
**
kwargs
)
ctx
[
'nodes'
]
=
[
n
for
n
in
Node
.
objects
.
filter
(
enabled
=
True
)
if
n
.
state
==
"ONLINE"
]
if
n
.
online
]
return
ctx
def
post
(
self
,
request
,
extra
=
None
,
*
args
,
**
kwargs
):
...
...
circle/vm/models/node.py
View file @
0a778b39
...
...
@@ -303,8 +303,8 @@ class Node(OperatedMixin, TimeStampedModel):
def
get_status_icon
(
self
):
return
{
'DISABLED'
:
'times-circle-o'
,
'OFFLINE'
:
'times-circle'
,
'DISABLED'
:
'
fa-
times-circle-o'
,
'OFFLINE'
:
'
fa-
times-circle'
,
'MISSING'
:
'fa-warning'
,
'PASSIVE'
:
'fa-play-circle-o'
,
'ACTIVE'
:
'fa-play-circle'
}
.
get
(
self
.
get_state
(),
...
...
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