hawat.blueprints.timeline package

This file contains pluggable module for Hawat web interface containing features related to IDEA event timeline based visualisations.

class hawat.blueprints.timeline.APILegacySearchView[source]

Bases: hawat.view.mixin.AJAXMixin, hawat.blueprints.timeline.AbstractSearchView

View responsible for querying IDEA event database and presenting the results in the form of JSON document.

*Deprecated legacy implementation, kept only for the purposes of comparison.

classmethod get_view_name()[source]

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

methods: Optional[List[str]] = ['GET', 'POST']
class hawat.blueprints.timeline.APISearchView[source]

Bases: hawat.view.mixin.AJAXMixin, hawat.blueprints.timeline.AbstractSearchView

View responsible for querying IDEA event database and presenting the results in the form of JSON document.

classmethod get_view_name()[source]

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

methods: Optional[List[str]] = ['GET', 'POST']
class hawat.blueprints.timeline.AbstractLegacySearchView[source]

Bases: hawat.base.PsycopgMixin, hawat.view.BaseSearchView

Base class for view responsible for searching IDEA event database and presenting the results in timeline-based manner.

authentication = True

This hook method will be called after successfull search.

do_before_response(**kwargs)[source]

This method will be called just before generating the response. By providing some meaningfull implementation you can use it for some simple item and response context mangling tasks.

Parameters

kwargs – Custom additional arguments.

This hook method will be called before search attempt.

classmethod get_menu_title(**kwargs)[source]

Return menu entry title for the view.

Default implementation returns the return value of hawat.view.BaseView.get_view_title() method by default.

Parameters

kwargs (dict) – Optional parameters.

Returns

Menu entry title for the view.

Return type

str

static get_qtype()[source]

Get type of the event select query.

static get_search_form(request_args)[source]

Must return instance of flask_wtf.FlaskForm appropriate for searching given type of items.

classmethod get_view_icon()[source]

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

classmethod get_view_title(**kwargs)[source]

Return title for the view, that will be displayed in the title tag of HTML head element and also as the content of page header in h2 tag.

Default implementation returns the return value of hawat.view.BaseView.get_menu_title() method by default.

Parameters

kwargs (dict) – Optional parameters.

Returns

Title for the view.

Return type

str

url_params_unsupported = ('page', 'limit', 'sortby')
class hawat.blueprints.timeline.AbstractSearchView[source]

Bases: hawat.base.PsycopgMixin, hawat.view.CustomSearchView

Base class for view responsible for searching IDEA event database and presenting the results in timeline-based manner.

authentication = True

Perform actual search with given query.

This hook method will be called after successfull search.

do_before_response(**kwargs)[source]

This method will be called just before generating the response. By providing some meaningfull implementation you can use it for some simple item and response context mangling tasks.

Parameters

kwargs – Custom additional arguments.

This hook method will be called before search attempt.

classmethod get_menu_title(**kwargs)[source]

Return menu entry title for the view.

Default implementation returns the return value of hawat.view.BaseView.get_view_title() method by default.

Parameters

kwargs (dict) – Optional parameters.

Returns

Menu entry title for the view.

Return type

str

static get_search_form(request_args)[source]

Must return instance of flask_wtf.FlaskForm appropriate for searching given type of items.

classmethod get_view_icon()[source]

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

classmethod get_view_title(**kwargs)[source]

Return title for the view, that will be displayed in the title tag of HTML head element and also as the content of page header in h2 tag.

Default implementation returns the return value of hawat.view.BaseView.get_menu_title() method by default.

Parameters

kwargs (dict) – Optional parameters.

Returns

Title for the view.

Return type

str

url_params_unsupported = ('page', 'sortby')
hawat.blueprints.timeline.BLUEPRINT_NAME = 'timeline'

Name of the blueprint as module global constant.

class hawat.blueprints.timeline.SearchView[source]

Bases: hawat.view.mixin.HTMLMixin, hawat.blueprints.timeline.AbstractSearchView

View responsible for querying IDEA event database and presenting the results in the form of HTML page.

classmethod get_breadcrumbs_menu()[source]

Get breadcrumbs menu.

methods: Optional[List[str]] = ['GET']
class hawat.blueprints.timeline.TimelineBlueprint(name, import_name, **kwargs)[source]

Bases: hawat.base.HawatBlueprint

Pluggable module - IDEA event timelines (timeline).

classmethod get_module_title()[source]

Get human readable name for this blueprint/module.

Returns

Name (short summary) of the blueprint/module.

Return type

str

name = None
register_app(app)[source]

Hook method: Custom callback, which will be called from hawat.app.Hawat.register_blueprint() method and which can perform additional tweaking of Hawat application object.

Parameters

app (hawat.app.Hawat) – Application object.

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

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