[Task] Availbility Traffic Light
This commit is contained in:
parent
49b531e58f
commit
67725d3ed4
|
@ -4,18 +4,16 @@
|
||||||
<!-- ex. {procent .Count 10}%-->
|
<!-- ex. {procent .Count 10}%-->
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
||||||
<g class="arcs">
|
<g class="arcs">
|
||||||
if (.Count < 4){
|
{{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="#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}}"/>
|
<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)}}
|
||||||
else if (.Count < 7 and .Count > 3){
|
|
||||||
<circle cx="50" cy="50" r="40" fill="#fff" stroke="#aaa" stroke-width="5"/>
|
<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}}"/>
|
<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}}
|
||||||
else{
|
|
||||||
<circle cx="50" cy="50" r="40" fill="#fff" stroke="#aaa" stroke-width="5"/>
|
<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}}"/>
|
<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>
|
</g>
|
||||||
<text x="50" y="65" fill="#555" text-anchor="middle" style="font: 50px Roboto,Verdana,sans-serif;">{{.Count}}</text>
|
<text x="50" y="65" fill="#555" text-anchor="middle" style="font: 50px Roboto,Verdana,sans-serif;">{{.Count}}</text>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue