config.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. export const coriolisUrl = (window.env && window.env.CORIOLIS_URL) || '/'
  15. export const servicesUrl = {
  16. identity: `${coriolisUrl}identity/auth/tokens`,
  17. projects: `${coriolisUrl}identity/auth/projects`,
  18. users: `${coriolisUrl}identity/users`,
  19. endpoints: `${coriolisUrl}coriolis/endpoints`,
  20. coriolis: `${coriolisUrl}coriolis`,
  21. migrations: `${coriolisUrl}coriolis/migrations`,
  22. barbican: `${coriolisUrl}barbican`,
  23. openId: `${coriolisUrl}identity/OS-FEDERATION/identity_providers/google/protocols/openid/auth`,
  24. }
  25. export const useSecret = true // use secret_ref when creating and endpoint
  26. export const navigationMenu = [
  27. { label: 'Replicas', value: 'replicas' },
  28. { label: 'Migrations', value: 'migrations' },
  29. { label: 'Cloud Endpoints', value: 'endpoints' },
  30. { label: 'Planning', value: 'planning', disabled: true },
  31. ]
  32. export const requestPollTimeout = 5000
  33. export const providerTypes = {
  34. TARGET_MIGRATION: 1,
  35. SOURCE_MIGRATION: 2,
  36. TARGET_REPLICA: 4,
  37. SOURCE_REPLICA: 8,
  38. CONNECTION: 16,
  39. }
  40. export const loginButtons = [
  41. // {
  42. // name: 'Google',
  43. // id: 'google',
  44. // url: '',
  45. // },
  46. ]
  47. export const env = {
  48. name: process.env.NODE_ENV || 'development',
  49. isDev: process.env.NODE_ENV !== 'production',
  50. isBrowser: typeof window !== 'undefined',
  51. }
  52. export const executionOptions = [
  53. {
  54. name: 'shutdown_instances',
  55. type: 'boolean',
  56. },
  57. ]
  58. export const wizardConfig = {
  59. pages: [
  60. { id: 'type', title: 'New', breadcrumb: 'Type' },
  61. { id: 'source', title: 'Select your source cloud', breadcrumb: 'Source Cloud' },
  62. { id: 'target', title: 'Select your target cloud', breadcrumb: 'Target Cloud' },
  63. { id: 'vms', title: 'Select instances', breadcrumb: 'Select VMs' },
  64. { id: 'options', title: 'Options', breadcrumb: 'Options' },
  65. { id: 'networks', title: 'Networks', breadcrumb: 'Networks' },
  66. { id: 'schedule', title: 'Schedule', breadcrumb: 'Schedule', excludeFrom: 'migration' },
  67. { id: 'summary', title: 'Summary', breadcrumb: 'Summary' },
  68. ],
  69. instancesItemsPerPage: 6,
  70. }
  71. // Providers for which `destination-options` API call will be made
  72. export const providersWithExtraOptions = ['azure']
  73. export const basename = process.env.PUBLIC_PATH