github.com/hernad/nomad@v1.6.112/ui/app/templates/components/scale-events-chart.hbs (about)

     1  {{!
     2    Copyright (c) HashiCorp, Inc.
     3    SPDX-License-Identifier: MPL-2.0
     4  ~}}
     5  
     6  <LineChart
     7    @timeseries={{true}}
     8    @xProp="time"
     9    @yProp="count"
    10    @data={{this.data}}>
    11    <:svg as |c|>
    12      <c.Area
    13        @curve="stepAfter"
    14        @data={{this.data}} />
    15    </:svg>
    16    <:after as |c|>
    17      <c.Tooltip class="is-snappy" as |series datum|>
    18        <li>
    19          <span class="label"><span class="color-swatch is-primary" />{{datum.formattedX}}</span>
    20          <span class="value">{{datum.formattedY}}</span>
    21        </li>
    22      </c.Tooltip>
    23      <c.VAnnotations
    24        @annotations={{this.annotations}}
    25        @key="event.uid"
    26        @activeAnnotation={{this.activeEvent}}
    27        @annotationClick={{action this.toggleEvent}} />
    28    </:after>
    29  </LineChart>
    30  {{#if this.activeEvent}}
    31    <div data-test-event-details>
    32      <div class="event">
    33        <div data-test-type class="type">
    34          {{#if this.activeEvent.event.error}}
    35            {{x-icon "cancel-circle-fill" class="is-danger"}}
    36          {{else}}
    37            {{x-icon "info-circle-fill" class="is-grey"}}
    38          {{/if}}
    39        </div>
    40        <div>
    41          <p data-test-timestamp class="timestamp">{{format-month-ts this.activeEvent.event.time}}</p>
    42          <p data-test-message class="message">{{this.activeEvent.event.message}}</p>
    43        </div>
    44      </div>
    45      <JsonViewer @json={{this.activeEvent.event.meta}} @fluidHeight={{true}} />
    46    </div>
    47  {{/if}}