diff --git a/CHANGELOG b/CHANGELOG index 904a6be9b..c58a44d19 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added +- [GUI] Add help_text to forms' attributes ## [2.34.4] - 2025-12-17 diff --git a/vulture_os/applications/backend/form.py b/vulture_os/applications/backend/form.py index 5fe9fd3d5..1be68b5a7 100644 --- a/vulture_os/applications/backend/form.py +++ b/vulture_os/applications/backend/form.py @@ -27,7 +27,7 @@ from django.forms import CheckboxInput, ModelForm, NumberInput, Select, TextInput, Textarea, HiddenInput # Django project imports -from gui.forms.form_utils import NoValidationField +from gui.forms.form_utils import NoValidationField, bootstrap_tooltips from applications.backend.models import (Backend, Server, MODE_CHOICES, BALANCING_CHOICES, HEALTH_CHECK_TCP_EXPECT_CHOICES, HEALTH_CHECK_EXPECT_CHOICES, HEALTH_CHECK_METHOD_CHOICES, HEALTH_CHECK_VERSION_CHOICES) from system.pki.models import TLSProfile @@ -38,7 +38,6 @@ # Logger configuration imports import logging - logging.config.dictConfig(settings.LOG_SETTINGS) logger = logging.getLogger('gui') @@ -141,6 +140,7 @@ class Meta: def __init__(self, *args, **kwargs): """ Initialize form and special attributes """ super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Remove the blank input generated by django for field_name in ['mode', 'balancing_mode', 'tcp_health_check_expect_match']: self.fields[field_name].empty_label = None @@ -223,6 +223,7 @@ def __init__(self, *args, **kwargs): kwargs['auto_id'] = False mode = kwargs.pop('mode', '') super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Remove the blank input generated by django self.fields['tls_profile'].empty_label = "Plain text" self.fields['tls_profile'].required = False diff --git a/vulture_os/applications/logfwd/form.py b/vulture_os/applications/logfwd/form.py index a869ea444..9c9200792 100644 --- a/vulture_os/applications/logfwd/form.py +++ b/vulture_os/applications/logfwd/form.py @@ -76,6 +76,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) for field_name in ['high_watermark', 'low_watermark', 'max_file_size', 'max_disk_space', 'spool_directory']: self.fields[field_name].required = False diff --git a/vulture_os/applications/parser/form.py b/vulture_os/applications/parser/form.py index 6f1c3d177..749d00589 100644 --- a/vulture_os/applications/parser/form.py +++ b/vulture_os/applications/parser/form.py @@ -28,6 +28,7 @@ # Django project imports from applications.parser.models import Parser +from gui.forms.form_utils import bootstrap_tooltips # Required exceptions imports @@ -56,6 +57,7 @@ class Meta: def __init__(self, *args, **kwargs): """ Initialize form and special attributes """ super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Convert list field from model to text input comma separated self.initial['tags'] = ','.join(self.initial.get('tags', []) or self.fields['tags'].initial) diff --git a/vulture_os/applications/reputation_ctx/form.py b/vulture_os/applications/reputation_ctx/form.py index 532a1aed4..f0c701b72 100644 --- a/vulture_os/applications/reputation_ctx/form.py +++ b/vulture_os/applications/reputation_ctx/form.py @@ -27,7 +27,7 @@ from django.forms import CheckboxInput, ModelForm, Select, TextInput, Textarea # Django project imports -from gui.forms.form_utils import NoValidationField +from gui.forms.form_utils import NoValidationField, bootstrap_tooltips from applications.reputation_ctx.models import (DBTYPE_CHOICES, HTTP_METHOD_CHOICES, HTTP_AUTH_TYPE_CHOICES, ReputationContext) @@ -37,7 +37,6 @@ # Logger configuration imports import logging - logging.config.dictConfig(settings.LOG_SETTINGS) logger = logging.getLogger('gui') @@ -67,6 +66,7 @@ class Meta: def __init__(self, *args, **kwargs): """ Initialize form and special attributes """ super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) for field_name in ['auth_type', 'verify_cert', 'post_data', 'user', 'password', 'tags']: self.fields[field_name].required = False # Set readonly if internal reputation context diff --git a/vulture_os/applications/templates/apps/backend_edit.html b/vulture_os/applications/templates/apps/backend_edit.html index f3ffccd20..bca79e587 100644 --- a/vulture_os/applications/templates/apps/backend_edit.html +++ b/vulture_os/applications/templates/apps/backend_edit.html @@ -481,10 +481,13 @@

{% translate "Form errors" %}

/* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* All events to refresh (re-apply) after a table is modified */ @@ -496,7 +499,13 @@

{% translate "Form errors" %}

}); /* Re-initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Re-initialize Tag-Editor events */ /* Try to destroy old tag-editor elements */ diff --git a/vulture_os/applications/templates/apps/logfwd_LogOMElasticSearch.html b/vulture_os/applications/templates/apps/logfwd_LogOMElasticSearch.html index 96e56c4b3..e85bc2fc1 100644 --- a/vulture_os/applications/templates/apps/logfwd_LogOMElasticSearch.html +++ b/vulture_os/applications/templates/apps/logfwd_LogOMElasticSearch.html @@ -361,14 +361,23 @@

Form errors

$(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); $('#id_data_stream_mode').on('change', function(event) { diff --git a/vulture_os/applications/templates/apps/logfwd_LogOMFWD.html b/vulture_os/applications/templates/apps/logfwd_LogOMFWD.html index c29485ca4..84f9c1109 100644 --- a/vulture_os/applications/templates/apps/logfwd_LogOMFWD.html +++ b/vulture_os/applications/templates/apps/logfwd_LogOMFWD.html @@ -338,14 +338,23 @@

Form errors

$(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); $('#id_enable_retry').on('change', function(e){ diff --git a/vulture_os/applications/templates/apps/logfwd_LogOMFile.html b/vulture_os/applications/templates/apps/logfwd_LogOMFile.html index 6fed46bcd..fce2a8da9 100644 --- a/vulture_os/applications/templates/apps/logfwd_LogOMFile.html +++ b/vulture_os/applications/templates/apps/logfwd_LogOMFile.html @@ -336,14 +336,23 @@

 {% translate "Local F $(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Show fields depending on chosen mode */ diff --git a/vulture_os/applications/templates/apps/logfwd_LogOMHIREDIS.html b/vulture_os/applications/templates/apps/logfwd_LogOMHIREDIS.html index e9c9ae70e..25df1c98b 100644 --- a/vulture_os/applications/templates/apps/logfwd_LogOMHIREDIS.html +++ b/vulture_os/applications/templates/apps/logfwd_LogOMHIREDIS.html @@ -394,14 +394,23 @@

Form errors

$(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Show fields depending on chosen mode */ diff --git a/vulture_os/applications/templates/apps/logfwd_LogOMKAFKA.html b/vulture_os/applications/templates/apps/logfwd_LogOMKAFKA.html index d6b9fd19e..a43a5198e 100644 --- a/vulture_os/applications/templates/apps/logfwd_LogOMKAFKA.html +++ b/vulture_os/applications/templates/apps/logfwd_LogOMKAFKA.html @@ -361,14 +361,23 @@

Form errors

$(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); $("#id_confParam").tagsinput(); diff --git a/vulture_os/applications/templates/apps/logfwd_LogOMMongoDB.html b/vulture_os/applications/templates/apps/logfwd_LogOMMongoDB.html index 4d386073d..779b406f2 100644 --- a/vulture_os/applications/templates/apps/logfwd_LogOMMongoDB.html +++ b/vulture_os/applications/templates/apps/logfwd_LogOMMongoDB.html @@ -326,14 +326,23 @@

 {% translate "MongoDB $(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Show fields depending on chosen mode */ diff --git a/vulture_os/applications/templates/apps/logfwd_LogOMRELP.html b/vulture_os/applications/templates/apps/logfwd_LogOMRELP.html index 7a50a143d..da6bc6210 100644 --- a/vulture_os/applications/templates/apps/logfwd_LogOMRELP.html +++ b/vulture_os/applications/templates/apps/logfwd_LogOMRELP.html @@ -317,14 +317,23 @@

Form errors

$(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Show or hide registration fields depending on enable_registration */ diff --git a/vulture_os/applications/templates/apps/parser_edit.html b/vulture_os/applications/templates/apps/parser_edit.html index 4db8c4850..fce075f19 100644 --- a/vulture_os/applications/templates/apps/parser_edit.html +++ b/vulture_os/applications/templates/apps/parser_edit.html @@ -151,10 +151,13 @@

{% translate "Form errors" %}

/* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); @@ -182,7 +185,13 @@

{% translate "Form errors" %}

$(this).parent().parent().remove(); }); /* Re-initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Re-initialize Tag-Editor events */ /* Try to destroy old tag-editor elements */ diff --git a/vulture_os/applications/templates/apps/reputation_ctx_edit.html b/vulture_os/applications/templates/apps/reputation_ctx_edit.html index 9a68d4156..6d9eb441f 100644 --- a/vulture_os/applications/templates/apps/reputation_ctx_edit.html +++ b/vulture_os/applications/templates/apps/reputation_ctx_edit.html @@ -272,10 +272,13 @@ /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); diff --git a/vulture_os/authentication/auth_access_control/form.py b/vulture_os/authentication/auth_access_control/form.py index 40c122f2d..0d02fefa2 100644 --- a/vulture_os/authentication/auth_access_control/form.py +++ b/vulture_os/authentication/auth_access_control/form.py @@ -24,6 +24,7 @@ from authentication.auth_access_control.models import AuthAccessControl from authentication.auth_access_control.models import OPERATOR_CHOICES +from gui.forms.form_utils import bootstrap_tooltips from django.conf import settings from django import forms import logging @@ -45,6 +46,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['rules'].required = False def clean(self): diff --git a/vulture_os/authentication/kerberos/form.py b/vulture_os/authentication/kerberos/form.py index f977fadc9..83d3bd213 100644 --- a/vulture_os/authentication/kerberos/form.py +++ b/vulture_os/authentication/kerberos/form.py @@ -28,6 +28,7 @@ # Django project imports from authentication.kerberos.models import KerberosRepository +from gui.forms.form_utils import bootstrap_tooltips from toolkit.auth.kerberos_client import test_keytab # Extern modules imports @@ -59,6 +60,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) def clean_keytab(self): """ Test keytab """ diff --git a/vulture_os/authentication/ldap/form.py b/vulture_os/authentication/ldap/form.py index 27f0809a4..d5b3f0706 100644 --- a/vulture_os/authentication/ldap/form.py +++ b/vulture_os/authentication/ldap/form.py @@ -31,6 +31,7 @@ # Django project imports from authentication.ldap.models import (LDAPRepository, LDAPCustomAttributeMapping, LDAP_ENC_SCHEMES_CHOICES, LDAP_PROTO_CHOICES, LDAP_SCOPES_CHOICES) +from gui.forms.form_utils import bootstrap_tooltips # Extern modules imports from re import match as re_match @@ -82,6 +83,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Remove the blank input generated by django for field_name in ['protocol', 'encryption_scheme', 'user_scope', 'group_scope']: self.fields[field_name].empty_label = None diff --git a/vulture_os/authentication/openid/form.py b/vulture_os/authentication/openid/form.py index f6b12a634..26a135619 100644 --- a/vulture_os/authentication/openid/form.py +++ b/vulture_os/authentication/openid/form.py @@ -29,6 +29,7 @@ # Django project imports from authentication.openid.models import OpenIDRepository, PROVIDERS_TYPE, JWT_SIG_ALG_CHOICES from authentication.user_scope.models import UserScope +from gui.forms.form_utils import bootstrap_tooltips # Extern modules imports from cryptography import x509 @@ -67,6 +68,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['user_scope'].queryset = UserScope.objects.all() self.fields['user_scope'].empty_label = "Retrieve all claims" # Remove the blank input generated by django diff --git a/vulture_os/authentication/otp/form.py b/vulture_os/authentication/otp/form.py index cebb29201..08a6df69a 100644 --- a/vulture_os/authentication/otp/form.py +++ b/vulture_os/authentication/otp/form.py @@ -28,6 +28,7 @@ from django.forms import ModelForm, NumberInput, Select, TextInput # Django project imports from authentication.otp.models import OTPRepository, OTP_TYPE, OTP_PHONE_SERVICE, OTP_MAIL_SERVICE +from gui.forms.form_utils import bootstrap_tooltips # Extern modules imports @@ -56,6 +57,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Remove the blank input generated by django for field_name in ['otp_type', 'otp_phone_service', 'otp_mail_service']: self.fields[field_name].empty_label = None diff --git a/vulture_os/authentication/portal_template/form.py b/vulture_os/authentication/portal_template/form.py index 929b80d92..048434e99 100644 --- a/vulture_os/authentication/portal_template/form.py +++ b/vulture_os/authentication/portal_template/form.py @@ -31,6 +31,7 @@ # Django project imports from authentication.portal_template.models import PortalTemplate +from gui.forms.form_utils import bootstrap_tooltips # Required exceptions imports @@ -114,6 +115,7 @@ class Meta: def __init__(self, *args, **kwargs): """ Initialize form and special attributes """ super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) class TemplateImageForm(Form): diff --git a/vulture_os/authentication/radius/form.py b/vulture_os/authentication/radius/form.py index 84913ea43..da88fcd6c 100644 --- a/vulture_os/authentication/radius/form.py +++ b/vulture_os/authentication/radius/form.py @@ -29,6 +29,7 @@ # Django project imports from authentication.radius.models import RadiusRepository +from gui.forms.form_utils import bootstrap_tooltips # Extern modules imports @@ -57,6 +58,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Remove the blank input generated by django if not self.initial.get('name'): self.fields['name'].initial = "RADIUS Repository" diff --git a/vulture_os/authentication/templates/authentication/access_control/edit.html b/vulture_os/authentication/templates/authentication/access_control/edit.html index f5fb80fbb..4f030f5c7 100644 --- a/vulture_os/authentication/templates/authentication/access_control/edit.html +++ b/vulture_os/authentication/templates/authentication/access_control/edit.html @@ -127,10 +127,13 @@

{% translate "Authentication Access control" %}

$(function() { /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Re-initialize select2 objects */ diff --git a/vulture_os/authentication/templates/authentication/kerberos_edit.html b/vulture_os/authentication/templates/authentication/kerberos_edit.html index 1f446d0ed..522ce7cab 100644 --- a/vulture_os/authentication/templates/authentication/kerberos_edit.html +++ b/vulture_os/authentication/templates/authentication/kerberos_edit.html @@ -193,14 +193,23 @@ } /* Initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); diff --git a/vulture_os/authentication/templates/authentication/ldap_edit.html b/vulture_os/authentication/templates/authentication/ldap_edit.html index d57ca5991..ae701cf09 100644 --- a/vulture_os/authentication/templates/authentication/ldap_edit.html +++ b/vulture_os/authentication/templates/authentication/ldap_edit.html @@ -541,14 +541,23 @@ } /* Initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); diff --git a/vulture_os/authentication/templates/authentication/openid_edit.html b/vulture_os/authentication/templates/authentication/openid_edit.html index ff1bae67b..19ac297cc 100644 --- a/vulture_os/authentication/templates/authentication/openid_edit.html +++ b/vulture_os/authentication/templates/authentication/openid_edit.html @@ -241,14 +241,23 @@ } /* Initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); diff --git a/vulture_os/authentication/templates/authentication/otp_edit.html b/vulture_os/authentication/templates/authentication/otp_edit.html index d4cdcdf15..b4a846df0 100644 --- a/vulture_os/authentication/templates/authentication/otp_edit.html +++ b/vulture_os/authentication/templates/authentication/otp_edit.html @@ -146,14 +146,23 @@

 {% translate "OTP Rep } /* Initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); diff --git a/vulture_os/authentication/templates/authentication/portal_template/edit.html b/vulture_os/authentication/templates/authentication/portal_template/edit.html index a7078048f..09d867403 100644 --- a/vulture_os/authentication/templates/authentication/portal_template/edit.html +++ b/vulture_os/authentication/templates/authentication/portal_template/edit.html @@ -193,10 +193,13 @@

{% translate "Portal templates" %}

/* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); @@ -224,7 +227,13 @@

{% translate "Portal templates" %}

$(this).parent().parent().remove(); }); /* Re-initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Re-initialize Tag-Editor events */ /* Try to destroy old tag-editor elements */ diff --git a/vulture_os/authentication/templates/authentication/radius_edit.html b/vulture_os/authentication/templates/authentication/radius_edit.html index aa0a611a4..0d1cda801 100644 --- a/vulture_os/authentication/templates/authentication/radius_edit.html +++ b/vulture_os/authentication/templates/authentication/radius_edit.html @@ -193,14 +193,23 @@ } /* Initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); diff --git a/vulture_os/authentication/templates/authentication/user_authentication_edit.html b/vulture_os/authentication/templates/authentication/user_authentication_edit.html index 1e80d6dff..f03aab542 100644 --- a/vulture_os/authentication/templates/authentication/user_authentication_edit.html +++ b/vulture_os/authentication/templates/authentication/user_authentication_edit.html @@ -769,10 +769,13 @@ /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); let enable_oauth_switch = new Switchery(document.querySelector("#id_enable_oauth")); @@ -1185,7 +1188,13 @@ }); /* Initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); //}); // end of function() diff --git a/vulture_os/authentication/templates/authentication/user_scope_edit.html b/vulture_os/authentication/templates/authentication/user_scope_edit.html index 8d9e3098d..edb358345 100644 --- a/vulture_os/authentication/templates/authentication/user_scope_edit.html +++ b/vulture_os/authentication/templates/authentication/user_scope_edit.html @@ -158,10 +158,13 @@

 {% translate "User's /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); function handle_form_errors(data){ @@ -257,7 +260,13 @@

 {% translate "User's /* Initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); //}); // end of function() diff --git a/vulture_os/authentication/user_portal/form.py b/vulture_os/authentication/user_portal/form.py index df9eea92c..c5cc4af70 100644 --- a/vulture_os/authentication/user_portal/form.py +++ b/vulture_os/authentication/user_portal/form.py @@ -36,6 +36,7 @@ from authentication.otp.models import OTPRepository from authentication.user_portal.models import (AUTH_TYPE_CHOICES, SSO_TYPE_CHOICES, SSO_CONTENT_TYPE_CHOICES, UserAuthentication) from authentication.user_scope.models import UserScope +from gui.forms.form_utils import bootstrap_tooltips from system.pki.models import PROTOCOL_CHOICES as TLS_PROTOCOL_CHOICES, X509Certificate from services.frontend.models import Frontend @@ -159,6 +160,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Remove the blank input generated by django for field_name in ['portal_template', 'repositories', 'auth_type', 'sso_forward_type']: self.fields[field_name].empty_label = None diff --git a/vulture_os/authentication/user_scope/form.py b/vulture_os/authentication/user_scope/form.py index 994980237..531229927 100644 --- a/vulture_os/authentication/user_scope/form.py +++ b/vulture_os/authentication/user_scope/form.py @@ -29,7 +29,7 @@ # Django project imports from authentication.user_scope.models import UserScope -from gui.forms.form_utils import NoValidationField +from gui.forms.form_utils import NoValidationField, bootstrap_tooltips # Extern modules imports @@ -56,3 +56,4 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) diff --git a/vulture_os/authentication/user_scope/models.py b/vulture_os/authentication/user_scope/models.py index 76e07099e..8bc2a886d 100644 --- a/vulture_os/authentication/user_scope/models.py +++ b/vulture_os/authentication/user_scope/models.py @@ -26,11 +26,12 @@ from django.conf import settings from django.utils.translation import gettext_lazy as _ from django.forms.models import model_to_dict +from django.forms import (ModelForm, Select, + TextInput) from djongo import models # Django project imports -from django.forms import (ModelForm, Select, - TextInput) +from gui.forms.form_utils import bootstrap_tooltips # Extern modules imports from bson import ObjectId @@ -217,6 +218,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Remove the blank input generated by django for field_name in ['condition_var_kind', 'condition_criterion', 'action_var_kind', 'assignator']: self.fields[field_name].empty_label = None diff --git a/vulture_os/darwin/access_control/form.py b/vulture_os/darwin/access_control/form.py index 9df2e4958..c9b34d4a0 100644 --- a/vulture_os/darwin/access_control/form.py +++ b/vulture_os/darwin/access_control/form.py @@ -25,6 +25,7 @@ from darwin.access_control.models import (AccessControl, CRITERION_CHOICES, CONVERTER_CHOICES, OPERATOR_CHOICES, FLAGS_CHOICES) +from gui.forms.form_utils import bootstrap_tooltips from django.conf import settings from django import forms import logging @@ -45,6 +46,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) for field_name in ['acls', 'rules']: self.fields[field_name].required = False diff --git a/vulture_os/darwin/templates/access_control_edit.html b/vulture_os/darwin/templates/access_control_edit.html index 981256922..52c93d1d9 100644 --- a/vulture_os/darwin/templates/access_control_edit.html +++ b/vulture_os/darwin/templates/access_control_edit.html @@ -179,10 +179,13 @@

{% translate "Access control" %}

$(function() { /* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Re-initialize select2 objects */ diff --git a/vulture_os/gui/static/js/application.js b/vulture_os/gui/static/js/application.js index ddd4a197f..25039f78b 100644 --- a/vulture_os/gui/static/js/application.js +++ b/vulture_os/gui/static/js/application.js @@ -19,6 +19,9 @@ function init_application_form(btn, html, app_id){ elems.forEach(function(elem) { var switchery = new Switchery(elem); + if (elem.attributes['data-original-title']) { + $(elem.nextElementSibling).tooltip({title: elem.attributes['data-original-title'].value, placement: "bottom"}); + } }); $('.tagsinput').tagsinput(); diff --git a/vulture_os/gui/static/js/listener.js b/vulture_os/gui/static/js/listener.js index 75221a75a..11771a72d 100644 --- a/vulture_os/gui/static/js/listener.js +++ b/vulture_os/gui/static/js/listener.js @@ -169,7 +169,13 @@ $(function() { }); /* Re-initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Re-initialize Tag-Editor events */ /* Try to destroy old tag-editor elements */ @@ -882,6 +888,9 @@ $(function(){ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); elems.forEach(function(html) { var switchery = new Switchery(html); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); redrawSwitch('id_enable_logging'); redrawSwitch('id_redis_use_local'); diff --git a/vulture_os/gui/static/js/pki.js b/vulture_os/gui/static/js/pki.js index 008197687..9d64caa46 100644 --- a/vulture_os/gui/static/js/pki.js +++ b/vulture_os/gui/static/js/pki.js @@ -19,6 +19,9 @@ function init_pki_form(btn, html, pki_id){ elems.forEach(function(elem) { var switchery = new Switchery(elem); + if (elem.attributes['data-original-title']) { + $(elem.nextElementSibling).tooltip({title: elem.attributes['data-original-title'].value, placement: "bottom"}); + } }); $('.tagsinput').tagsinput(); diff --git a/vulture_os/services/frontend/form.py b/vulture_os/services/frontend/form.py index 1c3cad80d..c00a42de5 100644 --- a/vulture_os/services/frontend/form.py +++ b/vulture_os/services/frontend/form.py @@ -23,7 +23,6 @@ __doc__ = 'Frontends & Listeners dedicated form classes' # Django system imports -import ast from django.conf import settings from django.core.validators import RegexValidator from django.forms import (BooleanField, CharField, CheckboxInput, ChoiceField, ModelChoiceField, ModelMultipleChoiceField, Form, @@ -34,7 +33,7 @@ from applications.logfwd.models import LogOM from applications.reputation_ctx.models import ReputationContext from darwin.policy.models import DarwinPolicy -from gui.forms.form_utils import NoValidationField +from gui.forms.form_utils import NoValidationField, bootstrap_tooltips from services.frontend.models import (Frontend, FrontendReputationContext, Listener, COMPRESSION_ALGO_CHOICES, LISTENING_MODE_CHOICES, LOG_LEVEL_CHOICES, MODE_CHOICES, DARWIN_MODE_CHOICES, REDIS_MODE_CHOICES, REDIS_STARTID_CHOICES, @@ -43,13 +42,12 @@ from services.rsyslogd.form import RsyslogQueueForm from services.rsyslogd.rsyslog import JINJA_PATH as JINJA_RSYSLOG_PATH -from system.cluster.models import NetworkAddress +from system.cluster.models import Node, NetworkAddress from system.error_templates.models import ErrorTemplate -from toolkit.api_parser.utils import get_available_api_parser -from toolkit.network.network import parse_proxy_url from system.pki.models import TLSProfile, X509Certificate -from system.cluster.models import Node from system.tenants.models import Tenants +from toolkit.api_parser.utils import get_available_api_parser +from toolkit.network.network import parse_proxy_url # Required exceptions imports from django.core.exceptions import ObjectDoesNotExist @@ -77,10 +75,10 @@ class Meta: fields = ("enabled", "reputation_ctx", "arg_field", "dst_field") widgets = { - 'enabled': CheckboxInput(attrs={'class': "form-control js-switch"}), - 'reputation_ctx': Select(attrs={'class': "form-control select2"}), - 'arg_field': TextInput(attrs={'class': "form-control", 'placeholder': "src_ip"}), - 'dst_field': TextInput(attrs={'class': "form-control", 'placeholder': "src_reputation"}) + 'enabled': CheckboxInput(attrs={'class': 'form-control js-switch'}), + 'reputation_ctx': Select(attrs={'class': 'form-control select2'}), + 'arg_field': TextInput(attrs={'class': 'form-control', 'placeholder': 'src_ip'}), + 'dst_field': TextInput(attrs={'class': 'form-control', 'placeholder': 'src_reputation'}) } def __init__(self, *args, **kwargs): @@ -88,6 +86,7 @@ def __init__(self, *args, **kwargs): # Do not set id of html fields, that causes issues in JS/JQuery kwargs['auto_id'] = False super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['reputation_ctx'].empty_label = None def as_table_headers(self): @@ -129,6 +128,7 @@ class FrontendForm(RsyslogQueueForm, ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) AVAILABLE_API_PARSER = [("", "--------")] AVAILABLE_API_PARSER.extend([(parser, parser.upper().replace('_', ' ')) @@ -223,43 +223,43 @@ def __init__(self, *args, **kwargs): 'redis_mode', 'redis_use_lpop', 'redis_server', 'redis_port', 'tls_profile', 'redis_key', 'redis_password', 'node', 'darwin_mode', 'api_parser_type', 'api_parser_use_proxy', 'api_parser_custom_proxy', 'api_parser_verify_ssl', 'api_parser_custom_certificate', - 'forcepoint_host', 'forcepoint_username', 'forcepoint_password', "symantec_username", "symantec_password", - "aws_access_key_id", "aws_secret_access_key", "aws_bucket_name", "akamai_host", - "akamai_client_secret", "akamai_access_token", "akamai_client_token", 'akamai_config_id', + 'forcepoint_host', 'forcepoint_username', 'forcepoint_password', 'symantec_username', 'symantec_password', + 'aws_access_key_id', 'aws_secret_access_key', 'aws_bucket_name', 'akamai_host', + 'akamai_client_secret', 'akamai_access_token', 'akamai_client_token', 'akamai_config_id', 'office365_tenant_id', 'office365_client_id', 'office365_client_secret', 'imperva_base_url', 'imperva_api_key', 'imperva_api_id', 'imperva_private_key', 'reachfive_host', 'reachfive_client_id', 'reachfive_client_secret', 'mongodb_api_user', 'mongodb_api_password', 'mongodb_api_group_id', - "mdatp_api_tenant", "mdatp_api_appid", "mdatp_api_secret", - "cortex_xdr_host", "cortex_xdr_apikey_id", "cortex_xdr_apikey", "cortex_xdr_advanced_token", - "cybereason_host", "cybereason_username", "cybereason_password", - "cisco_meraki_apikey", "cisco_meraki_get_security_logs", "cisco_meraki_get_configuration_changes_logs", + 'mdatp_api_tenant', 'mdatp_api_appid', 'mdatp_api_secret', + 'cortex_xdr_host', 'cortex_xdr_apikey_id', 'cortex_xdr_apikey', 'cortex_xdr_advanced_token', + 'cybereason_host', 'cybereason_username', 'cybereason_password', + 'cisco_meraki_apikey', 'cisco_meraki_get_security_logs', 'cisco_meraki_get_configuration_changes_logs', 'proofpoint_tap_host', 'proofpoint_tap_endpoint', 'proofpoint_tap_principal', - "carbon_black_host", 'carbon_black_orgkey', 'carbon_black_apikey', - "netskope_host", 'netskope_apikey', 'netskope_get_page_logs', 'netskope_get_network_logs', 'netskope_get_application_logs', + 'carbon_black_host', 'carbon_black_orgkey', 'carbon_black_apikey', + 'netskope_host', 'netskope_apikey', 'netskope_get_page_logs', 'netskope_get_network_logs', 'netskope_get_application_logs', 'rapid7_idr_host', 'rapid7_idr_apikey', 'harfanglab_host', 'harfanglab_apikey', 'nozomi_probe_host', 'nozomi_probe_login', 'nozomi_probe_password', 'vadesecure_host', 'vadesecure_login', 'vadesecure_password', 'defender_token_endpoint', 'defender_client_id', 'defender_client_secret', 'proofpoint_tap_secret', 'sentinel_one_host', 'sentinel_one_apikey', 'sentinel_one_account_type', - 'crowdstrike_request_incidents','crowdstrike_host','crowdstrike_client_id','crowdstrike_client_secret','crowdstrike_client', - 'vadesecure_o365_host','vadesecure_o365_tenant','vadesecure_o365_client_id', + 'crowdstrike_request_incidents', 'crowdstrike_host', 'crowdstrike_client_id', 'crowdstrike_client_secret', 'crowdstrike_client', + 'vadesecure_o365_host', 'vadesecure_o365_tenant', 'vadesecure_o365_client_id', 'vadesecure_o365_client_secret', - 'blackberry_cylance_host','blackberry_cylance_tenant','blackberry_cylance_app_id', + 'blackberry_cylance_host', 'blackberry_cylance_tenant', 'blackberry_cylance_app_id', 'blackberry_cylance_app_secret', 'ms_sentinel_tenant_id', 'ms_sentinel_appid', 'ms_sentinel_appsecret', 'sentinel_one_singularity_mobile_host', 'sentinel_one_singularity_mobile_client_id', 'sentinel_one_singularity_mobile_client_secret', 'ms_sentinel_subscription_id', 'ms_sentinel_resource_group', 'ms_sentinel_workspace', 'proofpoint_pod_uri', 'proofpoint_pod_cluster_id', 'proofpoint_pod_token', - 'waf_cloudflare_apikey','waf_cloudflare_zoneid', + 'waf_cloudflare_apikey', 'waf_cloudflare_zoneid', 'gsuite_alertcenter_json_conf', 'gsuite_alertcenter_admin_mail', 'sophos_cloud_client_id', 'sophos_cloud_client_secret', 'sophos_cloud_tenant_id', 'trendmicro_worryfree_access_token', 'trendmicro_worryfree_secret_key', 'trendmicro_worryfree_server_name', 'trendmicro_worryfree_server_port', 'safenet_tenant_code', 'safenet_apikey', 'signalsciences_ngwaf_email', 'signalsciences_ngwaf_token', 'signalsciences_ngwaf_corp_name', 'signalsciences_ngwaf_site_name', - 'proofpoint_casb_api_key','proofpoint_casb_client_id','proofpoint_casb_client_secret', + 'proofpoint_casb_api_key', 'proofpoint_casb_client_id', 'proofpoint_casb_client_secret', 'proofpoint_trap_host', 'proofpoint_trap_apikey', 'waf_cloud_protector_host', 'waf_cloud_protector_api_key_pub', 'waf_cloud_protector_api_key_priv', 'waf_cloud_protector_provider', 'waf_cloud_protector_tenant', 'waf_cloud_protector_servers', @@ -272,21 +272,23 @@ def __init__(self, *args, **kwargs): 'gatewatcher_alerts_host', 'gatewatcher_alerts_api_key', 'cisco_umbrella_client_id', 'cisco_umbrella_secret_key', 'waf_barracuda_token', - "beyondtrust_pra_client_id", "beyondtrust_pra_secret", "beyondtrust_pra_host", - "lockself_x_auth_token", "lockself_x_ls_token", "lockself_host", "lockself_organization_id", - "cisco_umbrella_managed_org_api_key", "cisco_umbrella_managed_org_secret_key", "cisco_umbrella_managed_org_customers_id", - "cisco_umbrella_managed_org_get_dns", "cisco_umbrella_managed_org_get_proxy", - "catonetworks_account_id", "catonetworks_api_key", - "infoblox_threat_defense_host", "infoblox_threat_defense_token", - "beyondtrust_reportings_client_id", "beyondtrust_reportings_secret", "beyondtrust_reportings_host", - "beyondtrust_reportings_get_team_logs", "beyondtrust_reportings_get_access_session_logs", "beyondtrust_reportings_get_vault_account_activity_logs", "beyondtrust_reportings_get_support_session_logs", - "varonis_host", "varonis_api_key", - "armis_centrix_host", "armis_centrix_secretkey", "armis_centrix_get_activity_logs", - "perception_point_x_ray_host", "perception_point_x_ray_token", "perception_point_x_ray_organization_id", "perception_point_x_ray_environment_id", "perception_point_x_ray_case_types", - "extrahop_host", "extrahop_id", "extrahop_secret", - "hornetsecurity_app_id", "hornetsecurity_token", - "ubika_base_refresh_token", "ubika_namespaces", - "sentinel_one_graph_token", "sentinel_one_graph_console_url", + 'beyondtrust_pra_client_id', 'beyondtrust_pra_secret', 'beyondtrust_pra_host', + 'lockself_x_auth_token', 'lockself_x_ls_token', 'lockself_host', 'lockself_organization_id', + 'cisco_umbrella_managed_org_api_key', 'cisco_umbrella_managed_org_secret_key', 'cisco_umbrella_managed_org_customers_id', + 'cisco_umbrella_managed_org_get_dns', 'cisco_umbrella_managed_org_get_proxy', + 'catonetworks_account_id', 'catonetworks_api_key', + 'infoblox_threat_defense_host', 'infoblox_threat_defense_token', + 'beyondtrust_reportings_client_id', 'beyondtrust_reportings_secret', 'beyondtrust_reportings_host', + 'beyondtrust_reportings_get_team_logs', 'beyondtrust_reportings_get_access_session_logs', + 'beyondtrust_reportings_get_vault_account_activity_logs', 'beyondtrust_reportings_get_support_session_logs', + 'varonis_host', 'varonis_api_key', + 'armis_centrix_host', 'armis_centrix_secretkey', 'armis_centrix_get_activity_logs', + 'perception_point_x_ray_host', 'perception_point_x_ray_token', 'perception_point_x_ray_organization_id', + 'perception_point_x_ray_environment_id', 'perception_point_x_ray_case_types', + 'extrahop_host', 'extrahop_id', 'extrahop_secret', + 'hornetsecurity_app_id', 'hornetsecurity_token', + 'ubika_base_refresh_token', 'ubika_namespaces', + 'sentinel_one_graph_token', 'sentinel_one_graph_console_url', 'messagetrace_o365_tenant_id', 'messagetrace_o365_client_id', 'messagetrace_o365_client_secret', 'cnapp_wiz_client_id', 'cnapp_wiz_client_secret', 'cnapp_wiz_api_url', ]: @@ -350,31 +352,31 @@ class Meta: 'node', 'darwin_policies', 'darwin_mode', 'api_parser_type', 'api_parser_use_proxy', 'api_parser_custom_proxy', 'api_parser_verify_ssl', 'api_parser_custom_certificate', 'forcepoint_host', 'forcepoint_username', 'forcepoint_password', - "symantec_username", "symantec_password", - "aws_access_key_id", "aws_secret_access_key", "aws_bucket_name", - "akamai_host", "akamai_client_secret", "akamai_access_token", "akamai_client_token", 'akamai_config_id', + 'symantec_username', 'symantec_password', + 'aws_access_key_id', 'aws_secret_access_key', 'aws_bucket_name', + 'akamai_host', 'akamai_client_secret', 'akamai_access_token', 'akamai_client_token', 'akamai_config_id', 'office365_tenant_id', 'office365_client_id', 'office365_client_secret', 'imperva_base_url', 'imperva_api_key', 'imperva_api_id', 'imperva_private_key', 'reachfive_host', 'reachfive_client_id', 'reachfive_client_secret', 'mongodb_api_user', 'mongodb_api_password', 'mongodb_api_group_id', - "mdatp_api_tenant", "mdatp_api_appid", "mdatp_api_secret", - "cortex_xdr_host", "cortex_xdr_apikey_id", "cortex_xdr_apikey", "cortex_xdr_advanced_token", - "cybereason_host", "cybereason_username", "cybereason_password", - "cisco_meraki_apikey", "cisco_meraki_get_security_logs", "cisco_meraki_get_configuration_changes_logs", + 'mdatp_api_tenant', 'mdatp_api_appid', 'mdatp_api_secret', + 'cortex_xdr_host', 'cortex_xdr_apikey_id', 'cortex_xdr_apikey', 'cortex_xdr_advanced_token', + 'cybereason_host', 'cybereason_username', 'cybereason_password', + 'cisco_meraki_apikey', 'cisco_meraki_get_security_logs', 'cisco_meraki_get_configuration_changes_logs', 'proofpoint_tap_host', 'proofpoint_tap_endpoint', 'proofpoint_tap_principal', - "proofpoint_tap_secret", - "sentinel_one_host", "sentinel_one_apikey", "sentinel_one_account_type", + 'proofpoint_tap_secret', + 'sentinel_one_host', 'sentinel_one_apikey', 'sentinel_one_account_type', 'netskope_host', 'netskope_apikey', 'netskope_get_page_logs', 'netskope_get_network_logs', 'netskope_get_application_logs', 'rapid7_idr_host', 'rapid7_idr_apikey', 'harfanglab_host', 'harfanglab_apikey', 'nozomi_probe_host', 'nozomi_probe_login', 'nozomi_probe_password', 'vadesecure_host', 'vadesecure_login', 'vadesecure_password', - "carbon_black_host", "carbon_black_orgkey", "carbon_black_apikey", + 'carbon_black_host', 'carbon_black_orgkey', 'carbon_black_apikey', 'defender_token_endpoint', 'defender_client_id', 'defender_client_secret', - 'crowdstrike_request_incidents','crowdstrike_host','crowdstrike_client_id','crowdstrike_client_secret','crowdstrike_client', - 'vadesecure_o365_host','vadesecure_o365_tenant','vadesecure_o365_client_id', + 'crowdstrike_request_incidents', 'crowdstrike_host', 'crowdstrike_client_id', 'crowdstrike_client_secret', 'crowdstrike_client', + 'vadesecure_o365_host', 'vadesecure_o365_tenant', 'vadesecure_o365_client_id', 'vadesecure_o365_client_secret', - 'blackberry_cylance_host','blackberry_cylance_tenant','blackberry_cylance_app_id', + 'blackberry_cylance_host', 'blackberry_cylance_tenant', 'blackberry_cylance_app_id', 'blackberry_cylance_app_secret', 'ms_sentinel_tenant_id', 'ms_sentinel_appid', 'ms_sentinel_appsecret', 'ms_sentinel_subscription_id', 'ms_sentinel_resource_group', 'ms_sentinel_workspace', @@ -387,7 +389,7 @@ class Meta: 'trendmicro_worryfree_access_token', 'trendmicro_worryfree_secret_key', 'trendmicro_worryfree_server_name', 'trendmicro_worryfree_server_port', 'safenet_tenant_code', 'safenet_apikey', 'signalsciences_ngwaf_email', 'signalsciences_ngwaf_token', 'signalsciences_ngwaf_corp_name', 'signalsciences_ngwaf_site_name', - 'proofpoint_casb_api_key','proofpoint_casb_client_id','proofpoint_casb_client_secret', + 'proofpoint_casb_api_key', 'proofpoint_casb_client_id', 'proofpoint_casb_client_secret', 'proofpoint_trap_host', 'proofpoint_trap_apikey', 'waf_cloud_protector_host', 'waf_cloud_protector_api_key_pub', 'waf_cloud_protector_api_key_priv', 'waf_cloud_protector_provider', 'waf_cloud_protector_tenant', 'waf_cloud_protector_servers', @@ -400,35 +402,35 @@ class Meta: 'gatewatcher_alerts_host', 'gatewatcher_alerts_api_key', 'cisco_umbrella_client_id', 'cisco_umbrella_secret_key', 'waf_barracuda_token', - "beyondtrust_pra_client_id", "beyondtrust_pra_secret", "beyondtrust_pra_host", + 'beyondtrust_pra_client_id', 'beyondtrust_pra_secret', 'beyondtrust_pra_host', 'lockself_x_auth_token', 'lockself_x_ls_token', 'lockself_host', 'lockself_organization_id', 'cisco_umbrella_managed_org_api_key', 'cisco_umbrella_managed_org_secret_key', 'cisco_umbrella_managed_org_customers_id', 'cisco_umbrella_managed_org_get_dns', 'cisco_umbrella_managed_org_get_proxy', 'catonetworks_api_key', 'catonetworks_account_id', - "infoblox_threat_defense_host", "infoblox_threat_defense_token", - "beyondtrust_reportings_client_id", "beyondtrust_reportings_secret", "beyondtrust_reportings_host", - "beyondtrust_reportings_get_team_logs", "beyondtrust_reportings_get_access_session_logs", - "beyondtrust_reportings_get_vault_account_activity_logs", - "beyondtrust_reportings_get_support_session_logs", - "varonis_host", "varonis_api_key", - "armis_centrix_host", "armis_centrix_secretkey", "armis_centrix_get_activity_logs", - "perception_point_x_ray_host", "perception_point_x_ray_token", "perception_point_x_ray_organization_id", "perception_point_x_ray_environment_id", "perception_point_x_ray_case_types", - "extrahop_host", "extrahop_id", "extrahop_secret", - "hornetsecurity_app_id", "hornetsecurity_token", - "ubika_base_refresh_token", "ubika_namespaces", - "sentinel_one_graph_token", "sentinel_one_graph_console_url", + 'infoblox_threat_defense_host', 'infoblox_threat_defense_token', + 'beyondtrust_reportings_client_id', 'beyondtrust_reportings_secret', 'beyondtrust_reportings_host', + 'beyondtrust_reportings_get_team_logs', 'beyondtrust_reportings_get_access_session_logs', + 'beyondtrust_reportings_get_vault_account_activity_logs', 'beyondtrust_reportings_get_support_session_logs', + 'varonis_host', 'varonis_api_key', + 'armis_centrix_host', 'armis_centrix_secretkey', 'armis_centrix_get_activity_logs', + 'perception_point_x_ray_host', 'perception_point_x_ray_token', 'perception_point_x_ray_organization_id', + 'perception_point_x_ray_environment_id', 'perception_point_x_ray_case_types', + 'extrahop_host', 'extrahop_id', 'extrahop_secret', + 'hornetsecurity_app_id', 'hornetsecurity_token', + 'ubika_base_refresh_token', 'ubika_namespaces', + 'sentinel_one_graph_token', 'sentinel_one_graph_console_url', 'messagetrace_o365_tenant_id', 'messagetrace_o365_client_id', 'messagetrace_o365_client_secret', 'cnapp_wiz_client_id', 'cnapp_wiz_client_secret', 'cnapp_wiz_api_url', ] + RsyslogQueueForm.Meta.fields widgets = { - 'enabled': CheckboxInput(attrs={'class': "js-switch"}), + 'enabled': CheckboxInput(attrs={'class': 'js-switch'}), 'name': TextInput(attrs={'class': 'form-control'}), - 'tags': TextInput(attrs={'class': 'form-control', 'data-role': "tagsinput"}), + 'tags': TextInput(attrs={'class': 'form-control', 'data-role': 'tagsinput'}), 'mode': Select(choices=MODE_CHOICES, attrs={'class': 'form-control select2'}), 'enable_logging': CheckboxInput({'class': 'js-switch'}), # do not set js-switch - 'tenants_config': Select(choices=Tenants.objects.all(), attrs={'class': "form-control select2"}), - 'enable_logging_reputation': CheckboxInput(attrs={'class': "js-switch"}), + 'tenants_config': Select(choices=Tenants.objects.all(), attrs={'class': 'form-control select2'}), + 'enable_logging_reputation': CheckboxInput(attrs={'class': 'js-switch'}), 'log_level': Select(choices=LOG_LEVEL_CHOICES, attrs={'class': 'form-control select2'}), 'darwin_mode': Select(choices=DARWIN_MODE_CHOICES, attrs={'class': 'form-control select2'}), 'log_condition': Textarea(attrs={'class': 'form-control'}), @@ -437,17 +439,17 @@ class Meta: 'filebeat_listening_mode': Select(choices=FILEBEAT_LISTENING_MODE, attrs={'class': 'form-control select2'}), 'filebeat_module': Select(choices=FILEBEAT_MODULE_LIST, attrs={'class': 'form-control select2'}), 'filebeat_config': Textarea(attrs={'class': 'form-control'}), - 'disable_octet_counting_framing': CheckboxInput(attrs={'class': " js-switch"}), + 'disable_octet_counting_framing': CheckboxInput(attrs={'class': 'js-switch'}), 'custom_tl_frame_delimiter': NumberInput(attrs={'class': 'form-control'}), 'custom_actions': HiddenInput(), 'custom_haproxy_conf': Textarea(attrs={'class': 'form-control'}), - 'enable_cache': CheckboxInput(attrs={'class': " js-switch"}), + 'enable_cache': CheckboxInput(attrs={'class': 'js-switch'}), 'cache_total_max_size': NumberInput(attrs={'class': 'form-control'}), 'cache_max_age': NumberInput(attrs={'class': 'form-control'}), - 'enable_compression': CheckboxInput(attrs={'class': " js-switch"}), + 'enable_compression': CheckboxInput(attrs={'class': 'js-switch'}), 'compression_algos': SelectMultiple(choices=COMPRESSION_ALGO_CHOICES, - attrs={'class': "form-control select2"}), - 'compression_mime_types': TextInput(attrs={'class': 'form-control', 'data-role': "tagsinput"}), + attrs={'class': 'form-control select2'}), + 'compression_mime_types': TextInput(attrs={'class': 'form-control', 'data-role': 'tagsinput'}), 'error_template': Select(choices=ErrorTemplate.objects.all(), attrs={'class': 'form-control select2'}), 'timeout_client': NumberInput(attrs={'class': 'form-control'}), 'timeout_keep_alive': NumberInput(attrs={'class': 'form-control'}), @@ -457,7 +459,7 @@ class Meta: 'ratelimit_burst': NumberInput(attrs={'class': 'form-control'}), 'expected_timezone': Select(choices=get_available_timezones(), attrs={'class': 'form-control select2'}), 'file_path': TextInput(attrs={'class': 'form-control'}), - 'kafka_brokers': TextInput(attrs={'class': 'form-control', 'data-role': "tagsinput"}), + 'kafka_brokers': TextInput(attrs={'class': 'form-control', 'data-role': 'tagsinput'}), 'kafka_topic': TextInput(attrs={'class': 'form-control'}), 'kafka_consumer_group': TextInput(attrs={'class': 'form-control'}), 'kafka_options': TextInput(attrs={'class': 'form-control'}), @@ -478,11 +480,11 @@ class Meta: 'api_parser_use_proxy': CheckboxInput(attrs={'class': 'js-switch'}), 'api_parser_custom_proxy': TextInput(attrs={'class': 'form-control'}), 'api_parser_verify_ssl': CheckboxInput(attrs={'class': 'js-switch'}), - 'api_parser_custom_certificate': Select(choices=X509Certificate.objects.all(), attrs={'class': "form-control select2"}), + 'api_parser_custom_certificate': Select(choices=X509Certificate.objects.all(), attrs={'class': 'form-control select2'}), 'forcepoint_username': TextInput(attrs={'class': 'form-control'}), 'forcepoint_password': TextInput(attrs={'class': 'form-control'}), 'symantec_username': TextInput(attrs={'class': 'form-control'}), - 'symantec_password': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'symantec_password': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'aws_access_key_id': TextInput(attrs={'class': 'form-control'}), 'aws_secret_access_key': TextInput(attrs={'class': 'form-control'}), 'aws_bucket_name': Select(attrs={'class': 'form-control select2'}), @@ -500,35 +502,35 @@ class Meta: 'imperva_private_key': Textarea(attrs={'class': 'form-control'}), 'reachfive_host': TextInput(attrs={'class': 'form-control'}), 'reachfive_client_id': TextInput(attrs={'class': 'form-control'}), - 'reachfive_client_secret': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'reachfive_client_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'mongodb_api_user': TextInput(attrs={'class': 'form-control'}), - 'mongodb_api_password': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'mongodb_api_password': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'mongodb_api_group_id': TextInput(attrs={'class': 'form-control'}), 'mdatp_api_tenant': TextInput(attrs={'class': 'form-control'}), 'mdatp_api_appid': TextInput(attrs={'class': 'form-control'}), - 'mdatp_api_secret': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'mdatp_api_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'cortex_xdr_host': TextInput(attrs={'class': 'form-control'}), 'cortex_xdr_apikey_id': TextInput(attrs={'class': 'form-control'}), 'cortex_xdr_apikey': TextInput(attrs={'class': 'form-control'}), - 'cortex_xdr_advanced_token': CheckboxInput(attrs={'class': "js-switch"}), + 'cortex_xdr_advanced_token': CheckboxInput(attrs={'class': 'js-switch'}), 'cybereason_host': TextInput(attrs={'class': 'form-control'}), 'cybereason_username': TextInput(attrs={'class': 'form-control'}), - 'cybereason_password': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'cybereason_password': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'cisco_meraki_apikey': TextInput(attrs={'class': 'form-control'}), 'cisco_meraki_get_security_logs': CheckboxInput(attrs={'class': 'js-switch'}), 'cisco_meraki_get_configuration_changes_logs': CheckboxInput(attrs={'class': 'js-switch'}), 'proofpoint_tap_host': TextInput(attrs={'class': 'form-control'}), 'proofpoint_tap_endpoint': Select(attrs={'class': 'form-control select2'}), 'proofpoint_tap_principal': TextInput(attrs={'class': 'form-control'}), - 'proofpoint_tap_secret': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'proofpoint_tap_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'sentinel_one_host': TextInput(attrs={'class': 'form-control'}), 'sentinel_one_apikey': TextInput(attrs={'class': 'form-control'}), 'sentinel_one_account_type': Select(choices=SENTINEL_ONE_ACCOUNT_TYPE_CHOICES, attrs={'class': 'form-control select2'}), 'netskope_host': TextInput(attrs={'class': 'form-control'}), 'netskope_apikey': TextInput(attrs={'class': 'form-control'}), - 'netskope_get_page_logs': CheckboxInput(attrs={'class': "js-switch"}), - 'netskope_get_network_logs': CheckboxInput(attrs={'class': "js-switch"}), - 'netskope_get_application_logs': CheckboxInput(attrs={'class': "js-switch"}), + 'netskope_get_page_logs': CheckboxInput(attrs={'class': 'js-switch'}), + 'netskope_get_network_logs': CheckboxInput(attrs={'class': 'js-switch'}), + 'netskope_get_application_logs': CheckboxInput(attrs={'class': 'js-switch'}), 'carbon_black_host': TextInput(attrs={'class': 'form-control'}), 'carbon_black_orgkey': TextInput(attrs={'class': 'form-control'}), 'carbon_black_apikey': TextInput(attrs={'class': 'form-control'}), @@ -538,38 +540,38 @@ class Meta: 'harfanglab_apikey': TextInput(attrs={'class': 'form-control'}), 'nozomi_probe_host': TextInput(attrs={'class': 'form-control'}), 'nozomi_probe_login': TextInput(attrs={'class': 'form-control'}), - 'nozomi_probe_password': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'nozomi_probe_password': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'vadesecure_host': TextInput(attrs={'class': 'form-control'}), 'vadesecure_login': TextInput(attrs={'class': 'form-control'}), - 'vadesecure_password': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'vadesecure_password': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'defender_token_endpoint': TextInput(attrs={'class': 'form-control'}), 'defender_client_id': TextInput(attrs={'class': 'form-control'}), - 'defender_client_secret': TextInput(attrs={'type': "password", 'class': 'form-control'}), - 'crowdstrike_request_incidents': CheckboxInput(attrs={'class': "js-switch"}), + 'defender_client_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), + 'crowdstrike_request_incidents': CheckboxInput(attrs={'class': 'js-switch'}), 'crowdstrike_host': TextInput(attrs={'class': 'form-control'}), 'crowdstrike_client_id': TextInput(attrs={'class': 'form-control'}), - 'crowdstrike_client_secret': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'crowdstrike_client_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'crowdstrike_client': TextInput(attrs={'class': 'form-control'}), 'vadesecure_o365_host': TextInput(attrs={'class': 'form-control'}), 'vadesecure_o365_tenant': TextInput(attrs={'class': 'form-control'}), 'vadesecure_o365_client_id': TextInput(attrs={'class': 'form-control'}), - 'vadesecure_o365_client_secret': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'vadesecure_o365_client_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'blackberry_cylance_host': TextInput(attrs={'class': 'form-control'}), 'blackberry_cylance_tenant': TextInput(attrs={'class': 'form-control'}), 'blackberry_cylance_app_id': TextInput(attrs={'class': 'form-control'}), - 'blackberry_cylance_app_secret': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'blackberry_cylance_app_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'ms_sentinel_tenant_id': TextInput(attrs={'class': 'form-control'}), 'ms_sentinel_appid': TextInput(attrs={'class': 'form-control'}), - 'ms_sentinel_appsecret': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'ms_sentinel_appsecret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'ms_sentinel_subscription_id': TextInput(attrs={'class': 'form-control'}), 'ms_sentinel_resource_group': TextInput(attrs={'class': 'form-control'}), 'ms_sentinel_workspace': TextInput(attrs={'class': 'form-control'}), 'sentinel_one_singularity_mobile_host': TextInput(attrs={'class': 'form-control'}), 'sentinel_one_singularity_mobile_client_id': TextInput(attrs={'class': 'form-control'}), - 'sentinel_one_singularity_mobile_client_secret': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'sentinel_one_singularity_mobile_client_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'proofpoint_pod_uri': TextInput(attrs={'class': 'form-control'}), 'proofpoint_pod_cluster_id': TextInput(attrs={'class': 'form-control'}), - 'proofpoint_pod_token': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'proofpoint_pod_token': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'waf_cloudflare_apikey': TextInput(attrs={'class': 'form-control'}), 'waf_cloudflare_zoneid': TextInput(attrs={'class': 'form-control'}), 'gsuite_alertcenter_json_conf': Textarea(attrs={'class': 'form-control'}), @@ -578,18 +580,18 @@ class Meta: 'sophos_cloud_client_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'sophos_cloud_tenant_id': TextInput(attrs={'class': 'form-control'}), 'trendmicro_worryfree_access_token': TextInput(attrs={'class': 'form-control'}), - 'trendmicro_worryfree_secret_key': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'trendmicro_worryfree_secret_key': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'trendmicro_worryfree_server_name': TextInput(attrs={'class': 'form-control'}), 'trendmicro_worryfree_server_port': TextInput(attrs={'class': 'form-control'}), 'safenet_tenant_code': TextInput(attrs={'class': 'form-control'}), 'safenet_apikey': TextInput(attrs={'class': 'form-control'}), 'signalsciences_ngwaf_email': TextInput(attrs={'class': 'form-control'}), - 'signalsciences_ngwaf_token': TextInput(attrs={'type': "password", 'class': 'form-control'}), + 'signalsciences_ngwaf_token': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'signalsciences_ngwaf_corp_name': TextInput(attrs={'class': 'form-control'}), 'signalsciences_ngwaf_site_name': TextInput(attrs={'class': 'form-control'}), 'proofpoint_casb_api_key': TextInput(attrs={'class': 'form-control'}), 'proofpoint_casb_client_id': TextInput(attrs={'class': 'form-control'}), - 'proofpoint_casb_client_secret': TextInput(attrs={'type': 'password','class': 'form-control'}), + 'proofpoint_casb_client_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'proofpoint_trap_host': TextInput(attrs={'class': 'form-control'}), 'proofpoint_trap_apikey': TextInput(attrs={'class': 'form-control'}), 'waf_cloud_protector_host': TextInput(attrs={'class': 'form-control'}), @@ -603,7 +605,7 @@ class Meta: 'cisco_duo_ikey': Textarea(attrs={'class': 'form-control'}), 'cisco_duo_skey': Textarea(attrs={'class': 'form-control'}), 'sentinel_one_mobile_host': TextInput(attrs={'class': 'form-control'}), - 'sentinel_one_mobile_apikey': TextInput(attrs={'type': 'password','class': 'form-control'}), + 'sentinel_one_mobile_apikey': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'csc_domainmanager_apikey':TextInput(attrs={'class': 'form-control'}), 'csc_domainmanager_authorization':TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'retarus_token': TextInput(attrs={'class': 'form-control'}), @@ -628,7 +630,7 @@ class Meta: 'lockself_organization_id': TextInput(attrs={'class': 'form-control'}), 'cisco_umbrella_managed_org_api_key': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'cisco_umbrella_managed_org_secret_key': TextInput(attrs={'type': 'password', 'class': 'form-control'}), - 'cisco_umbrella_managed_org_customers_id': TextInput(attrs={'class': 'form-control', 'data-role': "tagsinput"}), + 'cisco_umbrella_managed_org_customers_id': TextInput(attrs={'class': 'form-control', 'data-role': 'tagsinput'}), 'cisco_umbrella_managed_org_get_dns': CheckboxInput(attrs={'class': 'js-switch'}), 'cisco_umbrella_managed_org_get_proxy': CheckboxInput(attrs={'class': 'js-switch'}), 'catonetworks_api_key': TextInput(attrs={'type': 'password', 'class': 'form-control'}), @@ -651,14 +653,14 @@ class Meta: 'perception_point_x_ray_token': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'perception_point_x_ray_organization_id': TextInput(attrs={'class': 'form-control'}), 'perception_point_x_ray_environment_id': TextInput(attrs={'class': 'form-control'}), - 'perception_point_x_ray_case_types': TextInput(attrs={'class': 'form-control', 'data-role': "tagsinput"}), + 'perception_point_x_ray_case_types': TextInput(attrs={'class': 'form-control', 'data-role': 'tagsinput'}), 'extrahop_host': TextInput(attrs={'class': 'form-control'}), 'extrahop_id': TextInput(attrs={'class': 'form-control'}), 'extrahop_secret': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'hornetsecurity_app_id': TextInput(attrs={'class': 'form-control'}), 'hornetsecurity_token': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'ubika_base_refresh_token': TextInput(attrs={'type': 'password', 'class': 'form-control'}), - 'ubika_namespaces': TextInput(attrs={'class': 'form-control', 'data-role': "tagsinput"}), + 'ubika_namespaces': TextInput(attrs={'class': 'form-control', 'data-role': 'tagsinput'}), 'sentinel_one_graph_token': TextInput(attrs={'type': 'password', 'class': 'form-control'}), 'sentinel_one_graph_console_url': TextInput(attrs={'class': 'form-control'}), 'messagetrace_o365_tenant_id': TextInput(attrs={'class': 'form-control'}), @@ -758,7 +760,7 @@ def clean_kafka_brokers(self): if not data: return [] if "[" in data and "]" in data: - return ast.literal_eval(data) + return ast_literal_eval(data) return data.split(',') def clean_kafka_options(self): @@ -766,7 +768,7 @@ def clean_kafka_options(self): if not data: return [] if "[" in data and "]" in data: - return ast.literal_eval(data) + return ast_literal_eval(data) return data.split(',') def clean_mmdb_cache_size(self): @@ -790,7 +792,7 @@ def clean_cisco_umbrella_managed_org_customers_id(self): if not data: return [] if "[" in data and "]" in data: - return ast.literal_eval(data) + return ast_literal_eval(data) return data.split(',') def clean_ubika_namespaces(self): @@ -983,6 +985,7 @@ def __init__(self, *args, **kwargs): # Do not set id of html fields, that causes issues in JS/JQuery kwargs['auto_id'] = False super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['network_address'] = ModelChoiceField( label=_("Network address"), queryset=NetworkAddress.objects.all(), @@ -1117,6 +1120,7 @@ class LogOMTableForm(Form): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['action'].empty_label = None def as_table_headers(self): diff --git a/vulture_os/services/openvpn/form.py b/vulture_os/services/openvpn/form.py index e358406ef..77a7459a6 100644 --- a/vulture_os/services/openvpn/form.py +++ b/vulture_os/services/openvpn/form.py @@ -27,9 +27,9 @@ from django.forms import (CheckboxInput, ModelForm, Select, TextInput, ModelChoiceField) # Django project imports +from gui.forms.form_utils import bootstrap_tooltips from services.openvpn.models import Openvpn, PROTO from system.cluster.models import Node - from system.pki.models import TLSProfile # Logger configuration imports @@ -41,6 +41,7 @@ class OpenvpnForm(ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['node'] = ModelChoiceField( queryset=Node.objects.all(), diff --git a/vulture_os/services/strongswan/form.py b/vulture_os/services/strongswan/form.py index 39a990269..0204ad742 100644 --- a/vulture_os/services/strongswan/form.py +++ b/vulture_os/services/strongswan/form.py @@ -27,6 +27,7 @@ from django.forms import (CheckboxInput, ModelForm, Select, TextInput, ModelChoiceField) # Django project imports +from gui.forms.form_utils import bootstrap_tooltips from services.strongswan.models import AUTHBY, DPD, KEYEXCHANGE, Strongswan, TYPE from system.cluster.models import Node @@ -45,6 +46,7 @@ class StrongswanForm(ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['node'] = ModelChoiceField( queryset=Node.objects.all(), diff --git a/vulture_os/services/templates/services/haproxy_edit.html b/vulture_os/services/templates/services/haproxy_edit.html index 456c1df19..8cd121433 100644 --- a/vulture_os/services/templates/services/haproxy_edit.html +++ b/vulture_os/services/templates/services/haproxy_edit.html @@ -81,6 +81,12 @@

 HAProxy

{% block jquery_code %} // Load select2 for the MultipleSelect fields - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); {% endblock %} diff --git a/vulture_os/services/templates/services/openvpn_edit.html b/vulture_os/services/templates/services/openvpn_edit.html index ae3138dae..2c2bfbec3 100644 --- a/vulture_os/services/templates/services/openvpn_edit.html +++ b/vulture_os/services/templates/services/openvpn_edit.html @@ -122,10 +122,13 @@

{% translate "Form errors" %}

/* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Initialise tag-editor objects */ @@ -134,7 +137,13 @@

{% translate "Form errors" %}

}); /* Initialise select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); $('.link-tab').click(function(){ window.location.href = ($(this).attr('href')); diff --git a/vulture_os/services/templates/services/strongswan_edit.html b/vulture_os/services/templates/services/strongswan_edit.html index bfb173946..b9a0c72d9 100644 --- a/vulture_os/services/templates/services/strongswan_edit.html +++ b/vulture_os/services/templates/services/strongswan_edit.html @@ -232,10 +232,13 @@

{% translate "Form errors" %}

/* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Initialise tag-editor objects */ @@ -244,7 +247,13 @@

{% translate "Form errors" %}

}); /* Initialise select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); function updateFieldsAuthBy () { diff --git a/vulture_os/system/cluster/form.py b/vulture_os/system/cluster/form.py index fde34f2a4..83cf7054c 100644 --- a/vulture_os/system/cluster/form.py +++ b/vulture_os/system/cluster/form.py @@ -28,6 +28,7 @@ ValidationError) # Django project imports +from gui.forms.form_utils import bootstrap_tooltips from system.cluster.models import Node, NetworkAddress # Logger configuration imports @@ -74,6 +75,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Set non required fields for field_name in ['backends_outgoing_ip', 'logom_outgoing_ip', 'pstats_forwarders']: self.fields[field_name].required = False diff --git a/vulture_os/system/cluster/models.py b/vulture_os/system/cluster/models.py index a7ab2f5d8..91619d1af 100644 --- a/vulture_os/system/cluster/models.py +++ b/vulture_os/system/cluster/models.py @@ -23,40 +23,40 @@ __doc__ = 'Cluster main models' -from system.config.models import Config - -from toolkit.network.network import is_valid_ip4, is_valid_ip6, is_valid_hostname, is_loopback -from toolkit.network.route import get_route_interface -from toolkit.mongodb.mongo_base import MongoBase -from toolkit.redis.redis_base import RedisBase -from toolkit.mongodb.mongo_base import parse_uristr - +# Django system imports +from django.conf import settings from django.db.models import Q from django.db.utils import DatabaseError -from django.utils.translation import gettext as _ -from django.utils.module_loading import import_string -from django.utils import timezone -from django.conf import settings from django.forms.models import model_to_dict +from django.utils import timezone +from django.utils.module_loading import import_string +from django.utils.translation import gettext as _ from djongo import models -import subprocess -import ipaddress -from iptools.ipv4 import netmask2prefix -import time +# Django project imports from applications.logfwd.models import LogOM, LogOMRELP, LogOMHIREDIS, LogOMFWD, LogOMElasticSearch, LogOMMongoDB, LogOMKAFKA +from system.config.models import Config from system.pki.models import X509Certificate +from toolkit.mongodb.mongo_base import MongoBase, parse_uristr +from toolkit.network.network import get_hostname, is_valid_ip4, is_valid_ip6, is_valid_hostname, is_loopback +from toolkit.network.route import get_route_interface +from toolkit.redis.redis_base import RedisBase + +# Required exceptions imports from services.exceptions import ServiceExit +# Extern modules imports +import ipaddress +import subprocess +import time +from iptools.ipv4 import netmask2prefix from re import findall as re_findall, compile as re_compile +# Logger configuration imports import logging -import logging.config - logging.config.dictConfig(settings.LOG_SETTINGS) logger = logging.getLogger('gui') - JAILS = ("apache", "mongodb", "redis", "rsyslog", "haproxy") STATE_CHOICES = ( diff --git a/vulture_os/system/migrations/0009_node_pstats_forwarders.py b/vulture_os/system/migrations/0009_node_pstats_forwarders.py index d02fea094..12872dbba 100644 --- a/vulture_os/system/migrations/0009_node_pstats_forwarders.py +++ b/vulture_os/system/migrations/0009_node_pstats_forwarders.py @@ -9,7 +9,7 @@ def forwards_func(apps, schema_editor): logomhiredis_model = apps.get_model("applications", "LogOMHIREDIS") db_alias = schema_editor.connection.alias node = Cluster.get_current_node() - # If node not boostrapped + # If node not bootstrapped if not node: return logomhiredis_objects = logomhiredis_model.objects.using(db_alias) diff --git a/vulture_os/system/netif/form.py b/vulture_os/system/netif/form.py index 200ea336d..c6cd5c3d4 100644 --- a/vulture_os/system/netif/form.py +++ b/vulture_os/system/netif/form.py @@ -25,6 +25,9 @@ # Django system imports from django.conf import settings from django.forms import ModelForm, TextInput, SelectMultiple, Select, NumberInput, ModelMultipleChoiceField, ValidationError + +# Django project imports +from gui.forms.form_utils import bootstrap_tooltips from system.cluster.models import NetworkInterfaceCard, NetworkAddress, NetworkAddressNIC, NET_ADDR_TYPES, LAGG_PROTO_TYPES # External libraries @@ -49,6 +52,7 @@ class NetIfForm(ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['iface_id'].disabled = True diff --git a/vulture_os/system/pki/form.py b/vulture_os/system/pki/form.py index 053ce6e1a..24062e8ec 100644 --- a/vulture_os/system/pki/form.py +++ b/vulture_os/system/pki/form.py @@ -26,9 +26,13 @@ from django.conf import settings from django.forms import (ModelChoiceField, ModelForm, Select, SelectMultiple, TextInput, Textarea, ValidationError, CharField, ChoiceField, RadioSelect) + +# Django project imports +from gui.forms.form_utils import bootstrap_tooltips from system.pki.models import (ALPN_CHOICES, BROWSER_CHOICES, PROTOCOL_CHOICES, TLSProfile, X509Certificate, VERIFY_CHOICES) +# External libraries from ast import literal_eval from cryptography import x509 from ssl import PROTOCOL_TLS, SSLContext, SSLError @@ -119,6 +123,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['x509_certificate'].empty_label = "No SSL" for field_name in ['compatibility', 'protocols', 'alpn', 'verify_client', 'ca_cert']: self.fields[field_name].empty_label = None diff --git a/vulture_os/system/templates/system/cluster_edit.html b/vulture_os/system/templates/system/cluster_edit.html index d71bf5019..1b62f10a3 100644 --- a/vulture_os/system/templates/system/cluster_edit.html +++ b/vulture_os/system/templates/system/cluster_edit.html @@ -269,7 +269,13 @@

{% translate "Form errors" %}

{% block jquery_code %} $(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); $('#id_nic').change(function(e) { diff --git a/vulture_os/system/templates/system/netif_edit.html b/vulture_os/system/templates/system/netif_edit.html index cc31a3f71..2a0ee62a4 100644 --- a/vulture_os/system/templates/system/netif_edit.html +++ b/vulture_os/system/templates/system/netif_edit.html @@ -143,7 +143,13 @@

 {% translate "Network } $(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); show_or_hide_carp_params(); @@ -158,7 +164,13 @@

 {% translate "Network }); if (val === null){ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); return; } @@ -198,7 +210,13 @@

 {% translate "Network } }) - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); }).trigger('change') $('#id_type').on('change', function(e){ diff --git a/vulture_os/system/templates/system/pki_edit.html b/vulture_os/system/templates/system/pki_edit.html index dddec74c1..fe0954fa5 100644 --- a/vulture_os/system/templates/system/pki_edit.html +++ b/vulture_os/system/templates/system/pki_edit.html @@ -103,7 +103,13 @@

 {% translate "X509 Ce {% block jquery_code %} $(function() { - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); $('#id_type').on('change', function(e){ var val = $(this).val(); diff --git a/vulture_os/system/templates/system/template_edit.html b/vulture_os/system/templates/system/template_edit.html index 167899e48..68926cd77 100644 --- a/vulture_os/system/templates/system/template_edit.html +++ b/vulture_os/system/templates/system/template_edit.html @@ -397,15 +397,24 @@

{% translate "Form errors" %}

/* Switchery mandatory code */ var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function(html) { + elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834', }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); /* Initialize select2 objects */ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* Error modes bind */ diff --git a/vulture_os/system/templates/system/tls_profile_edit.html b/vulture_os/system/templates/system/tls_profile_edit.html index cd14790e8..d43d41d86 100644 --- a/vulture_os/system/templates/system/tls_profile_edit.html +++ b/vulture_os/system/templates/system/tls_profile_edit.html @@ -188,7 +188,13 @@

{% translate "Form errors" %}

var cipher_choices = {{ cipher_choices|safe }}; var protocols_handler = {{ protocols_handler|safe }}; - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); /* If browsers compatibility is not custom, * hide and disable protocol choice and ciphers area diff --git a/vulture_os/system/templates/system/users_edit.html b/vulture_os/system/templates/system/users_edit.html index 3a79126b8..135c62ae6 100644 --- a/vulture_os/system/templates/system/users_edit.html +++ b/vulture_os/system/templates/system/users_edit.html @@ -106,13 +106,22 @@

 {% translate "User edit {% block jquery_code %} $(function(){ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); }) diff --git a/vulture_os/system/templates/system/users_ldap_edit.html b/vulture_os/system/templates/system/users_ldap_edit.html index 7d81884cf..9f76adfbb 100644 --- a/vulture_os/system/templates/system/users_ldap_edit.html +++ b/vulture_os/system/templates/system/users_ldap_edit.html @@ -95,13 +95,22 @@

{% translate "Form errors" %}

{% block jquery_code %} $(function(){ - $('.select2').select2(); + let selects = Array.prototype.slice.call(document.querySelectorAll('.select2')); + selects.forEach(function(html) { + $(html).select2(); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } + }); var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); elems.forEach(function(html) { var switchery = new Switchery(html, { 'color': '#FA9834' }); + if (html.attributes['data-original-title']) { + $(html.nextElementSibling).tooltip({title: html.attributes['data-original-title'].value, placement: "bottom"}); + } }); }) diff --git a/vulture_os/toolkit/http/headers.py b/vulture_os/toolkit/http/headers.py index 5dba42a3d..e403e5b63 100644 --- a/vulture_os/toolkit/http/headers.py +++ b/vulture_os/toolkit/http/headers.py @@ -29,6 +29,7 @@ from djongo import models # Django project imports +from gui.forms.form_utils import bootstrap_tooltips # Extern modules imports from copy import deepcopy @@ -234,6 +235,7 @@ class Meta: def __init__(self, *args, **kwargs): """ Initialize form and special attributes """ super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) # Set required in POST data to False for field_name in ['enabled', 'match', 'replace', 'condition_action', 'condition']: self.fields[field_name].required = False @@ -295,6 +297,7 @@ def __init__(self, *args, **kwargs): # Do not set id of html fields, that causes issues in JS/JQuery kwargs['auto_id'] = False super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) def as_table_headers(self): """ Format field names as table head """ diff --git a/vulture_os/workflow/form.py b/vulture_os/workflow/form.py index 8c2356702..e0df88370 100644 --- a/vulture_os/workflow/form.py +++ b/vulture_os/workflow/form.py @@ -24,16 +24,20 @@ __doc__ = 'Backends & Servers dedicated form classes' # Django system imports -from django.utils.translation import gettext_lazy as _ -from django.utils.crypto import get_random_string from django.conf import settings from django.forms import (ModelForm, CheckboxInput, NumberInput, SelectMultiple, TextInput) -import validators -import logging +from django.utils.crypto import get_random_string +from django.utils.translation import gettext_lazy as _ # Django project imports +from gui.forms.form_utils import bootstrap_tooltips from workflow.models import Workflow, CORS_METHODS +# Extern modules imports +import validators + +# Logger configuration imports +import logging logging.config.dictConfig(settings.LOG_SETTINGS) logger = logging.getLogger('gui') @@ -57,6 +61,7 @@ class Meta: def __init__(self, *args, **kwargs): """ Initialize form and special attributes """ super().__init__(*args, **kwargs) + self = bootstrap_tooltips(self) self.fields['cors_allowed_methods'].empty_label = "" # Exclude LOG Frontends