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
6c4f9394
authored
Mar 18, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: connected max_ram_size and ram_size setting
parent
e83b54bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
circle/dashboard/views.py
+2
-2
No files found.
circle/dashboard/views.py
View file @
6c4f9394
...
...
@@ -278,6 +278,7 @@ class VmDetailView(CheckedDetailView):
resources
=
{
'num_cores'
:
request
.
POST
.
get
(
'cpu-count'
),
'ram_size'
:
request
.
POST
.
get
(
'ram-size'
),
'max_ram_size'
:
request
.
POST
.
get
(
'ram-size'
),
# TODO: max_ram
'priority'
:
request
.
POST
.
get
(
'cpu-priority'
)
}
Instance
.
objects
.
filter
(
pk
=
self
.
object
.
pk
)
.
update
(
**
resources
)
...
...
@@ -422,7 +423,6 @@ class VmDetailView(CheckedDetailView):
new_name
=
"Saved from
%
s (#
%
d) at
%
s"
%
(
self
.
object
.
name
,
self
.
object
.
pk
,
date
)
self
.
object
.
save_as_template_async
(
name
=
new_name
,
user
=
request
.
user
)
messages
.
success
(
request
,
_
(
"Saving instance as template!"
))
...
...
@@ -776,7 +776,7 @@ class TemplateCreate(SuccessMessageMixin, CreateView):
tags
=
post
.
pop
(
"tags"
)
post
[
'pw'
]
=
User
.
objects
.
make_random_password
()
post
.
pop
(
"parent"
)
post
[
'max_ram_size'
]
=
post
[
'ram_size'
]
inst
=
Instance
.
create
(
params
=
post
,
disks
=
[],
networks
=
networks
,
tags
=
tags
,
req_traits
=
req_traits
)
messages
.
success
(
request
,
_
(
"Your disk has been created, "
...
...
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