From 870fde3d5b13c4948bc6e17daa7276c4b433ab94 Mon Sep 17 00:00:00 2001
From: Dobe Peter <dobe@iit.bme.hu>
Date: Wed, 27 Jul 2016 03:19:09 +0200
Subject: [PATCH] dashboard: fix activity code checking

---
 circle/dashboard/views/vm.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/circle/dashboard/views/vm.py b/circle/dashboard/views/vm.py
index 0f4c138..33fc87f 100644
--- a/circle/dashboard/views/vm.py
+++ b/circle/dashboard/views/vm.py
@@ -46,6 +46,7 @@ from braces.views import SuperuserRequiredMixin, LoginRequiredMixin
 
 from common.models import (
     create_readable, HumanReadableException, fetch_human_exception,
+    split_activity_code,
 )
 from firewall.models import Vlan, Host, Rule
 from manager.scheduler import SchedulerError
@@ -798,7 +799,7 @@ def _get_activity_icon(act):
     op = act.get_operation()
     if op and op.id in vm_ops:
         return vm_ops[op.id].icon
-    elif act.activity_code == u'vm.Instance.console-accessed':
+    elif split_activity_code(act.activity_code)[-1] == u'console-accessed':
         return "terminal"
     else:
         return "cog"
--
libgit2 0.26.0