Delete old summary, fix tests for the builds page.

This commit breaks tests for the job page, but bear with me. It
doesn't have the new layout yet.
This commit is contained in:
Mathias Meyer 2014-05-08 16:00:28 +02:00
parent 882d479c0f
commit 1373308475
3 changed files with 24 additions and 72 deletions

View File

@ -4,7 +4,7 @@
<div id="new-summary">
<div class="right">
<div class="build-status">
#{{build.number}} {{build.state}}
{{#link-to "build" repo build}}#{{build.number}} {{build.state}}{{/link-to}}
</div>
<div class="runtime">
@ -39,12 +39,12 @@
</div>
<div class="commit">
<div><a class="github" {{bind-attr href="controller.urlGithubCommit"}}>Commit {{formatSha commit.sha}}</a></div><img src="/images/icons/github.png" height="15"/>
<div class=""><a class="github commit" {{bind-attr href="controller.urlGithubCommit"}}>Commit {{formatSha commit.sha}}</a></div><img src="/images/icons/github.png" height="15"/>
{{#if build.pullRequest}}
<div><a {{bind-attr href="build.commit.compareUrl"}} >#{{build.pullRequestNumber}}: {{build.pullRequestTitle}}</a></div>
<div><a class="compare" {{bind-attr href="build.commit.compareUrl"}} >#{{build.pullRequestNumber}}: {{build.pullRequestTitle}}</a></div>
{{else}}
{{#if build.commit.compareUrl}}
<div><a {{bind-attr href="build.commit.compareUrl"}}>Compare {{shortCompareShas build.commit.compareUrl}}</a></div>
<div><a class="compare" {{bind-attr href="build.commit.compareUrl"}}>Compare {{shortCompareShas build.commit.compareUrl}}</a></div>
{{/if}}
{{/if}}
<img src="/images/icons/github.png" height="15"/>
@ -52,57 +52,6 @@
</div>
</div>
<dl id="summary">
<div class="left">
<dt>Build</dt>
<dd class="number">
<span class="status"></span>
{{#if build.id}}
{{#if build.repo.slug}}
{{#link-to "build" repo build}}{{build.number}}{{/link-to}}
{{/if}}
{{/if}}
</dd>
<dt>State</dt>
<dd class="state">{{capitalize build.state}}</dd>
<dt class="finished_at_label">Finished</dt>
<dd class="finished_at timeago" {{bind-attr title="build.formattedFinishedAt"}}>{{formatTime build.finishedAt}}</dd>
<dt>Duration</dt>
<dd class="duration" {{bind-attr title="startedAt"}}>{{formatDuration build.duration}}</dd>
</div>
{{#with build}}
<div class="right">
<dt>Commit</dt>
<dd class="commit"><a {{bind-attr href="controller.urlGithubCommit"}}>{{formatCommit commit}}</a></dd>
{{#if pullRequest}}
<dt>Pull Request</dt>
<dd class="pull_request"><a {{bind-attr href="commit.compareUrl"}}>#{{pullRequestNumber}} {{pullRequestTitle}}</a></dd>
{{else}}
{{#if commit.compareUrl}}
<dt>Compare</dt>
<dd class="compare"><a {{bind-attr href="commit.compareUrl"}}>{{pathFrom commit.compareUrl}}</a></dd>
{{/if}}
{{/if}}
{{#if commit.authorName}}
<dt>Author</dt>
<dd class="author">{{commit.authorName}}</dd>
{{/if}}
{{#if commit.committerName}}
<dt>Committer</dt>
<dd class="committer">{{commit.committerName}}</dd>
{{/if}}
</div>
{{/with}}
<dt>Message</dt>
<dd class="message">
{{formatMessage build.commit.subject repoBinding=build.repo}}
<pre class="body">{{formatMessage build.commit.body repoBinding=build.repo pre=true}}</pre>
</dd>
</dl>
{{#unless build.isMatrix}}
{{view Travis.AnnotationsView annotationsBinding="build.jobs.firstObject.annotations"}}
{{/unless}}

View File

@ -9,36 +9,36 @@
equal($("#tab_#{name}").hasClass('display-inline'), !tab.hidden, "#{name} tab should have class display-inline") if name in ['build', 'job']
@displaysSummaryBuildLink = (link, number) ->
element = $('#summary .number a')
element = $('#new-summary .build-status a')
equal( element.attr('href') , link)
equal( element.text().trim() , "#{number}")
equal( element.text().trim() , "##{number} started")
@displaysSummary = (data) ->
element = $('#summary .left:first-child dt:first-child')
equal(element.text(), $.camelize(data.type))
element = $('#summary .number a')
element = $('#new-summary .build-status a')
equal(element.attr('href'), "/#{data.repo}/#{data.type}s/#{data.id}")
element = $('#summary .finished_at')
equal(element.text(), data.finishedAt)
element = $('#new-summary .finished')
equal(element.text().trim(), data.finishedAt)
element = $('#summary .duration')
equal(element.text(), data.duration)
element = $('#new-summary .runtime')
equal(element.text().trim(), "ran for #{data.duration}")
element = $('#summary .commit a')
element = $('#new-summary .commit a.commit')
equal(element.attr('href'), "https://github.com/#{data.repo}/commit/#{data.commit}")
element = $('#summary .commit a')
equal(element.text(), "#{data.commit} (#{data.branch})")
element = $('#new-summary .commit a.commit')
equal(element.text(), "Commit #{data.commit}")
element = $('#summary .compare a')
element = $('#new-summary .branch')
equal(element.text().trim(), data.branch)
element = $('#new-summary .commit a.compare')
equal(element.attr('href'), "https://github.com/compare/#{data.compare}")
element = $('#summary .compare a')
equal(element.text(), data.compare)
element = $('#new-summary .commit a.compare')
equal(element.text(), "Compare #{data.compare}")
element = $('#summary .message')
element = $('#new-summary .subject')
equal(element.text().trim(), data.message)
@displaysLog = (lines) ->

View File

@ -58,6 +58,9 @@
font-size: 16px
text-align: center
a
color: white
.runtime
float: right
font-size: 11px