genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
hs_monolith/contrib/good_availablity.svg

20 lines
1.2 KiB
XML

<!-- Funktionen: -->
<!-- process_radius ANZAHL MAXANZAHL RADIUS -->
<!-- procent ANZAHL MAXANZAHL -->
<!-- ex. {procent .Count 10}%-->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<g class="arcs">
{{if lt .Count 4}}
<circle cx="50" cy="50" r="40" fill="#fff" stroke="#aaa" stroke-width="5"/>
<circle cx="50" cy="50" r="40" fill="none" stroke="#b02" stroke-width="5" stroke-dasharray="251.33" stroke-dashoffset="{{process_radius .Count 10 40}}"/>
{{ else if and (lt .Count 7) (gt .Count 3)}}
<circle cx="50" cy="50" r="40" fill="#fff" stroke="#aaa" stroke-width="5"/>
<circle cx="50" cy="50" r="40" fill="none" stroke="#e72" stroke-width="5" stroke-dasharray="251.33" stroke-dashoffset="{{process_radius .Count 10 40}}"/>
{{else}}
<circle cx="50" cy="50" r="40" fill="#fff" stroke="#aaa" stroke-width="5"/>
<circle cx="50" cy="50" r="40" fill="none" stroke="#6a4" stroke-width="5" stroke-dasharray="251.33" stroke-dashoffset="{{process_radius .Count 10 40}}"/>
{{end}}
</g>
<text x="50" y="65" fill="#555" text-anchor="middle" style="font: 50px Roboto,Verdana,sans-serif;">{{.Count}}</text>
</svg>