Commit f0f742b6 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

runner: fix concurent status displayed

parent 6af6c81b
...@@ -234,19 +234,23 @@ function setRunningState(data) { ...@@ -234,19 +234,23 @@ function setRunningState(data) {
//change run menu title and style //change run menu title and style
if (data.software.state) { if (data.software.state) {
if ( $("#running").children('span').length === 0 ) { if ( $("#running").children('span').length === 0 ) {
$("#softrun").removeClass('slapos_run'); $("#softrun").removeClass('slapos_run');
$("#softrun").addClass('slapos_stop'); $("#softrun").addClass('slapos_stop');
if($("[class=software][id=running_info]").length === 0) if($("[class=software][id=running_info]").length === 0) {
$("#running img").before('<p id="running_info" class="software">Building software...</p>'); $("p#running_info").remove()
$("#running img").before('<p id="running_info" class="software">Building software...</p>');
}
} }
} }
if (data.instance.state) { if (data.instance.state) {
///Draft!! ///Draft!!
if ( $("#running").children('span').length === 0 ) { if ( $("#running").children('span').length === 0 ) {
$("#softrun").removeClass('slapos_run'); $("#softrun").removeClass('slapos_run');
$("#softrun").addClass('slapos_stop'); $("#softrun").addClass('slapos_stop');
if($("[class=instance][id=running_info]").length === 0) if($("[class=instance][id=running_info]").length === 0) {
$("#running img").before('<p id="running_info" class="instance">Running instance...</p>'); $("p#running_info").remove()
$("#running img").before('<p id="running_info" class="instance">Running instance...</p>');
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment