📄 stats-reporter.jsp
字号:
<table> <tr> <td width="1%" valign="top"> <input type="radio" name="dateRangeType" value="preset" id="drt01" onclick="checkPreset();" <%= ("preset".equals(dateRangeType) ? "checked" : "") %>> </td> <td width="99%" valign="top"> <label for="drt01"><fmt:message key="allreports.daterange.preset" /></label></td> </tr> <tr> <td colspan="2" align="right"> <select size="1" name="dateRangePreset" id="dateRangePreset" onchange="checkPreset();"> <option value="last60minutes" <%= ("last60minutes".equals(dateRangePreset) ? "selected" : "") %> ><fmt:message key="allreports.daterange.preset.last60minutes" /> </option> <option value="last24hours" <%= ("last24hours".equals(dateRangePreset) ? "selected" : "") %> ><fmt:message key="allreports.daterange.preset.last24hours" /> </option> <option value="thisweek" <%= ("thisweek".equals(dateRangePreset) ? "selected" : "") %> ><fmt:message key="allreports.daterange.preset.thisweek" /> </option> <option value="last7days" <%= ("last7days".equals(dateRangePreset) ? "selected" : "") %> ><fmt:message key="allreports.daterange.preset.last7days" /> </option> <option value="lastweek" <%= ("lastweek".equals(dateRangePreset) ? "selected" : "") %> ><fmt:message key="allreports.daterange.preset.lastweek" /> </option> <option value="thismonth" <%= ("thismonth".equals(dateRangePreset) ? "selected" : "") %> ><fmt:message key="allreports.daterange.preset.thismonth" /> </option> <option value="lastmonth" <%= ("lastmonth".equals(dateRangePreset) ? "selected" : "") %> ><fmt:message key="allreports.daterange.preset.lastmonth" /> </option> <option value="last3months" <%= ("last3months".equals(dateRangePreset) ? "selected" : "") %> ><fmt:message key="allreports.daterange.preset.last3months" /> </option> </select> </td> </tr> <tr valign="top"> <td width="1%" valign="top"> <input type="radio" name="dateRangeType" value="specific" id="drt02" onclick="checkSpecific();" <%= ("specific".equals(dateRangeType) ? "checked" : "") %>> </td> <td width="99%"><label for="drt02"><fmt:message key="allreports.daterange.specific" /></label></td> </tr> <tr valign="top"> <td colspan="2" align="right"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td align="right" id="fromDateTitle" class="datenormal"> <fmt:message key="allreports.daterange.specific.startdate" /> </td> <td> <input type="text" size="10" name="fromDate" id="fromDate" maxlength="10" onclick="checkSpecific();" onchange="viewStat(currentStat);" <%= ("specific".equals(dateRangeType) ? "" : "disabled") %> value="<%= (fromDateParam != null ? fromDateParam : "") %>" > </td> <td> <img src="images/icon_calendarpicker.gif" id="fromDateCal" /> </td> </tr> <tr> <td align="right" id="toDateTitle" class="datenormal"> <fmt:message key="allreports.daterange.specific.enddate" /> </td> <td> <input type="text" size="10" name="toDate" id="toDate" maxlength="10" onclick="checkSpecific();" onchange="viewStat(currentStat);" <%= ("specific".equals(dateRangeType) ? "" : "disabled") %> value="<%= (toDateParam != null ? toDateParam : "") %>"> </td> <td> <img src="images/icon_calendarpicker.gif" id="toDateCal" /> </td> </tr> </table> </td> </tr> </table> </td> </form></tr> </table> <br /> <table cellpadding="0" cellspacing="0" border="0" width="180" class="jive-table" style="border-bottom: 1px solid #bbb;"> <thead> <tr> <th> <fmt:message key="allreports.selectreport" /> </th> </tr> </thead> <tbody> <% for (String stat : statList) { %> <tr id="statDetail<%= stat %>" <% if (stat.equalsIgnoreCase(STAT_DEFAULT)) { %> class="allreports_report_selected" <% } else { %> class="allreports_report_default" <% } %> > <td valign="top" onclick="viewStat('<%= stat %>');toggleSelected('<%= stat %>'); return false;" onmouseover="toggleMouseOver('<%= stat %>');" onmouseout="toggleMouseOver('<%= stat %>');"> <%= getStatsViewer().getStatistic(stat)[0].getName()%> </td> </tr> <% } %> <script type="text/javascript"> var selectedStat = '<%= STAT_DEFAULT %>'; function toggleSelected(statname) { $('statDetail' + selectedStat).className = 'allreports_report_default'; $('statDetail' + statname).className = 'allreports_report_selected'; selectedStat = statname; } function toggleMouseOver(statname) { if (statname != selectedStat) { if ($('statDetail' + statname).className == 'allreports_report_hover') { $('statDetail' + statname).className = 'allreports_report_default'; } else { $('statDetail' + statname).className = 'allreports_report_hover'; } } } </script> </tbody> </table> <br /> <table cellpadding="0" cellspacing="0" border="0" width="180" class="jive-table"> <thead> <tr> <th style="border-bottom:none"> <table cellspacing='0' cellpadding='0' border='0' align="center" style="padding:0px;border-bottom:none"> <tr> <td colspan="2" style="padding:0px;border-bottom:none; font-size: 12px;"> <b><fmt:message key="allreports.download.allreports" /></b> </td> <td style="padding:0px;border-bottom:none"><img src="images/blank.gif" alt="" border="0" height="1" width="1" /></td> </tr> </table> </th> </tr> <tr> <th style="border-bottom : 1px #ccc solid;"> <table cellspacing='0' cellpadding='0' border='0' align="center" style="padding:0px;border-bottom:none"> <tr> <td style="padding:0px;border-bottom:none; font-size: 12px;"><img src="images/icon_pdf.gif" alt="<fmt:message key="allreports.download.allreports.pdf.format" />" border="0" /></td> <td style="padding:0px;border-bottom:none; font-size: 12px;"> <a target="_blank" href="graph?stat=<%= STAT_DEFAULT %>&timeperiod=<%= timePeriod %>&pdf=all" id="pdfviewerall"><fmt:message key="allreports.download.allreports.pdf" /></a></td> </tr> </table> </th> </thead> </table> </td> <td width="20"> </td> <td valign="top" width="553"> <table cellpadding="0" cellspacing="0" border="0" width="553" class="jive-table"> <thead> <tr> <th width="70%" id="graph-header"> <%= getStatsViewer().getStatistic(STAT_DEFAULT)[0].getName() %>: <script type="text/javascript">writeTimePeriod();</script> </th> <th style="text-align:right; border-bottom : 1px #ccc solid; padding:0px;" nowrap> <table cellspacing='0' cellpadding='0' border='0' align="right" style="padding:0px;border-bottom:none;"> <tr> <td style="padding:0px;border-bottom:none;font-size: 11px;" nowrap> <fmt:message key="allreports.download.singlereport" /> </td> <td style="padding:0px;border-bottom:none;"><img src="images/icon_pdf.gif" alt="PDF Format" border="0" /></td> <td style="padding:0px;border-bottom:none;font-size: 11px;"> <a target="_blank" href="graph?stat=<%= STAT_DEFAULT %>&timeperiod=<%= timePeriod %>&pdf=true" id="pdfviewer"><fmt:message key="allreports.download.singlereport.pdf" /></a></td> <td style="padding:0px;border-bottom:none;"><img src="images/blank.gif" alt="" border="0" height="1" width="8" /></td> </tr> </table> </th> </tr> </thead> <tr> <td colspan="2" style="padding:0px; border-bottom:0px"><img src="/images/blank.gif" alt="" border="0" height="1" width="500" /></td> </tr> <tr> <td colspan="2"> <table class="noclass"> <tr> <td><img src="/images/blank.gif" alt="" border="0" height="280" width="1" /></td> <td><img id="viewer" src="graph?stat=<%= STAT_DEFAULT %>&timeperiod=<%= timePeriod %>&width=500&height=250" border="0" /></td> </tr> <!-- <tr> <td colspan="2"> <div id="graph-description_NEW" style="padding: 10px 10px 20px 15px;"> <%= getStatsViewer().getStatistic(STAT_DEFAULT)[0].getDescription() %> </div> </td> </tr> --> </table> </td> </tr> </table> <br /> <table cellpadding="0" cellspacing="0" border="0" width="553" class="jive-table"> <thead> <tr> <th style="border-bottom : 1px #ccc solid"> <fmt:message key="allreports.reportinformation" /> </th> </tr> </thead> <tr> <td align="left" id="graph-description"> <b><%= getStatsViewer().getStatistic(STAT_DEFAULT)[0].getName() %></b><br /><br /> <%= getStatsViewer().getStatistic(STAT_DEFAULT)[0].getDescription() %> </td> </tr> </table> </td></tr></table><br><script type="text/javascript" > Calendar.setup( { inputField : "fromDate", // ID of the input field ifFormat : "%m/%d/%y", // the date format button : "fromDateCal", // ID of the button onUpdate : viewStat }); Calendar.setup( { inputField : "toDate", // ID of the input field ifFormat : "%m/%d/%y", // the date format button : "toDateCal", // ID of the button onUpdate : viewStat });</script></body></html><%! private StatsViewer statsViewer; public static final String STAT_DEFAULT = "sessions"; public static final String COOKIE_TIMEPERIOD = "openfire-reporting-timeperiod"; public StatsViewer getStatsViewer() { if (statsViewer == null) { MonitoringPlugin plugin = (MonitoringPlugin) XMPPServer.getInstance().getPluginManager().getPlugin("monitoring"); statsViewer = (StatsViewer) plugin.getModule(StatsViewer.class); } return statsViewer; } /** * Sorts Statistics by Name. */ final Comparator<String> statisticComporator = new Comparator<String>() { public int compare(String stat1, String stat2) { String statName1 = getStatsViewer().getStatistic(stat1)[0].getName(); String statName2 = getStatsViewer().getStatistic(stat2)[0].getName(); return statName1.toLowerCase().compareTo(statName2.toLowerCase()); } };%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -