From 7b2ad4de84ac3e5b8b8e417e8da5d4766e97021b Mon Sep 17 00:00:00 2001 From: zhuyue Date: Thu, 2 Dec 2021 14:22:27 +0800 Subject: [PATCH] fix: Remove pfw tab from fip detail page remove the pfw tab in an environment where pfw service is not deployed Change-Id: Ibc0e3c28e1ef34097818aea5be432d01208d384a --- src/pages/network/containers/FloatingIp/Detail/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/network/containers/FloatingIp/Detail/index.jsx b/src/pages/network/containers/FloatingIp/Detail/index.jsx index c5bbf395..39638f0a 100644 --- a/src/pages/network/containers/FloatingIp/Detail/index.jsx +++ b/src/pages/network/containers/FloatingIp/Detail/index.jsx @@ -17,6 +17,7 @@ import Base from 'containers/TabDetail'; import { floatingIpStatus } from 'resources/floatingip'; import { FloatingIpStore } from 'stores/neutron/floatingIp'; import { isNull } from 'lodash'; +import { enablePFW } from 'resources/neutron'; import actionConfigs from '../actions'; import BaseDetail from './BaseDetail'; import PortForwarding from './PortForwarding'; @@ -76,7 +77,7 @@ export class FloatingIpDetail extends Base { component: BaseDetail, }, ]; - if (isNull(this.detailData.fixed_ip_address)) { + if (enablePFW() && isNull(this.detailData.fixed_ip_address)) { tabs.push({ title: t('Port Forwarding Rules'), key: 'port_forwarding_rules',