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">
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" border="0" cellspacing="0" cellpadding="0" align=center>
91 <table width="100%" border="0" cellspacing="0" cellpadding="3">
93 <td valign="Middle"><b class=rtableheader><%= title.toString() %></b></td>
95 <% if(request.getAttribute("message")!=null) { %>
97 <td valign="Middle"><b class=rtableheader><%= (String) request.getAttribute("message") %></b></td>
102 <jsp:include page="wizard_adhoc_schedule.jsp"/>
104 <table width="100%" border="0" cellspacing="1" cellpadding="3">
106 <td width="10%" align="right">
110 <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';">
111 <%--<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';">--%>
120 <jsp:include page="footer.jsp" flush="true" />
125 <%--<jsp:include page="disclaimer.jsp" flush="true" />--%>
127 //document.getElementById('loadingMessageDiv').style.display='none';
128 //adding the bread crumb on the folder tree
129 if (window.parent && window.parent.addBreadCrumb)
130 window.parent.addBreadCrumb(true, "000<%=rdef.getReportID()%>");
131 //displayTree("000<%=rdef.getReportID()%>");
133 String isTreeHidden = "true";
134 if(request.getSession().getAttribute("isTreeHidden") != null && ((String)request.getSession().getAttribute("isTreeHidden")).equals("true")){
135 isTreeHidden = "true";
137 isTreeHidden = "false";
140 //if ("<%=isTreeHidden%>" == "true"){
143 //document.getElementById('contentDiv').style.height=document.body.offsetHeight - 50;
145 <%! private String HTMLEncode(String value) {
146 StringBuffer sb = new StringBuffer(value);
148 for(int i=0; i<sb.length(); i++)
149 if(sb.charAt(i)=='<')
150 sb.replace(i, i+1, "<");
151 else if(sb.charAt(i)=='>')
152 sb.replace(i, i+1, ">");
153 else if(sb.charAt(i)=='"')
154 sb.replace(i, i+1, """);
156 return sb.toString();
159 private String clearSpaces(String value) {
160 StringBuffer sb = new StringBuffer(value);
162 for(int i=0; i<sb.length(); i++)
163 if(sb.charAt(i)==' ')
164 sb.replace(i, i+1, " ");
166 return sb.toString();
169 private String nvl(String s) { return (s==null)?"":s; }
170 private String nvl(String s, String sDefault) { return nvl(s).equals("")?sDefault:s; } %>