diff options
author | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-08-06 16:14:59 +0300 |
---|---|---|
committer | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-08-06 16:14:59 +0300 |
commit | d350d5ac25c8df2846e4f0d9082cb4d364a17a83 (patch) | |
tree | 6e2afb18b785bb98dfa61509ae89749a221ad4e8 /epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp | |
parent | ff76b5ed0aa91d5fdf9dc4f95e8b20f91ed9d072 (diff) |
UI Feature flagging support
Change-Id: Ic2151dab6306c42364483e9064c01bab3dd7378b
Issue-ID: VID-208
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp')
-rwxr-xr-x | epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp index e52484e2..479459f0 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/jsp/welcome.jsp @@ -1,5 +1,11 @@ <script src="app/vid/external/multiselect/angular-bootstrap-multiselect.min.js"></script>
<script src="app/vid/external/upload-file/ng-file-upload.min.js"></script>
+<script src="app/vid/external/angular-feature-flags/featureFlags.min.js"></script>
+<script src="app/vid/external/angular-moment/moment.min.js"></script>
+<script src="app/vid/external/angular-moment/angular-moment.min.js"></script>
+<%@ page import="org.onap.vid.properties.Features"%>
+<%@ page import="org.onap.vid.properties.VidProperties" %>
+<%@ page import="org.onap.portalsdk.core.util.SystemProperties" %>
<div>
<h1 class="heading1">ONAP</h1>
<br>
@@ -19,7 +25,33 @@ <h1 class="heading1"><a href="mailto:portal@lists.onap.org" target="_top">Contact Us</a></h1>
<a href="mailto:portal@lists.onap.org" target="_top">Please click here to contact us.</a>
-
+ <%
+ if (Features.FLAG_ADD_MSO_TESTAPI_FIELD.isActive()) {
+
+ String displayTestApi = SystemProperties.getProperty(VidProperties.MSO_DISPLAY_TEST_API_ON_SCREEN);
+ String defaultTestApiValue = SystemProperties.getProperty(VidProperties.MSO_DEFAULT_TEST_API);
+
+ String selectionVisibility = Boolean.parseBoolean(displayTestApi) ? "inherit" : "hidden";
+ %>
+ <div style="visibility: <%=selectionVisibility%>" id="selectTestApiSection">
+ <br/><br/><br/>
+ <label>Test API for A-la-carte:</label>
+ <select style="width: 20ch" id="selectTestApi" onchange="sessionStorage.setItem('msoRequestParametersTestApiValue',this.value);">
+ <option value="VNF_API">VNF_API (old)</option>
+ <option value="GR_API">GR_API (new)</option>
+ </select>
+ </div>
+ <script type="text/javascript">
+ var selectedValue = sessionStorage.getItem('msoRequestParametersTestApiValue') || "<%=defaultTestApiValue%>";
+ var element = document.getElementById('selectTestApi');
+ if (element) {
+ element.value = selectedValue;
+ }
+ sessionStorage.setItem('msoRequestParametersTestApiValue', selectedValue);
+ </script>
+ <%
+ }
+ %>
<BR>
</div>
<br>
|