stats.shtml revision 2603
742N/A## -*- coding: utf-8 -*-
742N/A##
742N/A## CDDL HEADER START
742N/A##
742N/A## The contents of this file are subject to the terms of the
742N/A## Common Development and Distribution License (the "License").
742N/A## You may not use this file except in compliance with the License.
742N/A##
742N/A## You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
742N/A## or http://www.opensolaris.org/os/licensing.
742N/A## See the License for the specific language governing permissions
742N/A## and limitations under the License.
742N/A##
742N/A## When distributing Covered Code, include this CDDL HEADER in each
742N/A## file and include the License file at usr/src/OPENSOLARIS.LICENSE.
742N/A## If applicable, add the following below this CDDL HEADER, with the
742N/A## fields enclosed by brackets "[]" replaced with your own identifying
742N/A## information: Portions Copyright [yyyy] [name of copyright owner]
742N/A##
742N/A## CDDL HEADER END
742N/A##
2603N/A## Copyright 2009, 2011 Oracle and/or its affiliates. All rights reserved.
742N/A##
742N/A<%inherit file="layout.shtml"/>\
742N/A<%page args="g_vars"/>\
742N/A<%
742N/A catalog = g_vars["catalog"]
742N/A config = g_vars["config"]
2028N/A request = g_vars["request"]
742N/A%>\
742N/A<%def name="page_title(g_vars)"><%
742N/A return "Depot Statistics"
742N/A%></%def>\
742N/A<div id="yui-main" class="yui-b">
742N/A <div class="yui-gb">
2028N/A% if not config.mirror and request.publisher:
742N/A <div class="yui-u first">
817N/A <table class="stats" summary="A summary of high-level statistics
817N/A about the package repository's catalog.">
742N/A <tr class="first">
2603N/A <th scope="row" class="last" colspan="2">Catalog</th>
742N/A </tr>
742N/A <tr>
2603N/A <td scope="row" class="label">Packages</td>
742N/A <td class="value">${catalog.package_count}</td>
742N/A </tr>
742N/A <tr>
2603N/A <td scope="row" class="label">Last Modified</td>
742N/A<%
754N/A # Note: last_modified() is in local time relative to the timezone where
754N/A # catalog was last modified.
754N/A lm = catalog.last_modified
754N/A if lm:
754N/A lm = lm.replace(microsecond=0)
754N/A else:
754N/A lm = "Never"
742N/A%>
742N/A <td class="value">${lm}</td>
742N/A </tr>
742N/A </table>
742N/A </div>
742N/A% endif
742N/A <div class="yui-u">
817N/A <table class="stats" summary="A summary of high-level statistics
817N/A about this depot server.">
742N/A <tr class="first">
2603N/A <th scope="row" class="last" colspan="2">Depot</th>
742N/A </tr>
742N/A <tr>
2603N/A <td scope="row" class="label">Files served by filelist</td>
742N/A <td class="value">${config.filelist_file_requests}</td>
742N/A </tr>
742N/A% if not config.mirror:
742N/A <tr>
2603N/A <td scope="row" class="label">In-flight Transactions</td>
742N/A <td class="value">${config.in_flight_transactions}</td>
742N/A </tr>
742N/A% endif
742N/A </table>
742N/A </div>
742N/A <div class="yui-u">
817N/A <table class="stats" summary="A list of the number of requests
817N/A made to the depot server by operation.">
742N/A <tr class="first">
2603N/A <th scope="row" class="last" colspan="2">Operations</th>
742N/A </tr>
742N/A% if not config.mirror:
742N/A <tr>
2603N/A <td scope="row" class="label">catalog</td>
742N/A <td class="value">${config.catalog_requests}</td>
742N/A </tr>
742N/A% endif
742N/A <tr>
2603N/A <td scope="row" class="label">file</td>
742N/A <td class="value">${config.file_requests}</td>
742N/A </tr>
742N/A <tr>
2603N/A <td scope="row" class="label">filelist</td>
742N/A <td class="value">${config.filelist_requests}</td>
742N/A </tr>
742N/A% if not config.mirror:
742N/A <tr>
2603N/A <td scope="row" class="label">manifest</td>
742N/A <td class="value">${config.manifest_requests}</td>
742N/A </tr>
742N/A% endif
742N/A </table>
742N/A </div>
742N/A </div>
742N/A</div>