Merge "refactor: Update Label component to support floating ip's icon"

This commit is contained in:
Zuul 2022-08-11 04:18:26 +00:00 committed by Gerrit Code Review
commit 1f99dcfd07
4 changed files with 5 additions and 8 deletions

View File

@ -36,6 +36,7 @@ import {
LoadingOutlined,
TeamOutlined,
ProjectOutlined,
AimOutlined,
} from '@ant-design/icons';
import styles from './index.less';
@ -70,6 +71,7 @@ const iconTypeMap = {
lb: LBIcon,
group: <TeamOutlined />,
project: <ProjectOutlined />,
floatingIp: <AimOutlined />,
};
export default class index extends Component {

View File

@ -12,14 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import React from 'react';
import { inject, observer } from 'mobx-react';
import globalPortForwardingStore from 'stores/neutron/port-forwarding';
import globalPortStore, { PortStore } from 'stores/neutron/port';
import { getCanReachSubnetIdsWithRouterIdInComponent } from 'resources/neutron/router';
import { getInterfaceWithReason } from 'resources/neutron/floatingip';
import { getPortFormItem, getPortsAndReasons } from 'resources/neutron/port';
import { DesktopOutlined } from '@ant-design/icons';
import { ModalAction } from 'containers/Action';
export class Edit extends ModalAction {
@ -204,7 +202,7 @@ export class Edit extends ModalAction {
name: 'floatingIp',
label: t('Floating Ip'),
type: 'label',
icon: <DesktopOutlined />,
iconType: 'floatingIp',
},
{
name: 'protocol',

View File

@ -14,7 +14,6 @@
import React from 'react';
import { inject, observer } from 'mobx-react';
import { DesktopOutlined } from '@ant-design/icons';
import { ModalAction } from 'containers/Action';
import globalServerStore, { ServerStore } from 'stores/nova/instance';
import globalRouterStore, { RouterStore } from 'stores/neutron/router';
@ -231,7 +230,7 @@ export class Associate extends ModalAction {
name: 'floatingIp',
label: t('Floating Ip'),
type: 'label',
icon: <DesktopOutlined />,
iconType: 'floatingIp',
},
{
name: 'resourceType',

View File

@ -12,9 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import React from 'react';
import { inject, observer } from 'mobx-react';
import { DesktopOutlined } from '@ant-design/icons';
import { ModalAction } from 'containers/Action';
import { isNull } from 'lodash';
import { getCanReachSubnetIdsWithRouterIdInComponent } from 'resources/neutron/router';
@ -142,7 +140,7 @@ export class CreateDNAT extends ModalAction {
name: 'floatingIp',
label: t('Floating Ip'),
type: 'label',
icon: <DesktopOutlined />,
iconType: 'floatingIp',
},
{
name: 'protocol',