Skip to content

Commit 12766cf

Browse files
committed
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>
1 parent 447d83b commit 12766cf

File tree

1 file changed

+15
-4
lines changed
  • src/pages/compute/containers/Instance

1 file changed

+15
-4
lines changed

src/pages/compute/containers/Instance/index.jsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,26 @@ export class Instance extends Base {
246246
}
247247

248248
get searchFilters() {
249+
const ipFilter = this.isFilterByBackend
250+
? {
251+
label: t('Fixed IP'),
252+
name: 'ip',
253+
}
254+
: {
255+
label: t('Fixed IP'),
256+
name: 'fixed_addresses',
257+
filterFunc: (val, filterVal) => {
258+
return (val || []).some((v) =>
259+
v.includes((filterVal || '').trim())
260+
);
261+
},
262+
};
249263
return [
250264
{
251265
label: t('Name'),
252266
name: 'name',
253267
},
254-
{
255-
label: t('Fixed IP'),
256-
name: 'ip',
257-
},
268+
ipFilter,
258269
...(this.isAdminPage
259270
? [
260271
{

0 commit comments

Comments
 (0)