svishnev | 091edfd | 2018-03-19 12:15:19 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright © 2016-2018 European Support Limited |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 3 | * |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
andre.schmid | 6692cde | 2019-07-16 10:01:17 +0000 | [diff] [blame] | 7 | * |
svishnev | 091edfd | 2018-03-19 12:15:19 +0200 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
andre.schmid | 6692cde | 2019-07-16 10:01:17 +0000 | [diff] [blame] | 9 | * |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
svishnev | 091edfd | 2018-03-19 12:15:19 +0200 | [diff] [blame] | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 15 | */ |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 16 | import keyMirror from 'nfvo-utils/KeyMirror.js'; |
| 17 | |
Avi Ziv | b8e2faf | 2017-07-18 19:45:38 +0300 | [diff] [blame] | 18 | export const DATE_FORMAT = 'MM/DD/YYYY'; |
| 19 | |
svishnev | bacc715 | 2018-11-05 12:11:30 +0200 | [diff] [blame] | 20 | export const actionTypes = keyMirror( |
| 21 | { |
| 22 | SET_CURRENT_SCREEN: null, |
| 23 | SET_CURRENT_LICENSE_MODEL: null, |
| 24 | SET_CURRENT_SCREEN_VERSION: null, |
| 25 | UPDATE_CURRENT_SCREEN_PROPS: null, |
| 26 | UPDATE_ITEM_STATUS: null, |
| 27 | UPDATE_ITEM_ARCHIVE_STATUS: null |
| 28 | }, |
| 29 | 'onboardingMain' |
| 30 | ); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 31 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 32 | export const screenTypes = keyMirror({ |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 33 | LICENSE_MODEL: null, |
| 34 | SOFTWARE_PRODUCT: null, |
| 35 | SOFTWARE_PRODUCT_COMPONENT_DEFAULT_GENERAL: null |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 36 | }); |
| 37 | |
| 38 | const breadcrumbsEnum = { |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 39 | LICENSE_MODEL: 'LICENSE_MODEL', |
| 40 | VERSIONS_PAGE: 'VERSIONS_PAGE', |
| 41 | LICENSE_MODEL_OVERVIEW: 'LICENSE_MODEL_OVERVIEW', |
| 42 | LICENSE_AGREEMENTS: 'LICENSE_AGREEMENTS', |
| 43 | FEATURE_GROUPS: 'FEATURE_GROUPS', |
| 44 | ENTITLEMENT_POOLS: 'ENTITLEMENT_POOLS', |
| 45 | LICENSE_KEY_GROUPS: 'LICENSE_KEY_GROUPS', |
| 46 | ACTIVITY_LOG: 'ACTIVITY_LOG', |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 47 | |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 48 | SOFTWARE_PRODUCT: 'SOFTWARE_PRODUCT', |
| 49 | SOFTWARE_PRODUCT_VERSIONS_PAGE: 'SOFTWARE_PRODUCT_VERSIONS_PAGE', |
| 50 | SOFTWARE_PRODUCT_LANDING_PAGE: 'SOFTWARE_PRODUCT_LANDING_PAGE', |
| 51 | SOFTWARE_PRODUCT_DETAILS: 'SOFTWARE_PRODUCT_DETAILS', |
| 52 | SOFTWARE_PRODUCT_ATTACHMENTS: 'SOFTWARE_PRODUCT_ATTACHMENTS', |
| 53 | SOFTWARE_PRODUCT_PROCESSES: 'SOFTWARE_PRODUCT_PROCESSES', |
| 54 | SOFTWARE_PRODUCT_DEPLOYMENT: 'SOFTWARE_PRODUCT_DEPLOYMENT', |
| 55 | SOFTWARE_PRODUCT_NETWORKS: 'SOFTWARE_PRODUCT_NETWORKS', |
Vodafone | 804ec68 | 2019-03-18 15:46:53 +0530 | [diff] [blame] | 56 | SOFTWARE_PRODUCT_VALIDATION: 'SOFTWARE_PRODUCT_VALIDATION', |
| 57 | SOFTWARE_PRODUCT_VALIDATION_RESULTS: 'SOFTWARE_PRODUCT_VALIDATION_RESULTS', |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 58 | SOFTWARE_PRODUCT_DEPENDENCIES: 'SOFTWARE_PRODUCT_DEPENDENCIES', |
| 59 | SOFTWARE_PRODUCT_ACTIVITY_LOG: 'SOFTWARE_PRODUCT_ACTIVITY_LOG', |
| 60 | SOFTWARE_PRODUCT_COMPONENTS: 'SOFTWARE_PRODUCT_COMPONENTS', |
| 61 | SOFTWARE_PRODUCT_COMPONENT_PROCESSES: |
| 62 | 'SOFTWARE_PRODUCT_COMPONENT_PROCESSES', |
| 63 | SOFTWARE_PRODUCT_COMPONENT_NETWORK: 'SOFTWARE_PRODUCT_COMPONENT_NETWORK', |
| 64 | SOFTWARE_PRODUCT_COMPONENT_STORAGE: 'SOFTWARE_PRODUCT_COMPONENT_STORAGE', |
| 65 | SOFTWARE_PRODUCT_COMPONENT_GENERAL: 'SOFTWARE_PRODUCT_COMPONENT_GENERAL', |
| 66 | SOFTWARE_PRODUCT_COMPONENT_COMPUTE: 'SOFTWARE_PRODUCT_COMPONENT_COMPUTE', |
| 67 | SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING: |
| 68 | 'SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING', |
| 69 | SOFTWARE_PRODUCT_COMPONENT_MONITORING: |
| 70 | 'SOFTWARE_PRODUCT_COMPONENT_MONITORING', |
| 71 | SOFTWARE_PRODUCT_COMPONENT_IMAGES: 'SOFTWARE_PRODUCT_COMPONENT_IMAGES' |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame] | 72 | }; |
| 73 | |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 74 | export const enums = keyMirror({ |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 75 | BREADCRUMS: { ...breadcrumbsEnum }, |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 76 | |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 77 | SCREEN: { |
| 78 | ONBOARDING_CATALOG: 'ONBOARDING_CATALOG', |
| 79 | VERSIONS_PAGE: breadcrumbsEnum.VERSIONS_PAGE, |
| 80 | LICENSE_MODEL_OVERVIEW: breadcrumbsEnum.LICENSE_MODEL_OVERVIEW, |
| 81 | LICENSE_AGREEMENTS: breadcrumbsEnum.LICENSE_AGREEMENTS, |
| 82 | FEATURE_GROUPS: breadcrumbsEnum.FEATURE_GROUPS, |
| 83 | ENTITLEMENT_POOLS: breadcrumbsEnum.ENTITLEMENT_POOLS, |
| 84 | LICENSE_KEY_GROUPS: breadcrumbsEnum.LICENSE_KEY_GROUPS, |
| 85 | ACTIVITY_LOG: breadcrumbsEnum.ACTIVITY_LOG, |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 86 | |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 87 | SOFTWARE_PRODUCT_VERSIONS_PAGE: |
| 88 | breadcrumbsEnum.SOFTWARE_PRODUCT_VERSIONS_PAGE, |
| 89 | SOFTWARE_PRODUCT_LANDING_PAGE: |
| 90 | breadcrumbsEnum.SOFTWARE_PRODUCT_LANDING_PAGE, |
| 91 | SOFTWARE_PRODUCT_DETAILS: breadcrumbsEnum.SOFTWARE_PRODUCT_DETAILS, |
| 92 | SOFTWARE_PRODUCT_ATTACHMENTS: |
| 93 | breadcrumbsEnum.SOFTWARE_PRODUCT_ATTACHMENTS, |
| 94 | SOFTWARE_PRODUCT_ATTACHMENTS_SETUP: |
| 95 | 'SOFTWARE_PRODUCT_ATTACHMENTS_SETUP', |
| 96 | SOFTWARE_PRODUCT_ATTACHMENTS_VALIDATION: |
| 97 | 'SOFTWARE_PRODUCT_ATTACHMENTS_VALIDATION', |
andre.schmid | 6692cde | 2019-07-16 10:01:17 +0000 | [diff] [blame] | 98 | SOFTWARE_PRODUCT_ATTACHMENTS_VIEW_VALIDATION: |
| 99 | 'SOFTWARE_PRODUCT_ATTACHMENTS_VIEW_VALIDATION', |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 100 | SOFTWARE_PRODUCT_PROCESSES: breadcrumbsEnum.SOFTWARE_PRODUCT_PROCESSES, |
| 101 | SOFTWARE_PRODUCT_DEPLOYMENT: |
| 102 | breadcrumbsEnum.SOFTWARE_PRODUCT_DEPLOYMENT, |
| 103 | SOFTWARE_PRODUCT_NETWORKS: breadcrumbsEnum.SOFTWARE_PRODUCT_NETWORKS, |
Vodafone | 804ec68 | 2019-03-18 15:46:53 +0530 | [diff] [blame] | 104 | SOFTWARE_PRODUCT_VALIDATION: |
| 105 | breadcrumbsEnum.SOFTWARE_PRODUCT_VALIDATION, |
| 106 | SOFTWARE_PRODUCT_VALIDATION_RESULTS: |
| 107 | breadcrumbsEnum.SOFTWARE_PRODUCT_VALIDATION_RESULTS, |
Einav Weiss Keidar | 7fdf733 | 2018-03-20 14:45:40 +0200 | [diff] [blame] | 108 | SOFTWARE_PRODUCT_DEPENDENCIES: |
| 109 | breadcrumbsEnum.SOFTWARE_PRODUCT_DEPENDENCIES, |
| 110 | SOFTWARE_PRODUCT_ACTIVITY_LOG: |
| 111 | breadcrumbsEnum.SOFTWARE_PRODUCT_ACTIVITY_LOG, |
| 112 | SOFTWARE_PRODUCT_COMPONENTS: |
| 113 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENTS, |
| 114 | SOFTWARE_PRODUCT_COMPONENT_PROCESSES: |
| 115 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_PROCESSES, |
| 116 | SOFTWARE_PRODUCT_COMPONENT_COMPUTE: |
| 117 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_COMPUTE, |
| 118 | SOFTWARE_PRODUCT_COMPONENT_STORAGE: |
| 119 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_STORAGE, |
| 120 | SOFTWARE_PRODUCT_COMPONENT_NETWORK: |
| 121 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_NETWORK, |
| 122 | SOFTWARE_PRODUCT_COMPONENT_GENERAL: |
| 123 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_GENERAL, |
| 124 | SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING: |
| 125 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING, |
| 126 | SOFTWARE_PRODUCT_COMPONENT_MONITORING: |
| 127 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_MONITORING, |
| 128 | SOFTWARE_PRODUCT_COMPONENT_IMAGES: |
| 129 | breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_IMAGES |
| 130 | } |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 131 | }); |
svishnev | fa538a1 | 2018-05-31 15:01:00 +0300 | [diff] [blame] | 132 | |
| 133 | export const onboardingActions = { |
| 134 | updateItemArchivedStatus: isArchived => ({ |
| 135 | type: actionTypes.UPDATE_ITEM_ARCHIVE_STATUS, |
| 136 | isArchived |
| 137 | }) |
| 138 | }; |