blob: 97e82ef9b0cd5e3a04bc6dbc654bd5e011dc0c0c [file] [log] [blame]
svishnev091edfd2018-03-19 12:15:19 +02001/*
2 * Copyright © 2016-2018 European Support Limited
AviZi280f8012017-06-09 02:39:56 +03003 *
Michael Landoefa037d2017-02-19 12:57:33 +02004 * 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
svishnev091edfd2018-03-19 12:15:19 +02007 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
Michael Landoefa037d2017-02-19 12:57:33 +020010 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
svishnev091edfd2018-03-19 12:15:19 +020012 * 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 Landoefa037d2017-02-19 12:57:33 +020015 */
Michael Landoefa037d2017-02-19 12:57:33 +020016import keyMirror from 'nfvo-utils/KeyMirror.js';
17
Avi Zivb8e2faf2017-07-18 19:45:38 +030018export const DATE_FORMAT = 'MM/DD/YYYY';
19
svishnevbacc7152018-11-05 12:11:30 +020020export 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 Landoefa037d2017-02-19 12:57:33 +020031
talig8e9c0652017-12-20 14:30:43 +020032export const screenTypes = keyMirror({
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020033 LICENSE_MODEL: null,
34 SOFTWARE_PRODUCT: null,
35 SOFTWARE_PRODUCT_COMPONENT_DEFAULT_GENERAL: null
talig8e9c0652017-12-20 14:30:43 +020036});
37
38const breadcrumbsEnum = {
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020039 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',
talig8e9c0652017-12-20 14:30:43 +020047
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020048 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',
56 SOFTWARE_PRODUCT_DEPENDENCIES: 'SOFTWARE_PRODUCT_DEPENDENCIES',
57 SOFTWARE_PRODUCT_ACTIVITY_LOG: 'SOFTWARE_PRODUCT_ACTIVITY_LOG',
58 SOFTWARE_PRODUCT_COMPONENTS: 'SOFTWARE_PRODUCT_COMPONENTS',
59 SOFTWARE_PRODUCT_COMPONENT_PROCESSES:
60 'SOFTWARE_PRODUCT_COMPONENT_PROCESSES',
61 SOFTWARE_PRODUCT_COMPONENT_NETWORK: 'SOFTWARE_PRODUCT_COMPONENT_NETWORK',
62 SOFTWARE_PRODUCT_COMPONENT_STORAGE: 'SOFTWARE_PRODUCT_COMPONENT_STORAGE',
63 SOFTWARE_PRODUCT_COMPONENT_GENERAL: 'SOFTWARE_PRODUCT_COMPONENT_GENERAL',
64 SOFTWARE_PRODUCT_COMPONENT_COMPUTE: 'SOFTWARE_PRODUCT_COMPONENT_COMPUTE',
65 SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING:
66 'SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING',
67 SOFTWARE_PRODUCT_COMPONENT_MONITORING:
68 'SOFTWARE_PRODUCT_COMPONENT_MONITORING',
69 SOFTWARE_PRODUCT_COMPONENT_IMAGES: 'SOFTWARE_PRODUCT_COMPONENT_IMAGES'
talig8e9c0652017-12-20 14:30:43 +020070};
71
Michael Landoefa037d2017-02-19 12:57:33 +020072export const enums = keyMirror({
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020073 BREADCRUMS: { ...breadcrumbsEnum },
Michael Landoefa037d2017-02-19 12:57:33 +020074
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020075 SCREEN: {
76 ONBOARDING_CATALOG: 'ONBOARDING_CATALOG',
77 VERSIONS_PAGE: breadcrumbsEnum.VERSIONS_PAGE,
78 LICENSE_MODEL_OVERVIEW: breadcrumbsEnum.LICENSE_MODEL_OVERVIEW,
79 LICENSE_AGREEMENTS: breadcrumbsEnum.LICENSE_AGREEMENTS,
80 FEATURE_GROUPS: breadcrumbsEnum.FEATURE_GROUPS,
81 ENTITLEMENT_POOLS: breadcrumbsEnum.ENTITLEMENT_POOLS,
82 LICENSE_KEY_GROUPS: breadcrumbsEnum.LICENSE_KEY_GROUPS,
83 ACTIVITY_LOG: breadcrumbsEnum.ACTIVITY_LOG,
Michael Landoefa037d2017-02-19 12:57:33 +020084
Einav Weiss Keidar7fdf7332018-03-20 14:45:40 +020085 SOFTWARE_PRODUCT_VERSIONS_PAGE:
86 breadcrumbsEnum.SOFTWARE_PRODUCT_VERSIONS_PAGE,
87 SOFTWARE_PRODUCT_LANDING_PAGE:
88 breadcrumbsEnum.SOFTWARE_PRODUCT_LANDING_PAGE,
89 SOFTWARE_PRODUCT_DETAILS: breadcrumbsEnum.SOFTWARE_PRODUCT_DETAILS,
90 SOFTWARE_PRODUCT_ATTACHMENTS:
91 breadcrumbsEnum.SOFTWARE_PRODUCT_ATTACHMENTS,
92 SOFTWARE_PRODUCT_ATTACHMENTS_SETUP:
93 'SOFTWARE_PRODUCT_ATTACHMENTS_SETUP',
94 SOFTWARE_PRODUCT_ATTACHMENTS_VALIDATION:
95 'SOFTWARE_PRODUCT_ATTACHMENTS_VALIDATION',
96 SOFTWARE_PRODUCT_PROCESSES: breadcrumbsEnum.SOFTWARE_PRODUCT_PROCESSES,
97 SOFTWARE_PRODUCT_DEPLOYMENT:
98 breadcrumbsEnum.SOFTWARE_PRODUCT_DEPLOYMENT,
99 SOFTWARE_PRODUCT_NETWORKS: breadcrumbsEnum.SOFTWARE_PRODUCT_NETWORKS,
100 SOFTWARE_PRODUCT_DEPENDENCIES:
101 breadcrumbsEnum.SOFTWARE_PRODUCT_DEPENDENCIES,
102 SOFTWARE_PRODUCT_ACTIVITY_LOG:
103 breadcrumbsEnum.SOFTWARE_PRODUCT_ACTIVITY_LOG,
104 SOFTWARE_PRODUCT_COMPONENTS:
105 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENTS,
106 SOFTWARE_PRODUCT_COMPONENT_PROCESSES:
107 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_PROCESSES,
108 SOFTWARE_PRODUCT_COMPONENT_COMPUTE:
109 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_COMPUTE,
110 SOFTWARE_PRODUCT_COMPONENT_STORAGE:
111 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_STORAGE,
112 SOFTWARE_PRODUCT_COMPONENT_NETWORK:
113 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_NETWORK,
114 SOFTWARE_PRODUCT_COMPONENT_GENERAL:
115 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_GENERAL,
116 SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING:
117 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_LOAD_BALANCING,
118 SOFTWARE_PRODUCT_COMPONENT_MONITORING:
119 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_MONITORING,
120 SOFTWARE_PRODUCT_COMPONENT_IMAGES:
121 breadcrumbsEnum.SOFTWARE_PRODUCT_COMPONENT_IMAGES
122 }
Michael Landoefa037d2017-02-19 12:57:33 +0200123});
svishnevfa538a12018-05-31 15:01:00 +0300124
125export const onboardingActions = {
126 updateItemArchivedStatus: isArchived => ({
127 type: actionTypes.UPDATE_ITEM_ARCHIVE_STATUS,
128 isArchived
129 })
130};