mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
* fix: resource page detail title link Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: extract harvester type in a map Signed-off-by: Andy Lee <andy.lee@suse.com> * refactor: put in config/harvester-map.js Signed-off-by: Andy Lee <andy.lee@suse.com> --------- Signed-off-by: Andy Lee <andy.lee@suse.com>
97 lines
2.7 KiB
JavaScript
97 lines
2.7 KiB
JavaScript
import { HCI } from '../types';
|
|
|
|
// TODO: delete this not used variable
|
|
export const MemoryUnit = [{
|
|
label: 'Mi',
|
|
value: 'Mi'
|
|
}, {
|
|
label: 'Gi',
|
|
value: 'Gi'
|
|
},
|
|
{
|
|
label: 'TiB',
|
|
value: 'Ti'
|
|
}];
|
|
|
|
export const InterfaceOption = [{
|
|
label: 'VirtIO',
|
|
value: 'virtio'
|
|
}, {
|
|
label: 'SATA',
|
|
value: 'sata'
|
|
}, {
|
|
label: 'SCSI',
|
|
value: 'scsi'
|
|
}];
|
|
|
|
export const SOURCE_TYPE = {
|
|
NEW: 'New',
|
|
IMAGE: 'Virtual Machine Image',
|
|
ATTACH_VOLUME: 'Existing Volume',
|
|
CONTAINER: 'Container'
|
|
};
|
|
|
|
export const VOLUME_TYPE = [{
|
|
label: 'disk',
|
|
value: 'disk'
|
|
}, {
|
|
label: 'cd-rom',
|
|
value: 'cd-rom'
|
|
}];
|
|
|
|
export const ACCESS_CREDENTIALS = {
|
|
RESET_PWD: 'userPassword',
|
|
INJECT_SSH: 'sshPublicKey'
|
|
};
|
|
|
|
export const runStrategies = ['Always', 'RerunOnFailure', 'Manual', 'Halted'];
|
|
|
|
export const maintenanceStrategies = [
|
|
'Migrate',
|
|
'ShutdownAndRestartAfterEnable',
|
|
'ShutdownAndRestartAfterDisable',
|
|
'Shutdown'
|
|
];
|
|
|
|
export const VOLUME_DATA_SOURCE_KIND = {
|
|
VolumeSnapshot: 'VolumeSnapshot',
|
|
PersistentVolumeClaim: 'Volume'
|
|
};
|
|
|
|
export const FLOW_TYPE = {
|
|
LOGGING: 'Logging',
|
|
AUDIT: 'Audit',
|
|
EVENT: 'Event'
|
|
};
|
|
|
|
export const ADD_ONS = {
|
|
HARVESTER_SEEDER: 'harvester-seeder',
|
|
PCI_DEVICE_CONTROLLER: 'pcidevices-controller',
|
|
NVIDIA_DRIVER_TOOLKIT_CONTROLLER: 'nvidia-driver-toolkit',
|
|
RANCHER_LOGGING: 'rancher-logging',
|
|
RANCHER_MONITORING: 'rancher-monitoring',
|
|
VM_IMPORT_CONTROLLER: 'vm-import-controller',
|
|
LVM_DRIVER: 'lvm.driver.harvesterhci.io',
|
|
KUBEOVN_OPERATOR: 'kubeovn-operator',
|
|
};
|
|
|
|
export const CSI_SECRETS = {
|
|
CSI_PROVISIONER_SECRET_NAME: 'csi.storage.k8s.io/provisioner-secret-name',
|
|
CSI_PROVISIONER_SECRET_NAMESPACE: 'csi.storage.k8s.io/provisioner-secret-namespace',
|
|
CSI_NODE_PUBLISH_SECRET_NAME: 'csi.storage.k8s.io/node-publish-secret-name',
|
|
CSI_NODE_PUBLISH_SECRET_NAMESPACE: 'csi.storage.k8s.io/node-publish-secret-namespace',
|
|
CSI_NODE_STAGE_SECRET_NAME: 'csi.storage.k8s.io/node-stage-secret-name',
|
|
CSI_NODE_STAGE_SECRET_NAMESPACE: 'csi.storage.k8s.io/node-stage-secret-namespace',
|
|
};
|
|
|
|
// Some harvester CRD type is not equal to model file name, define the mapping here
|
|
export const HARVESTER_CRD_MAP = {
|
|
node: HCI.HOST,
|
|
configmap: HCI.CLOUD_TEMPLATE,
|
|
persistentvolumeclaim: HCI.VOLUME,
|
|
'snapshot.storage.k8s.io.volumesnapshot': HCI.SNAPSHOT,
|
|
// specific groupable table detail page
|
|
'network.harvesterhci.io.vlanconfig': HCI.CLUSTER_NETWORK,
|
|
'kubeovn.io.subnet': HCI.VPC
|
|
};
|