github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/components/primary-metric/node.hbs (about) 1 <div data-test-primary-metric class="primary-metric" ...attributes 2 {{did-insert this.start}} 3 {{did-update this.start}}> 4 <h4 data-test-primary-metric-title class="title is-5"> 5 {{#if (eq this.metric "cpu")}} CPU 6 {{else if (eq this.metric "memory")}} Memory 7 {{else}} {{this.metric}} {{/if}} 8 </h4> 9 <div class="primary-graphic"> 10 <StatsTimeSeries @data={{this.data}} @chartClass={{this.chartClass}}> 11 <:after as |c|> 12 {{#if this.reservedAnnotations}} 13 <c.HAnnotations @annotations={{this.reservedAnnotations}} @labelProp="label" /> 14 {{/if}} 15 </:after> 16 </StatsTimeSeries> 17 </div> 18 <PrimaryMetric::CurrentValue @chartClass={{this.chartClass}} @percent={{this.data.lastObject.percent}} /> 19 <div class="annotation" data-test-absolute-value> 20 {{#if (eq this.metric "cpu")}} 21 <strong>{{format-scheduled-hertz this.data.lastObject.used}}</strong> / {{format-scheduled-hertz this.reservedAmount}} Total 22 {{else if (eq this.metric "memory")}} 23 <strong>{{format-scheduled-bytes this.data.lastObject.used}}</strong> / {{format-scheduled-bytes this.reservedAmount start="MiB"}} Total 24 {{else}} 25 <strong>{{this.data.lastObject.used}}</strong> / {{this.reservedAmount}} Total 26 {{/if}} 27 </div> 28 </div>