From dcd8e0de40b91e52739e0b17c4eb94680d53c081 Mon Sep 17 00:00:00 2001 From: Alain Lefebvre Date: Wed, 6 Aug 2014 16:11:00 -0400 Subject: [PATCH] Applied small modification so that the hostname being tested can be visible on the index page --- locust/static/style.css | 11 +++++++++++ locust/templates/index.html | 1 + locust/web.py | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/locust/static/style.css b/locust/static/style.css index cd86bf16a2..2b71614aba 100644 --- a/locust/static/style.css +++ b/locust/static/style.css @@ -278,3 +278,14 @@ ul.tabs li a.current { padding: 30px; padding-top: 0px; } + +.hostname { + margin: 5px 10px 15px 5px; + float: right +} + +div.hostname > span { + font-weight: bold; + font-size: 1.2em; + color: #77c798; +} \ No newline at end of file diff --git a/locust/templates/index.html b/locust/templates/index.html index 627580041f..bba9f2b787 100644 --- a/locust/templates/index.html +++ b/locust/templates/index.html @@ -88,6 +88,7 @@

Change the locust count

  • Exceptions
  • +
    Host: {{host}}
    diff --git a/locust/web.py b/locust/web.py index ed54b02490..7d3f280048 100644 --- a/locust/web.py +++ b/locust/web.py @@ -39,7 +39,8 @@ def index(): is_distributed=is_distributed, slave_count=slave_count, user_count=runners.locust_runner.user_count, - version=version + version=version, + host=runners.locust_runner.locust_classes[0].host ) @app.route('/swarm', methods=["POST"])