warning-ui/warning.html
author Benjamin Smedberg <benjamin@smedbergs.us>
Fri, 19 Dec 2008 16:50:47 -0500
changeset 8 c33d0e330649de0393a2f86a529001f83b1010a4
child 22 4c1458dcdab38c2a9e66eabeec974b02ba5c73bd
permissions -rw-r--r--
Add a web frontend to the warning database: cherrypy+genshi FTW!

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
  <xi:include href="common.inc" />

  <head>
    <title>Warning: ${wlines[0][0]}:${wlines[0][1]}: ${wlines[0][2]}</title>
    <link type="text/css" rel="stylesheet" href="/static/warnings.css" />
  </head>
  <body class="warning">
    <h1>Warning: ${wlines[0][0]}:${wlines[0][1]}: ${wlines[0][2]}</h1>

    <div class="h2block">
      <h2>First appeared:</h2>
      <a href="${genlink('build', id=firstid)}">${firstrev}</a>
    </div>
    <div class="h2block" py:if="lastid is not None">
      <h2>Fixed in:</h2>
      <a href="${genlink('build', id=lastid)}">${lastrev}</a>
    </div>

    <dl>
      <py:for each="file, lineno, msg, blametype, blamefile, blamerev, blameline, blamewho in wlines">
        <dt>
          <a py:strip="blametype is None"
             href="http://hg.mozilla.org/mozilla-central/file/${firstrev}/${file}#l${lineno}">
            ${file}:${lineno}</a>:
          ${msg}
        </dt>
        <dd py:if="blametype is not None">
          <py:choose test="blametype">
            <py:when test="'hg'">
              Blamed on ${blamewho}: <a href="http://hg.mozilla.org/mozilla-central/annotate/${blamerev}/${blamefile}/#l${blameline}">${blamefile}:${blameline}</a>, revision <a href="http://hg.mozilla.org/mozilla-central/rev/${blamerev}">${blamerev}</a>
            </py:when>
            <py:when test="'cvs'">
              Blamed in ${blamewho}: <a href="http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/${blamefile}&amp;rev=HG_REPO_INITIAL_IMPORT&amp;mark=${blameline}#${blameline}">${blamefile}:${blameline}, revision ${blamerev}</a>
            </py:when>
          </py:choose>
        </dd>
      </py:for>
    </dl>
  </body>
</html>