Commit fd8e6531 by Kálmán Viktor

dashboard: better progress bar

parent 52b9dbf4
...@@ -832,11 +832,6 @@ textarea[name="list-new-namelist"] { ...@@ -832,11 +832,6 @@ textarea[name="list-new-namelist"] {
margin-left: 5px; margin-left: 5px;
} }
.progress-bar {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
#progress-marker-hard { #progress-marker-hard {
border-top-right-radius: 4px; border-top-right-radius: 4px;
border-bottom-right-radius: 4px; border-bottom-right-radius: 4px;
......
...@@ -12,23 +12,26 @@ ...@@ -12,23 +12,26 @@
</div> </div>
</div> </div>
<div class="progress" style="position: relative; overflow: visible;"> <div style="position: relative;">
<div class="progress-bar" role="progressbar" aria-valuenow="{{ quota.Used }}" aria-valuemin="0" <div class="progress" style="width: 100%">
aria-valuemax="{{ quota.Hard }}" style="width: <div class="progress-bar" role="progressbar"
{% if quota.Used > quota.Hard %}100{% else %}{% widthratio quota.Used quota.Hard 100 %}%{% endif %}%"> aria-valuenow="{{ quota.Used }}" aria-valuemin="0" aria-valuemax="{{ quota.Hard }}"
style="width: {% widthratio quota.Used quota.Hard 100 %}%; min-width: 150px;">
<div style="padding-top: 2px;"> <div style="padding-top: 2px;">
{% blocktrans with used=quota.readable_used %} {% blocktrans with used=quota.readable_used %}
{{ used }} used {{ used }} used
{% endblocktrans %} {% endblocktrans %}
</div> </div>
</div> </div>
<div class="progress-marker" id="progress-marker-hard" data-placement="left" <div class="progress-marker" id="progress-marker-hard" data-placement="left"
title="{% trans "Hard limit" %}: {{ quota.readable_hard }}"> title="{% trans "Hard limit" %}: {{ quota.readable_hard }}">
</div> </div>
<div class="progress-marker" id="progress-marker-soft" style="background: orange; <div class="progress-marker" id="progress-marker-soft" style="background: orange;
left: {% widthratio quota.Soft quota.Hard 100 %}%" left: {% widthratio quota.Soft quota.Hard 100 %}%"
title="{% trans "Soft limit" %}: {{ quota.readable_soft }}" title="{% trans "Soft limit" %}: {{ quota.readable_soft }}"
data-placement="left"> data-placement="top">
</div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment