def timeline(self, environ, projectname, revwid=''): """Aggregate activities under project review or individual review URLS : /p/{projectname}/r/timeline/{revwid} """ from zeta.config.environment import projcomp, revcomp c.rclose = h.ZResp() logid = request.params.get('logid', None) dir = request.params.get('dir', None) fromoff = request.params.get('fromoff', 1) logid = logid and int(logid) fromoff = int(fromoff) # Setup context for page generation c.projsummary = c.project.summary c.review = revwid and revcomp.get_review(int(revwid)) or None c.revweditable = h.authorized(h.HasPermname('REVIEW_CREATE')) routeargs = {'projectname': projectname, 'revwid': revwid} self.tline_controller(h.r_projrevwtline, routeargs, 'review', fromoff, logid, dir, c.review) c.title = 'Review:%s:timeline' % c.review.id c.datatline, c.startdt = h.tlineplot(c.logs[:]) c.rclose.append(render('/derived/projects/reviewtline.html')) return c.rclose
def timeline(self, environ, projectname, tckid): """Activities under project tickets or individual ticket URLS : /p/{projectname}/t/timeline/{tckid} """ from zeta.config.environment import projcomp, tckcomp c.rclose = h.ZResp() logid = request.params.get('logid', None) dir = request.params.get('dir', None) fromoff = request.params.get('fromoff', 1) logid = logid and int(logid) fromoff = int(fromoff) # Setup context for page generation c.projsummary = c.project.summary c.seltickets = self._seltickets() routeargs = {'projectname': projectname, 'tckid': tckid} self.tline_controller(h.r_projtcktline, routeargs, 'ticket', fromoff, logid, dir, c.ticket) c.title = 'Ticket:%s:timeline' % tckid c.datatline, c.startdt = h.tlineplot(c.logs[:]) c.rclose.append(render('/derived/projects/tickettline.html')) return c.rclose
def timelineadmin( self, environ, projectname ) : """Aggregate all the activities under the project URLS : /p/<projectname>/timeline/admin""" from zeta.config.environment import projcomp c.rclose = h.ZResp() logid = request.params.get( 'logid', None ) dir = request.params.get( 'dir', None ) fromoff = request.params.get( 'fromoff', 1 ) logid = logid and int(logid) fromoff = int(fromoff) # Setup context for page generation c.projsummary = c.project.summary routeargs = { 'projectname' : projectname } self.tline_controller( h.r_projadmtline, routeargs, 'project', fromoff, logid, dir, c.project ) c.title = projectname + ':admintimeline' h.url_rssfeed = h.url_for( h.r_projadmfeed, projectname=projectname ) c.datatline, c.startdt = h.tlineplot( c.logs[:] ) c.rclose.append(render( '/derived/projects/admintline.html' )) return c.rclose
def timeline( self, environ, projectname ) : """Aggregate all the activities under the project URLS : /p/<projectname>/timeline """ from zeta.config.environment import projcomp, tlcomp c.rclose = h.ZResp() logid = request.params.get( 'logid', None ) dir = request.params.get( 'dir', None ) fromoff = request.params.get( 'fromoff', 1 ) logid = logid and int(logid) fromoff = int(fromoff) # Setup context for page generation c.project = c.project or projcomp.get_project( projectname ) c.projectname = c.project.projectname c.projsummary = c.project.summary c.title = projectname + ':timeline' c.alllogs = tlcomp.fetchprojlogs( c.project, limit=h.TLCOUNT+2, id=logid, direction=dir ) routeargs = { 'projectname' : projectname } self.tline_controller( h.r_projtline, routeargs, [], fromoff, logid, dir, c.project ) h.url_rssfeed = h.url_for( h.r_projfeed, projectname=projectname ) c.datatline, c.startdt = h.tlineplot( c.logs[:] ) c.rclose.append(render( '/derived/projects/projtline.html' )) return c.rclose
def timeline(self, environ, projectname, wurl): """Aggregate activities under project wiki or individual wiki URLS : /p/{projectname}/wiki/timeline/*(wurl) """ from zeta.config.environment import projcomp, wikicomp c.rclose = h.ZResp() logid = request.params.get('logid', None) dir = request.params.get('dir', None) fromoff = request.params.get('fromoff', 1) logid = logid and int(logid) fromoff = int(fromoff) # Setup context for page generation c.projsummary = c.project.summary wikiurl = self.url_wikiurl(projectname, wurl) c.wiki = wikicomp.get_wiki(unicode(wikiurl)) c.wikipagenames = self.wikipagename(wikicomp.wikiurls(c.project)) c.wikipagename = wurl routeargs = {'projectname': projectname, 'wurl': wurl} self.tline_controller(h.r_projwikitline, routeargs, 'wiki', fromoff, logid, dir, c.wiki) c.title = '%s:timeline' % wurl c.datatline, c.startdt = h.tlineplot(c.logs[:]) c.rclose.append(render('/derived/projects/wikitline.html')) return c.rclose
def timeline( self, environ, username ) : """User timeline URLS : /u/timeline/{username} """ from zeta.config.environment import userscomp c.rclose = h.ZResp() # Action specific query parameters logid = request.params.get( 'logid', None ) dir = request.params.get( 'dir', None ) fromoff = request.params.get( 'fromoff', 1 ) logid = logid and int(logid) fromoff = int(fromoff) c.user = userscomp.get_user( username ) self.tline_controller( h.r_usertline, { 'username' : username }, [ 'user' ], fromoff, logid, dir, c.user ) c.title = '%s:timeline' % username c.datatline, c.startdt = h.tlineplot( c.logs[:] ) c.timeline = True # Html page generation c.rclose.append(render( '/derived/userpage/usertline.html' )) return c.rclose
def timeline(self, environ, licid): """Action for all license pages. URLS : /license/timeline/<licid> """ from zeta.config.environment import liccomp c.rclose = h.ZResp() # Action specific query parameters logid = request.params.get('logid', None) dir = request.params.get('dir', None) fromoff = request.params.get('fromoff', 1) logid = logid and int(logid) fromoff = int(fromoff) c.licensenames, c.licenselist, licfields = self._selectoptions() c.links = ['', '', ''] c.license = None c.timeline = True licid = [_i for _i, _, p in licfields if _i == c.licid_i][0] c.license = liccomp.get_license(licid) self.tline_controller(h.r_lictimeline, {'id': licid_i}, ['license'], fromoff, logid, dir, c.license) c.title = '%s:timeline' % c.license.licensename c.datatline, c.startdt = h.tlineplot(c.logs[:]) # Html page generation c.rclose.append(render('/derived/license/lictline.html')) return c.rclose
def timelines(self, environ): """Timeline log of activities on all license pages URLS : /license/timeline """ from zeta.config.environment import liccomp c.rclose = h.ZResp() # Action specific query parameters logid = request.params.get('logid', None) dir = request.params.get('dir', None) fromoff = request.params.get('fromoff', 1) logid = logid and int(logid) fromoff = int(fromoff) c.licensenames, c.licenselist, licfields = self._selectoptions() c.links = ['', '', ''] c.license = None c.timeline = True self.tline_controller(h.r_lictimelines, {}, 'license', fromoff, logid, dir, c.license) c.title = 'LicenseTimeline' c.datatline, c.startdt = h.tlineplot(c.logs[:]) # Html page generation c.rclose.append(render('/derived/license/lictline.html')) return c.rclose
def timeline( self, environ ) : """Complete timeline history""" c.rclose = h.ZResp() # Action specific query parameters logid = request.params.get( 'logid', None ) dir = request.params.get( 'dir', None ) fromoff = request.params.get( 'fromoff', 1 ) logid = logid and int(logid) fromoff = int(fromoff) c.links = [ '', '', '' ] self.tline_controller( h.r_sitetline, {}, [], fromoff, logid, dir ) c.title = 'SiteTimeline' c.datatline, c.startdt = h.tlineplot( c.logs[:] ) c.rclose.append(render( '/derived/siteadmin/tline.html' )) return c.rclose