mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
section #template renamed to #options, added title and description fields
This commit is contained in:
parent
510e0e6ee5
commit
2ceb456a4f
3 changed files with 56 additions and 11 deletions
|
|
@ -218,6 +218,7 @@ def instance(request, compute_id, vname):
|
|||
uuid = conn.get_uuid()
|
||||
memory = conn.get_memory()
|
||||
cur_memory = conn.get_cur_memory()
|
||||
title = conn.get_title()
|
||||
description = conn.get_description()
|
||||
disks = conn.get_disk_device()
|
||||
media = conn.get_media_device()
|
||||
|
|
@ -525,12 +526,19 @@ def instance(request, compute_id, vname):
|
|||
addlogmsg(request.user.username, instance.name, msg)
|
||||
return HttpResponseRedirect(request.get_full_path() + '#network')
|
||||
|
||||
if 'change_template' in request.POST:
|
||||
if 'change_options' in request.POST:
|
||||
instance.is_template = request.POST.get('is_template', False)
|
||||
instance.save()
|
||||
msg = _("Edit template %s" % instance.is_template)
|
||||
|
||||
options = {}
|
||||
for post in request.POST:
|
||||
if post in ['title', 'description']:
|
||||
options[post] = request.POST.get(post, '')
|
||||
conn.set_options(options)
|
||||
|
||||
msg = _("Edit options")
|
||||
addlogmsg(request.user.username, instance.name, msg)
|
||||
return HttpResponseRedirect(request.get_full_path() + '#template')
|
||||
return HttpResponseRedirect(request.get_full_path() + '#options')
|
||||
|
||||
conn.close()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue