refactor: Update Label component to support floating ip's icon
1. Update Label component to support floating ip's icon 2. Update the floating ip display in the associate fip form 3. Update the floating ip display in the create port forwarding form 4. Update the floating ip display in the edit port forwarding form Change-Id: I38ee2354c387d213cdd574f966be96afb8fcd433
This commit is contained in:
parent
fee350fd22
commit
57a17b83d2
@ -36,6 +36,7 @@ import {
|
|||||||
LoadingOutlined,
|
LoadingOutlined,
|
||||||
TeamOutlined,
|
TeamOutlined,
|
||||||
ProjectOutlined,
|
ProjectOutlined,
|
||||||
|
AimOutlined,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import styles from './index.less';
|
import styles from './index.less';
|
||||||
|
|
||||||
@ -70,6 +71,7 @@ const iconTypeMap = {
|
|||||||
lb: LBIcon,
|
lb: LBIcon,
|
||||||
group: <TeamOutlined />,
|
group: <TeamOutlined />,
|
||||||
project: <ProjectOutlined />,
|
project: <ProjectOutlined />,
|
||||||
|
floatingIp: <AimOutlined />,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class index extends Component {
|
export default class index extends Component {
|
||||||
|
@ -12,14 +12,12 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import globalPortForwardingStore from 'stores/neutron/port-forwarding';
|
import globalPortForwardingStore from 'stores/neutron/port-forwarding';
|
||||||
import globalPortStore, { PortStore } from 'stores/neutron/port';
|
import globalPortStore, { PortStore } from 'stores/neutron/port';
|
||||||
import { getCanReachSubnetIdsWithRouterIdInComponent } from 'resources/neutron/router';
|
import { getCanReachSubnetIdsWithRouterIdInComponent } from 'resources/neutron/router';
|
||||||
import { getInterfaceWithReason } from 'resources/neutron/floatingip';
|
import { getInterfaceWithReason } from 'resources/neutron/floatingip';
|
||||||
import { getPortFormItem, getPortsAndReasons } from 'resources/neutron/port';
|
import { getPortFormItem, getPortsAndReasons } from 'resources/neutron/port';
|
||||||
import { DesktopOutlined } from '@ant-design/icons';
|
|
||||||
import { ModalAction } from 'containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
|
|
||||||
export class Edit extends ModalAction {
|
export class Edit extends ModalAction {
|
||||||
@ -204,7 +202,7 @@ export class Edit extends ModalAction {
|
|||||||
name: 'floatingIp',
|
name: 'floatingIp',
|
||||||
label: t('Floating Ip'),
|
label: t('Floating Ip'),
|
||||||
type: 'label',
|
type: 'label',
|
||||||
icon: <DesktopOutlined />,
|
iconType: 'floatingIp',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'protocol',
|
name: 'protocol',
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import { DesktopOutlined } from '@ant-design/icons';
|
|
||||||
import { ModalAction } from 'containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import globalServerStore, { ServerStore } from 'stores/nova/instance';
|
import globalServerStore, { ServerStore } from 'stores/nova/instance';
|
||||||
import globalRouterStore, { RouterStore } from 'stores/neutron/router';
|
import globalRouterStore, { RouterStore } from 'stores/neutron/router';
|
||||||
@ -231,7 +230,7 @@ export class Associate extends ModalAction {
|
|||||||
name: 'floatingIp',
|
name: 'floatingIp',
|
||||||
label: t('Floating Ip'),
|
label: t('Floating Ip'),
|
||||||
type: 'label',
|
type: 'label',
|
||||||
icon: <DesktopOutlined />,
|
iconType: 'floatingIp',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'resourceType',
|
name: 'resourceType',
|
||||||
|
@ -12,9 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import { inject, observer } from 'mobx-react';
|
import { inject, observer } from 'mobx-react';
|
||||||
import { DesktopOutlined } from '@ant-design/icons';
|
|
||||||
import { ModalAction } from 'containers/Action';
|
import { ModalAction } from 'containers/Action';
|
||||||
import { isNull } from 'lodash';
|
import { isNull } from 'lodash';
|
||||||
import { getCanReachSubnetIdsWithRouterIdInComponent } from 'resources/neutron/router';
|
import { getCanReachSubnetIdsWithRouterIdInComponent } from 'resources/neutron/router';
|
||||||
@ -142,7 +140,7 @@ export class CreateDNAT extends ModalAction {
|
|||||||
name: 'floatingIp',
|
name: 'floatingIp',
|
||||||
label: t('Floating Ip'),
|
label: t('Floating Ip'),
|
||||||
type: 'label',
|
type: 'label',
|
||||||
icon: <DesktopOutlined />,
|
iconType: 'floatingIp',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'protocol',
|
name: 'protocol',
|
||||||
|
Loading…
Reference in New Issue
Block a user