Skip to content

Commit dfac34d

Browse files
satterlyclaude
andauthored
Fix all sphinx warnings, add customer views docs and CLIPBOARD_TEMPLATE (#123)
- Fix 90+ sphinx cross-reference warnings (broken :ref: labels throughout configuration.rst, authentication.rst, deployment.rst, faq.rst, index.rst, api/alert.rst, api/reference.rst) - Add missing toctree entries for tutorials, web UI pages, and lifecycle - Exclude support files (auth/*, examples/*, thrift/*) from build - Remove duplicate plugins label and fix RST formatting issues - Rewrite customer-views.rst with comprehensive multi-tenancy docs - Document CLIPBOARD_TEMPLATE setting in configuration.rst - Add title to tutorial-4-customisation.rst stub Build now completes with zero warnings. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6f42190 commit dfac34d

13 files changed

Lines changed: 329 additions & 86 deletions

source/api/alert.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ The following alert attributes are populated at source:
6262
default) then alerts must have an ``environment`` attribute that
6363
is one of either ``Production`` or ``Development`` and it must
6464
define a ``service`` attribute. For more information on configuring
65-
or disabling this plugin see :ref:`plugin config`.
65+
or disabling this plugin see :ref:`plugin settings`.
6666

6767
Attributes added when processing alerts
6868
---------------------------------------

source/api/reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ Input
4242
+-----------------+----------+----------------------------------------------+
4343
| ``environment`` | string | environment, used to namespace the resource |
4444
+-----------------+----------+----------------------------------------------+
45-
| ``severity`` | string | see :ref:`severity_table` table |
45+
| ``severity`` | string | see :ref:`severity table` table |
4646
+-----------------+----------+----------------------------------------------+
4747
| ``correlate`` | list | list of related event names |
4848
+-----------------+----------+----------------------------------------------+
49-
| ``status`` | string | see :ref:`status_table` table |
49+
| ``status`` | string | see :ref:`status table` table |
5050
+-----------------+----------+----------------------------------------------+
5151
| ``service`` | list | list of effected services |
5252
+-----------------+----------+----------------------------------------------+

source/authentication.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ Authentication
44
==============
55

66
By default, authentication is not enabled, however there are some features
7-
that are :ref:`not available <watched_alerts>` unless users login such as
8-
watching alerts.
7+
that are not available unless users login such as watching alerts.
98

109
Alerta supports six main authentication strategies:
1110

@@ -200,7 +199,7 @@ Refer to pysaml2 documentation and source code if you need additional options:
200199
- https://pysaml2.readthedocs.io/en/latest/howto/config.html
201200
- https://github.com/rohe/pysaml2/blob/master/src/saml2/config.py
202201

203-
Note: entityid and service provider endpoints are configured by default based on your BASE_URL value which is mandatory if you use SAML (see :ref:`general config`)
202+
Note: entityid and service provider endpoints are configured by default based on your BASE_URL value which is mandatory if you use SAML (see :ref:`general settings`)
204203

205204
``ALLOWED_SAML2_GROUPS``
206205

@@ -625,7 +624,7 @@ the command-line tool.
625624
Keys can be easily generated from the Alerta web UI and can have any scopes
626625
associated with them. They are valid for 1 year by default but this period
627626
is configurable using ``API_KEY_EXPIRE_DAYS`` in the
628-
:ref:`server configuration <api config>`.
627+
:ref:`server configuration <apikey settings>`.
629628

630629
To use an API key in an API query you must put the key in either an
631630
HTTP header or a query parameter.

source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
myst_heading_anchors = 3
4444

4545
templates_path = ['_templates']
46-
exclude_patterns = ['Thumbs.db', '.DS_Store']
46+
exclude_patterns = ['Thumbs.db', '.DS_Store', 'auth/*', 'examples/*', 'thrift/*', 'spelling_wordlist.txt']
4747

4848
# -- Options for HTML output -------------------------------------------------
4949
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

source/configuration.rst

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ Auth Provider Settings
293293
valid authentication providers are ``basic``, ``ldap``, ``github``, ``openid``, ``saml2``,
294294
``azure``, ``cognito``, ``gitlab``, ``google``, ``keycloak``,
295295
and ``cas`` (default is ``basic``)
296+
296297
.. note::
297298
Any authentication provider that is `OpenID Connect compliant`_ is supported. Set the
298299
``AUTH_PROVIDER`` to ``openid`` and configure the required ``OIDC`` settings
@@ -432,13 +433,13 @@ SAML 2.0 Auth Settings
432433
(no default)
433434
``SAML2_USER_NAME_FORMAT``
434435
Python format string which will be rendered to user's name using SAML
435-
attributes. See :ref:`saml2` (default is ``'{givenName} {surname}'``)
436+
attributes. See :ref:`saml2_auth` (default is ``'{givenName} {surname}'``)
436437
``SAML2_EMAIL_ATTRIBUTE``
437438
(default is ``'emailAddress'``)
438439
``SAML2_CONFIG``
439-
``pysaml2`` configuration ``dict``. See :ref:`saml2` (no default)
440+
``pysaml2`` configuration ``dict``. See :ref:`saml2_auth` (no default)
440441
``ALLOWED_SAML2_GROUPS``
441-
list of authorised groups a user must belong to. See :ref:`saml2` for
442+
list of authorised groups a user must belong to. See :ref:`saml2_auth` for
442443
details (default is ``*``)
443444
``ALLOWED_EMAIL_DOMAINS``
444445
authorised email domains when using email as login (default is ``*``)
@@ -892,6 +893,9 @@ The following settings are specific to the web UI and are not used by the server
892893
to sort by newest use ``lastReceiveTime`` or oldest use ``-createTime``. minus means reverse (default is ``lastReceiveTime``)
893894
``DEFAULT_FILTER``
894895
default alert list filter as query filter (default is ``{'status':['open','ack']}``)
896+
``CLIPBOARD_TEMPLATE``
897+
Jinja2-style template for the copy-to-clipboard button on alerts. Alert attributes
898+
are available as template variables eg. ``{{ resource }}: {{ event }}`` (default is empty string)
895899
``DEFAULT_FONT``
896900
default ``font-family``, ``font-size`` and ``font-weight`` (default is ``Sintony``, ``13px``, ``500``)
897901
``ACTIONS``
@@ -1071,20 +1075,20 @@ General Settings
10711075
~~~~~~~~~~~~~~~~
10721076

10731077
:envvar:`DEBUG`
1074-
:ref:`see above <general config>`
1078+
:ref:`see above <general settings>`
10751079
:envvar:`BASE_URL`
1076-
:ref:`see above <general config>`
1080+
:ref:`see above <general settings>`
10771081
:envvar:`USE_PROXYFIX`
1078-
:ref:`see above <general config>`
1082+
:ref:`see above <general settings>`
10791083
:envvar:`SECRET_KEY`
1080-
:ref:`see above <general config>`
1084+
:ref:`see above <general settings>`
10811085

10821086
Database Settings
10831087
~~~~~~~~~~~~~~~~~
10841088

10851089
:envvar:`DATABASE_URL`
1086-
used by both :ref:`Postgres <Postgres connection strings>` and
1087-
:ref:`MongoDB <MongoDB connection strings>` for database connection strings
1090+
used by both Postgres and MongoDB for database connection strings.
1091+
See :ref:`database settings`
10881092
:envvar:`DATABASE_NAME`
10891093
database name can be used to override default database defined in ``DATABASE_URL``
10901094

@@ -1113,81 +1117,81 @@ Authentication Settings
11131117
~~~~~~~~~~~~~~~~~~~~~~~
11141118

11151119
:envvar:`AUTH_REQUIRED`
1116-
:ref:`see above <auth config>`
1120+
:ref:`see above <auth settings>`
11171121
:envvar:`AUTH_PROVIDER`
1118-
:ref:`see above <auth config>`
1122+
:ref:`see above <auth settings>`
11191123
:envvar:`ADMIN_USERS`
1120-
:ref:`see above <auth config>`
1124+
:ref:`see above <auth settings>`
11211125
:envvar:`SIGNUP_ENABLED`
1122-
:ref:`see above <auth config>`
1126+
:ref:`see above <auth settings>`
11231127
:envvar:`CUSTOMER_VIEWS`
1124-
:ref:`see above <auth config>`
1128+
:ref:`see above <auth settings>`
11251129
:envvar:`OAUTH2_CLIENT_ID`
1126-
:ref:`see above <auth config>`
1130+
:ref:`see above <auth settings>`
11271131
:envvar:`OAUTH2_CLIENT_SECRET`
1128-
:ref:`see above <auth config>`
1132+
:ref:`see above <auth settings>`
11291133
:envvar:`ALLOWED_EMAIL_DOMAINS`
1130-
:ref:`see above <auth config>`
1134+
:ref:`see above <auth settings>`
11311135
:envvar:`AZURE_TENANT`
1132-
:ref:`see above <auth config>`
1136+
:ref:`see above <auth settings>`
11331137
:envvar:`GITHUB_URL`
1134-
:ref:`see above <auth config>`
1138+
:ref:`see above <auth settings>`
11351139
:envvar:`ALLOWED_GITHUB_ORGS`
1136-
:ref:`see above <auth config>`
1140+
:ref:`see above <auth settings>`
11371141
:envvar:`GITLAB_URL`
1138-
:ref:`see above <auth config>`
1142+
:ref:`see above <auth settings>`
11391143
:envvar:`ALLOWED_GITLAB_GROUPS`
1140-
:ref:`see above <auth config>`
1144+
:ref:`see above <auth settings>`
11411145
:envvar:`KEYCLOAK_URL`
1142-
:ref:`see above <auth config>`
1146+
:ref:`see above <auth settings>`
11431147
:envvar:`KEYCLOAK_REALM`
1144-
:ref:`see above <auth config>`
1148+
:ref:`see above <auth settings>`
11451149
:envvar:`ALLOWED_KEYCLOAK_ROLES`
1146-
:ref:`see above <auth config>`
1150+
:ref:`see above <auth settings>`
11471151
:envvar:`LDAP_BIND_PASSWORD`
1148-
:ref:`see above <auth config>`
1152+
:ref:`see above <auth settings>`
11491153
:envvar:`OIDC_ISSUER_URL`
1150-
:ref:`see above <auth config>`
1154+
:ref:`see above <auth settings>`
11511155
:envvar:`ALLOWED_OIDC_ROLES`
1152-
:ref:`see above <auth config>`
1156+
:ref:`see above <auth settings>`
11531157

11541158
Sundry Settings
11551159
~~~~~~~~~~~~~~~
11561160

11571161
:envvar:`CORS_ORIGINS`
1158-
:ref:`see above <cors config>`
1162+
:ref:`see above <CORS settings>`
11591163
:envvar:`MAIL_FROM`
1160-
:ref:`see above <email config>`
1164+
:ref:`see above <email settings>`
11611165
:envvar:`SMTP_PASSWORD`
1162-
:ref:`see above <email config>`
1166+
:ref:`see above <email settings>`
11631167
:envvar:`GOOGLE_TRACKING_ID`
11641168
:ref:`see above <webui config>`
11651169

11661170
Housekeeping Settings
11671171
~~~~~~~~~~~~~~~~~~~~~
11681172

11691173
:envvar:`DELETE_EXPIRED_AFTER`
1170-
:ref:`see above <housekeeping config>`
1174+
:ref:`see above <housekeeping settings>`
11711175
:envvar:`DELETE_INFO_AFTER`
1172-
:ref:`see above <housekeeping config>`
1176+
:ref:`see above <housekeeping settings>`
11731177

11741178
Plugin & Webhook Settings
11751179
~~~~~~~~~~~~~~~~~~~~~~~~~
11761180

11771181
:envvar:`PLUGINS`
1178-
:ref:`see above <plugin config>`
1182+
:ref:`see above <plugin settings>`
11791183
:envvar:`BLACKOUT_DURATION`
1180-
:ref:`see above <plugin config>`
1184+
:ref:`see above <plugin settings>`
11811185
:envvar:`NOTIFICATION_BLACKOUT`
1182-
:ref:`see above <plugin config>`
1186+
:ref:`see above <plugin settings>`
11831187
:envvar:`BLACKOUT_ACCEPT`
1184-
:ref:`see above <plugin config>`
1188+
:ref:`see above <plugin settings>`
11851189
:envvar:`ORIGIN_BLACKLIST`
1186-
:ref:`see above <plugin config>`
1190+
:ref:`see above <plugin settings>`
11871191
:envvar:`ALLOWED_ENVIRONMENTS`
1188-
:ref:`see above <plugin config>`
1192+
:ref:`see above <plugin settings>`
11891193
:envvar:`DEFAULT_ENVIRONMENT`
1190-
:ref:`see above <webhook config>`
1194+
:ref:`see above <webhook settings>`
11911195

11921196
Dynamic Settings
11931197
----------------

source/conventions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ could then become::
7474

7575
### Severity Levels
7676

77-
Agree on a subset of [severity levels](api/alert.rst#alert-severities) and
77+
Agree on a subset of {ref}`severity levels <severity table>` and
7878
be consistent with what they mean. For example, if severity levels are used
7979
consistently then integrating with a paging or email system becomes easier.
8080

0 commit comments

Comments
 (0)