2020-12-08 15:47:55 +00:00
|
|
|
{{#if (not @noMetricsReason)}}
|
2020-10-26 19:48:23 +00:00
|
|
|
<DataSource
|
2020-12-09 09:22:46 +00:00
|
|
|
@src={{uri
|
|
|
|
'/${nspace}/${dc}/metrics/summary-for-service/${service}/${protocol}'
|
|
|
|
(hash
|
|
|
|
nspace=@nspace
|
|
|
|
dc=@dc
|
|
|
|
service=@service
|
|
|
|
protocol=@protocol
|
|
|
|
)
|
|
|
|
}}
|
2020-10-26 19:48:23 +00:00
|
|
|
@onchange={{action 'change'}}
|
|
|
|
@onerror={{action (mut error) value="error"}}
|
|
|
|
/>
|
2020-12-08 15:47:55 +00:00
|
|
|
{{/if}}
|
2020-10-09 20:31:15 +00:00
|
|
|
|
|
|
|
{{on-window 'resize' (action 'redraw')}}
|
2020-12-08 15:47:55 +00:00
|
|
|
{{did-insert (action 'redraw')}}
|
2020-10-09 20:31:15 +00:00
|
|
|
|
2020-11-18 19:02:13 +00:00
|
|
|
{{#if (not empty)}}
|
|
|
|
{{#if data.labels}}
|
2021-03-09 09:30:01 +00:00
|
|
|
<a
|
|
|
|
class="sparkline-key-link"
|
|
|
|
{{on "click" (optional this.modal.open)}}
|
|
|
|
>
|
|
|
|
Key
|
|
|
|
</a>
|
2020-11-18 19:02:13 +00:00
|
|
|
{{/if}}
|
2020-10-20 15:41:16 +00:00
|
|
|
{{/if}}
|
|
|
|
|
2021-02-18 18:31:49 +00:00
|
|
|
<div data-test-sparkline class="sparkline-wrapper">
|
2020-10-09 20:31:15 +00:00
|
|
|
<div class="tooltip">
|
|
|
|
<div class="sparkline-time">Timestamp</div>
|
|
|
|
</div>
|
2020-11-18 19:02:13 +00:00
|
|
|
{{#if empty}}
|
2020-10-26 19:48:23 +00:00
|
|
|
<TopologyMetrics::Status
|
|
|
|
@noMetricsReason={{@noMetricsReason}}
|
|
|
|
@error={{error}}
|
|
|
|
/>
|
2020-11-18 19:02:13 +00:00
|
|
|
{{/if}}
|
2020-10-09 20:31:15 +00:00
|
|
|
<svg class="sparkline"></svg>
|
|
|
|
</div>
|
|
|
|
|
2020-10-20 15:41:16 +00:00
|
|
|
<ModalDialog
|
|
|
|
class="sparkline-key"
|
2021-04-06 12:40:40 +00:00
|
|
|
@aria={{hash
|
|
|
|
label="Metrics Key"
|
|
|
|
}}
|
2020-10-20 15:41:16 +00:00
|
|
|
as |modal|>
|
2021-03-09 09:30:01 +00:00
|
|
|
<Ref @target={{this}} @name="modal" @value={{modal}} />
|
2020-10-20 15:41:16 +00:00
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h3>Metrics Key</h3>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="body">
|
|
|
|
<div class="sparkline-key-content">
|
|
|
|
<p>This key describes the metrics corresponding to the graph tooltip labels in more detail.</p>
|
|
|
|
<dl>
|
|
|
|
{{#each-in data.labels as |label desc| }}
|
|
|
|
<dt>{{label}}</dt>
|
2020-10-26 19:48:23 +00:00
|
|
|
<dd>{{desc}}</dd>
|
2020-10-20 15:41:16 +00:00
|
|
|
{{/each-in}}
|
|
|
|
</dl>
|
|
|
|
{{#unless data.labels}}
|
|
|
|
<span class="no-data">No metrics loaded.</span>
|
|
|
|
{{/unless}}
|
|
|
|
</div>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
<button
|
|
|
|
type="button"
|
|
|
|
class="type-cancel"
|
|
|
|
onclick={{action modal.close}}
|
|
|
|
>
|
|
|
|
Close
|
|
|
|
</button>
|
|
|
|
</BlockSlot>
|
2021-03-09 09:30:01 +00:00
|
|
|
</ModalDialog>
|