constants.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. Copyright (C) 2017 Cloudbase Solutions SRL
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. import { WizardPage } from './@types/WizardData'
  15. export type NavigationMenuType = {
  16. label: string, value: string, hidden?: boolean, requiresAdmin?: boolean
  17. }
  18. export const navigationMenu: NavigationMenuType[] = [
  19. { label: 'Dashboard', value: 'dashboard' },
  20. { label: 'Replicas', value: 'replicas' },
  21. { label: 'Migrations', value: 'migrations' },
  22. { label: 'Cloud Endpoints', value: 'endpoints' },
  23. { label: 'Minion Pools', value: 'minion-pools' },
  24. { label: 'Bare Metal Servers', value: 'bare-metal-servers' },
  25. // Optional pages
  26. { label: 'Planning', value: 'planning' },
  27. // User management pages
  28. { label: 'Projects', value: 'projects', requiresAdmin: true },
  29. { label: 'Users', value: 'users', requiresAdmin: true },
  30. { label: 'Logs', value: 'logging', requiresAdmin: true },
  31. ]
  32. // https://github.com/cloudbase/coriolis/blob/master/coriolis/constants.py
  33. export const providerTypes = {
  34. TARGET_REPLICA: 4,
  35. SOURCE_REPLICA: 8,
  36. CONNECTION: 16,
  37. DESTINATION_OPTIONS: 512,
  38. SOURCE_OPTIONS: 131072,
  39. STORAGE: 32768,
  40. SOURCE_UPDATE: 65536,
  41. TARGET_UPDATE: 262144,
  42. SOURCE_MINION_POOL: 524288,
  43. DESTINATION_MINION_POOL: 1048576,
  44. }
  45. export const loginButtons = [
  46. // {
  47. // name: 'Google',
  48. // id: 'google',
  49. // url: '',
  50. // },
  51. ]
  52. export const executionOptions = [
  53. {
  54. name: 'shutdown_instances',
  55. type: 'boolean',
  56. defaultValue: false,
  57. nullableBoolean: false,
  58. },
  59. ]
  60. export const migrationFields = [
  61. {
  62. name: 'shutdown_instances',
  63. type: 'boolean',
  64. default: false,
  65. nullableBoolean: false,
  66. description: 'Whether or not Coriolis should power off the source VM before performing the final incremental sync. This guarantees consistency of the exported VM\'s filesystems, but implies downtime for the source VM during the final sync.',
  67. },
  68. {
  69. name: 'replication_count',
  70. type: 'integer',
  71. minimum: 1,
  72. maximum: 10,
  73. default: 2,
  74. description: 'The number of times to incrementally sync the disks of the source VM. This can be paired with "Shutdown Instances" to allow for the live syncing of the source VM, and shutting it off before the final incremental sync.',
  75. },
  76. ]
  77. export const wizardPages: WizardPage[] = [
  78. { id: 'type', title: 'New', breadcrumb: 'Type' },
  79. { id: 'source', title: 'Select your source cloud', breadcrumb: 'Source Cloud' },
  80. { id: 'source-options', title: 'Source options', breadcrumb: 'Source Options' },
  81. { id: 'vms', title: 'Select instances', breadcrumb: 'Select VMs' },
  82. { id: 'target', title: 'Select your target cloud', breadcrumb: 'Target Cloud' },
  83. { id: 'dest-options', title: 'Target options', breadcrumb: 'Target Options' },
  84. { id: 'networks', title: 'Networks', breadcrumb: 'Networks' },
  85. { id: 'storage', title: 'Storage Mapping', breadcrumb: 'Storage' },
  86. {
  87. id: 'scripts', title: 'User Scripts', breadcrumb: 'Scripts',
  88. },
  89. {
  90. id: 'schedule', title: 'Schedule', breadcrumb: 'Schedule', excludeFrom: 'migration',
  91. },
  92. { id: 'summary', title: 'Summary', breadcrumb: 'Summary' },
  93. ]
  94. export const basename = process.env.PUBLIC_PATH
  95. export const LEGAL_URLS = {
  96. eula: 'https://cloudbase.it/coriolis-eula/',
  97. privacy: ' https://cloudbase.it/privacy/',
  98. }