config.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 requestPollTimeout = 5000
  27. export const providerTypes = {
  28. TARGET_MIGRATION: 1,
  29. SOURCE_MIGRATION: 2,
  30. TARGET_REPLICA: 4,
  31. SOURCE_REPLICA: 8,
  32. CONNECTION: 16,
  33. }
  34. export const loginButtons = [
  35. // {
  36. // name: 'Google',
  37. // id: 'google',
  38. // url: '',
  39. // },
  40. ]
  41. export const env = {
  42. name: process.env.NODE_ENV || 'development',
  43. isDev: process.env.NODE_ENV !== 'production',
  44. isBrowser: typeof window !== 'undefined',
  45. }
  46. export const executionOptions = [
  47. {
  48. name: 'shutdown_instances',
  49. type: 'boolean',
  50. },
  51. ]
  52. export const wizardConfig = {
  53. pages: [
  54. { id: 'type', title: 'New', breadcrumb: 'Type' },
  55. { id: 'source', title: 'Select your source cloud', breadcrumb: 'Source Cloud' },
  56. { id: 'target', title: 'Select your target cloud', breadcrumb: 'Target Cloud' },
  57. { id: 'vms', title: 'Select instances', breadcrumb: 'Select VMs' },
  58. { id: 'options', title: 'Options', breadcrumb: 'Options' },
  59. { id: 'networks', title: 'Networks', breadcrumb: 'Networks' },
  60. { id: 'schedule', title: 'Schedule', breadcrumb: 'Schedule', excludeFrom: 'migration' },
  61. { id: 'summary', title: 'Summary', breadcrumb: 'Summary' },
  62. ],
  63. instancesItemsPerPage: 6,
  64. }
  65. // Providers for which `destination-options` API call will be made
  66. export const providersWithExtraOptions = ['azure']
  67. export const basename = process.env.PUBLIC_PATH