def events(request):
 if (not test_user_authenticated(request)):
  return login(request, next='/cobbler_web/events', expired=True)
 events = remote.get_events()
 events2 = []
 for id in events.keys():
  (ttime, name, state, read_by) = events[id]
  events2.append([id, time.asctime(time.localtime(ttime)), name, state])
 def sorter(a, b):
  return cmp(a[0], b[0])
 events2.sort(sorter)
 t = get_template('events.tmpl')
 html = t.render(RequestContext(request, {'results': events2, 'version': remote.extended_version(request.session['token'])['version'], 'username': username}))
 return HttpResponse(html)

def events ( request ) : if ( not test_user_authenticated ( request ) ) : return login ( request , next = '/cobbler_web/events' , expired = True ) events = remote . get_events ( ) events2 = [ ] for id in events . keys ( ) : ( ttime , name , state , read_by ) = events [ id ] events2 . append ( [ id , time . asctime ( time . localtime ( ttime ) ) , name , state ] ) def sorter ( a , b ) : return cmp ( a [ 0 ] , b [ 0 ] ) events2 . sort ( sorter ) t = get_template ( 'events.tmpl' ) html = t . render ( RequestContext ( request , { 'results' : events2 , 'version' : remote . extended_version ( request . session [ 'token' ] ) [ 'version' ] , 'username' : username } ) ) return HttpResponse ( html )
this page presents a list of all the events and links to the event log viewer .