Commit 0afb1934 by Kálmán Viktor

dashboard: ajax status update now respects the chosen language

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