From 5bf6011429f02ec40efc3ddd0a632f3a3f105883 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Fri, 1 Jul 2016 19:54:44 +0200 Subject: [PATCH] Rotation for label of interfaces --- gns3server/controller/link.py | 1 + tests/controller/test_link.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/gns3server/controller/link.py b/gns3server/controller/link.py index 6f82b144..db88f008 100644 --- a/gns3server/controller/link.py +++ b/gns3server/controller/link.py @@ -52,6 +52,7 @@ class Link: label = { "x": -10, "y": -10, + "rotation": 0, "text": "{}/{}".format(adapter_number, port_number), "style": "font-size: 10; font-style: Verdana" } diff --git a/tests/controller/test_link.py b/tests/controller/test_link.py index afd5ad96..cca721a0 100644 --- a/tests/controller/test_link.py +++ b/tests/controller/test_link.py @@ -66,6 +66,7 @@ def test_add_node(async_run, project, compute): 'y': -10, 'text': '0/4', 'x': -10, + 'rotation': 0, 'style': 'font-size: 10; font-style: Verdana' } } @@ -89,6 +90,7 @@ def test_update_node(async_run, project, compute): 'y': -42, 'text': '0/4', 'x': -10, + 'rotation': 0, 'style': 'font-size: 10; font-style: Verdana' } project.dump = AsyncioMagicMock() @@ -118,6 +120,7 @@ def test_json(async_run, project, compute): 'y': -10, 'text': '0/4', 'x': -10, + 'rotation': 0, 'style': 'font-size: 10; font-style: Verdana' } }, @@ -129,6 +132,7 @@ def test_json(async_run, project, compute): 'y': -10, 'text': '1/3', 'x': -10, + 'rotation': 0, 'style': 'font-size: 10; font-style: Verdana' } } @@ -148,6 +152,7 @@ def test_json(async_run, project, compute): 'y': -10, 'text': '0/4', 'x': -10, + 'rotation': 0, 'style': 'font-size: 10; font-style: Verdana' } }, @@ -159,6 +164,7 @@ def test_json(async_run, project, compute): 'y': -10, 'text': '1/3', 'x': -10, + 'rotation': 0, 'style': 'font-size: 10; font-style: Verdana' } }