Merge lp:~mhall119/summit/change-irclog-urls-1226818 into lp:summit

Proposed by Michael Hall
Status: Merged
Approved by: Chris Johnston
Approved revision: 565
Merged at revision: 563
Proposed branch: lp:~mhall119/summit/change-irclog-urls-1226818
Merge into: lp:summit
Diff against target: 96 lines (+46/-2)
5 files modified
summit/schedule/models/agendamodel.py (+8/-0)
summit/schedule/models/meetingmodel.py (+8/-0)
summit/schedule/templates/schedule/meeting.html (+1/-1)
summit/schedule/templates/schedule/virtual_meeting.html (+3/-1)
summit/schedule/tests/meeting_model.py (+26/-0)
To merge this branch: bzr merge lp:~mhall119/summit/change-irclog-urls-1226818
Reviewer Review Type Date Requested Status
Chris Johnston Approve
Review via email: mp+194050@code.launchpad.net

Commit message

Point IRC links and iframes to irclogs.ubuntu.com after the end of a summit

Description of the change

Point IRC links and iframes to irclogs.ubuntu.com after the end of a summit

To post a comment you must log in.
Revision history for this message
Chris Johnston (cjohnston) wrote :
Download full text (5.1 KiB)

Do any of the older summits still have valid ubottu logs? If so, do we want
to break the old links?
On Nov 5, 2013 9:33 PM, "Michael Hall" <email address hidden> wrote:

> Michael Hall has proposed merging
> lp:~mhall119/summit/change-irclog-urls-1226818 into lp:summit.
>
> Commit message:
> Point IRC links and iframes to irclogs.ubuntu.com after the end of a
> summit
>
> Requested reviews:
> Summit Hackers (summit-hackers)
> Related bugs:
> Bug #1226818 in Summit: "IRC Logs"
> https://bugs.launchpad.net/summit/+bug/1226818
>
> For more details, see:
>
> https://code.launchpad.net/~mhall119/summit/change-irclog-urls-1226818/+merge/194050
>
> Point IRC links and iframes to irclogs.ubuntu.com after the end of a
> summit
> --
>
> https://code.launchpad.net/~mhall119/summit/change-irclog-urls-1226818/+merge/194050
> Your team Summit Hackers is requested to review the proposed merge of
> lp:~mhall119/summit/change-irclog-urls-1226818 into lp:summit.
>
> === modified file 'summit/schedule/models/agendamodel.py'
> --- summit/schedule/models/agendamodel.py 2013-02-26 19:31:21 +0000
> +++ summit/schedule/models/agendamodel.py 2013-11-06 02:32:28 +0000
> @@ -48,3 +48,11 @@
>
> def __unicode__(self):
> return "%s" % self.meeting
> +
> + @property
> + def irc_log(self):
> + return 'http://irclogs.ubuntu.com/%s/%%23%s.html#t%s' % (
> + self.slot.start_utc.strftime('%Y/%m/%d'),
> + self.room.irc_channel,
> + self.slot.start_utc.strftime('%H:%M'),
> + )
>
> === modified file 'summit/schedule/models/meetingmodel.py'
> --- summit/schedule/models/meetingmodel.py 2013-11-05 20:56:44 +0000
> +++ summit/schedule/models/meetingmodel.py 2013-11-06 02:32:28 +0000
> @@ -717,6 +717,14 @@
> return False
>
> @property
> + def irc_logs(self):
> + logs = list()
> + for agenda in self.agenda_set.all():
> + logs.append(agenda.irc_log)
> + return logs
> +
> +
> + @property
> def current(self):
> for agenda in self.agenda_set.all():
> if agenda.slot.current:
>
> === modified file 'summit/schedule/templates/schedule/meeting.html'
> --- summit/schedule/templates/schedule/meeting.html 2013-05-14
> 02:30:50 +0000
> +++ summit/schedule/templates/schedule/meeting.html 2013-11-06
> 02:32:28 +0000
> @@ -143,7 +143,7 @@
> {% for ai in agenda_items %}
> {% if ai.room.irc_channel %}
> {% if summit.state == 'public' %}
> - <li><a href="
> http://ubottu.com/uds-logs/archives/{{summit.name}}/%23{{ai.room.irc_channel}}.log">IRC
> Logs for #{{ai.room.irc_channel}}</a></li>
> + <li><a href="{{ai.irc_log}}">IRC Logs for
> #{{ai.room.irc_channel}}</a></li>
> {% else %}
> <li><a href="{{ai.room.webchat_url}}">IRC Channel:
> #{{ai.room.irc_channel}}</a></li>
> {% endif %}
>
> === modified file 'summit/schedule/templates/schedule/virtual_meeting.html'
> --- summit/schedule/templates/schedule/virtual_meeting.html 2013-11-05
> 20:56:44 +0000
> +++ summit/schedule/templa...

Read more...

Revision history for this message
Michael Hall (mhall119) wrote :

The last one that might have valid ubuttu logs would be uds-r a year ago, everything else will be on irclogs.u.c, I think it's okay if we don't link to those older ones

Revision history for this message
Chris Johnston (cjohnston) :
review: Approve
Revision history for this message
Chris Johnston (cjohnston) wrote :

The `tree_dir` option for the target branch is not a lightweight checkout. Please ask a project administrator to resolve the issue, and try again.

Revision history for this message
Chris Johnston (cjohnston) wrote :

The `tree_dir` option for the target branch is not a lightweight checkout. Please ask a project administrator to resolve the issue, and try again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/schedule/models/agendamodel.py'
2--- summit/schedule/models/agendamodel.py 2013-02-26 19:31:21 +0000
3+++ summit/schedule/models/agendamodel.py 2013-11-06 02:32:28 +0000
4@@ -48,3 +48,11 @@
5
6 def __unicode__(self):
7 return "%s" % self.meeting
8+
9+ @property
10+ def irc_log(self):
11+ return 'http://irclogs.ubuntu.com/%s/%%23%s.html#t%s' % (
12+ self.slot.start_utc.strftime('%Y/%m/%d'),
13+ self.room.irc_channel,
14+ self.slot.start_utc.strftime('%H:%M'),
15+ )
16
17=== modified file 'summit/schedule/models/meetingmodel.py'
18--- summit/schedule/models/meetingmodel.py 2013-11-05 20:56:44 +0000
19+++ summit/schedule/models/meetingmodel.py 2013-11-06 02:32:28 +0000
20@@ -717,6 +717,14 @@
21 return False
22
23 @property
24+ def irc_logs(self):
25+ logs = list()
26+ for agenda in self.agenda_set.all():
27+ logs.append(agenda.irc_log)
28+ return logs
29+
30+
31+ @property
32 def current(self):
33 for agenda in self.agenda_set.all():
34 if agenda.slot.current:
35
36=== modified file 'summit/schedule/templates/schedule/meeting.html'
37--- summit/schedule/templates/schedule/meeting.html 2013-05-14 02:30:50 +0000
38+++ summit/schedule/templates/schedule/meeting.html 2013-11-06 02:32:28 +0000
39@@ -143,7 +143,7 @@
40 {% for ai in agenda_items %}
41 {% if ai.room.irc_channel %}
42 {% if summit.state == 'public' %}
43- <li><a href="http://ubottu.com/uds-logs/archives/{{summit.name}}/%23{{ai.room.irc_channel}}.log">IRC Logs for #{{ai.room.irc_channel}}</a></li>
44+ <li><a href="{{ai.irc_log}}">IRC Logs for #{{ai.room.irc_channel}}</a></li>
45 {% else %}
46 <li><a href="{{ai.room.webchat_url}}">IRC Channel: #{{ai.room.irc_channel}}</a></li>
47 {% endif %}
48
49=== modified file 'summit/schedule/templates/schedule/virtual_meeting.html'
50--- summit/schedule/templates/schedule/virtual_meeting.html 2013-11-05 20:56:44 +0000
51+++ summit/schedule/templates/schedule/virtual_meeting.html 2013-11-06 02:32:28 +0000
52@@ -126,7 +126,9 @@
53 </div>
54 <div id="chat">
55 {% if summit.state == 'public' %}
56- <iframe style="width:100%; border:2px solid #000000" src="http://ubottu.com/uds-logs/archives/{{ summit.name }}/%23{% for ai in agenda_items %}{{ ai.room.irc_channel }}{% endfor %}.log" height="395"></iframe>
57+ {% for irc_log in meeting.irc_logs %}
58+ <iframe style="width:100%; border:2px solid #000000" src="{{irc_log}}" height="395"></iframe>
59+ {% endfor %}
60 {% else %}
61 {% for ai in agenda_items %}
62 <iframe style="width:100%; border:2px solid #000000" src="{{ ai.room.webchat_url}}" height="395"></iframe>
63
64=== modified file 'summit/schedule/tests/meeting_model.py'
65--- summit/schedule/tests/meeting_model.py 2013-11-05 20:56:44 +0000
66+++ summit/schedule/tests/meeting_model.py 2013-11-06 02:32:28 +0000
67@@ -851,3 +851,29 @@
68 slot.end_utc = now + one_hour
69 slot.save()
70 self.assertTrue(self.meeting.current)
71+
72+ def test_irc_log_urls(self):
73+ now = datetime.datetime.utcnow()
74+ one_hour = datetime.timedelta(0, 3600)
75+
76+ slot = factory.make_one(
77+ Slot,
78+ start_utc=now + one_hour,
79+ end_utc=now + one_hour + one_hour,
80+ type='open',
81+ )
82+ room = factory.make_one(
83+ Room,
84+ summit=self.summit,
85+ irc_channel='test-irc',
86+ )
87+ agenda = factory.make_one(Agenda, meeting=self.meeting, slot=slot, room=room)
88+
89+ check_url = 'http://irclogs.ubuntu.com/%s/%%23%s.html#t%s' % (
90+ agenda.slot.start_utc.strftime('%Y/%m/%d'),
91+ agenda.room.irc_channel,
92+ agenda.slot.start_utc.strftime('%H:%M'),
93+ )
94+ self.assertEqual(check_url, agenda.irc_log)
95+ self.assertEqual(check_url, self.meeting.irc_logs[0])
96+

Subscribers

People subscribed via source and target branches