github.com/hernad/nomad@v1.6.112/ui/app/components/primary-metric/node.hbs (about)

     1  {{!
     2    Copyright (c) HashiCorp, Inc.
     3    SPDX-License-Identifier: MPL-2.0
     4  ~}}
     5  
     6  <div data-test-primary-metric class="primary-metric" ...attributes
     7    {{did-insert this.start}}
     8    {{did-update this.start}}>
     9    <h4 data-test-primary-metric-title class="title is-5">
    10      {{#if (eq this.metric "cpu")}} CPU
    11      {{else if (eq this.metric "memory")}} Memory
    12      {{else}} {{this.metric}} {{/if}}
    13    </h4>
    14    <div class="primary-graphic">
    15      <StatsTimeSeries @data={{this.data}} @chartClass={{this.chartClass}}>
    16        <:after as |c|>
    17          {{#if this.reservedAnnotations}}
    18            <c.HAnnotations @annotations={{this.reservedAnnotations}} @labelProp="label" />
    19          {{/if}}
    20        </:after>
    21      </StatsTimeSeries>
    22    </div>
    23    <PrimaryMetric::CurrentValue @chartClass={{this.chartClass}} @percent={{this.data.lastObject.percent}} />
    24    <div class="annotation" data-test-absolute-value>
    25      {{#if (eq this.metric "cpu")}}
    26        <strong>{{format-scheduled-hertz this.data.lastObject.used}}</strong> / {{format-scheduled-hertz this.reservedAmount}} Total
    27      {{else if (eq this.metric "memory")}}
    28        <strong>{{format-scheduled-bytes this.data.lastObject.used}}</strong> / {{format-scheduled-bytes this.reservedAmount start="MiB"}} Total
    29      {{else}}
    30        <strong>{{this.data.lastObject.used}}</strong> / {{this.reservedAmount}} Total
    31      {{/if}}
    32    </div>
    33  </div>