diff --git a/src/resources/neutron/port.jsx b/src/resources/neutron/port.jsx index e09c9bc8..ca1640b0 100644 --- a/src/resources/neutron/port.jsx +++ b/src/resources/neutron/port.jsx @@ -103,6 +103,10 @@ export function getPortFormItem(device_owner) { label: t('Name'), name: 'name', }, + { + label: t('Fixed IP'), + name: 'fixedIP', + }, ], columns: [ { diff --git a/src/stores/neutron/port.js b/src/stores/neutron/port.js index 09882548..b5d9582c 100644 --- a/src/stores/neutron/port.js +++ b/src/stores/neutron/port.js @@ -30,6 +30,17 @@ export class PortStore extends Base { return client.neutron.routers; } + get paramsFuncPage() { + return (params) => { + const { current, fixedIP, ...rest } = params; + const newParams = { ...rest }; + if (fixedIP) { + newParams.fixed_ips = `ip_address=${fixedIP}`; + } + return newParams; + }; + } + async detailDidFetch(item) { const { network_id } = item; try {