hawat.blueprints.reports.forms module¶
This module contains custom event report search form for Hawat.
-
class
hawat.blueprints.reports.forms.
EventReportSearchForm
(formdata=<object object>, **kwargs)[source]¶ Bases:
hawat.forms.BaseSearchForm
Class representing event report search form.
-
dt_from
= <UnboundField(SmartDateTimeField, (l'From:',), {'validators': [<wtforms.validators.Optional object>], 'default': <function EventReportSearchForm.<lambda>>})>¶
-
dt_to
= <UnboundField(SmartDateTimeField, (l'To:',), {'validators': [<wtforms.validators.Optional object>], 'default': <function default_dt>})>¶
-
groups
= <UnboundField(QuerySelectMultipleField, (l'Groups:',), {'query_factory': <function get_available_groups>, 'allow_blank': False, 'get_pk': <function EventReportSearchForm.<lambda>>})>¶
-
static
is_multivalue
(field_name)[source]¶ Check, if given form field is a multivalue field.
- Parameters
field_name (str) – Name of the form field
- Returns
True
, if the field can contain multiple values,False
otherwise.- Return type
bool
-
label
= <UnboundField(StringField, (l'Label:',), {'validators': [<wtforms.validators.Optional object>, <function check_null_character>]})>¶
-
severities
= <UnboundField(SelectMultipleField, (l'Severities:',), {'validators': [<wtforms.validators.Optional object>], 'choices': [('low', l'low'), ('medium', l'medium'), ('high', l'high'), ('critical', l'critical')], 'filters': [<function EventReportSearchForm.<lambda>>]})>¶
-
types
= <UnboundField(SelectMultipleField, (l'Types:',), {'validators': [<wtforms.validators.Optional object>], 'choices': [('summary', l'summary'), ('extra', l'extra')], 'filters': [<function EventReportSearchForm.<lambda>>]})>¶
-
-
class
hawat.blueprints.reports.forms.
FeedbackForm
(formdata=<object object>, **kwargs)[source]¶ Bases:
flask_wtf.form.FlaskForm
Class representing feedback form for reports.
-
ip
= <UnboundField(HiddenField, (), {'validators': [<wtforms.validators.DataRequired object>, <function check_network_record>]})>¶
-
section
= <UnboundField(HiddenField, (), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>]})>¶
-
submit
= <UnboundField(SubmitField, (l'Send feedback',), {})>¶
-
text
= <UnboundField(TextAreaField, (), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>]})>¶
-
-
class
hawat.blueprints.reports.forms.
ReportingDashboardForm
(formdata=<object object>, **kwargs)[source]¶ Bases:
flask_wtf.form.FlaskForm
Class representing event reporting dashboard search form.
-
dt_from
= <UnboundField(SmartDateTimeField, (l'From:',), {'validators': [<wtforms.validators.Optional object>], 'default': <function ReportingDashboardForm.<lambda>>})>¶
-
dt_to
= <UnboundField(SmartDateTimeField, (l'To:',), {'validators': [<wtforms.validators.Optional object>], 'default': <function default_dt>})>¶
-
groups
= <UnboundField(QuerySelectMultipleField, (l'Groups:',), {'query_factory': <function get_available_groups>, 'allow_blank': False, 'get_pk': <function ReportingDashboardForm.<lambda>>})>¶
-
static
is_multivalue
(field_name)[source]¶ Check, if given form field is a multivalue field.
- Parameters
field_name (str) – Name of the form field
- Returns
True
, if the field can contain multiple values,False
otherwise.- Return type
bool
-
submit
= <UnboundField(SubmitField, (l'Search',), {})>¶
-
-
hawat.blueprints.reports.forms.
get_available_groups
()[source]¶ Query the database for list of all available groups.