X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fapp%2FMainScreenHeader.jsx;h=a3225e7a6080e420160ef9b9501e221518f2d1d7;hb=b68cd9cee606372747f6fee4a864de994b0518a7;hp=49952f7fc76126122bda472be5892da93923f9ae;hpb=a38f3d6bb17a478d08016e49d6c2a667ac483d4a;p=aai%2Fsparky-fe.git
diff --git a/src/app/MainScreenHeader.jsx b/src/app/MainScreenHeader.jsx
index 49952f7..a3225e7 100644
--- a/src/app/MainScreenHeader.jsx
+++ b/src/app/MainScreenHeader.jsx
@@ -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,10 +17,7 @@
* 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 React, {Component} from 'react';
import {connect} from 'react-redux';
import FontAwesome from 'react-fontawesome';
@@ -32,7 +29,6 @@ import {postAnalyticsData} from 'app/analytics/AnalyticsActions.js';
import GlobalInlineMessageBar from 'app/globalInlineMessageBar/GlobalInlineMessageBar.jsx';
import {getClearGlobalMessageEvent} from 'app/globalInlineMessageBar/GlobalInlineMessageBarActions.js';
import {externalUrlRequest, externalMessageRequest, getSubscriptionPayload} from 'app/contextHandler/ContextHandlerActions.js';
-
import {
filterBarActionTypes
} from 'utils/GlobalConstants.js';
@@ -135,6 +131,7 @@ class MainScreenHeader extends Component {
return false;
}
}
+
isValidExternalURL(url) {
if(decodeURIComponent(url).indexOf('&') > 0 ) {
return true;
@@ -142,6 +139,7 @@ class MainScreenHeader extends Component {
return false;
}
}
+
componentWillMount() {
this.props.onGetSubscriptionPayload();
if(this.props.match.params.externalUrl !== undefined &&
@@ -149,6 +147,7 @@ class MainScreenHeader extends Component {
this.props.onExternalUrlRequest(this.props.match.params.externalUrl);
}
}
+
componentWillReceiveProps(nextProps) {
if (this.props.location &&
this.props.location.pathname !==
@@ -265,11 +264,19 @@ class MainScreenHeader extends Component {
// add all custom view menu options
for (let view in extensibleViews) {
- menuOptions.push(
-
- );
+ let shouldDisplayIcon = false;
+ if(extensibleViews[view]['onlyRoute'] === undefined){
+ shouldDisplayIcon = true;
+ } else if(extensibleViews[view]['onlyRoute'] === false){
+ shouldDisplayIcon = true;
+ }
+ if(shouldDisplayIcon === true){
+ menuOptions.push(
+
+ );
+ }
}
let secondaryTitleClass = 'secondary-header';