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}}
|
|
|
|
<a class="sparkline-key-link" {{action (mut shouldShowKey) true}}>Key</a>
|
|
|
|
{{/if}}
|
2020-10-20 15:41:16 +00:00
|
|
|
{{/if}}
|
|
|
|
|
2020-10-09 20:31:15 +00:00
|
|
|
<div class="sparkline-wrapper">
|
|
|
|
<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
|
|
|
{{#if shouldShowKey}}
|
|
|
|
<ModalDialog
|
|
|
|
class="sparkline-key"
|
|
|
|
@onclose={{action (mut shouldShowKey) false}}
|
|
|
|
as |modal|>
|
|
|
|
<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>
|
|
|
|
</ModalDialog>
|
|
|
|
{{/if}}
|