summaryrefslogtreecommitdiffstats
path: root/awx/ui/conf.py
blob: a2094488703a625793f8af3f5648a17295b9a837 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright (c) 2016 Ansible, Inc.
# All Rights Reserved.

# Django
from django.utils.translation import ugettext_lazy as _

# Tower
from awx.conf import register, fields
from awx.ui.fields import PendoTrackingStateField, CustomLogoField  # noqa


register(
    'PENDO_TRACKING_STATE',
    field_class=PendoTrackingStateField,
    choices=[
        ('off', _('Off')),
        ('anonymous', _('Anonymous')),
        ('detailed', _('Detailed')),
    ],
    label=_('Analytics Tracking State'),
    help_text=_('Enable or Disable Analytics Tracking.'),
    category=_('UI'),
    category_slug='ui',
)

register(
    'CUSTOM_LOGIN_INFO',
    field_class=fields.CharField,
    allow_blank=True,
    default='',
    label=_('Custom Login Info'),
    help_text=_('If needed, you can add specific information (such as a legal '
                'notice or a disclaimer) to a text box in the login modal using '
                'this setting. Any content added must be in plain text, as '
                'custom HTML or other markup languages are not supported.'),
    category=_('UI'),
    category_slug='ui',
    feature_required='rebranding',
)

register(
    'CUSTOM_LOGO',
    field_class=CustomLogoField,
    allow_blank=True,
    default='',
    label=_('Custom Logo'),
    help_text=_('To set up a custom logo, provide a file that you create. For '
                'the custom logo to look its best, use a .png file with a '
                'transparent background. GIF, PNG and JPEG formats are supported.'),
    placeholder='data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACwAAAAAAQABAAACAkQBADs=',
    category=_('UI'),
    category_slug='ui',
    feature_required='rebranding',
)

register(
    'MAX_UI_JOB_EVENTS',
    field_class=fields.IntegerField,
    min_value=100,
    label=_('Max Job Events Retrieved by UI'),
    help_text=_('Maximum number of job events for the UI to retrieve within a '
                'single request.'),
    category=_('UI'),
    category_slug='ui',
)

register(
    'UI_LIVE_UPDATES_ENABLED',
    field_class=fields.BooleanField,
    label=_('Enable Live Updates in the UI'),
    help_text=_('If disabled, the page will not refresh when events are received. '
                'Reloading the page will be required to get the latest details.'),
    category=_('UI'),
    category_slug='ui',
)