2 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13 * or implied. See the License for the specific language governing
14 * permissions and limitations under the License.
16 import {combineReducers} from 'redux';
18 import activityLogReducer from 'nfvo-components/activity-log/ActivityLogReducer.js';
20 import licenseModelCreationReducer from './creation/LicenseModelCreationReducer.js';
21 import licenseModelEditorReducer from './LicenseModelEditorReducer.js';
23 import licenseAgreementListReducer from './licenseAgreement/LicenseAgreementListReducer.js';
24 import licenseAgreementEditorReducer from './licenseAgreement/LicenseAgreementEditorReducer.js';
26 import featureGroupsEditorReducer from './featureGroups/FeatureGroupsEditorReducer.js';
27 import featureGroupsListReducer from './featureGroups/FeatureGroupsListReducer.js';
29 import entitlementPoolsListReducer from './entitlementPools/EntitlementPoolsListReducer.js';
30 import entitlementPoolsEditorReducer from './entitlementPools/EntitlementPoolsEditorReducer.js';
32 import licenseKeyGroupsEditorReducer from './licenseKeyGroups/LicenseKeyGroupsEditorReducer.js';
33 import licenseKeyGroupsListReducer from './licenseKeyGroups/LicenseKeyGroupsListReducer.js';
35 import {createPlainDataReducer} from 'sdc-app/common/reducers/PlainDataReducer.js';
37 import {actionTypes as licenseModelOverviewConstants, selectedButton, VLM_DESCRIPTION_FORM} from './overview/LicenseModelOverviewConstants.js';
39 export default combineReducers({
40 licenseModelCreation: createPlainDataReducer(licenseModelCreationReducer),
41 licenseModelEditor: licenseModelEditorReducer,
43 licenseAgreement: combineReducers({
44 licenseAgreementEditor: createPlainDataReducer(licenseAgreementEditorReducer),
45 licenseAgreementList: licenseAgreementListReducer
47 featureGroup: combineReducers({
48 featureGroupEditor: createPlainDataReducer(featureGroupsEditorReducer),
49 featureGroupsList: featureGroupsListReducer
51 entitlementPool: combineReducers({
52 entitlementPoolEditor: createPlainDataReducer(entitlementPoolsEditorReducer),
53 entitlementPoolsList: entitlementPoolsListReducer
55 licenseKeyGroup: combineReducers({
56 licenseKeyGroupsEditor: createPlainDataReducer(licenseKeyGroupsEditorReducer),
57 licenseKeyGroupsList: licenseKeyGroupsListReducer
59 licenseModelOverview: combineReducers({
60 selectedTab: (state = selectedButton.VLM_LIST_VIEW, action) => action.type === licenseModelOverviewConstants.LICENSE_MODEL_OVERVIEW_TAB_SELECTED ? action.buttonTab : state,
61 descriptionEditor: createPlainDataReducer(function(state = false, action) {
62 if (action.type === licenseModelOverviewConstants.LM_DATA_CHANGED) {
66 description : action.description
69 formName: VLM_DESCRIPTION_FORM,
74 validations: [{type: 'required', data: true}, {type: 'maxLength', data: 1000}]
78 //return action.description;
84 activityLog: activityLogReducer