removing unused db file
[policy/engine.git] / ecomp-sdk-app / src / main / webapp / WEB-INF / fusion / raptor / wizard_schedule_only.jsp
1 <%--
2   ================================================================================
3   eCOMP Portal SDK
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
10   
11        http://www.apache.org/licenses/LICENSE-2.0
12   
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   ================================================================================
19   --%>
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.*" %>
29
30 <%@ page errorPage="error_page.jsp" %>
31
32
33
34 <%      ReportDefinition rdef = (ReportDefinition) request.getSession().getAttribute(AppConstants.SI_REPORT_DEFINITION);
35         
36         String reportID   = rdef.getReportID();
37         
38
39     
40         String dbInfo = null;
41         dbInfo = rdef.getDBInfo();
42         int sessionflag = 0;
43         if(dbInfo == null  || dbInfo.length() == 0) {
44            dbInfo = (String) session.getAttribute("remoteDB");
45        sessionflag = 1; 
46         }
47        session.setAttribute("remoteDB", dbInfo);
48         if((dbInfo == null) && (request.getParameter("dataSource")!=null)) 
49            session.setAttribute("remoteDB", request.getParameter("dataSource"));
50
51         StringBuffer title = new StringBuffer("");
52         title.append(Globals.getBaseTitle()+" > "+(reportID.equals("-1")?"Create Report":"Schedule Report"));
53         title.append(" > "+rdef.getReportName());
54         
55         boolean isCrossTab = rdef.getReportType().equals(AppConstants.RT_CROSSTAB);
56         boolean isSQLBased = rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED); 
57 %>
58 <!--  Set All variable to request, to enable included jsp to access it -->      
59 <%
60         request.setAttribute(AppConstants.SI_REPORT_DEFINITION,rdef);
61 %>      
62
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>
66  
67
68 <jsp:include page="error_include.jsp" flush="true" />
69
70 <table width="100%" >
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" />
74         </jsp:include>-->
75         </table>
76 </td>
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) %>">
87
88
89 <table width="94%"  class="tableBorder" border="0" cellspacing="0" cellpadding="0" align=center>
90 <tr><td>
91         <table width="100%" border="0" cellspacing="0" cellpadding="3">
92                 <tr class=rbg1>
93                         <td valign="Middle"><b class=rtableheader><%= title.toString() %></b></td>
94                 </tr>
95                 <% if(request.getAttribute("message")!=null) { %>
96                 <tr class=rbg1>
97                         <td valign="Middle"><b class=rtableheader><%= (String) request.getAttribute("message") %></b></td>
98                 </tr>
99                 <% } %>
100         </table>
101 </td></tr><tr><td>
102                  <jsp:include page="wizard_adhoc_schedule.jsp"/>
103 </td></tr><tr><td>
104         <table width="100%" border="0" cellspacing="1" cellpadding="3">
105                 <tr>
106                         <td width="10%" align="right">
107                                 &nbsp;
108                         </td>
109                         <td align=center>
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';">--%>
112                                         
113                         </td>
114                 </tr>
115         </table>        
116 </td></tr>
117 </table>        
118 </form>
119
120  <jsp:include page="footer.jsp" flush="true" />
121 </div>
122 </td>
123 </tr>
124 </table>
125 <%--<jsp:include page="disclaimer.jsp" flush="true" />--%>
126 <script>
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()%>");
132         <%
133                 String isTreeHidden = "true";
134                 if(request.getSession().getAttribute("isTreeHidden") != null && ((String)request.getSession().getAttribute("isTreeHidden")).equals("true")){
135                         isTreeHidden = "true";
136                 }else{
137                         isTreeHidden = "false";
138                 }
139         %>
140         //if ("<%=isTreeHidden%>" == "true"){
141         //      hideTree();
142         //}
143         //document.getElementById('contentDiv').style.height=document.body.offsetHeight - 50;
144 </script>
145 <%!     private String HTMLEncode(String value) {
146                 StringBuffer sb = new StringBuffer(value);
147                 
148                 for(int i=0; i<sb.length(); i++)
149                         if(sb.charAt(i)=='<')
150                                 sb.replace(i, i+1, "&lt;");
151                         else if(sb.charAt(i)=='>')
152                                 sb.replace(i, i+1, "&gt;");
153                         else if(sb.charAt(i)=='"')
154                                 sb.replace(i, i+1, "&quot;");
155                 
156                 return sb.toString();
157         }   // HTMLEncode
158         
159         private String clearSpaces(String value) {
160                 StringBuffer sb = new StringBuffer(value);
161                 
162                 for(int i=0; i<sb.length(); i++)
163                         if(sb.charAt(i)==' ')
164                                 sb.replace(i, i+1, "&nbsp;");
165                 
166                 return sb.toString();
167         }   // clearSpaces
168         
169         private String nvl(String s)                  { return (s==null)?"":s; }
170         private String nvl(String s, String sDefault) { return nvl(s).equals("")?sDefault:s; } %>
171
172