--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/static/main.css Tue Jun 14 13:24:35 2016 +0800
+@media (min-width: 768px) {
--- a/templates/base.html Mon Jun 13 23:38:17 2016 +0800
+++ b/templates/base.html Tue Jun 14 13:24:35 2016 +0800
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% end %}{% block extra-title %} - Cat and Owl's online linter{% end %}</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.26.3/css/uikit.almost-flat.min.css" integrity="sha384-5bOKVP1JAsV2lpzCrvNxDsgBg/FrwwHfDcgmtE7quy/iY+stYq7ORPYbkzJYffwS" crossorigin="anonymous">
+ <link rel="stylesheet" href="/static/main.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js" integrity="sha384-rY/jv8mMhqDabXSo+UCggqKtdmBfd3qC2/KvyTDNQ6PcUJXaxK1tMepoQda4g5vB" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.26.3/js/uikit.min.js" integrity="sha384-6OYggLGXv4OPaVsh9O/0baGeEYFu1r1FE3+sNtPeDk6JofnNNZb2sHKzUa7wum04" crossorigin="anonymous"></script>
--- a/templates/index.html Mon Jun 13 23:38:17 2016 +0800
+++ b/templates/index.html Tue Jun 14 13:24:35 2016 +0800
<td>{{ check.errors }} error(s), {{ check.warnings }} warning(s)</td>
<td>#{{ check.ordinal }}</td>
- <td>{{ project.name }}</td>
+ <a href="/{{ project.domain }}/{{ project.user or '-' }}/{{ project.name }}">
<td>{{ change.rev }}:{{ change.node[:12] }} {{ change.branch }}</td>
<td>{{ check.started }}</td>
<td>{{ check.finished }}</td>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/project.html Tue Jun 14 13:24:35 2016 +0800
+{% extends "base.html" %}
+{% block title %}{{ project.name }}{% end %}
+ <div class="uk-container uk-container-center uk-margin-large-top">
+ <h2>{{ project.name }}</h2>
+ <dl class="uk-description-list-horizontal list-terse">
+ <dd>{{ checks[0].finished }}</dd>
+ <dd>{{ project.url }}</dd>
+ <table class="uk-table uk-table-middle">
+ {% for check in checks %}
+ {% set change = check.change %}
+ <td>{{ check.errors }} error(s), {{ check.warnings }} warning(s)</td>
+ <td>#{{ check.ordinal }}</td>
+ <td>{{ change.rev }}:{{ change.node[:12] }} {{ change.branch }}</td>
+ <div>{{ change.message }}</div>
+ <div>{{ change.author }}, <time>{{ change.date }}</time></div>
+ <td>{{ check.started }}</td>
+ <td>{{ check.finished }}</td>
+ <td>{{ check.finished - check.started }}</td>
--- a/viewer.py Mon Jun 13 23:38:17 2016 +0800
+++ b/viewer.py Tue Jun 14 13:24:35 2016 +0800
self.render('index.html', checks=checks)
+class ProjectHandler(BaseHandler):
+ def get(self, domain, user, name):
+ project = Project.select().where(
+ Project.domain == domain,
+ Project.user == (user if user != '-' else None),
+ Project.name == name).get()
+ .where(Check.project == project)
+ self.render('project.html', project=project, checks=checks)
class CandolintViewer(Application):
URLSpec(r'/', IndexHandler),
+ URLSpec(r'/([.a-z0-9_-]+)/([^/]+)/([^/]+)', ProjectHandler),
static_path=rel('static'),