mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-10 01:17:40 +03:00
M #-: Remove ALIAS selection (#3036)
* Remove alias selection when instantiating VR template as this is not supported by the core. Signed-off-by: Victor Hansson <vhansson@opennebula.io>
This commit is contained in:
parent
6e4407f061
commit
a58d4c6154
@ -21,7 +21,6 @@ import {
|
||||
Network as ManagementIcon,
|
||||
IpAddress,
|
||||
HistoricShield as SecurityGroupIcon,
|
||||
AtSign as AliasIcon,
|
||||
Computer as RdpIcon,
|
||||
TerminalSimple as SshIcon,
|
||||
} from 'iconoir-react'
|
||||
@ -47,7 +46,6 @@ const NicCard = ({ info = {}, removeNic, selectNic, active } = {}) => {
|
||||
autonetworkselect,
|
||||
sshconnection,
|
||||
rdpconnection,
|
||||
alias,
|
||||
} = info
|
||||
|
||||
return (
|
||||
@ -143,12 +141,6 @@ const NicCard = ({ info = {}, removeNic, selectNic, active } = {}) => {
|
||||
<SshIcon height={18} width={18} />
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
{alias && (
|
||||
<Tooltip title="Alias" arrow>
|
||||
<AliasIcon height={18} width={18} />
|
||||
</Tooltip>
|
||||
)}
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
|
@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and *
|
||||
* limitations under the License. *
|
||||
* ------------------------------------------------------------------------- */
|
||||
import { mixed, number, boolean, string } from 'yup'
|
||||
import { mixed, number, boolean } from 'yup'
|
||||
import { VNetworksTable, SecurityGroupsTable } from 'client/components/Tables'
|
||||
import { getObjectSchemaFromFields } from 'client/utils'
|
||||
|
||||
@ -35,47 +35,6 @@ const NETWORK = {
|
||||
grid: { md: 12 },
|
||||
}
|
||||
|
||||
const ALIAS = {
|
||||
name: 'alias',
|
||||
label: 'Alias',
|
||||
type: INPUT_TYPES.SWITCH,
|
||||
validation: boolean().default(() => false),
|
||||
grid: { md: 6 },
|
||||
}
|
||||
|
||||
const PARENT = {
|
||||
name: 'parent',
|
||||
label: T.AsAnAlias,
|
||||
dependOf: 'alias',
|
||||
type: INPUT_TYPES.SELECT,
|
||||
htmlType: (alias) => (alias ? INPUT_TYPES.SELECT : INPUT_TYPES.HIDDEN),
|
||||
values: (_, context) => {
|
||||
const nics = context?.getValues(`networking.NIC`) ?? []
|
||||
|
||||
return [
|
||||
{ text: '', value: '' },
|
||||
...nics
|
||||
/* eslint-disable-next-line no-shadow */
|
||||
.filter(({ parent }) => !parent) // filter nic alias
|
||||
.map(({ network, nicId, IP = '' }, index) => {
|
||||
const textIdentifier = [
|
||||
`NIC-${index}`,
|
||||
`VNET-${network}`,
|
||||
`IPv4-${IP?.slice(0, 16)}`,
|
||||
`#${nicId?.slice(0, 10)}`,
|
||||
].join(` | `)
|
||||
|
||||
return { text: textIdentifier, value: nicId }
|
||||
}),
|
||||
]
|
||||
},
|
||||
validation: string()
|
||||
.trim()
|
||||
.notRequired()
|
||||
.default(() => ''),
|
||||
grid: { md: 6 },
|
||||
}
|
||||
|
||||
const NETWORKSELECTION = {
|
||||
name: 'autonetworkselect',
|
||||
label: 'Automatic network selection',
|
||||
@ -154,8 +113,6 @@ const SECURITY_GROUPS = {
|
||||
}
|
||||
|
||||
export const FIELDS = [
|
||||
ALIAS,
|
||||
PARENT,
|
||||
NETWORKSELECTION,
|
||||
RDP,
|
||||
SSH,
|
||||
|
Loading…
Reference in New Issue
Block a user