summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorShawn Severin <shawn.severin@amdocs.com>2017-12-20 16:27:35 -0500
committerShawn Severin <shawn.severin@amdocs.com>2017-12-21 15:29:08 -0500
commitbca1bdc7d52b01ede5c0e85f06cd6c64e5aaab57 (patch)
tree846b787ece0982ebc2419e4600e6ecd3329a625a /src/app
parentd4fd54113808e9efa637719719b2831e0597996e (diff)
Updating versions of Sparky FE files
Updating versions of Sparky FE files as previous ones were out-dated Issue-ID: AAI-543 Change-Id: Idc7d09e0efabaa5ef82db126cf7563fc8370f4f9 Signed-off-by: Shawn Severin <shawn.severin@amdocs.com>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/AppStore.js2
-rw-r--r--src/app/MainScreenHeader.jsx10
-rw-r--r--src/app/MainScreenWrapper.jsx8
-rw-r--r--src/app/extensibility/ExtensibilityReducer.js1
-rw-r--r--src/app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarConstants.js2
-rw-r--r--src/app/vnfSearch/VnfSearch.jsx80
-rw-r--r--src/app/vnfSearch/VnfSearchActions.js1
-rw-r--r--src/app/vnfSearch/VnfSearchConstants.js1
-rw-r--r--src/app/vnfSearch/VnfSearchNfRoleVisualization.jsx1
-rw-r--r--src/app/vnfSearch/VnfSearchNfTypeVisualization.jsx1
-rw-r--r--src/app/vnfSearch/VnfSearchOrchestratedStatusVisualization.jsx1
-rw-r--r--src/app/vnfSearch/VnfSearchProvStatusVisualization.jsx1
-rw-r--r--src/app/vnfSearch/VnfSearchReducer.js11
-rw-r--r--src/app/vnfSearch/VnfSearchTotalCountVisualization.jsx1
14 files changed, 65 insertions, 56 deletions
diff --git a/src/app/AppStore.js b/src/app/AppStore.js
index a0022e1..24bda2a 100644
--- a/src/app/AppStore.js
+++ b/src/app/AppStore.js
@@ -26,7 +26,6 @@ import GlobalAutoCompleteSearchBarReducer from 'app/globalAutoCompleteSearchBar/
import TierSupportReducer from 'app/tierSupport/TierSupportReducer.js';
import MainScreenWrapperReducer from './MainScreenWrapperReducer.js';
import InventoryReducer from './inventory/InventoryReducer.js';
-import DynamicViewLoaderReducer from 'generic-components/dynamicViewLoader/DynamicViewLoaderReducer.js';
import VnfSearchReducer from './vnfSearch/VnfSearchReducer.js';
import GlobalInlineMessageBarReducer from 'app/globalInlineMessageBar/GlobalInlineMessageBarReducer.js';
import ExtensibilityReducer from 'app/extensibility/ExtensibilityReducer.js';
@@ -46,7 +45,6 @@ export const storeCreator = (initialState) => createStore(
globalAutoCompleteSearchBarReducer: GlobalAutoCompleteSearchBarReducer,
tierSupport: TierSupportReducer,
inventoryReducer: InventoryReducer,
- dynamicViewReducer: DynamicViewLoaderReducer,
vnfSearch: VnfSearchReducer,
globalInlineMessageBar: GlobalInlineMessageBarReducer,
extensibility: ExtensibilityReducer
diff --git a/src/app/MainScreenHeader.jsx b/src/app/MainScreenHeader.jsx
index 5fda9f4..e3ed257 100644
--- a/src/app/MainScreenHeader.jsx
+++ b/src/app/MainScreenHeader.jsx
@@ -23,6 +23,7 @@
import React, {Component} from 'react';
import {connect} from 'react-redux';
import FontAwesome from 'react-fontawesome';
+import {clearFilters} from 'filter-bar-utils';
import Button from 'react-bootstrap/lib/Button.js';
import Modal from 'react-bootstrap/lib/Modal.js';
import GlobalAutoCompleteSearchBar from 'app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBar.jsx';
@@ -32,6 +33,10 @@ import {getClearGlobalMessageEvent} from 'app/globalInlineMessageBar/GlobalInlin
import {externalUrlRequest, externalMessageRequest} from 'app/contextHandler/ContextHandlerActions.js';
import {
+ filterBarActionTypes
+} from 'utils/GlobalConstants.js';
+
+import {
Route,
NavLink
} from 'react-router-dom';
@@ -51,7 +56,8 @@ import {
import {clearSuggestionsTextField} from 'app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarActions.js';
import {changeUrlAddress} from 'utils/Routes.js';
import extensibleViews from 'resources/views/extensibleViews.json';
-import {clearFilters} from 'generic-components/filterBar/FilterBarUtils.js';
+
+
const mapStateToProps = ({mainWrapper}) => {
let {
showMenu = false,
@@ -81,7 +87,7 @@ const mapActionsToProps = (dispatch) => {
dispatch(getClearGlobalMessageEvent());
dispatch(clearSuggestionsTextField());
dispatch(clearExtensibleViewData());
- dispatch(clearFilters());
+ dispatch(clearFilters(filterBarActionTypes.CLEAR_FILTERS));
dispatch(setSecondaryTitle(undefined));
},
onExternalUrlRequest: (urlParamString) => {
diff --git a/src/app/MainScreenWrapper.jsx b/src/app/MainScreenWrapper.jsx
index e6d088f..1b1088b 100644
--- a/src/app/MainScreenWrapper.jsx
+++ b/src/app/MainScreenWrapper.jsx
@@ -90,7 +90,7 @@ class MainScreenWrapper extends Component {
} = this.props;
let customViewList = [];
- extensibleViews.forEach(function(view,key){
+ extensibleViews.forEach(function(view,key) {
var renderComponent = (props) => {
let viewParams = {};
if(props.match.params.extensibleViewParams !== undefined) {
@@ -102,11 +102,11 @@ class MainScreenWrapper extends Component {
return (
<Component
{...props}
- networkingCallback={(apiUrl, body, paramName,curViewData) => {
+ networkingCallback={(apiUrl, body, paramName, curViewData) => {
onExtensibleViewNetworkCallback(apiUrl, body, paramName, curViewData);
}}
- messagingCallback ={(message, messageSevirity) => {
- onExtensibleViewMessageCallback(message, messageSevirity);
+ messagingCallback ={(message, messageSeverity) => {
+ onExtensibleViewMessageCallback(message, messageSeverity);
}}
changeRouteCallback = {(routeParam, historyObj) => {
changeUrlAddress(routeParam, historyObj);
diff --git a/src/app/extensibility/ExtensibilityReducer.js b/src/app/extensibility/ExtensibilityReducer.js
index 7389b40..48b5775 100644
--- a/src/app/extensibility/ExtensibilityReducer.js
+++ b/src/app/extensibility/ExtensibilityReducer.js
@@ -22,7 +22,6 @@
*/
import {combineReducers} from 'redux';
-
export default combineReducers({
extensible: (state = {}) => {
return state;
diff --git a/src/app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarConstants.js b/src/app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarConstants.js
index 2f9befe..dda91c7 100644
--- a/src/app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarConstants.js
+++ b/src/app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarConstants.js
@@ -44,7 +44,7 @@ export const SEARCH_DEBOUNCE_TIME = 300;
export const ICON_CLASS_SEARCH = 'fa fa-search fa-lg';
export const ICON_CLASS_CLEAR = 'fa fa-times fa-lg';
-export const SEARCH_SELECTED_NODE_PATH = '/visualization/prepareVisualization';
+export const SEARCH_SELECTED_NODE_PATH = '/rest/visualization/prepareVisualization';
diff --git a/src/app/vnfSearch/VnfSearch.jsx b/src/app/vnfSearch/VnfSearch.jsx
index f4e6980..8b574a0 100644
--- a/src/app/vnfSearch/VnfSearch.jsx
+++ b/src/app/vnfSearch/VnfSearch.jsx
@@ -22,10 +22,12 @@
*/
import React, {Component} from 'react';
import {connect} from 'react-redux';
+
import {
isEqual,
isEmpty
} from 'lodash';
+
import {VerticalFilterBar} from 'vertical-filter-bar';
import {CollapsibleSlidingPanel} from 'collapsible-sliding-panel';
@@ -36,12 +38,14 @@ import {
VNFS_ROUTE,
VNF_SEARCH_FILTER_NAME
} from 'app/vnfSearch/VnfSearchConstants.js';
+
import {
processVnfVisualizationsOnFilterChange,
processVnfFilterPanelCollapse,
setNotificationText,
clearVnfSearchData
} from 'app/vnfSearch/VnfSearchActions.js';
+
import VnfSearchOrchStatusVisualizations from 'app/vnfSearch/VnfSearchOrchestratedStatusVisualization.jsx';
import VnfSearchProvStatusVisualizations from 'app/vnfSearch/VnfSearchProvStatusVisualization.jsx';
import VnfSearchNfTypeVisualizations from 'app/vnfSearch/VnfSearchNfTypeVisualization.jsx';
@@ -49,27 +53,37 @@ import VnfSearchNfRoleVisualizations from 'app/vnfSearch/VnfSearchNfRoleVisualiz
import VnfSearchTotalCountVisualization from 'app/vnfSearch/VnfSearchTotalCountVisualization.jsx';
import i18n from 'utils/i18n/i18n';
import {changeUrlAddress, buildRouteObjWithFilters} from 'utils/Routes.js';
+
import {
- getUnifiedFilters,
+ FilterBarConstants,
processFilterSelection,
- setNonConvertedFilterValues,
- convertNonConvertedValues,
+ getUnifiedFilters,
buildFilterValueMap,
+ setNonConvertedFilterValues,
setFilterSelectionsToDefaults,
- FILTER_BAR_TITLE
-} from 'generic-components/filterBar/FilterBarUtils.js';
+ convertNonConvertedValues
+} from 'filter-bar-utils';
+
+import {
+ globalInlineMessageBarActionTypes
+} from 'app/globalInlineMessageBar/GlobalInlineMessageBarConstants.js';
+
+import {
+ UNIFIED_FILTERS_URL,
+ filterBarActionTypes
+} from 'utils/GlobalConstants.js';
const mapStateToProps = ({vnfSearch}) => {
let {
- feedbackMsgText = '',
- feedbackMsgSeverity = '',
- vnfFilters = {},
- selectedFilterValues = {},
- vnfFilterValues = {},
- vnfVisualizationPanelClass = 'collapsible-panel-main-panel',
- unifiedFilterValues = {},
- nonConvertedFilters = {}
- } = vnfSearch;
+ feedbackMsgText = '',
+ feedbackMsgSeverity = '',
+ vnfFilters = {},
+ selectedFilterValues = {},
+ vnfFilterValues = {},
+ vnfVisualizationPanelClass = 'collapsible-panel-main-panel',
+ unifiedFilterValues = {},
+ nonConvertedFilters = {}
+ } = vnfSearch;
return {
feedbackMsgText,
@@ -90,7 +104,8 @@ let mapActionToProps = (dispatch) => {
},
onInitializeVnfSearchFilters: () => {
// first time to the page, need to get the list of available filters
- dispatch(getUnifiedFilters(VNF_SEARCH_FILTER_NAME, vnfActionTypes.VNF_SEARCH_FILTERS_RECEIVED));
+ dispatch(getUnifiedFilters(UNIFIED_FILTERS_URL, VNF_SEARCH_FILTER_NAME,
+ vnfActionTypes.VNF_SEARCH_FILTERS_RECEIVED, globalInlineMessageBarActionTypes.SET_GLOBAL_MESSAGE));
},
onFilterPanelCollapse: (isOpen) => {
// expand/collapse the filter panel
@@ -103,7 +118,7 @@ let mapActionToProps = (dispatch) => {
// only process the selection if allFilters has values (possible that
// filter bar is sending back the default filter selections before
// we have received the list of available filters i.e. allFilters)
- dispatch(processFilterSelection(selectedFilters, allFilters));
+ dispatch(processFilterSelection(filterBarActionTypes.NEW_SELECTIONS, selectedFilters, allFilters));
}
},
onFilterValueChange: (convertedFilterValues) => {
@@ -116,13 +131,14 @@ let mapActionToProps = (dispatch) => {
// and update the VNF visualizations
let filterValueMap = buildFilterValueMap(filterValueString);
- dispatch(setNonConvertedFilterValues(filterValueMap));
+ dispatch(setNonConvertedFilterValues(filterBarActionTypes.SET_NON_CONVERTED_VALUES, filterValueMap));
dispatch(processVnfVisualizationsOnFilterChange(filterValueMap));
// incase url param was changed manually, need to update vnfFilterValues
},
onResetFilterBarToDefaults: (filters, filterValues) => {
- dispatch(setFilterSelectionsToDefaults(filters, filterValues));
+ dispatch(setFilterSelectionsToDefaults(filterBarActionTypes.SET_UNIFIED_VALUES,
+ filterBarActionTypes.SET_NON_CONVERTED_VALUES, filters, filterValues));
},
onPrepareToUnmount: () => {
// clean things up:
@@ -134,7 +150,8 @@ let mapActionToProps = (dispatch) => {
onConvertFilterValues: (nonConvertedValues, allFilters, currentlySetFilterValues) => {
// we have saved non-converted filter values received from URL params,
// time to convert them so can update filter bar selections programatically
- dispatch(convertNonConvertedValues(nonConvertedValues, allFilters, currentlySetFilterValues));
+ dispatch(convertNonConvertedValues(filterBarActionTypes.SET_CONVERTED_VALUES, nonConvertedValues,
+ allFilters, currentlySetFilterValues));
},
onMessageStateChange: (msgText, msgSeverity) => {
dispatch(setNotificationText(msgText, msgSeverity));
@@ -171,19 +188,14 @@ class vnfSearch extends Component {
}
componentWillReceiveProps(nextProps) {
- if (nextProps.feedbackMsgText &&
- nextProps.feedbackMsgText !==
- this.props.feedbackMsgText) {
- this.props.onMessageStateChange(nextProps.feedbackMsgText,
- nextProps.feedbackMsgSeverity);
+ if (nextProps.feedbackMsgText && nextProps.feedbackMsgText !== this.props.feedbackMsgText) {
+ this.props.onMessageStateChange(nextProps.feedbackMsgText, nextProps.feedbackMsgSeverity);
}
- if (nextProps.vnfFilterValues &&
- !isEqual(nextProps.vnfFilterValues, this.props.vnfFilterValues) &&
+ if (nextProps.vnfFilterValues && !isEqual(nextProps.vnfFilterValues, this.props.vnfFilterValues) &&
this.props.vnfFilters) {
this.props.onFilterValueChange(nextProps.vnfFilterValues);
- changeUrlAddress(buildRouteObjWithFilters(VNFS_ROUTE, nextProps.vnfFilterValues),
- this.props.history);
+ changeUrlAddress(buildRouteObjWithFilters(VNFS_ROUTE, nextProps.vnfFilterValues), this.props.history);
}
if (nextProps.match &&
@@ -196,8 +208,8 @@ class vnfSearch extends Component {
} else if (Object.keys(nextProps.nonConvertedFilters).length > 0 &&
!isEqual(this.props.nonConvertedFilters, nextProps.nonConvertedFilters)) {
if (Object.keys(this.props.vnfFilters).length > 0) {
- this.props.onConvertFilterValues(
- nextProps.nonConvertedFilters, this.props.vnfFilters, this.props.vnfFilterValues);
+ this.props.onConvertFilterValues(nextProps.nonConvertedFilters, this.props.vnfFilters,
+ this.props.vnfFilterValues);
}
} else if ((!nextProps.match || !nextProps.match.params || !nextProps.match.params.filters) &&
this.props.match.params.filters && this.props.vnfFilters && this.props.vnfFilterValues) {
@@ -210,8 +222,10 @@ class vnfSearch extends Component {
Object.keys(this.props.nonConvertedFilters).length > 0) {
// just received list of available filters and there is are nonConvertedFilters (previously
// set from url params), need to convert those values and update the filter bar selections
- this.props.onConvertFilterValues(
- this.props.nonConvertedFilters, nextProps.vnfFilters, this.props.vnfFilterValues);
+
+ this.props.onConvertFilterValues(this.props.nonConvertedFilters, nextProps.vnfFilters,
+ this.props.vnfFilterValues);
+
} else if (nextProps.vnfFilters && !isEqual(nextProps.vnfFilters, this.props.vnfFilters) &&
isEmpty(this.props.vnfFilterValues)) {
// filter bar previously returned the default filter selections (but we didn't have the list
@@ -232,7 +246,7 @@ class vnfSearch extends Component {
<VerticalFilterBar
filtersConfig={this.props.vnfFilters}
filterValues={this.props.unifiedFilterValues}
- filterTitle={FILTER_BAR_TITLE}
+ filterTitle={FilterBarConstants.FILTER_BAR_TITLE}
onFilterChange={(selectedFilters) =>
this.props.onFilterSelection(selectedFilters, this.props.vnfFilters)} /> );
}
diff --git a/src/app/vnfSearch/VnfSearchActions.js b/src/app/vnfSearch/VnfSearchActions.js
index ce3f3e0..0167962 100644
--- a/src/app/vnfSearch/VnfSearchActions.js
+++ b/src/app/vnfSearch/VnfSearchActions.js
@@ -20,7 +20,6 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
import {
vnfActionTypes,
VNF_FILTER_AGGREGATION_URL,
diff --git a/src/app/vnfSearch/VnfSearchConstants.js b/src/app/vnfSearch/VnfSearchConstants.js
index 266b388..97d7159 100644
--- a/src/app/vnfSearch/VnfSearchConstants.js
+++ b/src/app/vnfSearch/VnfSearchConstants.js
@@ -20,7 +20,6 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
import keyMirror from 'utils/KeyMirror.js';
import {BASE_URL} from 'app/networking/NetworkConstants.js';
diff --git a/src/app/vnfSearch/VnfSearchNfRoleVisualization.jsx b/src/app/vnfSearch/VnfSearchNfRoleVisualization.jsx
index ab9bce7..ca6f269 100644
--- a/src/app/vnfSearch/VnfSearchNfRoleVisualization.jsx
+++ b/src/app/vnfSearch/VnfSearchNfRoleVisualization.jsx
@@ -20,7 +20,6 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {
diff --git a/src/app/vnfSearch/VnfSearchNfTypeVisualization.jsx b/src/app/vnfSearch/VnfSearchNfTypeVisualization.jsx
index 538bf25..30c6cdc 100644
--- a/src/app/vnfSearch/VnfSearchNfTypeVisualization.jsx
+++ b/src/app/vnfSearch/VnfSearchNfTypeVisualization.jsx
@@ -20,7 +20,6 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {
diff --git a/src/app/vnfSearch/VnfSearchOrchestratedStatusVisualization.jsx b/src/app/vnfSearch/VnfSearchOrchestratedStatusVisualization.jsx
index cee82d5..1855db7 100644
--- a/src/app/vnfSearch/VnfSearchOrchestratedStatusVisualization.jsx
+++ b/src/app/vnfSearch/VnfSearchOrchestratedStatusVisualization.jsx
@@ -20,7 +20,6 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {
diff --git a/src/app/vnfSearch/VnfSearchProvStatusVisualization.jsx b/src/app/vnfSearch/VnfSearchProvStatusVisualization.jsx
index f62579c..cdf6872 100644
--- a/src/app/vnfSearch/VnfSearchProvStatusVisualization.jsx
+++ b/src/app/vnfSearch/VnfSearchProvStatusVisualization.jsx
@@ -20,7 +20,6 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {
diff --git a/src/app/vnfSearch/VnfSearchReducer.js b/src/app/vnfSearch/VnfSearchReducer.js
index 5c96a2b..1394f97 100644
--- a/src/app/vnfSearch/VnfSearchReducer.js
+++ b/src/app/vnfSearch/VnfSearchReducer.js
@@ -20,9 +20,8 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-import {vnfActionTypes} from 'app/vnfSearch/VnfSearchConstants.js';
import {
+ vnfActionTypes,
CHART_ORCH_STATUS,
CHART_PROV_STATUS,
CHART_NF_ROLE,
@@ -30,13 +29,13 @@ import {
TOTAL_VNF_COUNT
} from 'app/vnfSearch/VnfSearchConstants.js';
import {ERROR_RETRIEVING_DATA} from 'app/networking/NetworkConstants.js';
-import {MESSAGE_LEVEL_DANGER} from 'utils/GlobalConstants.js';
+import {
+ filterBarActionTypes,
+ MESSAGE_LEVEL_DANGER
+} from 'utils/GlobalConstants.js';
import {
globalAutoCompleteSearchBarActionTypes
} from 'app/globalAutoCompleteSearchBar/GlobalAutoCompleteSearchBarConstants.js';
-import {
- filterBarActionTypes
-} from 'generic-components/filterBar/FilterBarConstants.js';
export default (state = {}, action) => {
let data = action.data;
diff --git a/src/app/vnfSearch/VnfSearchTotalCountVisualization.jsx b/src/app/vnfSearch/VnfSearchTotalCountVisualization.jsx
index 269b95d..a2abd7c 100644
--- a/src/app/vnfSearch/VnfSearchTotalCountVisualization.jsx
+++ b/src/app/vnfSearch/VnfSearchTotalCountVisualization.jsx
@@ -20,7 +20,6 @@
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
import React, {Component} from 'react';
import {connect} from 'react-redux';