Commit 47b46b44 by Kálmán Viktor

dashboard: fix console in vm details

parent 07c3c9b8
......@@ -202,9 +202,9 @@ function checkNewActivity(only_state, runs) {
$("#vm-details-state").html(data['state']);
if(data['state'] == "RUNNING") {
$("[data-target=#_console]").attr("data-toggle", "pill").parent("li").removeClass("disabled");
$("[data-target=#_console]").attr("data-toggle", "pill").attr("href", "#console").parent("li").removeClass("disabled");
} else {
$("[data-target=#_console]").attr("data-toggle", "_pill").parent("li").addClass("disabled");
$("[data-target=#_console]").attr("data-toggle", "_pill").attr("href", "#").parent("li").addClass("disabled");
}
if(decideActivityRefresh()) {
......
......@@ -103,7 +103,7 @@
{% trans "Resources" %}</a>
</li>
<li {% if instance.state != "RUNNING" %}class="disabled"{% endif %}>
<a href="#" {% if instance.state == "RUNNING" %}data-toggle="pill"{% endif %} data-target="#_console" class="text-center">
<a href="#{% if instance.state == "RUNNING" %}console" data-toggle="pill{% endif %}" data-target="#_console" class="text-center">
<i class="icon-desktop icon-2x"></i><br>
{% trans "Console" %}</a></li>
<li>
......
......@@ -49,7 +49,7 @@
} return false;});
$('a[href$="console"]').click(function() {
$("body").on("click", 'a[href$="console"]', function() {
var host, port, password, path;
$("#vm-info-pane").hide();
......
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