mirror of https://github.com/hashicorp/consul
multiselection version filter
parent
25d30a3fa9
commit
7f1d6192dc
|
@ -101,7 +101,7 @@ as |key value|}}
|
|||
class="type-version"
|
||||
@position="left"
|
||||
@onchange={{action @filter.version.change}}
|
||||
@multiple={{false}}
|
||||
@multiple={{true}}
|
||||
as |components|>
|
||||
<BlockSlot @name="selected">
|
||||
<span>
|
||||
|
|
|
@ -9,5 +9,12 @@ export default {
|
|||
warning: (item, value) => item.Status === value,
|
||||
critical: (item, value) => item.Status === value,
|
||||
},
|
||||
version: (item, value) => item.Version.includes(value + '.'),
|
||||
version: (item, value) => {
|
||||
for (const element of value) {
|
||||
if (item.Version.includes(element + '.')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue