src/web/en/index.shtml
author Brock Pytlik <brock.pytlik@oracle.com>
Wed, 27 Apr 2011 20:30:32 -0700
changeset 2310 ce10607d5332
parent 2028 b2c674e6ee28
child 2603 6b463bf6de94
permissions -rw-r--r--
11684 desire option to not propagate certs to non-global zones 17522 system repository should provide basic functionality 17523 Need a functioning sysdepo 17524 system depot should auto generate its configuration based on system image 17525 system depot should respond to versions/0 17526 system depot should provide publisher configuration 17527 caching should be enabled for system depot 17528 system depot should proxy http repositories 17529 system depot should proxy https repositories 17530 pkg client needs to be aware of the system repository 17531 pkg needs to cache system publisher information 17532 pkg should retrieve publisher information from the system repository when configured 17533 pkg needs to use the system repository as a proxy for http repositories 17534 pkg needs to use the system repository as a proxy for https repositories 17535 need an image property to indicate whether to use the system repository 17536 an image shouldn't require any configured publishers 17537 notion of preferred publisher should be removed 17538 pkg should be able to merge system publisher info with locally configured publishers 17539 pkg should notify that users cannot modify system publishers in certain ways 17540 pkg publisher needs to be updated to include information about system publishers 17541 pkg will need a way to specify alternate system repository urls 17547 file repositories need to be proxied by the system repository 17594 pkg set-publisher in GZ should refresh sysdepo service 17604 converting an imageconfig object to a string causes an infinite loop 17847 pkg set-publisher shouldn't allow -P along with --search-* 17911 pkg image-create should allow an image to be created without a publisher 18200 need a manpage for the sysrepo service

## -*- coding: utf-8 -*-
##
## CDDL HEADER START
##
## The contents of this file are subject to the terms of the
## Common Development and Distribution License (the "License").
## You may not use this file except in compliance with the License.
##
## You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
## or http://www.opensolaris.org/os/licensing.
## See the License for the specific language governing permissions
## and limitations under the License.
##
## When distributing Covered Code, include this CDDL HEADER in each
## file and include the License file at usr/src/OPENSOLARIS.LICENSE.
## If applicable, add the following below this CDDL HEADER, with the
## fields enclosed by brackets "[]" replaced with your own identifying
## information: Portions Copyright [yyyy] [name of copyright owner]
##
## CDDL HEADER END
##
## Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
##
<%inherit file="layout.shtml"/>\
<%page args="g_vars"/>\
<%
        catalog = g_vars["catalog"]
        config = g_vars["config"]
        request = g_vars["request"]
%>\
<%def name="page_title(g_vars)"><%
        req = g_vars["request"]
        pub = req.publisher
        rname = ""
        if pub:
                repo = pub.repository
                if repo and repo.name:
                        rname = repo.name
                else:
                        rname = "package repository"
        return rname
%></%def>\
<%def name="page_crumbs(g_vars)"><%
        # None at top level.
        return []
%></%def>\
<%def name="document_class()"><%
        return "yui-t4"
%></%def>\
<div id="yui-main">
        <div class="yui-b">
<%
        req = g_vars["request"]
        pub = req.publisher
        repo_desc = ""
        if pub:
                repo = pub.repository
                if repo and repo.description:
                        repo_desc = repo.description
%>
% if repo_desc:
                <h2 class="section-title">About</h2>
                <p>${repo_desc}</p>
% endif
% if catalog.search_available:
                <form class="search" action="search.shtml">
                        <h2 class="section-title">Search Packages</h2>
                        <p>
                                <input id="search-field" type="text" size="40"
                                    maxlength="512" name="token"/>
                                <input id="submit-search" type="submit"
                                    name="action" value="Search"/>
                                <a href="advanced_search.shtml">Advanced Search</a>
                        </p>
                </form>
% endif
% if not config.mirror and request.publisher:
<%
        versions = self.shared.get_releases(g_vars)
        selected_version = request.params.get("version", None)
        selected_match = False
        for v in versions:
                ver, val, label = v
                if selected_version == val:
                        selected_match = True

        if versions and (not selected_version or not selected_match):
                # Either a version wasn't already selected, or the version
                # provided didn't match a valid one, so default to the first in
                # the list.
                selected_version = versions[0][1]
%>
%       if versions:
                <form action="catalog.shtml">
                        <h2 class="section-title">Browse Packages</h2>
                        <p>
                                <label for="version">Release and Branch</label>
                                <select id="version" name="version">
<%
                for v in versions:
                        ver, val, label = v
                        attrs = ""
                        if val == selected_version:
                                attrs = 'selected="selected" '

                        context.write("""<option %svalue="%s">%s</option>\n""" % (
                            attrs, val, label))
%>
                                </select>
                                <input id="submit-browse" type="submit"
                                    name="action" value="Browse"/>
                        </p>
                        <p>Select a release from the list above to see all of
the packages available for it.</p>
                </form>
%       else:
                <h2 class="section-title">Browse Packages</h2>
                <p>The list of all available packages can be found
<a href="catalog.shtml">here</a>.</p>
%       endif
% elif not request.publisher:
                <p>This package repository is empty or no default publisher has
 been set.</p>
% else:
                <p>Information about packages is not available when the server
 is operating in mirror mode.</p>
% endif
        </div>
</div>
<div class="yui-b">
% if not config.mirror and request.publisher:
        <table class="stats" summary="A summary of information about the
 package repository.">
                <tr class="first">
                        <th colspan="2" class="last">
                                <a id="catalog-feed"
                                    href="../feed"
                                    title="${self.shared.dcval(g_vars, 'pkg_bui', 'feed_name')}"></a>
                                    Catalog
                        </th>
                </tr>
                <tr>
                        <td class="label">Publisher</td>
                        <td class="value">${pub.prefix}</td>
                </tr>
                <tr>
                        <td class="label">Packages</td>
                        <td class="value">${catalog.package_count}</td>
                </tr>
                <tr>
                        <td class="label">Last Updated</td>
<%
        if catalog.version == 0:
                # Note: last_modified() is in local time relative to the
                # timezone where catalog was last modified.
                lm = catalog.last_modified()
                if not lm:
                        lm = "Never"
        else:
                # last_modified is a UTC datetime object.
                lm = catalog.last_modified
                if lm:
                        lm = lm.replace(microsecond=0)
                else:
                        lm = "Never"
%>
                        <td class="value">${lm}</td>
                </tr>
        </table>
% endif
</div>