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:
AJAXMixin
,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: t.ClassVar[t.Optional[t.Collection[str]]] = ['GET', 'POST']
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- class hawat.blueprints.timeline.APISearchView[source]
Bases:
AJAXMixin
,AbstractSearchView
View responsible for querying IDEA event database and presenting the results in the form of JSON document.
- get_blocked_response_context_keys()[source]
Returns a list of reponse context keys that will be removed in the
hawat.view.mixin.AJAXMixin.process_response_context()
- Returns
a list of response context keys to be removed
- classmethod get_view_name()[source]
Implementation of
hawat.view.BaseView.get_view_name()
.
- methods: t.ClassVar[t.Optional[t.Collection[str]]] = ['GET', 'POST']
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- class hawat.blueprints.timeline.AbstractLegacySearchView[source]
Bases:
PsycopgMixin
,BaseSearchView
Base class for view responsible for searching IDEA event database and presenting the results in timeline-based manner.
- authentication = True
Similar to the
decorators
mechanism in Flask pluggable views, you may use this class variable to specify, that the view is protected by authentication. During the process of registering the view into the blueprint inhawat.app.hawatBlueprint.register_view_class()
the view will be automatically decorated withflask_login.login_required()
decorator.The advantage of using this in favor of
decorators
is that the application menu can automatically hide/show items inaccessible to current user.This is a scalar variable that must contain boolean
True
orFalse
.
- 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.
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_title(**kwargs)[source]
Return title for the view, that will be displayed in the
title
tag of HTMLhead
element and also as the content of page header inh2
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')
List of URL parameters, that are not supported by this view and should be removed before generating the URL.
- class hawat.blueprints.timeline.AbstractSearchView[source]
Bases:
PsycopgMixin
,CustomSearchView
Base class for view responsible for searching IDEA event database and presenting the results in timeline-based manner.
- authentication = True
Similar to the
decorators
mechanism in Flask pluggable views, you may use this class variable to specify, that the view is protected by authentication. During the process of registering the view into the blueprint inhawat.app.hawatBlueprint.register_view_class()
the view will be automatically decorated withflask_login.login_required()
decorator.The advantage of using this in favor of
decorators
is that the application menu can automatically hide/show items inaccessible to current user.This is a scalar variable that must contain boolean
True
orFalse
.
- 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.
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_title(**kwargs)[source]
Return title for the view, that will be displayed in the
title
tag of HTMLhead
element and also as the content of page header inh2
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')
List of URL parameters, that are not supported by this view and should be removed before generating the URL.
- hawat.blueprints.timeline.BLUEPRINT_NAME = 'timeline'
Name of the blueprint as module global constant.
- class hawat.blueprints.timeline.SearchView[source]
Bases:
HTMLMixin
,AbstractSearchView
View responsible for querying IDEA event database and presenting the results in the form of HTML page.
Get breadcrumbs menu.
- methods: t.ClassVar[t.Optional[t.Collection[str]]] = ['GET']
The methods this view is registered for. Uses the same default (
["GET", "HEAD", "OPTIONS"]
) asroute
andadd_url_rule
by default.
- class hawat.blueprints.timeline.TimelineBlueprint(name, import_name, **kwargs)[source]
Bases:
HawatBlueprint
Pluggable module - IDEA event timelines (timeline).
- hawat.blueprints.timeline.get_blueprint()[source]
Mandatory interface for
hawat.Hawat
and factory function. This function must return a valid instance ofhawat.app.HawatBlueprint
orflask.Blueprint
.
Subpackages
Submodules
- hawat.blueprints.timeline.forms module
SimpleTimelineSearchForm
SimpleTimelineSearchForm.aggregations
SimpleTimelineSearchForm.categories
SimpleTimelineSearchForm.classes
SimpleTimelineSearchForm.description
SimpleTimelineSearchForm.detector_types
SimpleTimelineSearchForm.detectors
SimpleTimelineSearchForm.dt_from
SimpleTimelineSearchForm.dt_to
SimpleTimelineSearchForm.groups
SimpleTimelineSearchForm.host_addrs
SimpleTimelineSearchForm.host_ports
SimpleTimelineSearchForm.host_types
SimpleTimelineSearchForm.inspection_errs
SimpleTimelineSearchForm.is_multivalue()
SimpleTimelineSearchForm.limit
SimpleTimelineSearchForm.not_categories
SimpleTimelineSearchForm.not_classess
SimpleTimelineSearchForm.not_detector_types
SimpleTimelineSearchForm.not_detectors
SimpleTimelineSearchForm.not_groups
SimpleTimelineSearchForm.not_inspection_errs
SimpleTimelineSearchForm.not_protocols
SimpleTimelineSearchForm.not_severities
SimpleTimelineSearchForm.protocols
SimpleTimelineSearchForm.section
SimpleTimelineSearchForm.severities
SimpleTimelineSearchForm.source_addrs
SimpleTimelineSearchForm.source_ports
SimpleTimelineSearchForm.source_types
SimpleTimelineSearchForm.st_from
SimpleTimelineSearchForm.st_to
SimpleTimelineSearchForm.submit
SimpleTimelineSearchForm.target_addrs
SimpleTimelineSearchForm.target_ports
SimpleTimelineSearchForm.target_types
get_available_groups()