Ejemplo n.º 1
0
def write_log_events(writer,
                     user,
                     domain=None,
                     override_user=None,
                     start_date=None,
                     end_date=None):
    event_ids = navigation_event_ids_by_user(user, start_date, end_date)
    for event in iter_docs(NavigationEventAudit.get_db(), event_ids):
        doc = NavigationEventAudit.wrap(event)
        if not domain or domain == doc.domain:
            write_log_event(writer, doc, override_user)
Ejemplo n.º 2
0
 def rows(self):
     rows = []
     event_ids = navigation_event_ids_by_user(self.selected_user,
                                              self.datespan.startdate,
                                              self.datespan.enddate)
     for event_doc in iter_docs(NavigationEventAudit.get_db(), event_ids):
         event = NavigationEventAudit.wrap(event_doc)
         if not self.selected_domain or self.selected_domain == event.domain:
             rows.append([
                 event.event_date, event.user, event.domain or '',
                 event.ip_address, event.request_path
             ])
     return rows
def log_events(writer, domain, user, override_user=""):
    for event in iter_docs(NavigationEventAudit.get_db(),
                           navigation_event_ids_by_user(user)):
        doc = NavigationEventAudit.wrap(event)
        if request_was_made_to_domain(domain, doc.request_path):
            log_event(writer, doc, override_user)
Ejemplo n.º 4
0
def write_log_events(writer, user, domain=None, override_user=None, start_date=None, end_date=None):
    event_ids = navigation_event_ids_by_user(user, start_date, end_date)
    for event in iter_docs(NavigationEventAudit.get_db(), event_ids):
        doc = NavigationEventAudit.wrap(event)
        if not domain or domain == doc.domain:
            write_log_event(writer, doc, override_user)
Ejemplo n.º 5
0
def log_events(writer, domain, user, override_user=""):
    for event in iter_docs(NavigationEventAudit.get_db(), navigation_event_ids_by_user(user)):
        doc = NavigationEventAudit.wrap(event)
        if request_was_made_to_domain(domain, doc.request_path):
            log_event(writer, doc, override_user)