Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
7dbb9c7e
authored
Aug 27, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: mass op smart migrate
parent
e64d3033
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
circle/dashboard/templates/dashboard/_vm-mass-migrate.html
+16
-10
circle/dashboard/views.py
+2
-0
No files found.
circle/dashboard/templates/dashboard/_vm-mass-migrate.html
View file @
7dbb9c7e
...
...
@@ -2,28 +2,34 @@
{% load i18n %}
{% load sizefieldtags %}
{% block question %}
<p>
{% blocktrans with op=op.name %}
Choose a compute node to migrate the selected VMs to.
{% endblocktrans %}
</p>
<p
class=
"text-info"
>
{{op.name}}: {{op.description}}
</p>
{% endblock %}
{% block formfields %}
<hr
/>
<ul
id=
"vm-migrate-node-list"
class=
"list-unstyled"
>
<li
class=
"panel panel-default panel-primary mass-migrate-node"
>
<div
class=
"panel-body"
>
<label
for=
"migrate-to-none"
>
<strong>
{% trans "Reschedule" %}
</strong>
</label>
<input
id=
"migrate-to-none"
type=
"radio"
name=
"node"
value=
""
style=
"float: right;"
checked=
"checked"
>
<span
class=
"vm-migrate-node-property"
>
{% trans "This option will reschedule each virtual machine to the most optimal node." %}
</span>
<div
style=
"clear: both;"
></div>
</div>
</li>
{% for n in nodes %}
<li
class=
"panel panel-default mass-migrate-node"
>
<div
class=
"panel-body"
>
<label
for=
"migrate-to-{{n.pk}}"
>
<strong>
{{ n }}
</strong>
</label>
<input
id=
"migrate-to-{{n.pk}}"
type=
"radio"
name=
"node"
value=
"{{ n.pk }}"
style=
"float: right;"
checked=
"checked"
>
<input
id=
"migrate-to-{{n.pk}}"
type=
"radio"
name=
"node"
value=
"{{ n.pk }}"
style=
"float: right;"
/
>
<span
class=
"vm-migrate-node-property"
>
{% trans "CPU load" %}: {{ n.cpu_usage }}
</span>
<span
class=
"vm-migrate-node-property"
>
{% trans "RAM usage" %}: {{ n.byte_ram_usage|filesize }}/{{ n.ram_size|filesize }}
</span>
<div
style=
"clear: both;"
></div>
</div></li>
</div>
</li>
{% endfor %}
</ul>
<hr
/>
...
...
circle/dashboard/views.py
View file @
7dbb9c7e
...
...
@@ -1124,6 +1124,8 @@ class MassMigrationView(MassOperationView):
node
=
self
.
request
.
POST
.
get
(
"node"
)
if
node
:
node
=
get_object_or_404
(
Node
,
pk
=
node
)
else
:
node
=
None
extra
[
"to_node"
]
=
node
return
super
(
MassMigrationView
,
self
)
.
post
(
request
,
extra
,
*
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