Filter Source and Destination menus by Kind

This commit is contained in:
John Cowen 2018-06-19 14:54:57 +01:00 committed by Jack Pearkes
parent cbf31a467f
commit ceabb8b439
3 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,7 @@ export default Model.extend({
return [];
},
}),
Kind: attr('string'),
Address: attr('string'),
Port: attr('number'),
EnableTagOverride: attr('boolean'),

View File

@ -24,7 +24,9 @@ export default Route.extend(WithIntentionActions, {
return {
...model,
...{
items: [{ Name: '*' }].concat(model.items.toArray()),
items: [{ Name: '*' }].concat(
model.items.toArray().filter(item => get(item, 'Kind') === 'consul')
),
},
};
});

View File

@ -18,7 +18,9 @@ export default Route.extend(WithAclActions, {
return {
...model,
...{
items: [{ Name: '*' }].concat(model.items.toArray()),
items: [{ Name: '*' }].concat(
model.items.toArray().filter(item => get(item, 'Kind') === 'consul')
),
},
};
});