2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017 Amdocs
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 import {vnfActionTypes} from 'app/vnfSearch/VnfSearchConstants.js';
28 } from 'app/vnfSearch/VnfSearchConstants.js';
29 import {ERROR_RETRIEVING_DATA} from 'app/networking/NetworkConstants.js';
30 import {MESSAGE_LEVEL_DANGER} from 'utils/GlobalConstants.js';
32 globalAutoCompleteSearchBarActionTypes
33 } from 'app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarConstants.js';
35 export default (state = {}, action) => {
36 let data = action.data;
37 switch (action.type) {
39 case vnfActionTypes.COUNT_BY_PROV_STATUS_RECEIVED:
42 processedProvStatusCountChartData: data.provStatusCountChartData.chartData,
44 feedbackMsgSeverity: ''
47 case vnfActionTypes.COUNT_BY_ORCH_STATUS_RECEIVED:
50 processedOrchStatusCountChartData: data.orchStatusCountChartData.chartData,
52 feedbackMsgSeverity: ''
54 case vnfActionTypes.TOTAL_VNF_COUNT_RECEIVED:
59 feedbackMsgSeverity: ''
61 case vnfActionTypes.ERROR_NO_DATA_FOR_PROV_STATUS_IN_SEARCH_RANGE_RECEIVED:
64 processedProvStatusCountChartData: CHART_PROV_STATUS.emptyData,
66 case vnfActionTypes.ERROR_NO_DATA_FOR_ORCH_STATUS_IN_SEARCH_RANGE_RECEIVED:
69 processedOrchStatusCountChartData: CHART_ORCH_STATUS.emptyData,
71 case vnfActionTypes.ERROR_NO_COUNT_RECEIVED:
74 count: TOTAL_VNF_COUNT.emptyValue,
76 case vnfActionTypes.VNF_NETWORK_ERROR:
79 processedProvStatusCountChartData: CHART_PROV_STATUS.emptyData,
80 processedOrchStatusCountChartData: CHART_ORCH_STATUS.emptyData,
81 count: TOTAL_VNF_COUNT.emptyValue,
82 feedbackMsgText: ERROR_RETRIEVING_DATA,
83 feedbackMsgSeverity: MESSAGE_LEVEL_DANGER
85 case globalAutoCompleteSearchBarActionTypes.SEARCH_WARNING_EVENT:
88 processedProvStatusCountChartData: CHART_PROV_STATUS.emptyData,
89 processedOrchStatusCountChartData: CHART_ORCH_STATUS.emptyData,
90 count: TOTAL_VNF_COUNT.emptyValue