removing unused db file
[policy/engine.git] / ecomp-sdk-app / src / main / webapp / WEB-INF / fusion / raptor / wizard_log.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="org.openecomp.portalsdk.analytics.xmlobj.DataColumnType" %>
21 <%@ page import="org.openecomp.portalsdk.analytics.util.AppConstants" %>
22 <%@ page import="org.openecomp.portalsdk.analytics.model.definition.ReportDefinition" %>
23 <%@ page import="org.openecomp.portalsdk.analytics.system.AppUtils" %>
24 <%@ page import="org.openecomp.portalsdk.analytics.controller.WizardSequence" %>
25 <%@ page import="java.util.List" %>
26 <%@ page import="java.util.Iterator" %>
27 <%@ page import="org.openecomp.portalsdk.analytics.system.Globals" %>
28 <%@ page import="org.openecomp.portalsdk.analytics.util.Utils" %>
29 <%@ page import="java.util.Vector" %>
30 <%@ page import="org.openecomp.portalsdk.analytics.model.ReportLoader" %>
31 <%@ page import="org.openecomp.portalsdk.analytics.model.base.IdNameValue" %>
32 <%@ page import="org.openecomp.portalsdk.analytics.xmlobj.FormFieldType" %>
33 <%@ page import="org.openecomp.portalsdk.analytics.model.base.ReportWrapper" %>
34 <%@ page import="org.openecomp.portalsdk.analytics.model.DataCache" %>
35 <%@ page import="org.openecomp.portalsdk.analytics.model.runtime.FormField" %>
36 <%@ page import="org.openecomp.portalsdk.analytics.util.Log" %>
37 <%@ page import="org.openecomp.portalsdk.analytics.model.definition.ReportLogEntry" %>
38 <%      
39     ReportDefinition rdef = (ReportDefinition) request.getAttribute(AppConstants.SI_REPORT_DEFINITION);
40     WizardSequence ws = rdef.getWizardSequence();
41     String curSubStep = ws.getCurrentSubStep();
42         String reportID   = rdef.getReportID();
43         boolean isCrossTab = rdef.getReportType().equals(AppConstants.RT_CROSSTAB);
44         boolean isSQLBased = rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED); 
45         
46 %>
47
48 <%      String errorMsg = null;
49         Vector reportLogEntries = null; 
50         try {
51                 reportLogEntries = ReportLoader.loadReportLogEntries(reportID);
52         } catch(Exception e) { 
53                 Log.write("ERROR [wizard_log.jsp] Unable to load report log entries. Exception: "+e.getMessage());
54                 errorMsg = "<b>ERROR: </b>Unable to load report log entries from the database <!--Exception: "+e.getMessage()+"-->";
55         } %>
56
57 <table class="mTAB" width="100%" class="tableBorder" border="0" cellspacing="1" cellpadding="3" align=center>
58         <tr>
59                 <td class=rbg1 colspan=6 valign="Middle"><b class=rtableheader>Step <%= ws.getCurrentStepIndex() %> of <%= ws.getStepCount() %> - Report <%= ws.getCurrentStep() %></b></td>
60         </tr>
61         <tr class=rbg1>
62                 <td align="center" valign="Middle" width="7%" height="30"><b class=rtableheader>&nbsp;&nbsp;No&nbsp;&nbsp;</b></td>
63                 <td align="center" valign="Middle" width="31%"><b class=rtableheader>Date/Time</b></td>
64                 <td align="center" valign="Middle" width="31%"><b class=rtableheader>User Name</b></td>
65                 <td align="center" valign="Middle" width="31%"><b class=rtableheader>Action</b></td>
66             <td align="center" valign="Middle" width="31%"><b class=rtableheader>Execution Time</b></td>                                
67             <td align="center" valign="Middle" width="31%"><b class=rtableheader>Run</b></td>       
68         </tr>
69 <%      int iCount = 0;
70         if(reportLogEntries!=null)
71                 for(Iterator iter=reportLogEntries.iterator(); iter.hasNext(); iCount++) { 
72                         ReportLogEntry logEntry = (ReportLogEntry) iter.next(); %>
73         <tr <%= (iCount%2==0)?" class=rowalt1":" class=rowalt2" %>>
74                 <td align="center" height="30" class="tdborder"><font class=rtabletext><%= iCount+1 %></font></td>
75                 <td align="center" class="tdborder"><font class=rtabletext><%= logEntry.getLogTime() %></font></td>
76                 <td class="tdborder"><font class=rtabletext><%= logEntry.getUserName() %></font></td>
77                 <td class="tdborder"><font class=rtabletext><%= logEntry.getAction() %></font></td>
78         <td class="tdborder"><font class=rtabletext><%= logEntry.getTimeTaken() %></font></td>                          
79         <td class="tdborder"><font class=rtabletext><%= logEntry.getRunIcon() %></font></td>        
80                         
81         </tr>
82 <%      }   // for
83         if(errorMsg!=null) { %>
84         <tr class=rbg6>
85                 <td colspan=6 align="center" height="30"><font class=rerrortextsm><%= errorMsg %></font></td>
86         </tr>
87 <%      } else if(iCount==0) { %>
88         <tr class=rbg2>
89                 <td colspan=6 align="center" height="30"><font class=rtabletext>No log entries found</font></td>
90         </tr>
91 <%      } else { %>
92         <tr class=rbg1>
93                 <td colspan=6 align="left" valign="Middle" height="30">
94                         <input type="Submit" class=button value="Clear Log" onClick="document.forma.<%= AppConstants.RI_WIZARD_ACTION %>.value='<%= AppConstants.WA_DELETE_USER %>';">
95                 </td>
96         </tr>
97 <%      }       // if 
98 %>
99 </table>
100 <br>
101
102 <script language="JavaScript">
103 <!--
104 function dataValidate() {
105         return true;
106 }   // dataValidate
107 //-->
108 </script>
109