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
5aee89e2
authored
Aug 25, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-259' into 'master'
Issue #259
parents
4097a8a3
53da6b24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
circle/dashboard/templates/dashboard/_vm-create-2.html
+3
-1
circle/dashboard/views.py
+4
-2
No files found.
circle/dashboard/templates/dashboard/_vm-create-2.html
View file @
5aee89e2
...
...
@@ -7,7 +7,6 @@
{% csrf_token %}
{{ vm_create_form.template }}
{{ vm_create_form.customized }}
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
...
...
@@ -23,6 +22,8 @@
</div>
</div>
{% if perms.vm.set_resources %}
{{ vm_create_form.customized }}
<div
class=
"row"
>
<div
class=
"col-sm-10"
>
<div
class=
"form-group"
>
...
...
@@ -85,6 +86,7 @@
</div>
<!-- .no-js-hidden -->
</div>
<!-- .col-sm-8 -->
</div>
<!-- .row -->
{% endif %}
</form>
<script>
...
...
circle/dashboard/views.py
View file @
5aee89e2
...
...
@@ -1912,8 +1912,10 @@ class VmCreate(LoginRequiredMixin, TemplateView):
if
not
template
.
has_level
(
request
.
user
,
'user'
):
raise
PermissionDenied
()
instances
=
[
Instance
.
create_from_template
(
template
=
template
,
owner
=
user
)]
args
=
{
"template"
:
template
,
"owner"
:
user
}
if
"name"
in
request
.
POST
:
args
[
"name"
]
=
request
.
POST
.
get
(
"name"
)
instances
=
[
Instance
.
create_from_template
(
**
args
)]
return
self
.
__deploy
(
request
,
instances
)
def
__create_customized
(
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