github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/ui/app/templates/components/scale-events-chart.hbs (about)

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