2 ================================================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property
6 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ================================================================================
20 <%@ page import="java.util.*" %>
21 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.*" %>
22 <%@ page import="org.openecomp.portalsdk.analytics.model.*" %>
23 <%@ page import="org.openecomp.portalsdk.analytics.model.base.*" %>
24 <%@ page import="org.openecomp.portalsdk.analytics.model.definition.*" %>
25 <%@ page import="org.openecomp.portalsdk.analytics.model.runtime.*" %>
26 <%@ page import="org.openecomp.portalsdk.analytics.controller.*" %>
27 <%@ page import="org.openecomp.portalsdk.analytics.system.*" %>
28 <%@ page import="org.openecomp.portalsdk.analytics.util.*" %>
30 <%@ page errorPage="error_page.jsp" %>
34 <% ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
36 String reportID = rdef.getReportID();
41 dbInfo = rdef.getDBInfo();
43 if(dbInfo == null || dbInfo.length() == 0) {
44 dbInfo = (String) session.getAttribute("remoteDB");
47 session.setAttribute("remoteDB", dbInfo);
48 if((dbInfo == null) && (request.getParameter("dataSource")!=null))
49 session.setAttribute("remoteDB", request.getParameter("dataSource"));
51 StringBuffer title = new StringBuffer("");
52 title.append(Globals.getBaseTitle()+" > "+(reportID.equals("-1")?"Create Report":"Schedule Report"));
53 title.append(" > "+rdef.getReportName());
55 boolean isCrossTab = rdef.getReportType().equals(AppConstants.RT_CROSSTAB);
56 boolean isSQLBased = rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED);
58 <!-- Set All variable to request, to enable included jsp to access it -->
60 request.setAttribute(AppConstants.SI_REPORT_DEFINITION,rdef);
63 <jsp:include page="header.jsp" flush="true" />
64 <!-- <link rel="stylesheet" type="text/css" href="<%= AppUtils.getBaseFolderURL() %>css/raptor.css">-->
65 <script language="JavaScript" src="<%= AppUtils.getBaseFolderURL() %>js/raptor.js"></script>
68 <jsp:include page="error_include.jsp" flush="true" />
71 <tr><td id="folderTreeContainer" width="1%" height='300' valign='top' ><table>
72 <!--<jsp:include page="tree/folderNav.jsp" flush="true" >
73 <jsp:param name="doCollapseTree" value="Y" />
77 <td id="searchContentContainer" valign='top' >
78 <div id="contentDiv" style="position:relative;overflow:auto;">
79 <form name="forma" action="<%= AppUtils.getBaseURL() %>" method="post">
80 <input type="hidden" name="action" value="raptor">
81 <input type="hidden" name="<%= AppConstants.RI_ACTION %>" value="report.schedule.submit_from_search">
82 <input type="hidden" name="<%= AppConstants.RI_REPORT_ID %>" value="<%= reportID %>">
83 <input type="hidden" name="<%= AppConstants.RI_DETAIL_ID %>" value="<%= AppUtils.getRequestNvlValue(request, AppConstants.RI_DETAIL_ID) %>">
84 <input type="hidden" name="<%= AppConstants.RI_GO_TO_STEP %>" value="">
85 <input type="hidden" name="<%= AppConstants.RI_WIZARD_ACTION %>" value="<%= AppConstants.WA_BACK %>">
86 <input type="hidden" name="<%= AppConstants.RI_SCHEDULE_ID %>" value="<%= AppUtils.getRequestNvlValue(request, AppConstants.RI_SCHEDULE_ID) %>">
89 <table width="94%" class="tableBorder" cellspacing="0" cellpadding="0" align=center>
91 <table width="100%" border="0" cellspacing="0" cellpadding="3">
92 <% if(request.getAttribute("message")!=null) { %>
94 <td valign="Middle"><b class=rerrortext><%= (String) request.getAttribute("message") %></b></td>
98 <td valign="Middle"><b class=rtableheader><%= title.toString() %></b></td>
103 <jsp:include page="wizard_adhoc_schedule.jsp"/>
105 <table width="100%" border="0" cellspacing="1" cellpadding="3">
107 <td width="10%" align="right">
111 <input type=submit class="button" border="0" value="Submit" width="71" height="28" onClick="if(! dataValidate()) return false; document.forma.<%= AppConstants.RI_ACTION %>.value='report.schedule.submit_from_search';">
112 <%--<input type=submit class="button" border="0" value="Report Search Page" width="71" height="28" onClick="document.forma.<%= AppConstants.RI_ACTION %>.value='report.search.public.container';">--%>
121 <jsp:include page="footer.jsp" flush="true" />
126 <%--<jsp:include page="disclaimer.jsp" flush="true" />--%>
128 //document.getElementById('loadingMessageDiv').style.display='none';
129 //adding the bread crumb on the folder tree
130 if (window.parent && window.parent.addBreadCrumb)
131 window.parent.addBreadCrumb(true, "000<%=rdef.getReportID()%>");
132 //displayTree("000<%=rdef.getReportID()%>");
134 String isTreeHidden = "true";
135 if(request.getSession().getAttribute("isTreeHidden") != null && ((String)request.getSession().getAttribute("isTreeHidden")).equals("true")){
136 isTreeHidden = "true";
138 isTreeHidden = "false";
141 //if ("<%=isTreeHidden%>" == "true"){
144 //document.getElementById('contentDiv').style.height=document.body.offsetHeight - 50;
146 <%! private String HTMLEncode(String value) {
147 StringBuffer sb = new StringBuffer(value);
149 for(int i=0; i<sb.length(); i++)
150 if(sb.charAt(i)=='<')
151 sb.replace(i, i+1, "<");
152 else if(sb.charAt(i)=='>')
153 sb.replace(i, i+1, ">");
154 else if(sb.charAt(i)=='"')
155 sb.replace(i, i+1, """);
157 return sb.toString();
160 private String clearSpaces(String value) {
161 StringBuffer sb = new StringBuffer(value);
163 for(int i=0; i<sb.length(); i++)
164 if(sb.charAt(i)==' ')
165 sb.replace(i, i+1, " ");
167 return sb.toString();
170 private String nvl(String s) { return (s==null)?"":s; }
171 private String nvl(String s, String sDefault) { return nvl(s).equals("")?sDefault:s; } %>