Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
48d04736
authored
Mar 18, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: state display fixed
parent
508ff864
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
one/templates/show.html
+11
-5
No files found.
one/templates/show.html
View file @
48d04736
...
...
@@ -4,17 +4,17 @@
{% block js %}
<script
type=
"text/javascript"
>
{
%
if
booting
or
state
!=
'ACTIVE
'
or
i
.
waiting
%
}
{
%
if
booting
or
state
==
'PENDING
'
or
i
.
waiting
%
}
var
timer
=
setInterval
(
function
(){
$
.
ajax
({
type
:
'GET'
,
dataType
:
'json'
,
url
:
'{% url one.views.vm_ajax_instance_status id %}'
,
success
:
function
(
data
){
if
(
!
data
.
waiting
&&
!
data
.
booting
&&
data
.
state
==
'ACTIVE
'
){
if
(
!
data
.
waiting
&&
!
data
.
booting
&&
data
.
state
!=
'PENDING
'
){
window
.
location
.
reload
();
}
else
if
(
!
data
.
waiting
)
{
window
.
location
.
reload
();
//
window.location.reload();
}
}
});
...
...
@@ -86,14 +86,20 @@
<img
src=
"{% static "
image
/
load
.
gif
"
%}"
/>
{% trans "Saving..." %}
</p>
{% elif state == "ACTIVE" and not booting %}
{% elif state == "ACTIVE" and not booting
and not i.waiting
%}
<p
id=
"connect"
style=
"display:block; font-size:25px; line-height:2em;text-align:center;"
>
<a
href=
"{{uri}}"
class=
"button"
onclick=
"return connectbutton();"
>
<img
src=
"{% static "
image
/
load
.
gif
"
%}"
id=
"connecting"
style=
"display:none;"
/>
{% trans "Running" %}
</a>
</p>
{% elif state == "STOPPED" %}
{% elif state == "ACTIVE" and not booting and i.waiting %}
<p
style=
"display:block; font-size:25px; line-height:2em;text-align:center;"
>
{% trans "Stopping..." %}
</p>
{% elif state == "STOPPED" and i.waiting %}
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
{% trans "Starting..." %}
</p>
{% elif state == "STOPPED"%}
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
{% trans "Stopped" %}
</p>
{% endif %}
{% if state == "DONE" %}
...
...
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