diff --git a/examples/extend_web_ui/static/custom-stats-table.css b/examples/extend_web_ui/static/custom-stats-table.css new file mode 100644 index 0000000000..189f6c257f --- /dev/null +++ b/examples/extend_web_ui/static/custom-stats-table.css @@ -0,0 +1,49 @@ +/* + Customises stats tables color, alignment. Adds row highlighting. + Just a simple extension example. The sky's the limit here :-) +**/ + +table.stats { + border-collapse: collapse; + overflow: hidden; + box-shadow: 0 0 20px rgba(0,0,0,0.1); +} + +table.stats th, td { + padding: 15px; + background-color: rgba(255,255,255,0.2); + color: #fff; +} + +table.stats th { + text-align: left; +} + +table.stats thead { + th { + background-color: #55608f; + } +} + +table.stats tbody { + tr { + &:hover { + background-color: rgba(255,255,255,0.3); + } + } + td { + position: relative; + &:hover { + &:before { + content: ""; + position: absolute; + left: 0; + right: 0; + top: -9999px; + bottom: -9999px; + background-color: rgba(255,255,255,0.2); + z-index: -1; + } + } + } +} \ No newline at end of file diff --git a/examples/extend_web_ui/templates/extend.html b/examples/extend_web_ui/templates/extend.html index fcd58eeb50..5ea7826dff 100644 --- a/examples/extend_web_ui/templates/extend.html +++ b/examples/extend_web_ui/templates/extend.html @@ -1,5 +1,9 @@ {% extends "index.html" %} +{% block extended_head %} + +{% endblock extended_head %} + {% block extended_tabs %}
  • Content Length
  • {% endblock extended_tabs %} diff --git a/locust/templates/index.html b/locust/templates/index.html index 3fc4921987..840af1ffba 100644 --- a/locust/templates/index.html +++ b/locust/templates/index.html @@ -4,6 +4,8 @@ Locust for {{ locustfile }} + {% block extended_head %} + {% endblock extended_head %}