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
8c2ea6bf
authored
Feb 11, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
one: try to the suspend time
parent
c2acf969
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
one/static/cloud.js
+2
-0
one/views.py
+6
-3
No files found.
one/static/cloud.js
View file @
8c2ea6bf
...
...
@@ -226,6 +226,8 @@ $(function() {
success
:
function
(
data
,
b
,
xhrRequest
)
{
window
.
location
.
href
=
'/'
;
//xhrRequest.getResponseHeader("Location");
//alert(xhrRequest.getResponseHeader("Location"));
window
.
location
.
href
=
xhrRequest
.
getResponseHeader
(
"Location"
);
}
})
}
...
...
one/views.py
View file @
8c2ea6bf
...
...
@@ -225,13 +225,16 @@ def vm_new(request, template=None, share=None, redir=True):
extra
=
"<RECONTEXT>YES</RECONTEXT>"
try
:
#Gány quota
if
share
==
None
or
(
share
!=
None
and
share
.
get_running
()
<
share
.
instance_limit
)
or
extra
:
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'
]:
try
:
TYPES
[
share
.
type
][
'suspend'
]
time_of_suspend
=
TYPES
[
share
.
type
][
'suspend'
]
+
datetime
.
now
()
if
TYPES
[
share
.
type
][
'delete'
]:
TYPES
[
share
.
type
][
'delete'
]
time_of_delete
=
TYPES
[
share
.
type
][
'delete'
]
+
datetime
.
now
()
except
:
pass
i
=
Instance
.
submit
(
base
,
request
.
user
,
extra
=
extra
,
share
=
share
)
i
.
time_of_suspend
=
time_of_suspend
i
.
time_of_delete
=
time_of_delete
...
...
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