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
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 @@
...
@@ -4,17 +4,17 @@
{% block js %}
{% block js %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
{
%
if
booting
or
state
!=
'ACTIVE
'
or
i
.
waiting
%
}
{
%
if
booting
or
state
==
'PENDING
'
or
i
.
waiting
%
}
var
timer
=
setInterval
(
function
(){
var
timer
=
setInterval
(
function
(){
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
dataType
:
'json'
,
dataType
:
'json'
,
url
:
'{% url one.views.vm_ajax_instance_status id %}'
,
url
:
'{% url one.views.vm_ajax_instance_status id %}'
,
success
:
function
(
data
){
success
:
function
(
data
){
if
(
!
data
.
waiting
&&
!
data
.
booting
&&
data
.
state
==
'ACTIVE
'
){
if
(
!
data
.
waiting
&&
!
data
.
booting
&&
data
.
state
!=
'PENDING
'
){
window
.
location
.
reload
();
window
.
location
.
reload
();
}
else
if
(
!
data
.
waiting
)
{
}
else
if
(
!
data
.
waiting
)
{
window
.
location
.
reload
();
//
window.location.reload();
}
}
}
}
});
});
...
@@ -86,14 +86,20 @@
...
@@ -86,14 +86,20 @@
<img
src=
"{% static "
image
/
load
.
gif
"
%}"
/>
<img
src=
"{% static "
image
/
load
.
gif
"
%}"
/>
{% trans "Saving..." %}
{% trans "Saving..." %}
</p>
</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;"
>
<p
id=
"connect"
style=
"display:block; font-size:25px; line-height:2em;text-align:center;"
>
<a
href=
"{{uri}}"
class=
"button"
onclick=
"return connectbutton();"
>
<a
href=
"{{uri}}"
class=
"button"
onclick=
"return connectbutton();"
>
<img
src=
"{% static "
image
/
load
.
gif
"
%}"
id=
"connecting"
style=
"display:none;"
/>
<img
src=
"{% static "
image
/
load
.
gif
"
%}"
id=
"connecting"
style=
"display:none;"
/>
{% trans "Running" %}
{% trans "Running" %}
</a>
</a>
</p>
</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>
<p
style=
"font-size:25px; line-height:2em;text-align:center;"
>
{% trans "Stopped" %}
</p>
{% endif %}
{% endif %}
{% if state == "DONE" %}
{% 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