"Fossies" - the Fresh Open Source Software Archive

Member "psi-probe-psi-probe-3.4.2/web/src/main/webapp/WEB-INF/jsp/allappstats.jsp" (21 Nov 2019, 9579 Bytes) of package /linux/www/psi-probe-3.4.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) JavaServer Pages source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "allappstats.jsp": 2.4.0.SP1_vs_3.0.0.

    1 <%--
    2 
    3     Licensed under the GPL License. You may not use this file except in compliance with the License.
    4     You may obtain a copy of the License at
    5 
    6       https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
    7 
    8     THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
    9     WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
   10     PURPOSE.
   11 
   12 --%>
   13 <%@ page contentType="text/html;charset=UTF-8" language="java" session="false" %>
   14 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
   15 <%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
   16 <%@ taglib uri="https://github.com/psi-probe/psi-probe/jsp/tags" prefix="probe" %>
   17 
   18 <html>
   19     <head>
   20         <title>
   21             <spring:message code="probe.jsp.title.allappstats"/>
   22         </title>
   23         <script type="text/javascript" src="<c:url value='/js/prototype.js'/>"></script>
   24         <script type="text/javascript" src="<c:url value='/js/scriptaculous/scriptaculous.js'/>"></script>
   25         <script type="text/javascript" src="<c:url value='/js/func.js'/>"></script>
   26         <script type="text/javascript" src="<c:url value='/js/behaviour.js'/>"></script>
   27     </head>
   28 
   29     <c:set var="navTabApps" value="active" scope="request"/>
   30 
   31     <body>
   32 
   33         <div id="charts" class="embeddedBlockContainer">
   34             <h3><spring:message code="probe.jsp.allappstats.h3.charts"/></h3>
   35 
   36             <c:set var="chartWidth" value="345"/>
   37             <c:set var="chartHeight" value="250"/>
   38             <c:set var="fullChartWidth" value="700"/>
   39             <c:set var="fullChartHeight" value="320"/>
   40 
   41             <%-- Cumulative Response Time --%>
   42             <c:url value="/chart.png" var="total_avg_proc_time_url">
   43                 <c:param name="ct" value="area"/>
   44                 <c:param name="p" value="total_avg_proc_time"/>
   45                 <c:param name="xz" value="${chartWidth}"/>
   46                 <c:param name="yz" value="${chartHeight}"/>
   47                 <c:param name="s1c" value="#FFCD9B"/>
   48                 <c:param name="s1o" value="#D26900"/>
   49                 <c:param name="l" value="false"/>
   50             </c:url>
   51 
   52             <c:url value="/chart.png" var="total_avg_proc_time_url_full">
   53                 <c:param name="p" value="total_avg_proc_time"/>
   54                 <c:param name="xz" value="${fullChartWidth}"/>
   55                 <c:param name="yz" value="${fullChartHeight}"/>
   56                 <c:param name="s1c" value="#FFCD9B"/>
   57                 <c:param name="s1o" value="#D26900"/>
   58                 <c:param name="s1l">
   59                     <spring:message code="probe.jsp.allappstats.charts.totalAvgProcTime.legend"/>
   60                 </c:param>
   61             </c:url>
   62 
   63             <%-- Response Time by App --%>
   64             <c:url value="/chart.png" var="all_app_avg_proc_time_url">
   65                 <c:param name="ct" value="line"/>
   66                 <c:param name="p" value="all_app_avg_proc_time"/>
   67                 <c:param name="xz" value="${chartWidth}"/>
   68                 <c:param name="yz" value="${chartHeight}"/>
   69                 <c:param name="s1c" value="#9BD2FB"/>
   70                 <c:param name="s1o" value="#0665AA"/>
   71                 <c:param name="s2c" value="#FFCCCC"/>
   72                 <c:param name="s2o" value="#FF8484"/>
   73                 <c:param name="s3c" value="#95FE8B"/>
   74                 <c:param name="s3o" value="#009406"/>
   75                 <c:param name="s4c" value="#FFCD9B"/>
   76                 <c:param name="s4o" value="#D26900"/>
   77             </c:url>
   78 
   79             <c:url value="/chart.png" var="all_app_avg_proc_time_url_full">
   80                 <c:param name="ct" value="line"/>
   81                 <c:param name="p" value="all_app_avg_proc_time"/>
   82                 <c:param name="xz" value="${fullChartWidth}"/>
   83                 <c:param name="yz" value="${fullChartHeight}"/>
   84                 <c:param name="s1c" value="#9BD2FB"/>
   85                 <c:param name="s1o" value="#0665AA"/>
   86                 <c:param name="s2c" value="#FFCCCC"/>
   87                 <c:param name="s2o" value="#FF8484"/>
   88                 <c:param name="s3c" value="#95FE8B"/>
   89                 <c:param name="s3o" value="#009406"/>
   90                 <c:param name="s4c" value="#FFCD9B"/>
   91                 <c:param name="s4o" value="#D26900"/>
   92             </c:url>
   93 
   94             <%-- Cumulative Requests --%>
   95             <c:url value="/chart.png" var="total_req_url">
   96                 <c:param name="ct" value="area"/>
   97                 <c:param name="p" value="total_req"/>
   98                 <c:param name="xz" value="${chartWidth}"/>
   99                 <c:param name="yz" value="${chartHeight}"/>
  100                 <c:param name="l" value="false"/>
  101             </c:url>
  102 
  103             <c:url value="/chart.png" var="total_req_url_full">
  104                 <c:param name="p" value="total_req"/>
  105                 <c:param name="xz" value="${fullChartWidth}"/>
  106                 <c:param name="yz" value="${fullChartHeight}"/>
  107                 <c:param name="s1l">
  108                     <spring:message code="probe.jsp.allappstats.charts.totalReq.legend"/>
  109                 </c:param>
  110             </c:url>
  111 
  112             <%-- Requests By App --%>
  113             <c:url value="/chart.png" var="all_app_req_url">
  114                 <c:param name="ct" value="line"/>
  115                 <c:param name="p" value="all_app_req"/>
  116                 <c:param name="xz" value="${chartWidth}"/>
  117                 <c:param name="yz" value="${chartHeight}"/>
  118                 <c:param name="s1c" value="#9BD2FB"/>
  119                 <c:param name="s1o" value="#0665AA"/>
  120                 <c:param name="s2c" value="#FFCCCC"/>
  121                 <c:param name="s2o" value="#FF8484"/>
  122                 <c:param name="s3c" value="#95FE8B"/>
  123                 <c:param name="s3o" value="#009406"/>
  124                 <c:param name="s4c" value="#FFCD9B"/>
  125                 <c:param name="s4o" value="#D26900"/>
  126             </c:url>
  127 
  128             <c:url value="/chart.png" var="all_app_req_url_full">
  129                 <c:param name="ct" value="line"/>
  130                 <c:param name="p" value="all_app_req"/>
  131                 <c:param name="xz" value="${fullChartWidth}"/>
  132                 <c:param name="yz" value="${fullChartHeight}"/>
  133                 <c:param name="s1c" value="#9BD2FB"/>
  134                 <c:param name="s1o" value="#0665AA"/>
  135                 <c:param name="s2c" value="#FFCCCC"/>
  136                 <c:param name="s2o" value="#FF8484"/>
  137                 <c:param name="s3c" value="#95FE8B"/>
  138                 <c:param name="s3o" value="#009406"/>
  139                 <c:param name="s4c" value="#FFCD9B"/>
  140                 <c:param name="s4o" value="#D26900"/>
  141             </c:url>
  142 
  143             <div id="chart_group">
  144                 <div class="cumulative">
  145                     <div class="chartContainer">
  146                         <dl>
  147                             <dt><spring:message code="probe.jsp.allappstats.charts.totalReq.title"/></dt>
  148                             <dd class="image">
  149                                 <img id="total_req_chart" border="0" src="${total_req_url}" width="${chartWidth}" height="${chartHeight}" alt="+"/>
  150                             </dd>
  151                         </dl>
  152                     </div>
  153                     <div class="chartContainer">
  154                         <dl>
  155                             <dt><spring:message code="probe.jsp.allappstats.charts.totalAvgProcTime.title"/></dt>
  156                             <dd class="image">
  157                                 <img id="total_avg_proc_time_chart" border="0" src="${total_avg_proc_time_url}" width="${chartWidth}" height="${chartHeight}" alt="+"/>
  158                             </dd>
  159                         </dl>
  160                     </div>
  161                 </div>
  162                 <div class="combined">
  163                     <div class="chartContainer">
  164                         <dl>
  165                             <dt><spring:message code="probe.jsp.allappstats.charts.allAppReq.title"/></dt>
  166                             <dd class="image">
  167                                 <img id="all_app_req_chart" border="0" src="${all_app_req_url}" width="${chartWidth}" height="${chartHeight}" alt="+"/>
  168                             </dd>
  169                         </dl>
  170                     </div>
  171                     <div class="chartContainer">
  172                         <dl>
  173                             <dt><spring:message code="probe.jsp.allappstats.charts.allAppAvgProcTime.title"/></dt>
  174                             <dd class="image">
  175                                 <img id="all_app_avg_proc_time_chart" border="0" src="${all_app_avg_proc_time_url}" width="${chartWidth}" height="${chartHeight}" alt="+"/>
  176                             </dd>
  177                         </dl>
  178                     </div>
  179                 </div>
  180             </div>
  181 
  182             <div id="full_chart" class="chartContainer" style="display: none;">
  183                 <dl>
  184                     <dt id="full_title"></dt>
  185                     <dd class="image">
  186                         <img id="fullImg" border="0" src="${total_avg_proc_time_url_full}" width="${fullChartWidth}" height="${fullChartHeight}" alt="-"/>
  187                     </dd>
  188                 </dl>
  189             </div>
  190         </div>
  191 
  192         <script type="text/javascript">
  193             var imageUpdaters = new Array();
  194             var fullImageUpdater;
  195 
  196             function zoomIn(imgUrl, title) {
  197                 if (fullImageUpdater) {
  198                     fullImageUpdater.stop();
  199                 }
  200                 for (var i = 0; i < imageUpdaters.length; i++) {
  201                     if (imageUpdaters[i]) {
  202                         imageUpdaters[i].stop();
  203                     }
  204                 }
  205                 $('full_title').update(title);
  206                 Effect.DropOut('chart_group');
  207                 Effect.Appear('full_chart');
  208                 fullImageUpdater = new Ajax.ImgUpdater('fullImg', '${probe:max(collectionPeriod, 5)}', imgUrl);
  209             }
  210 
  211             function zoomOut() {
  212                 Effect.DropOut('full_chart');
  213                 Effect.Appear('chart_group');
  214                 if (fullImageUpdater) {
  215                     fullImageUpdater.stop();
  216                     fullImageUpdater = null;
  217                 }
  218                 for (var i = 0; i < imageUpdaters.length; i++) {
  219                     if (imageUpdaters[i]) {
  220                         imageUpdaters[i].start();
  221                     }
  222                 }
  223             }
  224 
  225             var rules = {
  226                 '#total_avg_proc_time_chart': function(element) {
  227                     element.onclick = function() {
  228                         zoomIn('${total_avg_proc_time_url_full}', '<spring:message code="probe.jsp.allappstats.charts.totalAvgProcTime.title"/>');
  229                     }
  230                 },
  231                 '#all_app_avg_proc_time_chart': function(element) {
  232                     element.onclick = function() {
  233                         zoomIn('${all_app_avg_proc_time_url_full}', '<spring:message code="probe.jsp.allappstats.charts.allAppAvgProcTime.title"/>');
  234                     }
  235                 },
  236                 '#total_req_chart': function(element) {
  237                     element.onclick = function() {
  238                         zoomIn('${total_req_url_full}', '<spring:message code="probe.jsp.allappstats.charts.totalReq.title"/>');
  239                     }
  240                 },
  241                 '#all_app_req_chart': function(element) {
  242                     element.onclick = function() {
  243                         zoomIn('${all_app_req_url_full}', '<spring:message code="probe.jsp.allappstats.charts.allAppReq.title"/>');
  244                     }
  245                 },
  246                 '#full_chart': function(element) {
  247                     element.onclick = function() {
  248                         zoomOut();
  249                     }
  250                 }
  251             }
  252 
  253             Behaviour.register(rules);
  254 
  255             imageUpdaters[0] = new Ajax.ImgUpdater('total_avg_proc_time_chart', '${probe:max(collectionPeriod, 5)}');
  256             imageUpdaters[1] = new Ajax.ImgUpdater('all_app_avg_proc_time_chart', '${probe:max(collectionPeriod, 5)}');
  257             imageUpdaters[2] = new Ajax.ImgUpdater('total_req_chart', '${probe:max(collectionPeriod, 5)}');
  258             imageUpdaters[3] = new Ajax.ImgUpdater('all_app_req_chart', '${probe:max(collectionPeriod, 5)}');
  259         </script>
  260     </body>
  261 </html>