V2Wizard: Move targets to a constant

This moves mapping between target short and full names to the const to make it reusable.
This commit is contained in:
regexowl 2024-06-10 14:20:01 +02:00 committed by Klara Simickova
parent b09e82f492
commit 388069ec11
4 changed files with 38 additions and 32 deletions

View file

@ -1,3 +1,5 @@
import { ImageTypes } from './store/imageBuilderApi';
export const IMAGE_BUILDER_API = '/api/image-builder/v1';
export const RHSM_API = '/api/rhsm/v2';
export const EDGE_API = '/api/edge/v1';
@ -46,6 +48,24 @@ export const CENTOS_9 = 'centos-9';
export const X86_64 = 'x86_64';
export const AARCH64 = 'aarch64';
export const targetOptions: { [key in ImageTypes]: string } = {
aws: 'Amazon Web Services',
azure: 'Microsoft Azure',
'edge-commit': 'Edge Commit',
'edge-installer': 'Edge Installer',
gcp: 'Google Cloud Platform',
'guest-image': 'Virtualization - Guest image',
'image-installer': 'Bare metal - Installer',
vsphere: 'VMware vSphere',
'vsphere-ova': 'VMware vSphere',
wsl: 'Windows Subsystem for Linux',
ami: 'Amazon Web Services',
'rhel-edge-commit': 'RHEL Edge Commit',
'rhel-edge-installer': 'RHEL Edge Installer',
vhd: '',
oci: 'Oracle Cloud Infrastructure',
};
export const UNIT_KIB = 1024 ** 1;
export const UNIT_MIB = 1024 ** 2;
export const UNIT_GIB = 1024 ** 3;