Add new code new version
[sdc.git] / openecomp-ui / src / sdc-app / onboarding / licenseModel / entitlementPools / EntitlementPoolsConstants.js
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 import keyMirror from 'nfvo-utils/KeyMirror.js';
22 import i18n from 'nfvo-utils/i18n/i18n.js';
23
24 export const actionTypes = keyMirror({
25
26         ENTITLEMENT_POOLS_LIST_LOADED: null,
27         ADD_ENTITLEMENT_POOL: null,
28         EDIT_ENTITLEMENT_POOL: null,
29         DELETE_ENTITLEMENT_POOL: null,
30         ENTITLEMENT_POOLS_DELETE_CONFIRM: null,
31
32         entitlementPoolsEditor: {
33                 OPEN: null,
34                 CLOSE: null,
35                 DATA_CHANGED: null,
36         }
37
38 });
39
40 export const enums = keyMirror({
41         SELECTED_FEATURE_GROUP_TAB: {
42                 GENERAL: 1,
43                 ENTITLEMENT_POOLS: 2,
44                 LICENCE_KEY_GROUPS: 3
45         },
46         SELECTED_ENTITLEMENT_POOLS_BUTTONTAB: {
47                 ASSOCIATED_ENTITLEMENT_POOLS: 1,
48                 AVAILABLE_ENTITLEMENT_POOLS: 2
49         }
50 });
51
52 export const defaultState = {
53         ENTITLEMENT_POOLS_EDITOR_DATA: {
54                 entitlementMetric: {choice: '', other: ''},
55                 aggregationFunction: {choice: '', other: ''},
56                 operationalScope: {choices: [], other: ''},
57                 time: {choice: '', other: ''}
58         }
59 };
60
61 export const thresholdUnitType = {
62         ABSOLUTE: 'Absolute',
63         PERCENTAGE: 'Percentage'
64 };
65
66 export const optionsInputValues = {
67         OPERATIONAL_SCOPE: [
68                 {enum: '', title: i18n('please select…')},
69                 {enum: 'Network_Wide', title: 'Network Wide'},
70                 {enum: 'Availability_Zone', title: 'Availability Zone'},
71                 {enum: 'Data_Center', title: 'Data Center'},
72                 {enum: 'Tenant', title: 'Tenant'},
73                 {enum: 'VM', title: 'VM'},
74                 {enum: 'CPU', title: 'CPU'},
75                 {enum: 'Core', title: 'Core'}
76         ],
77         TIME: [
78                 {enum: '', title: i18n('please select…')},
79                 {enum: 'Hour', title: 'Hour'},
80                 {enum: 'Day', title: 'Day'},
81                 {enum: 'Month', title: 'Month'}
82         ],
83         AGGREGATE_FUNCTION: [
84                 {enum: '', title: i18n('please select…')},
85                 {enum: 'Peak', title: 'Peak'},
86                 {enum: 'Average', title: 'Average'}
87         ],
88         ENTITLEMENT_METRIC: [
89                 {enum: '', title: i18n('please select…')},
90                 {enum: 'Software_Instances_Count', title: 'Software Instances'},
91                 {enum: 'Core', title: 'Core'},
92                 {enum: 'CPU', title: 'CPU'},
93                 {enum: 'Trunks', title: 'Trunks'},
94                 {enum: 'User', title: 'User'},
95                 {enum: 'Subscribers', title: 'Subscribers'},
96                 {enum: 'Tenants', title: 'Tenants'},
97                 {enum: 'Tokens', title: 'Tokens'},
98                 {enum: 'Seats', title: 'Seats'},
99                 {enum: 'Units_TB', title: 'Units-TB'},
100                 {enum: 'Units_GB', title: 'Units-GB'},
101                 {enum: 'Units_MB', title: 'Units-MB'}
102         ],
103         THRESHOLD_UNITS: [
104                 {enum: '', title: i18n('please select…')},
105                 {enum: thresholdUnitType.ABSOLUTE, title: 'Absolute'},
106                 {enum: thresholdUnitType.PERCENTAGE, title: '%'}
107         ]
108 };
109
110
111
112