2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 import keyMirror from 'nfvo-utils/KeyMirror.js';
22 import i18n from 'nfvo-utils/i18n/i18n.js';
24 export const actionTypes = keyMirror({
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,
32 entitlementPoolsEditor: {
40 export const enums = keyMirror({
41 SELECTED_FEATURE_GROUP_TAB: {
46 SELECTED_ENTITLEMENT_POOLS_BUTTONTAB: {
47 ASSOCIATED_ENTITLEMENT_POOLS: 1,
48 AVAILABLE_ENTITLEMENT_POOLS: 2
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: ''}
61 export const thresholdUnitType = {
63 PERCENTAGE: 'Percentage'
66 export const optionsInputValues = {
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'}
78 {enum: '', title: i18n('please select…')},
79 {enum: 'Hour', title: 'Hour'},
80 {enum: 'Day', title: 'Day'},
81 {enum: 'Month', title: 'Month'}
84 {enum: '', title: i18n('please select…')},
85 {enum: 'Peak', title: 'Peak'},
86 {enum: 'Average', title: 'Average'}
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'}
104 {enum: '', title: i18n('please select…')},
105 {enum: thresholdUnitType.ABSOLUTE, title: 'Absolute'},
106 {enum: thresholdUnitType.PERCENTAGE, title: '%'}