John Cowen 613be01f43
ui: Change URI helper to a template based approach (#9344)
This moves our uri helper to use a the template renderer we already have for rendering URLs.
2020-12-09 09:22:46 +00:00

43 lines
838 B
Handlebars

{{#if (not @noMetricsReason)}}
<DataSource
@src={{uri
'/${nspace}/${dc}/metrics/${endpoint}/${service}/${protocol}'
(hash
nspace=@nspace
dc=@dc
endpoint=@endpoint
service=@service
protocol=@protocol
)
}}
@onchange={{action 'statsUpdate'}}
@onerror={{action (mut error) value="error"}}
/>
{{/if}}
<div class="stats">
{{#if hasLoaded }}
{{#each stats as |stat|}}
<dl {{tooltip
stat.desc
options=(hash
allowHTML=true
)
}}>
<dt>
{{stat.value}}
</dt>
<dd>
{{stat.label}}
</dd>
</dl>
{{else}}
<span>No Metrics Available</span>
{{/each}}
{{else}}
<TopologyMetrics::Status
@noMetricsReason={{@noMetricsReason}}
@error={{error}}
/>
{{/if}}
</div>