From 4530e2e5476b017e8c49effb283223f7c8fb8bf2 Mon Sep 17 00:00:00 2001 From: wenincode Date: Thu, 13 Oct 2022 15:48:18 -0600 Subject: [PATCH] Format healthchecks template --- .../dc/services/instance/healthchecks.hbs | 81 +++++++++---------- 1 file changed, 36 insertions(+), 45 deletions(-) diff --git a/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs b/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs index 80f621db55..f9630f2d3b 100644 --- a/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs +++ b/ui/packages/consul-ui/app/templates/dc/services/instance/healthchecks.hbs @@ -1,68 +1,59 @@ - + {{#let - (filter (action 'syntheticNodeSearchPropertyFilter' route.model.item) searchProperties) as |filteredSearchProperties|}} + (filter (action 'syntheticNodeSearchPropertyFilter' route.model.item) searchProperties) + as |filteredSearchProperties| + }} {{#let - - (hash - value=(or sortBy "Status:asc") - change=(action (mut sortBy) value="target.selected") - ) - + (hash value=(or sortBy 'Status:asc') change=(action (mut sortBy) value='target.selected')) (hash status=(hash value=(if status (split status ',') undefined) - change=(action (mut status) value="target.selectedItems") + change=(action (mut status) value='target.selectedItems') ) check=(hash value=(if check (split check ',') undefined) - change=(action (mut check) value="target.selectedItems") + change=(action (mut check) value='target.selectedItems') ) searchproperty=(hash - value=(if (not-eq searchproperty undefined) - (split searchproperty ',') - filteredSearchProperties + value=(if + (not-eq searchproperty undefined) (split searchproperty ',') filteredSearchProperties ) - change=(action (mut searchproperty) value="target.selectedItems") + change=(action (mut searchproperty) value='target.selectedItems') default=filteredSearchProperties ) ) - - (filter + (filter (action 'syntheticNodeHealthCheckFilter' route.model.item) - (merge-checks (array route.model.item.Checks route.model.proxy.Checks) route.model.proxy.ServiceProxy.Expose.Checks) + (merge-checks + (array route.model.item.Checks route.model.proxy.Checks) + route.model.proxy.ServiceProxy.Expose.Checks + ) ) + as |sort filters items| + }} +
- as |sort filters items|}} -
- - {{#if (gt items.length 0) }} - + {{#if (gt items.length 0)}} + {{/if}} - {{#let (find-by "Type" "serf" items) as |serf|}} - {{#if (and serf (eq serf.Status "critical"))}} - + {{#let (find-by 'Type' 'serf' items) as |serf|}} + {{#if (and serf (eq serf.Status 'critical'))}} +

- {{t "routes.dc.services.instance.healthchecks.critical-serf-notice.header"}} + {{t 'routes.dc.services.instance.healthchecks.critical-serf-notice.header'}}

{{t - "routes.dc.services.instance.healthchecks.critical-serf-notice.body" + 'routes.dc.services.instance.healthchecks.critical-serf-notice.body' htmlSafe=true }} @@ -70,30 +61,30 @@ as |route|> {{/if}} {{/let}} + as |collection| + > - + - - {{t "routes.dc.services.instance.healthchecks.empty" + + {{t + 'routes.dc.services.instance.healthchecks.empty' items=items.length htmlSafe=true }} - - + + -
+
{{/let}} {{/let}}