X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fsparky-fe.git;a=blobdiff_plain;f=src%2Fapp%2FvnfSearch%2FVnfSearchActions.js;h=4ca149d6f95016070d0c6e2c5b20fabfafa76d87;hp=01679629f905fcb24f832ad102a855794916968e;hb=47b85e9b95e0a0a3570f0cea4d3ee4645c911a8b;hpb=bca1bdc7d52b01ede5c0e85f06cd6c64e5aaab57 diff --git a/src/app/vnfSearch/VnfSearchActions.js b/src/app/vnfSearch/VnfSearchActions.js index 0167962..4ca149d 100644 --- a/src/app/vnfSearch/VnfSearchActions.js +++ b/src/app/vnfSearch/VnfSearchActions.js @@ -2,8 +2,8 @@ * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. - * Copyright © 2017 Amdocs + * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved. + * Copyright © 2017-2018 Amdocs * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,6 @@ * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. */ import { vnfActionTypes, @@ -205,8 +203,21 @@ function getVnfVisualizationsResultsEvent(results) { }; } +function setBusyFeedback(){ + return { + type: vnfActionTypes.VNF_ACTIVATE_BUSY_FEEDBACK + }; +} + +function disableBusyFeedback(){ + return { + type: vnfActionTypes.VNF_DISABLE_BUSY_FEEDBACK + }; +} + export function processVnfVisualizationsOnFilterChange(filterValueMap) { return dispatch => { + dispatch(setBusyFeedback()); return fetch(VNF_FILTER_AGGREGATION_URL, { method: POST, headers: POST_HEADER, @@ -222,8 +233,13 @@ export function processVnfVisualizationsOnFilterChange(filterValueMap) { } dispatch(getVnfVisualizationsResultsEvent(responseJson)); } + ).then( + () => { + dispatch(disableBusyFeedback()); + } ).catch( () => { + dispatch(disableBusyFeedback()); dispatch(getInvalidQueryEvent()); } );