From 8b6f79aa298b32c2cefcd4f7695ec4cddeaafabf Mon Sep 17 00:00:00 2001 From: Kálmán Viktor <kviktor@cloud.bme.hu> Date: Tue, 23 Sep 2014 13:18:53 +0200 Subject: [PATCH] dashboard: show node on vm --- circle/dashboard/templates/dashboard/vm-detail/home.html | 13 +++++++++++++ circle/vm/operations.py | 7 +++++++ 2 files changed, 20 insertions(+) diff --git a/circle/dashboard/templates/dashboard/vm-detail/home.html b/circle/dashboard/templates/dashboard/vm-detail/home.html index 4c946bf..e647858 100644 --- a/circle/dashboard/templates/dashboard/vm-detail/home.html +++ b/circle/dashboard/templates/dashboard/vm-detail/home.html @@ -90,6 +90,19 @@ </div> </form> </div><!-- id:vm-details-tags --> + {% if request.user.is_superuser %} + <dl> + <dt>Node:</dt> + {% if instance.node %} + <dd> + <a href="{{ instance.node.get_absolute_url }}"> + {{ instance.node.name }} + </a> + </dd> + {% else %} + - + {% endif %} + {% endif %} <dl> <dt>{% trans "Template" %}:</dt> <dd> diff --git a/circle/vm/operations.py b/circle/vm/operations.py index d5b0e59..ae16624 100644 --- a/circle/vm/operations.py +++ b/circle/vm/operations.py @@ -758,6 +758,13 @@ class WakeUpOperation(InstanceOperation): "deploy network")): self.instance.deploy_net() + activity.result = create_readable( + "", + ugettext_noop( + "Scheduled to %(node)s" % {'node': self.instance.node.name} + ) + ) + try: self.instance.renew(parent_activity=activity) except: -- libgit2 0.26.0