2
0

config.ts 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. import type { Config } from "@src/@types/Config";
  2. const conf: Config = {
  3. // The list of pages which will not appear in the navigation menu
  4. // Remove or comment to enable them
  5. disabledPages: [
  6. "planning",
  7. // Enabling users and projects page by default
  8. // 'users',
  9. // 'projects',
  10. // 'bare-metal-servers',
  11. ],
  12. // Whether to show the user domain name input when logging in
  13. showUserDomainInput: false,
  14. // The default user domain name used for logging in
  15. defaultUserDomain: "default",
  16. // The name of the admin role, used for checking
  17. // if a user is allowed to do certain admin operations
  18. adminRoleName: "admin",
  19. // Shows the 'Use Current User/Project/Domain for Authentification' switch
  20. // when creating a new openstack endpoint
  21. showOpenstackCurrentUserSwitch: false,
  22. // Whether to use Barbican secrets when creating a new endpoint
  23. useBarbicanSecrets: true,
  24. // The timeout between polling requests
  25. requestPollTimeout: 5000,
  26. // The timeout for an inactive user session (in ms). Set 0 to disable.
  27. inactiveSessionTimeout: 0,
  28. // - Specifies the `limit` for each provider when listing all its VMs for pagination.
  29. // - If the provider is not in this list, the 'default' value will be used.
  30. // - If the `default` value is lower than the number of instances that
  31. // fit into a page, the latter number will be used.
  32. // - `Infinity` value means no `limit` will be used, i.e. all VMs will be listed.
  33. instancesListBackgroundLoading: {
  34. default: 100,
  35. ovm: Infinity,
  36. "hyper-v": Infinity,
  37. },
  38. /**
  39. * The name of the Coriolis Bare Metal Hub enpoint used for doing Coriolis Bare Metal server operations.
  40. */
  41. bareMetalEndpointName: "appliance-metal-hub",
  42. /**
  43. * The list of providers for which and extra source or destination options API call will be made.
  44. * The API call will be made only if all the required fields have values.
  45. * If `requiredValues` is provided, the field specified there needs to have a
  46. * certain value (specified in values)
  47. * in order to make the options API call.
  48. * If `relistFields` is provided, the options call will be made if any of the relist fields are changed.
  49. */
  50. extraOptionsApiCalls: [
  51. {
  52. name: "openstack",
  53. types: ["source"],
  54. requiredFields: ["replica_export_mechanism"],
  55. requiredValues: [
  56. {
  57. field: "replica_export_mechanism",
  58. values: ["swift_backups", "ceph_backups", "coriolis_backups"],
  59. },
  60. ],
  61. },
  62. {
  63. name: "openstack",
  64. types: ["destination"],
  65. requiredFields: ["list_all_destination_networks"],
  66. },
  67. {
  68. name: "vhi",
  69. types: ["destination"],
  70. requiredFields: ["list_all_destination_networks"],
  71. },
  72. {
  73. name: "vhi",
  74. types: ["source"],
  75. requiredFields: ["replica_export_mechanism"],
  76. requiredValues: [
  77. {
  78. field: "replica_export_mechanism",
  79. values: ["swift_backups", "ceph_backups", "coriolis_backups"],
  80. },
  81. ],
  82. },
  83. {
  84. name: "aws",
  85. types: ["source", "destination"],
  86. requiredFields: ["region"],
  87. },
  88. {
  89. name: "azure",
  90. types: ["source", "destination"],
  91. requiredFields: ["location", "resource_group"],
  92. },
  93. {
  94. name: "oci",
  95. types: ["destination"],
  96. requiredFields: ["compartment", "availability_domain", "vcn_compartment"],
  97. relistFields: ["migr_image_map", "migr_image"],
  98. },
  99. {
  100. name: "opca",
  101. types: ["destination"],
  102. requiredFields: ["compartment", "availability_domain", "vcn_compartment"],
  103. relistFields: ["migr_image_map", "migr_image"],
  104. },
  105. {
  106. name: "o3c",
  107. types: ["destination"],
  108. requiredFields: ["compartment", "availability_domain", "vcn_compartment"],
  109. relistFields: ["migr_image_map", "migr_image"],
  110. },
  111. {
  112. name: "vmware_vsphere",
  113. types: ["destination"],
  114. requiredFields: ["import_datacenter"],
  115. relistFields: ["import_cluster", "migr_minion_cluster"],
  116. },
  117. {
  118. name: "proxmox",
  119. types: ["destination"],
  120. requiredFields: ["import_node"],
  121. relistFields: ["linux_template", "windows_template"],
  122. },
  123. {
  124. name: "olvm",
  125. types: ["destination"],
  126. requiredFields: ["cluster"],
  127. },
  128. {
  129. name: "rhev",
  130. types: ["destination"],
  131. requiredFields: ["cluster"],
  132. },
  133. ],
  134. /*
  135. Lower number means that the provider will appear sooner in the list.
  136. Equal number means alphabetical order within the same group number.
  137. If the provider is not in the list, it will appear later and alphabetically sorted
  138. with all the other providers not in the list.
  139. */
  140. providerSortPriority: {
  141. aws: 1,
  142. openstack: 1,
  143. vhi: 2,
  144. vmware_vsphere: 1,
  145. azure: 2,
  146. "hyper-v": 2,
  147. kubevirt: 2,
  148. harvester: 2,
  149. scvmm: 2,
  150. oci: 3,
  151. opc: 3,
  152. oracle_vm: 3,
  153. olvm: 3,
  154. opca: 3,
  155. o3c: 3,
  156. proxmox: 3,
  157. rhev: 3,
  158. metal: 4,
  159. lxd: 4,
  160. libvirt: 4,
  161. },
  162. providerNames: {
  163. aws: "AWS",
  164. openstack: "OpenStack",
  165. vhi: "VHI",
  166. vmware_vsphere: "VMware",
  167. azure: "Azure",
  168. "hyper-v": "Hyper-V",
  169. kubevirt: "KubeVirt",
  170. harvester: "SUSE Virtualization",
  171. scvmm: "SCVMM",
  172. oci: "OCI",
  173. opca: "Oracle Private Cloud Appliance",
  174. o3c: "Oracle Cloud Compute@Customer",
  175. opc: "Oracle Cloud",
  176. oracle_vm: "Oracle VM",
  177. olvm: "OLVM",
  178. metal: "Bare Metal",
  179. rhev: "Red Hat",
  180. lxd: "LXD",
  181. proxmox: "Proxmox VE",
  182. libvirt: "Libvirt",
  183. },
  184. // The list of providers for which to disable setting the 'Execute Now Options' field
  185. providersDisabledExecuteOptions: ["metal"],
  186. // The list of execution option fields to disable for the providers in 'providersDisabledExecuteOptions'
  187. providersExecuteOptionsDisabledFields: ["shutdown_instances"],
  188. // The list of the users to hide in the UI
  189. hiddenUsers: ["barbican", "coriolis"],
  190. // The list of user roles to hide in the UI
  191. hiddenUserRoles: [
  192. "audit",
  193. "creator",
  194. "observer",
  195. "service",
  196. "key-manager:service-admin",
  197. ],
  198. // By default, if a field name contains `password` in it (ex.: `user_password`),
  199. // it will be rendered as a password input
  200. // If the field doesn't contain `password` in its name, the following list will be used instead
  201. passwordFields: [
  202. "private_key_passphrase",
  203. "secret_access_key",
  204. "client_secret",
  205. ],
  206. // The number of items per page applicable to default lists:
  207. // transfers, deployments, endpoints, users etc.
  208. defaultListItemsPerPage: 25,
  209. maxMinionPoolEventsPerPage: 50,
  210. servicesUrls: {
  211. keystone: "{BASE_URL}/identity",
  212. barbican: "{BASE_URL}/barbican",
  213. coriolis: "{BASE_URL}/coriolis",
  214. coriolisLogs: "{BASE_URL}/logs",
  215. coriolisLogStreamBaseUrl: "{BASE_URL}",
  216. coriolisLicensing: "{BASE_URL}/licensing",
  217. metalhub: "{BASE_URL}/metal-hub",
  218. cloudbaseEmailEndpoint: "http://localhost:3334",
  219. },
  220. };
  221. export const config = conf;