Commit eb728978 by Kálmán Viktor

vm: get_readable_name method for InstanceActivity

parent bebce715
...@@ -772,6 +772,9 @@ class InstanceActivity(ActivityModel): ...@@ -772,6 +772,9 @@ class InstanceActivity(ActivityModel):
return '{}({})'.format(self.activity_code, return '{}({})'.format(self.activity_code,
self.instance) self.instance)
def get_readable_name(self):
return self.activity_code.split('.')[-1].replace('_', ' ').capitalize()
@classmethod @classmethod
def create(cls, code_suffix, instance, task_uuid=None, user=None): def create(cls, code_suffix, instance, task_uuid=None, user=None):
act = cls(activity_code='vm.Instance.' + code_suffix, act = cls(activity_code='vm.Instance.' + code_suffix,
......
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