Commit d0f18ec8 by Kálmán Viktor

dashboard: fix console not enabling because of upper case/translated state name

parent 0afb1934
......@@ -215,7 +215,7 @@ function checkNewActivity(only_state, runs) {
}
$("#vm-details-state i").prop("class", data['icon']);
$("#vm-details-state span").html(data['state'].toUpperCase());
$("#vm-details-state span").html(data['human_readable_state'].toUpperCase());
if(data['state'] == "RUNNING") {
$("[data-target=#_console]").attr("data-toggle", "pill").attr("href", "#console").parent("li").removeClass("disabled");
} else {
......
......@@ -1615,7 +1615,8 @@ def vm_activity(request, pk):
response = {}
only_state = request.GET.get("only_state")
response['state'] = instance.get_status_display()
response['human_readable_state'] = instance.get_status_display()
response['state'] = instance.state
response['icon'] = instance.get_status_icon()
if only_state is not None and only_state == "false": # instance activity
context = {
......
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