Merge pull request #2780 from modoboa/update-frontend-doc

Update frontend doc and fix new admin default url
This commit is contained in:
Antoine Nguyen
2023-02-16 16:43:56 +01:00
committed by GitHub
5 changed files with 26 additions and 9 deletions
+2 -1
View File
@@ -11,13 +11,14 @@ documentation.
**You will find them using the following url patterns:**
* New API+Docs: *https://<hostname>/api/schema-v2/swagger/*
* Old API: *http://<hostname>/api/v1/
* Old API: *http://<hostname>/api/v1/*
* (Old) Documentation: *http://<hostname>/docs/api/*
**Examples:**
* `new example <https://demo.modoboa.org/api/schema-v2/swagger/>`_
* `old example <https://demo.modoboa.org/docs/api/>`_
documentation is available on the official demo.
Using this API requires an authentication and for now, only a token
+21 -5
View File
@@ -50,6 +50,23 @@ Make sure to use root privileges and run the following command:
Then, reload postfix.
New-admin interface
===================
.. note::
You don't need to perform these actions if you use the installer to upgrade your instance.
New admin interface won't update by itself. Run the following commands to update it:
.. sourcecode:: bash
> sudo -u <modoboa_user> -i bash
> cd <modoboa_instance_dir>
> cp frontend/config.json ./
> rm -rf frontend
> cp -R <virtuenv_path>/lib/pythonX.X/site-packages/modoboa/frontend_dist/ frontend/
> cp ./config.json frontend/config.json
Extensions
**********
@@ -124,13 +141,13 @@ The following modifications must be applied to the :file:`settings.py` file:
]
* Add the following variable::
* Add the following variable:
.. sourcecode:: python
PID_FILE_STORAGE_PATH = '/var/run'
* Update ``LOGGING`` variable to define an address for ``syslog-auth`` handler::
* Update ``LOGGING`` variable to define an address for ``syslog-auth`` handler:
.. sourcecode:: python
@@ -142,9 +159,8 @@ The following modifications must be applied to the :file:`settings.py` file:
},
* You now have the possibility to customize the url of the new-admin
interface. To do so please head up to :ref:`the custom configuration
chapter <customization>` (advanced user).
* You now have the possibility to customize the url of the new-admin interface.
To do so please head up to :ref:`the custom configuration chapter <customization>` (advanced user).
* Add ``DEFAULT_THROTTLE_RATES`` to ``REST_FRAMEWORK``:
@@ -213,7 +213,7 @@ REST_FRAMEWORK = {
}
# Uncomment if you need a custom sub url for new_admin interface
# NEW_ADMIN_URL = 'new_admin'
# NEW_ADMIN_URL = 'new-admin'
SPECTACULAR_SETTINGS = {
'SCHEMA_PATH_PREFIX': r'/api/v[0-9]',
+1 -1
View File
@@ -25,5 +25,5 @@ def top_notifications(request):
def new_admin_url(*args):
"""A context processor to include new admin url."""
return {
"new_admin": getattr(settings, "NEW_ADMIN_URL", "new_admin")
"new_admin": getattr(settings, "NEW_ADMIN_URL", "new-admin")
}
+1 -1
View File
@@ -205,7 +205,7 @@ REST_FRAMEWORK = {
}
# Uncomment if you need a custom sub url for new_admin interface
# NEW_ADMIN_URL = 'new_admin'
# NEW_ADMIN_URL = 'new-admin'
SPECTACULAR_SETTINGS = {
'SCHEMA_PATH_PREFIX': r'/api/v[0-9]',