diff --git a/computes/models.py b/computes/models.py index f81eafa..86df52a 100644 --- a/computes/models.py +++ b/computes/models.py @@ -48,6 +48,10 @@ class Compute(Model): @cached_property def cpu_count(self): return self.proxy.get_node_info()[3] + + @cached_property + def cpu_usage(self): + return round(self.proxy.get_cpu_usage().get('usage')) @cached_property def ram_size(self): diff --git a/instances/templates/allinstances.html b/instances/templates/allinstances.html index 457d9f6..b600db5 100644 --- a/instances/templates/allinstances.html +++ b/instances/templates/allinstances.html @@ -39,8 +39,8 @@ {% if request.user.is_superuser %} diff --git a/instances/templates/create_inst_block.html b/instances/templates/create_inst_block.html index e069773..6ef1915 100644 --- a/instances/templates/create_inst_block.html +++ b/instances/templates/create_inst_block.html @@ -5,7 +5,7 @@