open-nomad/ui/app/templates/components/gauge-chart.hbs
Phil Renaud 99185e2d8f
[ui, compliance] Remove the newline after .hbs copyright headers (#16861)
* Remove the newline after .hbs copyright headers

* Trying with the whitespace control char
2023-04-14 13:08:13 -04:00

25 lines
926 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
~}}
<svg data-test-gauge-svg role="img" height={{this.height}} title="gauge chart">
<defs>
<linearGradient x1="0" x2="1" y1="0" y2="0" class="{{this.chartClass}}" id="{{this.fillId}}">
<stop class="start" offset="0%" />
<stop class="end" offset="100%" />
</linearGradient>
<clipPath id="{{this.maskId}}">
<path class="fill" d="{{this.valueArc}}" />
</clipPath>
</defs>
<g class="canvas {{this.chartClass}}">
<path class="background" d="{{this.backgroundArc}}" />
<rect class="area" x="0" y="0" width="100%" height="100%" fill="url(#{{this.fillId}})" clip-path="url(#{{this.maskId}})" />
</g>
</svg>
<div class="metric">
<h3 data-test-label class="label">{{this.label}}</h3>
<p data-test-percentage class="value">{{format-percentage this.value total=this.total complement=this.complement}}</p>
</div>