diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/browse-error.html | 5 | ||||
-rw-r--r-- | templates/browse-home.html | 50 | ||||
-rw-r--r-- | templates/browse-layout.html | 48 | ||||
-rw-r--r-- | templates/browse-package.html | 20 | ||||
-rw-r--r-- | templates/browse-results.html | 36 | ||||
-rw-r--r-- | templates/browse-running.html | 80 | ||||
-rw-r--r-- | templates/browse-statistics.html | 55 | ||||
-rw-r--r-- | templates/browse-testlist.html | 52 |
8 files changed, 346 insertions, 0 deletions
diff --git a/templates/browse-error.html b/templates/browse-error.html new file mode 100644 index 0000000..af23654 --- /dev/null +++ b/templates/browse-error.html @@ -0,0 +1,5 @@ +{% extends "browse-layout.html" %} +{% block content %} +<h1>Error:</h1> +<p>{{error}}</p> +{% endblock %} diff --git a/templates/browse-home.html b/templates/browse-home.html new file mode 100644 index 0000000..fe51858 --- /dev/null +++ b/templates/browse-home.html @@ -0,0 +1,50 @@ +{% extends "browse-layout.html" %} +{% block content %} +<div class='container'> + <div class='row'> + + <div class='col-md-4'> + <div class="panel panel-default"> + <div class="panel-heading">Recent test runs</div> + <div class="list-group"> + {% for (res, pkg, rel, arch, trigs) in recent_runs %} + <a class="list-group-item" href="{{base_url}}packages/{{pkg}}/{{rel}}/{{arch}}"> + <span class="{{res}}">{{pkg}} on {{rel}}/{{arch}}</span><br /> + <small class="text-muted">Triggers: {{trigs}}</small> + </a> + {% endfor %} + </div> + </div> + </div> + + <div class="col-md-4"> + <div class="panel panel-default"> + <div class="panel-heading">Package Index</div> + <div class="panel-body"> + <p>You can navigate to {{base_url}}packages/<i>packagename</i> to get + results for a particular package.</p> + + <ul class="list-inline"> + + {% for i in indexes %} + <li><h5><a href="{{base_url}}testlist#index-{{i}}">{{i}}</a></h5></li> + {% endfor %} + </ul> + </div> + </div> + + <div class="panel panel-default"> + <div class="panel-heading">Machine readable data</div> + <div class="panel-body"> + <ul> + <li><a href="{{base_url}}static/autopkgtest.db">SQLite database with results</a></li> + <li><a href="{{base_url}}static/running.json">Currently running tests in JSON format</a></li> + <li><a href="{{base_url}}queues.json">Queued tests in JSON format</a></li> + </ul> + </div> + </div> + </div> + + </div> <!-- main row --> +</div> <!-- class='container' --> +{% endblock %} diff --git a/templates/browse-layout.html b/templates/browse-layout.html new file mode 100644 index 0000000..b47203f --- /dev/null +++ b/templates/browse-layout.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Ubuntu Autopkgtest Results {{title_suffix}}</title> + <!-- <link rel="icon" type="image/png" href="/debian.png"/> --> + <link rel="stylesheet" type="text/css" href="{{static_url}}/bootstrap/css/bootstrap.css"/> + <link rel="stylesheet" type="text/css" href="{{static_url}}/bootstrap/css/bootstrap-theme.css"/> + <link rel="stylesheet" type="text/css" href="{{static_url}}/style.css"/> + </head> + <body> + <div id='wrap'> + + <!-- Fixed navbar --> + <div class="navbar navbar-default"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="{{base_url}}">Ubuntu Autopkgtest</a> + </div> + <div class="collapse navbar-collapse"> + <ul class="nav navbar-nav"> + <li><a href="{{base_url}}">Home</a></li> + <li><a href="{{base_url}}testlist">Test list</a></li> + <li><a href="{{base_url}}running">Running</a></li> + <li><a href="{{base_url}}statistics">Statistics</a></li> + <li><a href="https://wiki.ubuntu.com/ProposedMigration#autopkgtests">Documentation</a></li> + <li><a href="https://autopkgtest-cloud.readthedocs.io/">Docs for admins</a></li> + </ul> + </div><!--/.nav-collapse --> + </div> + </div> + + +<div class="container"> +{% block content %}{% endblock %} +</div> + + <script type="text/javascript" src="{{static_url}}/jquery/jquery.min.js"></script> + <script type="text/javascript" src="{{static_url}}/bootstrap/js/bootstrap.min.js"></script> + </body> +</html> diff --git a/templates/browse-package.html b/templates/browse-package.html new file mode 100644 index 0000000..3ac81c3 --- /dev/null +++ b/templates/browse-package.html @@ -0,0 +1,20 @@ +{% extends "browse-layout.html" %} +{% block content %} + <h2>{{package}}</h2> + + <table class="table" style='width: auto'> + <tr> + <th /> + {% for r in releases %}<th>{{r}}</th> {% endfor %} + </tr> + + {% for a in arches %} + <tr> + <th>{{a}}</th> + {% for r in releases %} + <td class="{{ results[r][a] }}"><a href="{{package}}/{{r}}/{{a}}">{{ results[r][a] }}</a></td> + {% endfor %} + </tr> + {% endfor %} + </table> +{% endblock %} diff --git a/templates/browse-results.html b/templates/browse-results.html new file mode 100644 index 0000000..7fc194a --- /dev/null +++ b/templates/browse-results.html @@ -0,0 +1,36 @@ +{% extends "browse-layout.html" %} +{% block content %} + <h2><a href="{{base_url}}packages/{{package}}">{{package}}</a> <small>[{{release}}/{{arch}}]</small></h2> + + <table class="table"> + <tr> + <td><b>Version</b></td> + <td><b>Triggers</b></td> + <td><b>Date</b></td> + <td><b>Duration</b></td> + <td><b>Requester</b></td> + <td><b>Result</b></td> + <td></td> + </tr> + + {% for row in package_results %} + <tr> + <td>{{row[0]}}</td> + <td>{{row[1]}}</td> + <td>{{row[2]}}</td> + <td>{{row[3]}}</td> + <td>{{row[4]}}</td> + <td class="{{row[5]}}">{{row[5]}}</td> + <td class="nowrap"> + <a href="{{row[6]}}/log.gz">log</a>   + <a href="{{row[6]}}/artifacts.tar.gz">artifacts</a>   + {% if row[7] %} + {% set ts = row[1].split()|map('urlencode')|join("&trigger=")|safe %} + <a href="{{base_url}}request.cgi?release={{release}}&arch={{arch}}&package={{package|urlencode}}&trigger={{ts}}">♻</a> + {% endif %} + </td> + </tr> + {% endfor %} + + </table> +{% endblock %} diff --git a/templates/browse-running.html b/templates/browse-running.html new file mode 100644 index 0000000..9dc080e --- /dev/null +++ b/templates/browse-running.html @@ -0,0 +1,80 @@ +{% extends "browse-layout.html" %} +{% block content %} + <h1 class="page-header">Currently running tests</h1> + <p>Click on the package name to jump to the currently running tests of that package.</p> + + <table class="table-condensed table-striped"> + {% for column in running|sort|batch(3) %} + <tr> + {% for p in column %} + <td><a href="#pkg-{{p}}">{{p}}</a></td> + {% endfor %} + </tr> + {% endfor %} + </table> + + <h3>Queue lengths</h3> + <p>Click on the number in a cell to jump to the list of test requests for + that release and architecture which are waiting to be run.</p> + + {% for context in ["ubuntu", "huge", "ppa", "upstream"] %} + <table class="table-condensed table-striped" style="display: inline-block; padding-right: 30px"> + <tr> + <th>{{context}}</th> + {% for a in arches %}<th>{{a}}</th>{% endfor %} + </tr> + + {% for r in releases %} + <tr> + <td>{{r}}</td> + {% for a in arches %} + <td>{% if queue_lengths[context][r][a] %}<a href="#queue-{{context}}-{{r}}-{{a}}">{{queue_lengths[context][r][a]}} {% else %}-{% endif %}</td> + {% endfor %} + </tr> + {% endfor %} + </table> + {% endfor %} + + <!-- Running tests --> + {% for p in running|sort %} + <h2 id="pkg-{{p}}"><a href="/packages/{{p}}">{{p}}</a></h2> + {% for runhash, relinfo in running[p].items() %} + {% for release, archinfo in relinfo.items() %} + {% for arch, (params, duration, logtail) in archinfo.items() %} + <table class="table-condensed"> + <tr><th>Release:</th><td>{{release}}</td></tr> + <tr><th>Architecture:</th><td>{{arch}}</td></tr> + {% for param, v in params.items() %} + <tr><th>{{param|capitalize}}:</th><td>{{v}}</td></tr> + {% endfor %} + <tr><th>Running for:</th><td>{{duration//3600 }}h {{duration % 3600//60}}m {{duration % 60}}s</td></tr> + </table> + <pre> +{{logtail}} + </pre> + {% endfor %} + {% endfor %} + {% endfor %} + {% endfor %} + + <!-- queue contents --> + + {% for context in contexts %} + {% for r in queue_info[context] %} + {% for a in queue_info[context][r] %} + {% if queue_info[context][r][a] %} + {% set (nreqs, reqs) = queue_info[context][r][a] %} + {% if nreqs > 0 %} + <h3 id="queue-{{context}}-{{r}}-{{a}}">Queued tests for {{context}} {{r}} {{a}}</h3> + <table class="table-condensed table-striped"> + {% for req in reqs %} + <tr><td>{{req}}</td></tr> + {% endfor %} + {% endif %} + </table> + {% endif %} + {% endfor %} + {% endfor %} + {% endfor %} + +{% endblock %} diff --git a/templates/browse-statistics.html b/templates/browse-statistics.html new file mode 100644 index 0000000..fddcaa6 --- /dev/null +++ b/templates/browse-statistics.html @@ -0,0 +1,55 @@ +{% extends "browse-layout.html" %} +{% block content %} + <h1 class="page-header">Statistics</h1> + + {% for r in release_arches %} + <h3 class="page-header">{{ r.capitalize() }}</h2> + + <table class="table" style="width: auto"> + <tr> + <th>architecture</th> + {% for arch in release_arches[r]|sort %}<th>{{arch}}</th> {% endfor %} + </tr> + + <tr> + <th>#packages with tests</th> + {% for arch in release_arches[r]|sort %} + <td>{{data[r][arch]['numpkgs']}}</td> + {% endfor %} + </tr> + + <tr> + <th>#packages with passing tests </th> + {% for arch in release_arches[r]|sort %} + <td>{% if data[r][arch]['numpkgspass'] %}{{data[r][arch]['numpkgspass']}}{% endif %}</td> + {% endfor %} + </tr> + + <tr> + <th>pass rate</th> + {% for arch in release_arches[r]|sort %} + <td>{% if data[r][arch]['numpkgs'] %} + {{'%.1f' % (data[r][arch]['numpkgspass'] * 100 / data[r][arch]['numpkgs'])}}% + {% endif %}</td> + {% endfor %} + </tr> + + + <tr> + <th>#passed test runs</th> + {% for arch in release_arches[r]|sort %} + <td>{{data[r][arch]['passruns']}}</td> + {% endfor %} + </tr> + + <tr> + <th>#failed test runs</th> + {% for arch in release_arches[r]|sort %} + <td>{{data[r][arch]['failruns']}}</td> + {% endfor %} + </tr> + </table> + + {% endfor %} + +{% endblock %} diff --git a/templates/browse-testlist.html b/templates/browse-testlist.html new file mode 100644 index 0000000..5744f1c --- /dev/null +++ b/templates/browse-testlist.html @@ -0,0 +1,52 @@ +{% extends "browse-layout.html" %} +{% block content %} +<div class='container'> + <div class='row'> + <div class='col-md-12'> + <h1 class="page-header">List of packages with tests</h1> + + <p>Click on a source package to get to the current autopkgtest results. + Versions link to the current source package, which can be downloaded with + <a href="http://manpages.ubuntu.com/dget">dget</a>.</p> + </div> + </div> + + <div class='row'> + <div class='col-md-5'> + <table class="table-condensed table-striped"> + <tr><th>Source package</th> <th>Version</th></tr> + {% for i, pkglist in indexed_pkgs|dictsort %} + {% set next_id=True %} + {% for (p, v) in pkglist %} + {% if next_id %} + <tr id="index-{{i}}"> + {% set next_id=False %} + {% else %} + <tr> + {% endif %} + <td><a href="{{base_url}}packages/{{p}}">{{p}}</a></td> + <td><a href="https://launchpad.net/ubuntu/+archive/primary/+files/{{p}}_{{v}}.dsc">{{v}}</a></td> + </tr> + {% endfor %} + {% endfor %} + </table> + </div> + + <div class="col-md-3"> + <div class="panel panel-default"> + <div class="panel-heading">Package Index</div> + <div class="panel-body"> + <ul class="list-inline"> + + {% for i in indexed_pkgs|sort %} + <li><h5><a href="#index-{{i}}">{{i}}</a></h5></li> + {% endfor %} + </ul> + </div> + </div> + </div> + + </div> +</div> <!-- class='container' --> + +{% endblock %} |