Commit 07c3c9b8 by Kálmán Viktor

dashboard: enable console if status is changed to running via ajax

parent 10fc46ee
...@@ -201,6 +201,11 @@ function checkNewActivity(only_state, runs) { ...@@ -201,6 +201,11 @@ function checkNewActivity(only_state, runs) {
} }
$("#vm-details-state").html(data['state']); $("#vm-details-state").html(data['state']);
if(data['state'] == "RUNNING") {
$("[data-target=#_console]").attr("data-toggle", "pill").parent("li").removeClass("disabled");
} else {
$("[data-target=#_console]").attr("data-toggle", "_pill").parent("li").addClass("disabled");
}
if(decideActivityRefresh()) { if(decideActivityRefresh()) {
console.log("szia"); console.log("szia");
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
{% trans "Resources" %}</a> {% trans "Resources" %}</a>
</li> </li>
<li {% if instance.state != "RUNNING" %}class="disabled"{% endif %}> <li {% if instance.state != "RUNNING" %}class="disabled"{% endif %}>
<a href="#{% if instance.state == "RUNNING" %}console" data-toggle="pill{% endif %}" data-target="#_console" class="text-center"> <a href="#" {% if instance.state == "RUNNING" %}data-toggle="pill"{% endif %} data-target="#_console" class="text-center">
<i class="icon-desktop icon-2x"></i><br> <i class="icon-desktop icon-2x"></i><br>
{% trans "Console" %}</a></li> {% trans "Console" %}</a></li>
<li> <li>
......
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 sign in to comment