| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- /*
- Copyright (C) 2017 Cloudbase Solutions SRL
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as
- published by the Free Software Foundation, either version 3 of the
- License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- // @flow
- export const coriolisUrl = (window.env && window.env.CORIOLIS_URL) || '/'
- let licenceUrl = (window.env && window.env.CORIOLIS_LICENSING_BASE_URL) || '/licensing'
- export const servicesUrl = {
- identity: `${coriolisUrl}identity/auth/tokens`,
- projects: `${coriolisUrl}identity/auth/projects`,
- users: `${coriolisUrl}identity/users`,
- endpoints: `${coriolisUrl}coriolis/endpoints`,
- coriolis: `${coriolisUrl}coriolis`,
- migrations: `${coriolisUrl}coriolis/migrations`,
- barbican: `${coriolisUrl}barbican`,
- openId: `${coriolisUrl}identity/OS-FEDERATION/identity_providers/google/protocols/openid/auth`,
- licence: licenceUrl,
- }
- export const navigationMenu = [
- { label: 'Replicas', value: 'replicas' },
- { label: 'Migrations', value: 'migrations' },
- { label: 'Cloud Endpoints', value: 'endpoints' },
- // Optional pages
- { label: 'Planning', value: 'planning' },
- // User management pages
- { label: 'Projects', value: 'projects', requiresAdmin: true },
- { label: 'Users', value: 'users', requiresAdmin: true },
- ]
- /* https://github.com/cloudbase/coriolis/blob/master/coriolis/constants.py
- PROVIDER_TYPE_IMPORT = 1 // migration target schema
- PROVIDER_TYPE_EXPORT = 2 // migration source schema
- PROVIDER_TYPE_REPLICA_IMPORT = 4 // replica target schema
- PROVIDER_TYPE_REPLICA_EXPORT = 8 // replica source schema
- PROVIDER_TYPE_ENDPOINT_STORAGE = 32768
- PROVIDER_TYPE_SOURCE_REPLICA_UPDATE = 65536 // the replica can be updated if provider is source
- PROVIDER_TYPE_DESTINATION_REPLICA_UPDATE = 262144 // the replica can be updated if provider is source */
- export const providerTypes = {
- TARGET_MIGRATION: 1,
- SOURCE_MIGRATION: 2,
- TARGET_REPLICA: 4,
- SOURCE_REPLICA: 8,
- CONNECTION: 16,
- STORAGE: 32768,
- SOURCE_UPDATE: 65536,
- TARGET_UPDATE: 262144,
- }
- export const loginButtons = [
- // {
- // name: 'Google',
- // id: 'google',
- // url: '',
- // },
- ]
- export const env = {
- name: process.env.NODE_ENV || 'development',
- isDev: process.env.NODE_ENV !== 'production',
- isBrowser: typeof window !== 'undefined',
- }
- export const executionOptions = [
- {
- name: 'shutdown_instances',
- type: 'strict-boolean',
- defaultValue: false,
- },
- ]
- export const wizardPages = [
- { id: 'type', title: 'New', breadcrumb: 'Type' },
- { id: 'source', title: 'Select your source cloud', breadcrumb: 'Source Cloud' },
- {
- id: 'source-options',
- title: 'Source options',
- breadcrumb: 'Source Options',
- },
- { id: 'vms', title: 'Select instances', breadcrumb: 'Select VMs' },
- { id: 'target', title: 'Select your target cloud', breadcrumb: 'Target Cloud' },
- { id: 'dest-options', title: 'Target options', breadcrumb: 'Target Options' },
- { id: 'networks', title: 'Networks', breadcrumb: 'Networks' },
- {
- id: 'storage',
- title: 'Storage Mapping',
- breadcrumb: 'Storage',
- },
- { id: 'schedule', title: 'Schedule', breadcrumb: 'Schedule', excludeFrom: 'migration' },
- { id: 'summary', title: 'Summary', breadcrumb: 'Summary' },
- ]
- export const basename = process.env.PUBLIC_PATH
|