config.js 2.8 KB

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