Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
99b581c6
authored
Feb 11, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: Added suspend and delete time
parent
8653eae5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
one/templates/box-vmlist.html
+2
-0
one/views.py
+9
-0
No files found.
one/templates/box-vmlist.html
View file @
99b581c6
...
...
@@ -50,6 +50,8 @@
<ul>
<li
class=
"name"
>
{% trans "Hostname" %}:
<span
class=
"value"
>
{{i.name}}
</span><div
class=
"clear"
></div></li>
<li
class=
"os-{{i.template.os_type}}"
>
{% trans "System" %}:
<span
class=
"value"
>
{{i.template.system}}
</span><div
class=
"clear"
></div></li>
<li
class=
"template"
>
{% trans "Type" %}:
<span
class=
"value"
>
{{i.share.type}}
</span><div
class=
"clear"
></div></li>
<li
class=
"template"
>
{% trans "Share" %}:
<span
class=
"value"
>
{{i.share.name}}
</span><div
class=
"clear"
></div></li>
<li
class=
"template"
>
{% trans "Template" %}:
<span
class=
"value"
>
{{i.template.name}}
</span><div
class=
"clear"
></div></li>
<li
class=
"type"
>
{% trans "Size" %}:
<span
class=
"value"
>
{{i.template.instance_type.name}}:
<span
class=
"cpu"
>
{{i.template.instance_type.CPU}}
</span>
...
...
one/views.py
View file @
99b581c6
...
...
@@ -226,7 +226,16 @@ def vm_new(request, template=None, share=None, redir=True):
try
:
#Gány quota
if
share
==
None
or
(
share
!=
None
and
share
.
get_running
()
<
share
.
instance_limit
)
or
extra
:
time_of_suspend
=
None
time_of_delete
=
None
if
TYPES
[
share
.
type
][
'suspend'
]:
time_of_suspend
=
TYPES
[
share
.
type
][
'suspend'
]
+
datetime
.
now
()
if
TYPES
[
share
.
type
][
'delete'
]:
time_of_delete
=
TYPES
[
share
.
type
][
'delete'
]
+
datetime
.
now
()
i
=
Instance
.
submit
(
base
,
request
.
user
,
extra
=
extra
,
share
=
share
)
i
.
time_of_suspend
=
time_of_suspend
i
.
time_of_delete
=
time_of_delete
i
.
save
()
if
redir
:
return
redirect
(
i
)
else
:
...
...
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