hawat.blueprints.reports package

Description

This pluggable module provides access to event reports.

hawat.blueprints.reports.BLUEPRINT_NAME = 'reports'

Name of the blueprint as module global constant.

class hawat.blueprints.reports.DashboardView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.BaseSearchView

View responsible for presenting reporting dashboard.

authentication = True
authorization = [<Permission needs={Need(method='role', value='user'), Need(method='role', value='admin'), Need(method='role', value='developer'), Need(method='role', value='maintainer')} excludes=set()>]
static build_query(query, model, form_args)[source]

Interface implementation of hawat.base.SQLAlchemyMixin.build_query().

property dbmodel

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

Interface implementation of hawat.base.SearchView.do_after_search().

do_before_response(**kwargs)[source]

Implementation of hawat.base.RenderableView.do_before_response().

classmethod get_menu_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_menu_title().

static get_search_form(request_args)[source]

Interface implementation of hawat.base.SearchView.get_search_form().

classmethod get_view_name()[source]

Implementation of hawat.base.BaseView.get_view_name().

classmethod get_view_template()[source]

Implementation of hawat.base.RenderableView.get_view_template().

classmethod get_view_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_view_title().

class hawat.blueprints.reports.DataView[source]

Bases: hawat.base.FileIdView

View responsible for providing access to report data.

authentication = False
classmethod get_directory_path(fileid, filetype)[source]

Interface implementation of hawat.base.FileIdView.get_directory_path().

get_filename(fileid, filetype)[source]

Interface implementation of hawat.base.FileIdView.get_filename().

classmethod get_view_name()[source]

Implementation of hawat.base.BaseView.get_view_name().

classmethod get_view_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_menu_title().

methods = ['GET']
class hawat.blueprints.reports.DeleteView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemDeleteView

View for deleting existing user accounts.

authentication = True
authorization = [<Permission needs={Need(method='role', value='admin')} excludes=set()>]
property dbmodel

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

classmethod get_menu_legend(**kwargs)[source]

Interface implementation of hawat.base.BaseView.get_menu_legend().

static get_message_cancel(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_cancel().

static get_message_failure(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_failure().

static get_message_success(**kwargs)[source]

Implementation of hawat.base.ItemActionView.get_message_success().

get_url_next()[source]

Interface implementation of hawat.base.ItemActionView.get_url_next().

methods = ['GET', 'POST']
class hawat.blueprints.reports.FeedbackView[source]

Bases: hawat.base.AJAXMixin, hawat.base.RenderableView

View for sending feedback for reports.

authentication = True
authorization = [<Permission needs={Need(method='role', value='user'), Need(method='role', value='admin'), Need(method='role', value='developer'), Need(method='role', value='maintainer')} excludes=set()>]
dispatch_request(item_id)[source]

Mandatory interface required by the flask.views.View.dispatch_request(). Will be called by the Flask framework to service the request.

Feedback for report with label item_id. More specific part like section and ip can be send in POST data.

classmethod get_view_name()[source]

Implementation of hawat.base.BaseView.get_view_name().

classmethod get_view_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_menu_title().

methods = ['POST']
class hawat.blueprints.reports.ReportsBlueprint(name, import_name, **kwargs)[source]

Bases: hawat.base.HawatBlueprint

Hawat pluggable module - event reports.

classmethod get_module_title()[source]

Implementation of hawat.base.HawatBlueprint.get_module_title().

jinja_loader[source]

The Jinja loader for this package bound object.

New in version 0.5.

register_app(app)[source]

Callback method. Will be called from hawat.base.HawatApp.register_blueprint() method and can be used to customize the Flask application object. Possible use cases:

  • application menu customization

Parameters

app (hawat.base.HawatApp) – Flask application to be customize.

class hawat.blueprints.reports.SearchView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.BaseSearchView

View responsible for searching IDEA event report database and presenting result.

authentication = True
authorization = [<Permission needs={Need(method='role', value='user'), Need(method='role', value='admin'), Need(method='role', value='developer'), Need(method='role', value='maintainer')} excludes=set()>]
static build_query(query, model, form_args)[source]

Interface implementation of hawat.base.SQLAlchemyMixin.build_query().

property dbmodel

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

Interface implementation of hawat.base.SearchView.do_after_search().

classmethod get_menu_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_menu_title().

static get_search_form(request_args)[source]

Interface implementation of hawat.base.SearchView.get_search_form().

classmethod get_view_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_view_title().

methods = ['GET']
class hawat.blueprints.reports.ShowView[source]

Bases: hawat.base.HTMLMixin, hawat.base.SQLAlchemyMixin, hawat.base.ItemShowView

Detailed report view.

authentication = True
classmethod authorize_item_action(**kwargs)[source]

Interface implementation of hawat.base.ItemShowView.authorize_item_action().

property dbmodel

Implementation of hawat.base.SQLAlchemyMixin.dbmodel().

do_before_response(**kwargs)[source]

Implementation of hawat.base.RenderableView.do_before_response().

static format_datetime(val, tzone)[source]

Static method that take string with isoformat datetime in utc and return string with BABEL_RFC3339_FORMAT formated datetime in tz timezone

classmethod get_action_menu()[source]

Interface implementation of hawat.base.ItemShowView.get_action_menu().

classmethod get_breadcrumbs_menu()[source]

Interface implementation of hawat.base.ItemShowView.get_breadcrumbs_menu().

classmethod get_menu_legend(**kwargs)[source]

Interface implementation of hawat.base.BaseView.get_menu_legend().

classmethod get_menu_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_menu_title().

classmethod get_view_title(**kwargs)[source]

Implementation of hawat.base.BaseView.get_view_title().

methods = ['GET']
class hawat.blueprints.reports.UnauthShowView[source]

Bases: hawat.blueprints.reports.ShowView

Unauthorized access to report detail view.

authentication = False
classmethod authorize_item_action(**kwargs)[source]

Interface implementation of hawat.base.ItemShowView.authorize_item_action().

classmethod get_view_name()[source]

Implementation of hawat.base.BaseView.get_view_name().

classmethod get_view_template()[source]

Implementation of hawat.base.RenderableView.get_view_template().

methods = ['GET']
property search_by

Interface implementation of hawat.base.SQLAlchemyMixin.search_by().

hawat.blueprints.reports.adjust_query_for_groups(query, groups)[source]

Adjust given SQLAlchemy query for current user. In case user specified set of groups, perform query filtering. In case no groups were selected, restrict non-administrators only to groups they are member of.

Build dictionary containing parameters for searching related report events.

hawat.blueprints.reports.get_blueprint()[source]

Mandatory interface and factory function. This function must return a valid instance of hawat.base.HawatBlueprint or flask.Blueprint.