Merge lp:~robru/bileto/excuses-link into lp:bileto

Proposed by Robert Bruce Park
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 266
Merged at revision: 263
Proposed branch: lp:~robru/bileto/excuses-link
Merge into: lp:bileto
Diff against target: 61 lines (+16/-6)
2 files modified
tickets/static/app.js (+15/-5)
tickets/static/index.html (+1/-1)
To merge this branch: bzr merge lp:~robru/bileto/excuses-link
Reviewer Review Type Date Requested Status
Robert Bruce Park (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+270700@code.launchpad.net

Commit message

Add links to the excuses page for packages stuck in proposed.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:263
http://jenkins.qa.ubuntu.com/job/bileto-ci/60/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/bileto-ci/60/rebuild

review: Approve (continuous-integration)
lp:~robru/bileto/excuses-link updated
264. By Robert Bruce Park

Fix regex.

Revision history for this message
Colin Watson (cjwatson) :
lp:~robru/bileto/excuses-link updated
265. By Robert Bruce Park

Fix regex... again.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:265
http://jenkins.qa.ubuntu.com/job/bileto-ci/61/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/bileto-ci/61/rebuild

review: Approve (continuous-integration)
lp:~robru/bileto/excuses-link updated
266. By Robert Bruce Park

Fix series as per cjwatson.

Revision history for this message
Robert Bruce Park (robru) wrote :

Thanks for the tip Colin, fixed & looking good in staging.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tickets/static/app.js'
2--- tickets/static/app.js 2015-09-02 19:57:39 +0000
3+++ tickets/static/app.js 2015-09-10 15:59:16 +0000
4@@ -1,3 +1,8 @@
5+var EXCUSES = 'http://people.canonical.com/~ubuntu-archive/proposed-migration/';
6+var PPA_PREFIX = 'https://launchpad.net/~ci-train-ppa-service/+archive/';
7+var SOURCE_PREFIX = 'https://launchpad.net/ubuntu/+source/';
8+var TEAM_PREFIX = 'https://launchpad.net/~';
9+
10 var visibilitychange = null;
11 var hidden = null;
12 ['h', 'mozH', 'webkitH', 'msH', 'oH'].some(function(prefix) {
13@@ -42,11 +47,16 @@
14 function display_siloname(text) {
15 text = (text || '');
16 // TODO: Make PPA link link to correct staging/production PPA team
17- return a('https://launchpad.net/~ci-train-ppa-service/+archive/' + text, text)
18+ return a(PPA_PREFIX + text, text)
19 }
20
21-function display_status(text, job_log) {
22- return a(job_log, '[log] ') + linkify((text || ''));
23+function display_status(text, job_log, series) {
24+ series = series || '';
25+ series = {'dual': 'wily'}[series] || series;
26+ text = a(job_log, '[log] ') + linkify((text || ''));
27+ return text.replace(
28+ /(\S+)( is in the Proposed pocket)/gi,
29+ a(EXCUSES + series + '/update_excuses.html#$1', '$1') + '$2');
30 }
31
32 function display_landers(text) {
33@@ -54,13 +64,13 @@
34 }
35
36 function display_sources(text) {
37- return link_each_word('https://launchpad.net/ubuntu/+source/', (text || ''));
38+ return link_each_word(SOURCE_PREFIX, (text || ''));
39 }
40
41 function display_dest(text) {
42 if (!text) return '';
43 var parts = text.split(/\//);
44- return a('https://launchpad.net/~' + parts[0] + '/+archive/' + parts[1] + '/' + parts[2], parts[2]);
45+ return a(TEAM_PREFIX + parts[0] + '/+archive/' + parts[1] + '/' + parts[2], parts[2]);
46 }
47
48 app.controller('appController', ['$scope', '$location', '$http', '$anchorScroll', function($scope, $location, $http, $anchorScroll) {
49
50=== modified file 'tickets/static/index.html'
51--- tickets/static/index.html 2015-09-02 18:02:37 +0000
52+++ tickets/static/index.html 2015-09-10 15:59:16 +0000
53@@ -69,7 +69,7 @@
54 </tr>
55 <tr ng-hide="display_this(req)">
56 <td><p ng-bind-html="display_siloname(req.siloname)"></p></td>
57-<td><p ng-bind-html="display_status(req.status, req.job_log)" class="{{req.status_color}}"></p></td>
58+<td><p ng-bind-html="display_status(req.status, req.job_log, req.series)" class="{{req.status_color}}"></p></td>
59 <td><p ng-bind-html="display_landers(req.landers)"></p></td>
60 <td><p>{{sync_request}}</p></td>
61 <td><p ng-bind-html="display_dest(req.dest)"></p></td>

Subscribers

People subscribed via source and target branches