1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-04-01 06:50:25 +03:00

B #6214: Updated BUS_TYPES to include correct dev_prefix (#2635)

This commit is contained in:
vichansson 2023-06-13 14:51:59 +03:00 committed by GitHub
parent 5007641078
commit bcbc9ef21e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,10 +23,10 @@ import {
import { useGetSunstoneConfigQuery } from 'client/features/OneApi/system'
export const BUS_TYPES = {
VD: 'path',
SD: 'upload',
HD: 'empty',
CUSTOM: 'custom',
VD: T.Vd,
SD: T.Sd,
HD: T.Hd,
CUSTOM: T.Custom,
}
const FORMAT_TYPES = {
@ -35,12 +35,7 @@ const FORMAT_TYPES = {
CUSTOM: 'custom',
}
const BUS = {
[BUS_TYPES.VD]: T.Vd,
[BUS_TYPES.SD]: T.Sd,
[BUS_TYPES.HD]: T.Hd,
[BUS_TYPES.CUSTOM]: T.Custom,
}
const htmlType = (opt) => (value) => value !== opt && INPUT_TYPES.HIDDEN
@ -49,7 +44,7 @@ export const DEV_PREFIX = {
name: 'DEV_PREFIX',
label: T.Bus,
type: INPUT_TYPES.SELECT,
values: arrayToOptions(Object.entries(BUS), {
values: arrayToOptions(Object.entries(BUS_TYPES), {
addEmpty: true,
getText: ([_, name]) => name,
getValue: ([key]) => key,