Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
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
4cde034a
authored
Mar 02, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: make _vm-migrate template fancier
parent
9db57446
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
circle/dashboard/templates/dashboard/_vm-migrate.html
+7
-4
circle/dashboard/views.py
+1
-1
No files found.
circle/dashboard/templates/dashboard/_vm-migrate.html
View file @
4cde034a
{% load i18n %}
{% load i18n %}
{% load sizefieldtags %}
{% load sizefieldtags %}
<form
method=
"POST"
action=
"{% url "
dashboard
.
views
.
vm-migrate
"
pk=
vm
%}"
>
<form
method=
"POST"
action=
"{% url "
dashboard
.
views
.
vm-migrate
"
pk=
vm
.pk
%}"
>
{% csrf_token %}
{% csrf_token %}
<ul
id=
"vm-migrate-node-list"
>
<ul
id=
"vm-migrate-node-list"
>
{% for n in nodes %}
{% for n in nodes %}
<li>
<li
class=
"panel panel-default"
><div
class=
"panel-body"
>
<label
for=
"migrate-to-{{n.pk}}"
>
<strong>
{{ n }}
</strong>
<strong>
{{ n }}
</strong>
<input
type=
"radio"
name=
"node"
value=
"{{ n.pk }}"
style=
"float: right;"
/>
</label>
<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 "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>
<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
style=
"clear: both;"
></div>
</li>
</div>
</li>
{% endfor %}
{% endfor %}
{% endwith %}
</ul>
</ul>
<button
type=
"submit"
class=
"btn btn-primary btn-sm"
><i
class=
"icon-truck"
></i>
Migrate
</button>
<button
type=
"submit"
class=
"btn btn-primary btn-sm"
><i
class=
"icon-truck"
></i>
Migrate
</button>
</form>
</form>
circle/dashboard/views.py
View file @
4cde034a
...
@@ -1731,7 +1731,7 @@ class VmMigrateView(SuperuserRequiredMixin, TemplateView):
...
@@ -1731,7 +1731,7 @@ class VmMigrateView(SuperuserRequiredMixin, TemplateView):
'template'
:
'dashboard/_vm-migrate.html'
,
'template'
:
'dashboard/_vm-migrate.html'
,
'box_title'
:
_
(
'Migrate
%(name)
s'
%
{
'name'
:
vm
.
name
}),
'box_title'
:
_
(
'Migrate
%(name)
s'
%
{
'name'
:
vm
.
name
}),
'ajax_title'
:
True
,
'ajax_title'
:
True
,
'vm'
:
kwargs
[
'pk'
]
,
'vm'
:
vm
,
'nodes'
:
[
n
for
n
in
Node
.
objects
.
filter
(
enabled
=
True
)
'nodes'
:
[
n
for
n
in
Node
.
objects
.
filter
(
enabled
=
True
)
if
n
.
state
==
"ONLINE"
]
if
n
.
state
==
"ONLINE"
]
})
})
...
...
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