Change summary on job page, fix more tests.
This brings both pages on par, though the duplication isn't ideal.
This commit is contained in:
parent
1373308475
commit
e1bd111224
|
@ -31,15 +31,15 @@
|
|||
<div class="footer">
|
||||
<div class="author">
|
||||
{{#if commit.authorName}}
|
||||
<img src="https://travis-ci.org/images/mailer/mascot-avatar-40px.png"/>{{commit.authorName}} authored
|
||||
<div><img src="https://travis-ci.org/images/mailer/mascot-avatar-40px.png"/>{{commit.authorName}} authored</div>
|
||||
{{/if}}
|
||||
{{#if commit.committerName}}
|
||||
<img src="https://travis-ci.org/images/mailer/mascot-avatar-40px.png"/>{{commit.committerName}} committed
|
||||
<div><img src="https://travis-ci.org/images/mailer/mascot-avatar-40px.png"/>{{commit.committerName}} committed</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="commit">
|
||||
<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"/>
|
||||
<div class="commit-changes">
|
||||
<div class=""><a class="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 class="compare" {{bind-attr href="build.commit.compareUrl"}} >#{{build.pullRequestNumber}}: {{build.pullRequestTitle}}</a></div>
|
||||
{{else}}
|
||||
|
|
|
@ -1,53 +1,56 @@
|
|||
{{#if job.isLoaded}}
|
||||
<div {{bind-attr class="view.color"}}>
|
||||
<dl id="summary">
|
||||
<div class="left">
|
||||
<dt>Job</dt>
|
||||
<dd class="number">
|
||||
<span class="status"></span>
|
||||
{{#if job.id}}
|
||||
{{#if job.repo.slug}}
|
||||
{{#link-to "job" repo job}}{{job.number}}{{/link-to}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</dd>
|
||||
<dt>State</dt>
|
||||
<dd class="state">{{capitalize job.state}}</dd>
|
||||
<dt class="finished_at_label">Finished</dt>
|
||||
<dd class="finished_at timeago" {{bind-attr title="job.formattedFinishedAt"}}>{{formatTime job.finishedAt}}</dd>
|
||||
<dt>Duration</dt>
|
||||
<dd class="duration" {{bind-attr title="startedAt"}}>{{formatDuration job.duration}}</dd>
|
||||
<div id="new-summary">
|
||||
<div class="right">
|
||||
<div class="build-status">
|
||||
{{#link-to "job" repo job}}#{{job.number}} {{job.state}}{{/link-to}}
|
||||
</div>
|
||||
|
||||
<div class="runtime">
|
||||
ran for {{formatDuration job.duration}}
|
||||
</div>
|
||||
|
||||
<div class="finished">
|
||||
{{formatTime job.finishedAt}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="branch" {{bind-attr title="job.commit.branch"}}>
|
||||
{{job.commit.branch}}
|
||||
</div>
|
||||
-
|
||||
<div class="subject">
|
||||
{{formatMessage job.commit.subject repoBinding=job.repo}}
|
||||
</div>
|
||||
|
||||
{{#with job}}
|
||||
<div class="right">
|
||||
<dt>Commit</dt>
|
||||
<dd class="commit"><a {{bind-attr href="controller.urlGithubCommit"}}>{{formatCommit commit}}</a></dd>
|
||||
{{#if build.pullRequest}}
|
||||
<dt></dt>
|
||||
<dd class="pull_request"><a {{bind-attr href="commit.compareUrl"}}>#{{build.pullRequestNumber}} {{build.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}}
|
||||
<pre class="body">
|
||||
{{formatMessage job.commit.body repoBinding=job.repo pre=true}}
|
||||
</pre>
|
||||
|
||||
<div class="footer">
|
||||
<div class="author">
|
||||
{{#if commit.authorName}}
|
||||
<dt>Author</dt>
|
||||
<dd class="author">{{commit.authorName}}</dd>
|
||||
<img src="https://travis-ci.org/images/mailer/mascot-avatar-40px.png"/>{{commit.authorName}} authored
|
||||
{{/if}}
|
||||
{{#if commit.committerName}}
|
||||
<dt>Committer</dt>
|
||||
<dd class="committer">{{commit.committerName}}</dd>
|
||||
<img src="https://travis-ci.org/images/mailer/mascot-avatar-40px.png"/>{{commit.committerName}} committed
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/with}}
|
||||
<dt>Message</dt>
|
||||
<dd class="message">
|
||||
{{formatMessage job.commit.subject repoBinding=job.repo}}
|
||||
<pre>{{formatMessage job.commit.body repoBinding=job.repo pre=true}}</pre>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<div class="commit-changes">
|
||||
<div><a class="commit" {{bind-attr href="controller.urlGithubCommit"}}>Commit {{formatSha job.commit.sha}}</a></div><img src="/images/icons/github.png" height="15"/>
|
||||
{{#if job.build.pullRequest}}
|
||||
<div><a class="compare" {{bind-attr href="job.commit.compareUrl"}} >#{{job.build.pullRequestNumber}}: {{job.build.pullRequestTitle}}</a></div>
|
||||
{{else}}
|
||||
{{#if job.commit.compareUrl}}
|
||||
<div><a class="compare" {{bind-attr href="job.commit.compareUrl"}}>Compare {{shortCompareShas
|
||||
job.commit.compareUrl}}</a></div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
<img src="/images/icons/github.png" height="15"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{view Travis.AnnotationsView annotationsBinding="view.annotations"}}
|
||||
|
||||
|
|
|
@ -23,19 +23,19 @@
|
|||
element = $('#new-summary .runtime')
|
||||
equal(element.text().trim(), "ran for #{data.duration}")
|
||||
|
||||
element = $('#new-summary .commit a.commit')
|
||||
element = $('#new-summary .commit-changes a.commit')
|
||||
equal(element.attr('href'), "https://github.com/#{data.repo}/commit/#{data.commit}")
|
||||
|
||||
element = $('#new-summary .commit a.commit')
|
||||
element = $('#new-summary .commit-changes a.commit')
|
||||
equal(element.text(), "Commit #{data.commit}")
|
||||
|
||||
element = $('#new-summary .branch')
|
||||
equal(element.text().trim(), data.branch)
|
||||
|
||||
element = $('#new-summary .commit a.compare')
|
||||
element = $('#new-summary .commit-changes a.compare')
|
||||
equal(element.attr('href'), "https://github.com/compare/#{data.compare}")
|
||||
|
||||
element = $('#new-summary .commit a.compare')
|
||||
element = $('#new-summary .commit-changes a.compare')
|
||||
equal(element.text(), "Compare #{data.compare}")
|
||||
|
||||
element = $('#new-summary .subject')
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
a
|
||||
text-decoration: underline
|
||||
|
||||
.commit
|
||||
.commit-changes
|
||||
text-align: right
|
||||
width: inherit
|
||||
margin-top: 0px
|
||||
|
@ -108,6 +108,10 @@
|
|||
.author
|
||||
float: left
|
||||
|
||||
div
|
||||
display: inline
|
||||
clear: none
|
||||
|
||||
img
|
||||
height: 15px
|
||||
width: 15px
|
||||
|
|
Loading…
Reference in New Issue
Block a user