diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-02-23 17:11:17 +0100 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-02-24 17:05:29 +0100 |
commit | 23d9799e09ea6192fb12d6091e31400fbd6c3a8d (patch) | |
tree | a29789a90f9981862d975d2a612e455fb1b3d145 /ogcp/templates/macros.html | |
parent | af4b07cecf032ed4812eb0af288a00a966eb36d1 (diff) |
Limit max number of clients drawn in commands
Print large number of clients (hundreds) does not make sense, it is
unreadable.
Diffstat (limited to 'ogcp/templates/macros.html')
-rw-r--r-- | ogcp/templates/macros.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html index a779dd7..d6ef2af 100644 --- a/ogcp/templates/macros.html +++ b/ogcp/templates/macros.html @@ -55,8 +55,12 @@ {% macro cmd_selected_clients(ip_list) -%} <ul class="list-group mx-5 list-group-horizontal-sm d-flex flex-wrap"> -{% for ip in ip_list %} +{% set max_clients = 50 %} +{% for ip in ip_list[:max_clients] %} <li class="list-group-item flex-fill list-group-item-info">{{ ip }}</li> + {% if loop.last %} + <li class="list-group-item flex-fill list-group-item-info">...</li> + {% endif %} {% endfor %} </ul> {% endmacro %} |