linotp.controllers.reporting module¶
reporting controller - interfaces for Reporting
-
class
linotp.controllers.reporting.
ReportingController
(*args, **kw)[source]¶ Bases:
linotp.lib.base.BaseController
reporting
-
delete_all
()[source]¶ - method:
- reporting/delete_all
- description:
- delete entries from the reporting database table
arguments: * realms - optional: takes realms, only the reporting entries
from this realm are dedleted- status - optional: filters reporting entries by status
- like ‘assigned’ or ‘inactive’
returns: dict in which value is the number of deleted rows
- exception:
- if an error occurs an exception is serialized and returned
-
delete_before
()[source]¶ - method:
- reporting/delete_before
- description:
- delete all entries from reporting database with respect to the arguments date must be given in format: ‘yyyy-mm-dd’
arguments: * date - optional: only delete entries which are older than date;
date must be given in format ‘yyyy-mm-dd’ if no date is given, all entries get deleted- realms - optional: takes realms, only the reporting entries
- from this realm are dedleted
- status - optional: filters reporting entries by status
- like ‘assigned’ or ‘inactive’
returns: dict in which value is the number of deleted rows
- exception:
- if an error occurs an exception is serialized and returned
-
maximum
()[source]¶ - method:
- reporting/maximum
- description:
- return the maximum of tokens in a given realm with given status
- arguments:
- realms - required: takes realms, only the reporting entries for
- this realms will be displayed
- status - optional: (default is ‘active’)
- takes assigned/unassigned/active/ etc. and shows max of lines in database with this characteristic
- returns:
- a json result with: { “head”: [], “data”: [ [row1], [row2] .. ] }
- exception:
- if an error occurs an exception is serialized and returned
Returns:
-
show
()[source]¶ - method:
- reporting/show
- description:
- show entries from the reporting database table
arguments: * date - optional: only show entries which are newer than date;
date must be given in format ‘yyyy-mm-dd’ if no date is given, all entries are shown- realms - optional: takes realms, only the reporting entries
- from this realm are shown
- status - optional: filters reporting entries by status
- like ‘assigned’ or ‘inactive’
- sortby - optional: sort the output by column
- sortdir - optional: asc/desc
- page - optional: reqeuest a certain page
- pagesize - optional: limit the number of returned tokens
- outform - optional: if set to “csv”, the output will be a .csv file
- returns: a json result with:
- { “head”: [], “data”: [ [row1] , [row2] , [row3] .. ] }
in case of csv: first line: header of columns other lines: column values
- exception:
- if an error occurs an exception is serialized and returned
-