Merge lp:~mabac/launchpad-work-items-tracker/remove-html-extensions into lp:~linaro-automation/launchpad-work-items-tracker/linaro

Proposed by Mattias Backman
Status: Rejected
Rejected by: Mattias Backman
Proposed branch: lp:~mabac/launchpad-work-items-tracker/remove-html-extensions
Merge into: lp:~linaro-automation/launchpad-work-items-tracker/linaro
Diff against target: 74 lines (+7/-7)
3 files modified
report_tools.py (+4/-4)
templates/roadmap_card.html (+1/-1)
templates/roadmap_lane.html (+2/-2)
To merge this branch: bzr merge lp:~mabac/launchpad-work-items-tracker/remove-html-extensions
Reviewer Review Type Date Requested Status
Linaro Infrastructure Pending
Review via email: mp+85744@code.launchpad.net

Description of the change

Hi,

This branch removes the .html extension from the generated card and lane pages.

It also removes the leading blank line from the base.html template. The reason we need it is that IS has enabled some magic apache trick that will show pages without extensions if the content "looks like" html. That heuristic fails if there is a blank line before any tags.

Thanks,

Mattias

To post a comment you must log in.
317. By Mattias Backman

Revert removing the leading blank line.

Revision history for this message
Mattias Backman (mabac) wrote :

IS changed their solution so we don't need to remove the blank line anymore.

Revision history for this message
Guilherme Salgado (salgado) wrote :

I'm not sure I understand why we're doing this. Is this something we
wanted to do and now we can as they've changed apache to detect the
content-type of extensionless files?

Revision history for this message
Mattias Backman (mabac) wrote :

We need the changes that are left in the branch. That is generate the files without the .html extension. I reverted the other change.

Unmerged revisions

317. By Mattias Backman

Revert removing the leading blank line.

316. By Mattias Backman

Remove .html extension from lane and card reports.

315. By Mattias Backman

Remove leading blank line in the base.html template.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'report_tools.py'
2--- report_tools.py 2011-12-12 07:35:35 +0000
3+++ report_tools.py 2011-12-15 12:12:50 +0000
4@@ -205,7 +205,7 @@
5
6 def roadmap_pages(my_path, database, basename, config, lane, root=None):
7 cfg = load_config(config)
8- fh = open(basename + '.html', 'w')
9+ fh = open(basename, 'w')
10 try:
11 args = [os.path.join(my_path, 'html-report'), '-d', database]
12 args += ['--report-type', 'roadmap_page']
13@@ -214,7 +214,7 @@
14 args += ['--root', root]
15 report_args(args, theme=get_theme(cfg))
16 proc = Popen(args, stdout=fh)
17- print basename + '.html'
18+ print basename
19 proc.wait()
20 finally:
21 fh.close()
22@@ -222,7 +222,7 @@
23
24 def roadmap_cards(my_path, database, basename, config, card, root=None):
25 cfg = load_config(config)
26- fh = open(basename + '.html', 'w')
27+ fh = open(basename, 'w')
28 try:
29 args = [os.path.join(my_path, 'html-report'), '-d', database]
30 args += ['--report-type', 'roadmap_card']
31@@ -231,7 +231,7 @@
32 args += ['--root', root]
33 report_args(args, theme=get_theme(cfg))
34 proc = Popen(args, stdout=fh)
35- print basename + '.html'
36+ print basename
37 proc.wait()
38 finally:
39 fh.close()
40
41=== modified file 'templates/roadmap_card.html'
42--- templates/roadmap_card.html 2011-12-14 12:34:43 +0000
43+++ templates/roadmap_card.html 2011-12-15 12:12:50 +0000
44@@ -23,7 +23,7 @@
45 % endfor
46 </table>
47 </div>
48-<h2>${card.status} in <a href="../lane/${lane}.html">${lane}</a></h2>
49+<h2>${card.status} in <a href="../lane/${lane}">${lane}</a></h2>
50 <p>
51 <ul>
52 <li>Card ID: <a href="${card.url}">${card.roadmap_id}</a>
53
54=== modified file 'templates/roadmap_lane.html'
55--- templates/roadmap_lane.html 2011-12-12 09:17:20 +0000
56+++ templates/roadmap_lane.html 2011-12-15 12:12:50 +0000
57@@ -9,7 +9,7 @@
58 Lane to view:
59 <select name="laneselect" onchange="window.location=this.value;">
60 % for lane in lanes:
61-<option value="${lane.name}.html"${' selected="selected"' if lane.name == lane_title else ''}>${lane.name}${' (current)' if lane.is_current else ''}</option>
62+<option value="${lane.name}"${' selected="selected"' if lane.name == lane_title else ''}>${lane.name}${' (current)' if lane.is_current else ''}</option>
63 % endfor
64 </select>
65
66@@ -25,7 +25,7 @@
67 % for card_dict in status['cards']:
68 <tr>
69 <td>
70- <a href="../card/${card_dict['card'].roadmap_id if card_dict['card'].roadmap_id != '' else card_dict['card'].card_id}.html">${card_dict['card'].name}</a>
71+ <a href="../card/${card_dict['card'].roadmap_id if card_dict['card'].roadmap_id != '' else card_dict['card'].card_id}">${card_dict['card'].name}</a>
72 </td>
73 <td>${status['name']}</td>
74 <td>${card_dict['card'].team}</td><td align=right>${card_dict['card'].priority}</td>

Subscribers

People subscribed via source and target branches