mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 13:55:55 +00:00
Filter healthchecks for synthetic-nodes
This commit is contained in:
parent
e04c56a3a1
commit
0eb250d3a0
@ -0,0 +1,16 @@
|
|||||||
|
import Controller from '@ember/controller';
|
||||||
|
import { action } from '@ember/object';
|
||||||
|
|
||||||
|
export default class HealthChecksController extends Controller {
|
||||||
|
@action
|
||||||
|
syntheticNodeSearchPropertyFilter(item, searchProperty) {
|
||||||
|
return !(item.Node.Meta?.['synthetic-node'] && searchProperty === 'Node');
|
||||||
|
}
|
||||||
|
|
||||||
|
@action
|
||||||
|
syntheticNodeHealthCheckFilter(item, healthcheck, index, list) {
|
||||||
|
console.log('List to be filtered: ', list);
|
||||||
|
console.log(healthcheck.Kind);
|
||||||
|
return !(item.Node.Meta?.['synthetic-node'] && healthcheck?.Kind === 'node');
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,8 @@
|
|||||||
<Route
|
<Route
|
||||||
@name={{routeName}}
|
@name={{routeName}}
|
||||||
as |route|>
|
as |route|>
|
||||||
|
{{#let
|
||||||
|
(filter (action 'syntheticNodeSearchPropertyFilter' route.model.item) searchProperties) as |filteredSearchProperties|}}
|
||||||
{{#let
|
{{#let
|
||||||
|
|
||||||
(hash
|
(hash
|
||||||
@ -20,14 +22,17 @@ as |route|>
|
|||||||
searchproperty=(hash
|
searchproperty=(hash
|
||||||
value=(if (not-eq searchproperty undefined)
|
value=(if (not-eq searchproperty undefined)
|
||||||
(split searchproperty ',')
|
(split searchproperty ',')
|
||||||
searchProperties
|
filteredSearchProperties
|
||||||
)
|
)
|
||||||
change=(action (mut searchproperty) value="target.selectedItems")
|
change=(action (mut searchproperty) value="target.selectedItems")
|
||||||
default=searchProperties
|
default=filteredSearchProperties
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(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|}}
|
||||||
<div class="tab-section">
|
<div class="tab-section">
|
||||||
@ -90,4 +95,5 @@ as |route|>
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{/let}}
|
{{/let}}
|
||||||
|
{{/let}}
|
||||||
</Route>
|
</Route>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user