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
Commit
302a9fd0
authored
Apr 20, 2015
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix resources slider save button
parent
0f995dc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
circle/dashboard/templates/dashboard/vm-detail/resources.html
+2
-2
circle/dashboard/views/vm.py
+4
-0
No files found.
circle/dashboard/templates/dashboard/vm-detail/resources.html
View file @
302a9fd0
...
...
@@ -13,11 +13,11 @@
{% if op.resources_change %}
<button
type=
"submit"
class=
"btn btn-success btn-sm change-resources-button"
id=
"vm-details-resources-save"
data-vm=
"{{ instance.pk }}"
{%
if
op
.
resources_change
.
dis
abled
%}
disabled
{%
endif
%}
>
{%
if
not
save_resources_en
abled
%}
disabled
{%
endif
%}
>
<i
class=
"fa fa-floppy-o"
></i>
{% trans "Save resources" %}
</button>
<span
class=
"change-resources-help"
{%
if
not
op
.
resources_change
.
dis
abled
%}
style=
"display: none;"
{%
endif
%}
>
{%
if
save_resources_en
abled
%}
style=
"display: none;"
{%
endif
%}
>
{% trans "Stop your VM to change resources." %}
</span>
{% else %}
...
...
circle/dashboard/views/vm.py
View file @
302a9fd0
...
...
@@ -173,6 +173,10 @@ class VmDetailView(GraphMixin, CheckedDetailView):
context
[
'is_operator'
]
=
is_operator
context
[
'is_owner'
]
=
is_owner
# operation also allows RUNNING (if with_shutdown is present)
context
[
'save_resources_enabled'
]
=
instance
.
status
not
in
(
"RUNNING"
,
"PENDING"
)
return
context
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