<%-- ================================================================================ eCOMP Portal SDK ================================================================================ Copyright (C) 2017 AT&T Intellectual Property ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================================================ --%> <%-- Name: report_wizard.jsp Use : Master JSP which navigates to specific JSP when different tab is selected. Default it navigates to the wizard_definition.jsp Change Log ========== 22-Jun-2009 : Version 8.4 (Sundar); --%> <%@ page import="java.util.*" %> <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.*" %> <%@ page import="org.openecomp.portalsdk.analytics.model.*" %> <%@ page import="org.openecomp.portalsdk.analytics.model.base.*" %> <%@ page import="org.openecomp.portalsdk.analytics.model.definition.*" %> <%@ page import="org.openecomp.portalsdk.analytics.model.runtime.*" %> <%@ page import="org.openecomp.portalsdk.analytics.controller.*" %> <%@ page import="org.openecomp.portalsdk.analytics.system.*" %> <%@ page import="org.openecomp.portalsdk.analytics.util.*" %> <%@ page errorPage="error_page.jsp" %> <% ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION); String reportID = rdef.getReportID(); WizardSequence ws = rdef.getWizardSequence(); String curStep = ws.getCurrentStep(); String curSubStep = ws.getCurrentSubStep(); String dbInfo = null; dbInfo = rdef.getDBInfo(); int sessionflag = 0; if(dbInfo == null || dbInfo.length() == 0) { dbInfo = (String) session.getAttribute("remoteDB"); sessionflag = 1; } session.setAttribute("remoteDB", dbInfo); if((dbInfo == null) && (request.getParameter("dataSource")!=null)) session.setAttribute("remoteDB", request.getParameter("dataSource")); String title = (reportID.equals("-1")?"Create Report":"Edit Report"); String navTitle = Globals.getBaseTitle()+" > " + title; boolean isCrossTab = rdef.getReportType().equals(AppConstants.RT_CROSSTAB); boolean isSQLBased = rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED); %> <% request.setAttribute(AppConstants.SI_REPORT_DEFINITION,rdef); %>
<% for(ws.resetNext(); ws.hasNext(); ) { String sTab = ws.getNext(); %> <% } // for %>
" width="9" height="24"> align="center" valign="middle"> <% if(sTab.equals(curStep)) { %>  <%= clearSpaces(sTab) %>  <% } else if(reportID.equals("-1")) { %>  <%= clearSpaces(sTab) %>  <% } else { %>  <%= clearSpaces(sTab) %>  <% } %> " width="9" height="24"> 
<%= navTitle %>
<% if(curStep.equals(AppConstants.WS_DEFINITION)) { %> <% if(sessionflag == 1) dbInfo = ""; %> <% } else if(curStep.equals(AppConstants.WS_SQL)) { %> <% } else if(curStep.equals(AppConstants.WS_TABLES)&&curSubStep.equals("")) { %> <% } else if(curStep.equals(AppConstants.WS_TABLES)&&(curSubStep.equals(AppConstants.WSS_ADD)||curSubStep.equals(AppConstants.WSS_EDIT))) { %> <% } else if(curStep.equals(AppConstants.WS_COLUMNS)&&curSubStep.equals("")) { %> <% } else if(curStep.equals(AppConstants.WS_COLUMNS)&&curSubStep.equals(AppConstants.WSS_ADD_MULTI)) { %> <% } else if(curStep.equals(AppConstants.WS_COLUMNS)&&curSubStep.equals(AppConstants.WSS_ORDER_ALL)) { %> <% } else if(curStep.equals(AppConstants.WS_COLUMNS)&&(curSubStep.equals(AppConstants.WSS_ADD)||curSubStep.equals(AppConstants.WSS_EDIT) ||curSubStep.equals(AppConstants.WA_MODIFY))) { %> <% } else if(curStep.equals(AppConstants.WS_FORM_FIELDS)&&curSubStep.equals("")||curSubStep.equals(AppConstants.WSS_ADD_BLANK)) { %> <% } else if(curStep.equals(AppConstants.WS_FORM_FIELDS)&&(curSubStep.equals(AppConstants.WSS_ADD)||curSubStep.equals(AppConstants.WSS_EDIT))) { %> <% } else if(curStep.equals(AppConstants.WS_FILTERS)&&curSubStep.equals("")) { %> <% } else if(curStep.equals(AppConstants.WS_FILTERS)&&(curSubStep.equals(AppConstants.WSS_ADD)||curSubStep.equals(AppConstants.WSS_EDIT))) { %> <% } else if(curStep.equals(AppConstants.WS_SORTING)&&curSubStep.equals("")) { %> <% } else if(curStep.equals(AppConstants.WS_SORTING)&&curSubStep.equals(AppConstants.WSS_ORDER_ALL)) { %> <% } else if(curStep.equals(AppConstants.WS_SORTING)&&(curSubStep.equals(AppConstants.WSS_ADD)||curSubStep.equals(AppConstants.WSS_EDIT))) { %> <% } else if(curStep.equals(AppConstants.WS_JAVASCRIPT)) { %> <% } else if(curStep.equals(AppConstants.WS_CHART)) { %> <% } else if(curStep.equals(AppConstants.WS_USER_ACCESS)) { %> <% } else if(curStep.equals(AppConstants.WS_SCHEDULE)) { %> <% } else if(curStep.equals(AppConstants.WS_REPORT_LOG)) { %> <% } else if(curStep.equals(AppConstants.WS_MAP)) { %> <% } else if(curStep.equals(AppConstants.WS_DATA_FORECASTING)) { %> <% } else { %> <% } %>
  <% if(! ws.isInitialStep()) { %> <% } %> <% if(! ws.isFinalStep()) { %> <% } %>
<%----%> <%! private String HTMLEncode(String value) { StringBuffer sb = new StringBuffer(value); for(int i=0; i') sb.replace(i, i+1, ">"); else if(sb.charAt(i)=='"') sb.replace(i, i+1, """); return sb.toString(); } // HTMLEncode private String clearSpaces(String value) { StringBuffer sb = new StringBuffer(value); for(int i=0; i