backend.globaleaks.handlers.admin.auditlog

Module Contents

Classes

AnomalyCollection
StatsCollection This Handler returns the list of the stats for the requested range
TipsCollection This Handler returns the list of the tips
RecentEventsCollection This handler is refreshed constantly by an admin page
JobsTiming This handler return the timing for the latest scheduler execution

Functions

weekmap_to_heatmap(week_map) Convert a list of list with dict inside, in a flat list
get_stats(session, tid, week_delta) Get the set of statistics collected for a specific week
get_anomaly_history(session, tid, limit) Transaction for fetching the anomalies registered for a specific tenant
get_tips(session, tid)
backend.globaleaks.handlers.admin.auditlog.weekmap_to_heatmap(week_map)[source]

Convert a list of list with dict inside, in a flat list

Parameters:week_map – A week map
Returns:A flat list obtained from the week map
backend.globaleaks.handlers.admin.auditlog.get_stats(session, tid, week_delta)[source]

Get the set of statistics collected for a specific week

Parameters:
  • session
  • tid
  • week_delta – commonly is 0, mean that you’re taking this week. -1 is the previous week.
backend.globaleaks.handlers.admin.auditlog.get_anomaly_history(session, tid, limit)[source]

Transaction for fetching the anomalies registered for a specific tenant

Parameters:
  • session – An ORM session
  • tid – A tenant ID
  • limit – The limit of retrieved objects
Returns:

The list of detected anomalies

backend.globaleaks.handlers.admin.auditlog.get_tips(session, tid)[source]
class backend.globaleaks.handlers.admin.auditlog.AnomalyCollection[source]

Bases: globaleaks.handlers.base.BaseHandler

check_roles = admin[source]
get(self)[source]
class backend.globaleaks.handlers.admin.auditlog.StatsCollection[source]

Bases: globaleaks.handlers.base.BaseHandler

This Handler returns the list of the stats for the requested range

check_roles = admin[source]
get(self, week_delta)[source]
class backend.globaleaks.handlers.admin.auditlog.TipsCollection[source]

Bases: globaleaks.handlers.base.BaseHandler

This Handler returns the list of the tips

check_roles = admin[source]
get(self)[source]
class backend.globaleaks.handlers.admin.auditlog.RecentEventsCollection[source]

Bases: globaleaks.handlers.base.BaseHandler

This handler is refreshed constantly by an admin page and provide real time update about the GlobaLeaks status

check_roles = admin[source]
get(self)[source]
class backend.globaleaks.handlers.admin.auditlog.JobsTiming[source]

Bases: globaleaks.handlers.base.BaseHandler

This handler return the timing for the latest scheduler execution

check_roles = admin[source]
get(self)[source]