summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app/MainScreenWrapper.jsx5
-rw-r--r--src/app/contextHandler/ContextHandlerActions.js3
-rw-r--r--src/app/networking/NetworkCalls.js4
-rw-r--r--src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx6
-rw-r--r--src/generic-components/notifications/NotificationReducer.js59
5 files changed, 34 insertions, 43 deletions
diff --git a/src/app/MainScreenWrapper.jsx b/src/app/MainScreenWrapper.jsx
index 730ac93..3348494 100644
--- a/src/app/MainScreenWrapper.jsx
+++ b/src/app/MainScreenWrapper.jsx
@@ -140,6 +140,8 @@ class MainScreenWrapper extends Component {
extensibleViewNetworkCallbackData,
onExtensibleViewMessageCallback,
onOverlayNetworkCallback,
+ configurableViewsConfig,
+ customComponents,
customRoutes
} = this.props;
@@ -199,6 +201,8 @@ class MainScreenWrapper extends Component {
});
+ let configurableViewList = getConfigurableRoutes(configurableViewsConfig, customComponents);
+
return (
<Router>
<div className='main-app-container'>
@@ -210,6 +214,7 @@ class MainScreenWrapper extends Component {
<Route key='VnfSearchRoute' path='/vnfSearch/:filters?' component={VnfSearch}/>
{customViewList}
{customRoutes}
+ {configurableViewList}
</div>
</Router>
);
diff --git a/src/app/contextHandler/ContextHandlerActions.js b/src/app/contextHandler/ContextHandlerActions.js
index b4805e1..f3ede6d 100644
--- a/src/app/contextHandler/ContextHandlerActions.js
+++ b/src/app/contextHandler/ContextHandlerActions.js
@@ -105,7 +105,8 @@ function fetchSubscriptionPayload(fetchRequestCallback) {
export function getSubscriptionPayload() {
let externalfetchRequest =
- () => networkCall.getRequest(SUBSCRIPTION_PAYLOAD_URL, GET);
+ () => networkCall.getRequest(SUBSCRIPTION_PAYLOAD_URL, GET);
+
return dispatch => {
dispatch(fetchSubscriptionPayload(externalfetchRequest));
};
diff --git a/src/app/networking/NetworkCalls.js b/src/app/networking/NetworkCalls.js
index e391391..9bf7535 100644
--- a/src/app/networking/NetworkCalls.js
+++ b/src/app/networking/NetworkCalls.js
@@ -55,9 +55,7 @@ function getRequest(URL, GET) {
return fetch(URL, {
credentials: 'same-origin',
method: GET
- }).then(
- (response) => response.json()
- );
+ });
}
const genericRequest = (url, relativeURL, httpMethodType) => {
diff --git a/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx b/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
index 4f93125..47cdc9a 100644
--- a/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
+++ b/src/generic-components/autoCompleteSearchBar/AutoCompleteSearchBar.jsx
@@ -164,7 +164,8 @@ export default class AutoCompleteSearchBar extends Component {
<Highlighter key={arrayIndex + 'high'}
highlightClassName='highlight'
searchWords={toHighLightArray}
- textToHighlight={suggestionTextArray[arrayIndex]}/>
+ textToHighlight={suggestionTextArray[arrayIndex]}
+ autoEscape={true}/>
{ ++arrayIndex ? ' ' : ' '}
</span>);
@@ -185,7 +186,8 @@ export default class AutoCompleteSearchBar extends Component {
<Highlighter key={arrayIndex + 'high'}
highlightClassName='highlight'
searchWords={toHighLightArray}
- textToHighlight={suggestionTextArray[arrayIndex]}/>
+ textToHighlight={suggestionTextArray[arrayIndex]}
+ autoEscape={true}/>
{ ++arrayIndex ? ' ' : ' '}
</span>);
diff --git a/src/generic-components/notifications/NotificationReducer.js b/src/generic-components/notifications/NotificationReducer.js
index e20a8fb..1f5122c 100644
--- a/src/generic-components/notifications/NotificationReducer.js
+++ b/src/generic-components/notifications/NotificationReducer.js
@@ -21,43 +21,28 @@
import NotificationConstants from './NotificationConstants.js';
export default (state = null, action) => {
- switch (action.type) {
- case NotificationConstants.NOTIFY_INFO:
- return {
- type: 'default',
- title: action.data.title,
- msg: action.data.msg,
- timeout: action.data.timeout
- };
-
- case NotificationConstants.NOTIFY_ERROR:
- return {
- type: 'error',
- title: action.data.title,
- msg: action.data.msg,
- timeout: action.data.timeout
- };
-
- case NotificationConstants.NOTIFY_WARNING:
- return {
- type: 'warning',
- title: action.data.title,
- msg: action.data.msg,
- timeout: action.data.timeout
- };
-
- case NotificationConstants.NOTIFY_SUCCESS:
- return {
- type: 'success',
+ switch (action.type) {
+ case NotificationConstants.NOTIFY_INFO:
+ return createStatus('default', action);
+ case NotificationConstants.NOTIFY_ERROR:
+ return createStatus('error', action);
+ case NotificationConstants.NOTIFY_WARNING:
+ return createStatus('warning', action);
+ case NotificationConstants.NOTIFY_SUCCESS:
+ return createStatus('success', action);
+ case NotificationConstants.NOTIFY_CLOSE:
+ return null;
+ default:
+ return state;
+ }
+
+};
+
+function createStatus(type, action) {
+ return {
+ type: type,
title: action.data.title,
msg: action.data.msg,
timeout: action.data.timeout
- };
- case NotificationConstants.NOTIFY_CLOSE:
- return null;
-
- default:
- return state;
- }
-
-};
+ };
+}