Commit ce68d003 by Csók Tamás

vm-details.js: Modified the disable/enable connection button to check from response

parent 0dcbe8f9
......@@ -388,10 +388,14 @@ function checkNewActivity(runs) {
}
$("#vm-details-state span").html(data['human_readable_status'].toUpperCase());
if(data['status'] == "RUNNING") {
$("#dashboard-vm-details-connect-button").prop("disabled", false);
if(data['connect_uri']) {
$("#dashboard-vm-details-connect-button").prop("disabled", false);
}
$("[data-target=#_console]").attr("data-toggle", "pill").attr("href", "#console").parent("li").removeClass("disabled");
} else {
$("#dashboard-vm-details-connect-button").prop("disabled", true);
if(data['connect_uri']) {
$("#dashboard-vm-details-connect-button").prop("disabled", true);
}
$("[data-target=#_console]").attr("data-toggle", "_pill").attr("href", "#").parent("li").addClass("disabled");
}
......
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