github.com/hernad/nomad@v1.6.112/ui/app/components/primary-metric/task.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 @taskState @metric}}>
     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    </div>
    17    <PrimaryMetric::CurrentValue @chartClass={{this.chartClass}} @percent={{this.data.lastObject.percent}} />
    18    <div class="annotation" data-test-absolute-value>
    19      {{#if (eq this.metric "cpu")}}
    20        <strong>{{format-scheduled-hertz this.data.lastObject.used}}</strong> / {{format-scheduled-hertz this.reservedAmount}} Total
    21      {{else if (eq this.metric "memory")}}
    22        <strong>{{format-scheduled-bytes this.data.lastObject.used}}</strong> / {{format-scheduled-bytes this.reservedAmount start="MiB"}} Total
    23      {{else}}
    24        <strong>{{this.data.lastObject.used}}</strong> / {{this.reservedAmount}} Total
    25      {{/if}}
    26    </div>
    27  </div>