refact: Refactoring generation of the link of network and security group when creating instance
Use route name in menu to generate network && security group link Change-Id: I84c9470a06a5bc41eba19c91c40d40d8cab7f26a
This commit is contained in:
parent
24feb71191
commit
7419565aa2
@ -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 { Link } from 'react-router-dom';
|
|
||||||
import { Button } from 'antd';
|
import { Button } from 'antd';
|
||||||
import { FormOutlined } from '@ant-design/icons';
|
import { FormOutlined } from '@ant-design/icons';
|
||||||
import { isEmpty, isArray } from 'lodash';
|
import { isEmpty, isArray } from 'lodash';
|
||||||
@ -29,6 +28,7 @@ import {
|
|||||||
securityGroupColumns,
|
securityGroupColumns,
|
||||||
securityGroupFilter,
|
securityGroupFilter,
|
||||||
} from 'resources/security-group';
|
} from 'resources/security-group';
|
||||||
|
import { getLinkRender } from 'utils/route-map';
|
||||||
|
|
||||||
// import EditYamlModal from 'components/Modals/EditYaml';
|
// import EditYamlModal from 'components/Modals/EditYaml';
|
||||||
const { isIPv4, isIpv6 } = ipValidate;
|
const { isIPv4, isIpv6 } = ipValidate;
|
||||||
@ -179,9 +179,10 @@ export class NetworkStep extends Base {
|
|||||||
'Please reasonably plan the network and subnet to which the virtual network card belongs.'
|
'Please reasonably plan the network and subnet to which the virtual network card belongs.'
|
||||||
)}
|
)}
|
||||||
{t(' You can go to the console to ')}
|
{t(' You can go to the console to ')}
|
||||||
<Link to="/network/networks">
|
{getLinkRender({
|
||||||
{t('create a new network/subnet')}>{' '}
|
key: 'network',
|
||||||
</Link>
|
value: `${t('create a new network/subnet')} > `,
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@ -242,9 +243,10 @@ export class NetworkStep extends Base {
|
|||||||
'The security group is similar to the firewall function and is used to set up network access control. '
|
'The security group is similar to the firewall function and is used to set up network access control. '
|
||||||
)}
|
)}
|
||||||
{t(' You can go to the console to ')}
|
{t(' You can go to the console to ')}
|
||||||
<Link to="/network/security-group">
|
{getLinkRender({
|
||||||
{t('create a new security group')}>{' '}
|
key: 'securityGroup',
|
||||||
</Link>
|
value: `${t('create a new security group')}> `,
|
||||||
|
})}
|
||||||
{t(
|
{t(
|
||||||
'Note: The security group you use will act on all virtual adapters of the instance.'
|
'Note: The security group you use will act on all virtual adapters of the instance.'
|
||||||
)}
|
)}
|
||||||
|
@ -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 { Link } from 'react-router-dom';
|
|
||||||
import { isEmpty, isArray } from 'lodash';
|
import { isEmpty, isArray } from 'lodash';
|
||||||
import { NetworkStore } from 'stores/neutron/network';
|
import { NetworkStore } from 'stores/neutron/network';
|
||||||
import { SubnetStore } from 'stores/neutron/subnet';
|
import { SubnetStore } from 'stores/neutron/subnet';
|
||||||
@ -29,6 +28,7 @@ import {
|
|||||||
securityGroupFilter,
|
securityGroupFilter,
|
||||||
} from 'resources/security-group';
|
} from 'resources/security-group';
|
||||||
import { portColumns, portFilters } from 'resources/port';
|
import { portColumns, portFilters } from 'resources/port';
|
||||||
|
import { getLinkRender } from 'utils/route-map';
|
||||||
|
|
||||||
// import EditYamlModal from 'components/Modals/EditYaml';
|
// import EditYamlModal from 'components/Modals/EditYaml';
|
||||||
const { isIPv4, isIpv6 } = ipValidate;
|
const { isIPv4, isIpv6 } = ipValidate;
|
||||||
@ -209,9 +209,10 @@ export class NetworkStep extends Base {
|
|||||||
'Please reasonably plan the network and subnet to which the virtual network card belongs.'
|
'Please reasonably plan the network and subnet to which the virtual network card belongs.'
|
||||||
)}
|
)}
|
||||||
{t(' You can go to the console to ')}
|
{t(' You can go to the console to ')}
|
||||||
<Link to="/network/networks">
|
{getLinkRender({
|
||||||
{t('create a new network/subnet')}>{' '}
|
key: 'network',
|
||||||
</Link>
|
value: `${t('create a new network/subnet')} > `,
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
@ -281,9 +282,10 @@ export class NetworkStep extends Base {
|
|||||||
'The security group is similar to the firewall function and is used to set up network access control. '
|
'The security group is similar to the firewall function and is used to set up network access control. '
|
||||||
)}
|
)}
|
||||||
{t(' You can go to the console to ')}
|
{t(' You can go to the console to ')}
|
||||||
<Link to="/network/security-group">
|
{getLinkRender({
|
||||||
{t('create a new security group')}>{' '}
|
key: 'securityGroup',
|
||||||
</Link>
|
value: `${t('create a new security group')}> `,
|
||||||
|
})}
|
||||||
{t(
|
{t(
|
||||||
'Note: The security group you use will act on all virtual adapters of the instance.'
|
'Note: The security group you use will act on all virtual adapters of the instance.'
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user