feat: Update fixed ip filter for instance
Update the fixed ip filter for the instance list in the server group detail page which filter data by the frontend. Change-Id: I4bf10e82b6f3aba514b2a56766aabd719bc989a9 Signed-off-by: Jingwei Zhang <zhang.jingwei@99cloud.net>
This commit is contained in:
@@ -246,15 +246,26 @@ export class Instance extends Base {
|
||||
}
|
||||
|
||||
get searchFilters() {
|
||||
const ipFilter = this.isFilterByBackend
|
||||
? {
|
||||
label: t('Fixed IP'),
|
||||
name: 'ip',
|
||||
}
|
||||
: {
|
||||
label: t('Fixed IP'),
|
||||
name: 'fixed_addresses',
|
||||
filterFunc: (val, filterVal) => {
|
||||
return (val || []).some((v) =>
|
||||
v.includes((filterVal || '').trim())
|
||||
);
|
||||
},
|
||||
};
|
||||
return [
|
||||
{
|
||||
label: t('Name'),
|
||||
name: 'name',
|
||||
},
|
||||
{
|
||||
label: t('Fixed IP'),
|
||||
name: 'ip',
|
||||
},
|
||||
ipFilter,
|
||||
...(this.isAdminPage
|
||||
? [
|
||||
{
|
||||
|
Reference in New Issue
Block a user