mirror of https://github.com/zulip/zulip.git
Allow specifying multiple URLs for a given query name in ActivityTable
(imported from commit 1a3313d27168447025d0c98d72d2f6ab0c32587e)
This commit is contained in:
parent
99f98f77b6
commit
649119ead5
|
@ -1194,9 +1194,10 @@ class ActivityTable(object):
|
||||||
row[query_name + '_count'] = record.count
|
row[query_name + '_count'] = record.count
|
||||||
row[query_name + '_last' ] = record.last_visit
|
row[query_name + '_last' ] = record.last_visit
|
||||||
|
|
||||||
for query_name, url in queries:
|
for query_name, urls in queries:
|
||||||
if 'pointer' in query_name:
|
if 'pointer' in query_name:
|
||||||
self.has_pointer = True
|
self.has_pointer = True
|
||||||
|
for url in urls:
|
||||||
do_url(query_name, url)
|
do_url(query_name, url)
|
||||||
|
|
||||||
for row in self.rows.values():
|
for row in self.rows.values():
|
||||||
|
@ -1221,14 +1222,14 @@ def get_activity(request):
|
||||||
return HttpResponseRedirect(reverse('zephyr.views.login_page'))
|
return HttpResponseRedirect(reverse('zephyr.views.login_page'))
|
||||||
|
|
||||||
web_queries = (
|
web_queries = (
|
||||||
("get_updates", "/json/get_updates"),
|
("get_updates", ["/json/get_updates"]),
|
||||||
("send_message", "/json/send_message"),
|
("send_message", ["/json/send_message"]),
|
||||||
("update_pointer", "/json/update_pointer"),
|
("update_pointer", ["/json/update_pointer"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
api_queries = (
|
api_queries = (
|
||||||
("get_updates", "/api/v1/get_messages"),
|
("get_updates", ["/api/v1/get_messages"]),
|
||||||
("send_message", "/api/v1/send_message"),
|
("send_message", ["/api/v1/send_message"]),
|
||||||
)
|
)
|
||||||
|
|
||||||
return render_to_response('zephyr/activity.html',
|
return render_to_response('zephyr/activity.html',
|
||||||
|
|
Loading…
Reference in New Issue