hawat.const module

This module contains global application-wide constants for Hawat user interface.

hawat.const.CFGKEY_ENABLED_BLUEPRINTS = 'ENABLED_BLUEPRINTS'

Configuration key name: List of all requested blueprints.

hawat.const.CFGKEY_HAWAT_BLUEPRINTS = 'HAWAT_BLUEPRINTS'

Configuration key name: Registry of all successfully loaded blueprints.

hawat.const.CFGKEY_HAWAT_MENU_SKELETON = 'HAWAT_MENU_SKELETON'

Configuration key name: Default application main menu skeleton.

hawat.const.CFGKEY_MENTAT_CACHE_DIR = 'MENTAT_CACHE_DIR'

Configuration key name: Path to Mentat cache dir.

hawat.const.CFGKEY_MENTAT_CORE = 'MENTAT_CORE'

Configuration key name: Core Mentat configurations.

hawat.const.CRE_COUNTRY_CODE = re.compile('^[a-zA-Z]{2,3}$')

Compiled regular expression for validating language/country codes.

hawat.const.CRE_EMAIL = re.compile('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$')

Compiled regular expression for email address format validation.

hawat.const.CRE_LANG_CODE = re.compile('^[a-zA-Z]{2}(_[a-zA-Z]{2})?$')

Compiled regular expression for validating language codes.

hawat.const.CRE_LOGIN = re.compile('^[-_@.a-zA-Z0-9]+$')

Compiled regular expression for login validation.

hawat.const.FA_ICONS = {'action-add-member': '<i class="fas fa-fw fa-user-plus"></i>', 'action-create': '<i class="fas fa-fw fa-plus-circle"></i>', 'action-create-user': '<i class="fas fa-fw fa-user-plus"></i>', 'action-delete': '<i class="fas fa-fw fa-trash"></i>', 'action-delete-user': '<i class="fas fa-fw fa-user-slash"></i>', 'action-disable': '<i class="fas fa-fw fa-lock"></i>', 'action-disable-user': '<i class="fas fa-fw fa-user-lock"></i>', 'action-download': '<i class="fas fa-fw fa-file-download"></i>', 'action-download-csv': '<i class="fas fa-fw fa-file-csv"></i>', 'action-download-js': '<i class="fab fa-fw fa-js"></i>', 'action-download-svg': '<i class="fas fa-fw fa-file-image"></i>', 'action-download-zip': '<i class="fas fa-fw fa-file-archive"></i>', 'action-enable': '<i class="fas fa-fw fa-unlock"></i>', 'action-enable-user': '<i class="fas fa-fw fa-user-check"></i>', 'action-genkey': '<i class="fas fa-fw fa-key"></i>', 'action-mail': '<i class="fas fa-fw fa-envelope"></i>', 'action-more': '<i class="fas fa-fw fa-cubes"></i>', 'action-rej-member': '<i class="fas fa-fw fa-user-minus"></i>', 'action-reload': '<i class="fas fa-fw fa-sync-alt"></i>', 'action-rem-member': '<i class="fas fa-fw fa-user-times"></i>', 'action-save': '<i class="fas fa-fw fa-save"></i>', 'action-search': '<i class="fas fa-fw fa-search"></i>', 'action-show': '<i class="fas fa-fw fa-eye"></i>', 'action-show-user': '<i class="fas fa-fw fa-user-circle"></i>', 'action-stop': '<i class="fas fa-fw fa-stop-circle"></i>', 'action-update': '<i class="fas fa-fw fa-edit"></i>', 'action-update-user': '<i class="fas fa-fw fa-user-edit"></i>', 'actions': '<i class="fas fa-fw fa-wrench"></i>', 'ajax-loader': '<i class="fas fa-fw fa-spinner fa-spin fa-4x"></i>', 'alert-danger': '<i class="fas fa-fw fa-exclamation-triangle"></i>', 'alert-info': '<i class="fas fa-fw fa-info-circle"></i>', 'alert-success': '<i class="fas fa-fw fa-check-circle"></i>', 'alert-warning': '<i class="fas fa-fw fa-exclamation-circle"></i>', 'anchor': '<i class="fas fa-fw fa-anchor"></i>', 'avg': '<i class="fas fa-fw fa-dot-circle"></i>', 'backtotop': '<i class="fas fa-fw fa-level-up-alt"></i>', 'calendar': '<i class="fas fa-fw fa-calendar-alt"></i>', 'caret-down': '<i class="fas fa-fw fa-caret-square-down"></i>', 'check': '<i class="fas fa-fw fa-check-square"></i>', 'check_blank': '<i class="far fa-fw fa-square"></i>', 'clock': '<i class="fas fa-fw fa-clock"></i>', 'cnt': '<i class="fas fa-fw fa-hashtag"></i>', 'cog': '<i class="fas fa-fw fa-cog"></i>', 'collapse': '<i class="fas fa-fw fa-angle-down" aria-hidden="true"></i>', 'compress': '<i class="fas fa-fw fa-gift"></i>', 'debug': '<i class="fas fa-fw fa-bug"></i>', 'domain': '<i class="fas fa-fw fa-tag"></i>', 'eventclss': '<i class="fas fa-fw fa-book"></i>', 'expand': '<i class="fas fa-fw fa-angle-left" aria-hidden="true"></i>', 'export': '<i class="fas fa-fw fa-cloud-download"></i>', 'first': '<i class="fas fa-fw fa-angle-double-left"></i>', 'form-error': '<i class="fas fa-fw fa-exclamation-triangle" aria-hidden="true"></i>', 'help': '<i class="fas fa-fw fa-question-circle"></i>', 'import': '<i class="fas fa-fw fa-cloud-upload"></i>', 'item-disabled': '<i class="fas fa-fw fa-toggle-off"></i>', 'item-enabled': '<i class="fas fa-fw fa-toggle-on"></i>', 'ko': '<i class="fas fa-fw fa-times"></i>', 'language': '<i class="fas fa-fw fa-globe"></i>', 'last': '<i class="fas fa-fw fa-angle-double-right" aria-hidden="true"></i>', 'liitem': '<i class="fas fa-li fa-asterisk" aria-hidden="true"></i>', 'list': '<i class="fas fa-fw fa-list-ul"></i>', 'login': '<i class="fas fa-fw fa-sign-in-alt"></i>', 'logout': '<i class="fas fa-fw fa-sign-out-alt"></i>', 'mail': '<i class="fas fa-fw fa-envelope"></i>', 'max': '<i class="fas fa-fw fa-angle-double-up"></i>', 'med': '<i class="fas fa-fw fa-bullseye"></i>', 'min': '<i class="fas fa-fw fa-angle-double-down"></i>', 'missing-icon': '<i class="fas fa-fw fa-question" title="Missing icon"></i>', 'modal-question': '<i class="fas fa-fw fa-question-circle"></i>', 'module-auth-api': '<i class="fas fa-fw fa-key"></i>', 'module-auth-dev': '<i class="fas fa-fw fa-key"></i>', 'module-auth-env': '<i class="fas fa-fw fa-key"></i>', 'module-changelogs': '<i class="fas fa-fw fa-clipboard-list"></i>', 'module-dashboards': '<i class="fas fa-fw fa-tachometer-alt"></i>', 'module-dbstatus': '<i class="fas fa-fw fa-database"></i>', 'module-design': '<i class="fas fa-fw fa-palette"></i>', 'module-devtools': '<i class="fas fa-fw fa-bug"></i>', 'module-dnsr': '<i class="fas fa-fw fa-directions"></i>', 'module-events': '<i class="fas fa-fw fa-bell"></i>', 'module-filters': '<i class="fas fa-fw fa-filter"></i>', 'module-geoip': '<i class="fas fa-fw fa-map-marked-alt"></i>', 'module-groups': '<i class="fas fa-fw fa-users"></i>', 'module-help': '<i class="fas fa-fw fa-question-circle"></i>', 'module-hosts': '<i class="fas fa-fw fa-server"></i>', 'module-nerd': '<i class="fas fa-fw fa-certificate"></i>', 'module-networks': '<i class="fas fa-fw fa-sitemap"></i>', 'module-pdnsr': '<i class="fas fa-fw fa-compass"></i>', 'module-performance': '<i class="fas fa-fw fa-chart-bar"></i>', 'module-reports': '<i class="fas fa-fw fa-newspaper"></i>', 'module-settings-reporting': '<i class="fas fa-fw fa-sliders-h"></i>', 'module-skeleton': '<i class="fas fa-fw fa-skull"></i>', 'module-status': '<i class="fas fa-fw fa-heartbeat"></i>', 'module-timeline': '<i class="fas fa-fw fa-chart-line"></i>', 'module-users': '<i class="fas fa-fw fa-user"></i>', 'module-whois': '<i class="fas fa-fw fa-map-signs"></i>', 'mute': '<i class="fas fa-fw fa-volume-off"></i>', 'na': '<i class="fas fa-fw fa-times"></i>', 'next': '<i class="fas fa-fw fa-angle-right"></i>', 'ok': '<i class="fas fa-fw fa-check"></i>', 'playground': '<i class="fas fa-fw fa-gamepad"></i>', 'previous': '<i class="fas fa-fw fa-angle-left"></i>', 'profile': '<i class="fas fa-fw fa-id-card"></i>', 'quicksearch': '<i class="fab fa-fw fa-searchengin"></i>', 'r-s-critical': '<i class="fas fa-fw fa-thermometer-full"></i>', 'r-s-high': '<i class="fas fa-fw fa-thermometer-three-quarters"></i>', 'r-s-low': '<i class="fas fa-fw fa-thermometer-quarter"></i>', 'r-s-medium': '<i class="fas fa-fw fa-thermometer-half"></i>', 'r-s-unknown': '<i class="fas fa-fw fa-thermometer-empty"></i>', 'r-t-extra': '<i class="fas fa-fw fa-file-alt"></i>', 'r-t-summary': '<i class="fas fa-fw fa-archive"></i>', 'redirect': '<i class="fas fa-fw fa-share"></i>', 'reference': '<i class="fas fa-fw fa-external-link-alt"></i>', 'register': '<i class="fas fa-fw fa-user-plus"></i>', 'report-data-filtered': '<i class="fas fa-fw fa-filter"></i>', 'report-data-mailed': '<i class="fas fa-fw fa-envelope"></i>', 'report-data-relapsed': '<i class="fas fa-fw fa-sync-alt"></i>', 'report-data-test': '<i class="fas fa-fw fa-bug"></i>', 'role-admin': '<i class="fas fa-fw fa-user-ninja"></i>', 'role-anonymous': '<i class="fas fa-fw fa-user-secret"></i>', 'role-developer': '<i class="fas fa-fw fa-user-md"></i>', 'role-maintainer': '<i class="fas fa-fw fa-user-tie"></i>', 'role-user': '<i class="fas fa-fw fa-user"></i>', 'search': '<i class="fas fa-fw fa-search"></i>', 'section-administration': '<i class="fas fa-fw fa-cogs"></i>', 'section-dashboards': '<i class="fas fa-fw fa-tachometer-alt"></i>', 'section-development': '<i class="fas fa-fw fa-bug"></i>', 'section-home': '<i class="fas fa-fw fa-home"></i>', 'section-more': '<i class="fas fa-fw fa-puzzle-piece"></i>', 'sortasc': '<i class="fas fa-fw fa-sort-asc"></i>', 'sortdesc': '<i class="fas fa-fw fa-sort-desc"></i>', 'stats': '<i class="fas fa-fw fa-bar-chart"></i>', 'stopwatch': '<i class="fas fa-fw fa-stopwatch"></i>', 'structure': '<i class="fas fa-fw fa-tree"></i>', 'sum': '<i class="fas fa-fw fa-plus"></i>', 'table': '<i class="fas fa-fw fa-table"></i>', 'time-from': '<i class="fas fa-fw fa-hourglass-start"></i>', 'time-to': '<i class="fas fa-fw fa-hourglass-end"></i>', 'unassigned': '<i class="fas fa-fw fa-minus"></i>', 'uncompress': '<span class="fa-layers fa-fw"><i class="fas fa-fw fa-gift"></i><i class="fas fa-fw fa-ban"></i></span>', 'undisclosed': '<i class="fas fa-fw fa-minus"></i>', 'unmute': '<i class="fas fa-fw fa-volume-up"></i>', 'unredirect': '<span class="fa-layers fa-fw"><i class="fas fa-fw fa-share"></i><i class="fas fa-fw fa-ban"></i></span>', 'validate': '<i class="fas fa-fw fa-check-circle"></i>', 'weight': '<i class="fas fa-fw fa-weight"></i>'}

Predefined list of selected font-awesome icons that are used in this application.

hawat.const.HAWAT_DEFAULT_LOCALE = 'en'

Default application locale.

hawat.const.HAWAT_DEFAULT_PAGER_LIMIT = 100

Default page limit for pager/paginator.

hawat.const.HAWAT_DEFAULT_RESULT_TIMEDELTA = 7

Default result time delta for searching various objects.

hawat.const.HAWAT_DEFAULT_TIMEZONE = 'UTC'

Default application timezone.

hawat.const.HAWAT_FLASH_FAILURE = 'danger'

Class for failure flash messages.

hawat.const.HAWAT_FLASH_INFO = 'info'

Class for info flash messages.

hawat.const.HAWAT_FLASH_SUCCESS = 'success'

Class for success flash messages.

hawat.const.HAWAT_FLASH_WARNING = 'warning'

Class for warning flash messages.

hawat.const.HAWAT_FORM_ACTION_CANCEL = 'cancel'

Name of the item form cancel button.

hawat.const.HAWAT_FORM_ACTION_SUBMIT = 'submit'

Name of the item form submit button.

hawat.const.HAWAT_ITEM_ACTION_CREATE = 'create'

Name of the item create action.

hawat.const.HAWAT_ITEM_ACTION_CREATEFOR = 'createfor'

Name of the item createfor action.

hawat.const.HAWAT_ITEM_ACTION_UPDATE = 'update'

Name of the item update action.

hawat.const.HAWAT_PAGER_LIMIT_CHOICES = [(5, 5), (10, 10), (20, 20), (25, 25), (50, 50), (100, 100), (200, 200), (250, 250), (500, 500), (1000, 1000), (2500, 2500), (5000, 5000), (10000, 10000), (25000, 25000), (50000, 50000), (100000, 100000)]

List of available valid pager limit choices.

hawat.const.HAWAT_ROLES = ['user', 'developer', 'maintainer', 'admin']

List of valid user roles.

hawat.const.HAWAT_ROLE_ADMIN = 'admin'

Name of the ‘admin’ role.

hawat.const.HAWAT_ROLE_DEVELOPER = 'developer'

Name of the ‘developer’ role.

hawat.const.HAWAT_ROLE_MAINTAINER = 'maintainer'

Name of the ‘maintainer’ role.

hawat.const.HAWAT_ROLE_USER = 'user'

Name of the ‘user’ role.

hawat.const.RESOURCE_BABEL = 'babel'

Name for the flask_babel.Babel object within the application resources.

hawat.const.RESOURCE_LOGIN_MANAGER = 'login_manager'

Name for the flask_login.LoginManager object within the application resources.

hawat.const.RESOURCE_MIGRATE = 'migrate'

Name for the flask_migrate.Migrate object within the application resources.

hawat.const.RESOURCE_PRINCIPAL = 'principal'

Name for the flask_principal.Principal object within the application resources.

hawat.const.TIME_WINDOWS = {'12w': {'current': <function <lambda>>, 'next': <function <lambda>>, 'previous': <function <lambda>>}, '14d': {'current': <function <lambda>>, 'next': <function <lambda>>, 'previous': <function <lambda>>}, '4w': {'current': <function <lambda>>, 'next': <function <lambda>>, 'previous': <function <lambda>>}, 'td': {'current': <function <lambda>>, 'next': <function <lambda>>, 'previous': <function <lambda>>}, 'tm': {'current': <function <lambda>>, 'next': <function <lambda>>, 'previous': <function <lambda>>}, 'tw': {'current': <function <lambda>>, 'next': <function <lambda>>, 'previous': <function <lambda>>}, 'ty': {'current': <function <lambda>>, 'next': <function <lambda>>, 'previous': <function <lambda>>}}

Default list of time windows for ‘by time’ quicksearch lists.