open-nomad/ui/app/templates/components/scale-events-accordion.hbs

53 lines
1.5 KiB
Handlebars
Raw Normal View History

<ListAccordion data-test-scale-events @source={{@events}} @key="time" as |a|>
2022-01-26 16:28:21 +00:00
<a.head
@buttonLabel="details"
@isExpandable={{a.item.hasMeta}}
class="with-columns"
>
<div class="columns inline-definitions">
<div class="column is-3">
<span class="icon-field">
2022-01-26 16:28:21 +00:00
<span
class="icon-container"
title="{{if a.item.error "Error event"}}"
data-test-error={{a.item.error}}
>
{{#if a.item.error}}
{{x-icon "cancel-circle-fill" class="is-danger"}}
{{/if}}
</span>
<span data-test-time title="{{format-ts a.item.time}}">
{{format-month-ts a.item.time}}
</span>
</span>
</div>
<div class="column is-2">
{{#if a.item.hasCount}}
2022-01-26 16:28:21 +00:00
<span
data-test-count-icon
class="tooltip"
2022-01-26 16:28:21 +00:00
aria-label="Count
{{if a.item.increased "increased" "decreased"}}
to
{{a.item.count}}"
>
{{#if a.item.increased}}
{{x-icon "arrow-up" class="is-danger"}}
{{else}}
{{x-icon "arrow-down" class="is-primary"}}
{{/if}}
</span>
2022-01-26 16:28:21 +00:00
<span data-test-count>
{{a.item.count}}
</span>
{{/if}}
</div>
<div class="column" data-test-message>
{{a.item.message}}
</div>
</div>
</a.head>
<a.body @fullBleed={{true}}>
<JsonViewer @json={{a.item.meta}} @fluidHeight={{true}} />
</a.body>
2022-01-26 16:28:21 +00:00
</ListAccordion>