diff --git a/docs/images/site_admin/json_custom_settings.png b/docs/images/site_admin/json_custom_settings.png new file mode 100644 index 000000000..ff418da77 --- /dev/null +++ b/docs/images/site_admin/json_custom_settings.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a69040a489a52ee0132f3d2c0101dfbb33e75c5d64de916a6fe8f8245928c5e7 +size 22621 diff --git a/docs/images/site_admin/secret_custom_settings.png b/docs/images/site_admin/secret_custom_settings.png new file mode 100644 index 000000000..0260d3089 --- /dev/null +++ b/docs/images/site_admin/secret_custom_settings.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4b0f8e5170e62fb39573a085d4688f261ce36b96fc73b0fa8adb85e3fae09f2 +size 12638 diff --git a/docs/tethys_portal/admin_pages.rst b/docs/tethys_portal/admin_pages.rst index 568540795..5cb593915 100644 --- a/docs/tethys_portal/admin_pages.rst +++ b/docs/tethys_portal/admin_pages.rst @@ -4,7 +4,7 @@ Administrator Pages ******************* -**Last Updated:** December 2022 +**Last Updated:** May 2023 Tethys Portal includes administration pages that can be used to manage the website (see Figure 1). The administration dashboard is only available to administrator users (staff users). You should have created a default administrator user when you installed Tethys Platform. If you are logged in as an administrator, you will be able to access the administrator dashboard by selecting the "Site Admin" option from the user drop down menu in the top right-hand corner of the page (when you are not in an app). @@ -215,24 +215,48 @@ The Common Settings include those settings that are common to all apps or extens Custom Settings +++++++++++++++ -Custom Settings appear under the ``CUSTOM SETTINGS`` heading and are defined by the app developer (see Figure 12). Custom Settings have simple values such as strings, integers, floats, or booleans, but all are entered as text. For boolean type Custom Settings, type a valid boolean value such as ``True`` or ``False``. +Custom Settings appear under the ``CUSTOM SETTINGS`` heading and are defined by the app developer (see Figure 12). Most Custom Settings have simple values such as strings, integers, floats, or booleans, but all are entered as text. For boolean type Custom Settings, type a valid boolean value such as ``True`` or ``False``. .. figure:: ../images/site_admin/custom_settings.png :width: 675px **Figure 12.** Custom Settings section of an app. +.. _tethys_portal_secret_settings: + +Secret Custom Settings +++++++++++++++++++++++ + +Secret Custom Settings can be used to store sensitive information that is need by your app such as passwords and API keys. The values of Secret Custom Settings are encrypted before being stored in the database and not displayed on the settings page for additional security. Secret Custom Setting values are returned as strings when you access them in your app. + +.. figure:: ../images/site_admin/secret_custom_settings.png + :width: 675px + +**Figure 13.** Secret Custom Settings section of an app. + +.. _tethys_portal_json_settings: + +JSON Custom Settings +++++++++++++++++++++ + +JSON Custom Settings store JSON strings and provide an embedded JSON editor on the settings page for easy editing. In addition, you may initialize a JSON Custom Setting with a JSON file when installing an app. + +.. figure:: ../images/site_admin/json_custom_settings.png + :width: 675px + +**Figure 14.** JSON Custom Settings section of an app. + .. _tethys_portal_service_settings: Service Settings ++++++++++++++++ -There are several different types of Service Settings including: ``Persistent Store Connection Settings``, ``Persistent Store Database Settings``, ``Dataset Service Settings``, ``Spatial Dataset Service Settings``, and ``Web Processing Service Settings`` (see Figure 13). These settings specify the types of services that the apps require. Use the drop down next to each Service Setting to assign a pre-registered ``Tethys Service`` to that app or use the *plus* button to create a new one. +There are several different types of Service Settings including: ``Persistent Store Connection Settings``, ``Persistent Store Database Settings``, ``Dataset Service Settings``, ``Spatial Dataset Service Settings``, and ``Web Processing Service Settings`` (see Figure 15). These settings specify the types of services that the apps require. Use the drop down next to each Service Setting to assign a pre-registered ``Tethys Service`` to that app or use the *plus* button to create a new one. .. figure:: ../images/site_admin/service_settings.png :width: 675px -**Figure 13.** Service Settings sections of an app. +**Figure 15.** Service Settings sections of an app. .. tip:: @@ -243,7 +267,7 @@ There are several different types of Service Settings including: ``Persistent St Proxy Apps ---------- -Proxy apps are links to external web applications or websites. They are represented in the App Library page with an app tile just like native Tethys Apps. To manage the Proxy Apps in a Tethys Portal, click on the ``Proxy Apps`` link under the ``TETHYS APPS`` heading. Click on the ``ADD PROXY APP`` button to create a new Proxy App. Proxy Apps have many of the same configuration options as normal Tethys Apps including ``Name``, ``Description``, ``Tags``, ``Enabled``, ``Show in apps library`` and ``Order``, but there are a few options that are specific to Proxy apps (see Figure 14). A brief description of each option is provided below: +Proxy apps are links to external web applications or websites. They are represented in the App Library page with an app tile just like native Tethys Apps. To manage the Proxy Apps in a Tethys Portal, click on the ``Proxy Apps`` link under the ``TETHYS APPS`` heading. Click on the ``ADD PROXY APP`` button to create a new Proxy App. Proxy Apps have many of the same configuration options as normal Tethys Apps including ``Name``, ``Description``, ``Tags``, ``Enabled``, ``Show in apps library`` and ``Order``, but there are a few options that are specific to Proxy apps (see Figure 16). A brief description of each option is provided below: * **Name**: The name of the app that will appear on the app tile on the Apps Library page (e.g.: "My Proxy App"). * **Endpoint**: The URL that will be opened when the user clicks on the app tile of the proxy app (e.g.: ``https://my.proxy.app/foo/``). @@ -259,7 +283,7 @@ Proxy apps are links to external web applications or websites. They are represen .. figure:: ../images/site_admin/new_proxy_app.png :width: 675px -**Figure 14.** The Add Proxy App dialog. +**Figure 16.** The Add Proxy App dialog. Tethys Compute ============== @@ -278,12 +302,12 @@ The links under the ``TETHYS COMPUTE`` heading can be used to manage ``Jobs`` an Tethys Portal ============= -The links under the ``TETHYS PORTAL`` heading can be used to customize the look of the Tethys Portal. For example, you can change the name, logo, and color theme of the portal (see Figure 15). +The links under the ``TETHYS PORTAL`` heading can be used to customize the look of the Tethys Portal. For example, you can change the name, logo, and color theme of the portal (see Figure 17). .. figure:: ../images/tethys_portal/tethys_portal_home_page_settings.png :width: 500px -**Figure 15.** Home page settings for Tethys Portal. +**Figure 17.** Home page settings for Tethys Portal. .. tip:: @@ -301,7 +325,7 @@ The link under the ``TETHYS QUOTAS`` heading can be used to manage resource quot Resource Quotas --------------- -``Resource Quotas`` shows a list of all loaded quotas. By default, all quotas are disabled when they are first loaded. Use this page to enable and customize the quotas for your portal (see Figure 16). +``Resource Quotas`` shows a list of all loaded quotas. By default, all quotas are disabled when they are first loaded. Use this page to enable and customize the quotas for your portal (see Figure 18). All quotas have the following fields that can be customized: @@ -313,14 +337,14 @@ All quotas have the following fields that can be customized: .. figure:: ../images/tethys_portal/tethys_portal_rq_settings.png :width: 675px -**Figure 16.** Resource Quota settings page. +**Figure 18.** Resource Quota settings page. .. _tethys_quotas_user_admin: User Workspace Quotas --------------------- -To manage quotas specific to individual users, navigate to the user's settings page. Any applicable Resource Quotas will be listed in the User Quotas section. To set a custom quota for the user, enter the custom value in the Value field on the line corresponding to the appropriate Resource Quota. A link to the ``Resource Quota`` is also provided in the table (see Figure 17). +To manage quotas specific to individual users, navigate to the user's settings page. Any applicable Resource Quotas will be listed in the User Quotas section. To set a custom quota for the user, enter the custom value in the Value field on the line corresponding to the appropriate Resource Quota. A link to the ``Resource Quota`` is also provided in the table (see Figure 19). .. tip:: @@ -329,19 +353,19 @@ To manage quotas specific to individual users, navigate to the user's settings p .. figure:: ../images/tethys_portal/tethys_portal_uq_settings.png :width: 675px -**Figure 17.** User settings page showing User Quotas. +**Figure 19.** User settings page showing User Quotas. .. _tethys_quotas_app_admin: App Workspace Quotas -------------------- -To manage quotas specific to individual apps, navigate to the specified app's settings page. Any applicable Resource Quotas will be listed in the Tethys App Quotas section. To set a custom quota for the app, enter the custom value in the Value field on the line corresponding to the appropriate Resource Quota. A link to the ``Resource Quota`` is also provided in the table (see Figure 18). +To manage quotas specific to individual apps, navigate to the specified app's settings page. Any applicable Resource Quotas will be listed in the Tethys App Quotas section. To set a custom quota for the app, enter the custom value in the Value field on the line corresponding to the appropriate Resource Quota. A link to the ``Resource Quota`` is also provided in the table (see Figure 20). .. figure:: ../images/tethys_portal/tethys_portal_aq_settings.png :width: 675px -**Figure 18.** App settings page showing Tethys App Quotas. +**Figure 20.** App settings page showing Tethys App Quotas. .. _tethys_quotas_app_manage_storage: diff --git a/docs/tethys_sdk/app_settings.rst b/docs/tethys_sdk/app_settings.rst index 845cd3ab1..9926520b6 100644 --- a/docs/tethys_sdk/app_settings.rst +++ b/docs/tethys_sdk/app_settings.rst @@ -2,7 +2,7 @@ App Settings API **************** -**Last Updated:** January 2022 +**Last Updated:** May 2023 The App Settings API allows developers to create settings for their apps that can be configured in the admin interface of the Tethys Portal in which the app is installed. Examples of what App Settings could be used for include enabling or disabling functionality, assigning constant values or assumptions that are used throughout the app, or customizing the look and feel of the app. App Settings are only be accessible by Tethys Portal administrators in production, so they should be thought of as global settings for the app that are not customizable on a user by user basis. @@ -14,16 +14,21 @@ As of Tethys Platform 2.0.0, Tethys Services such as databases and map servers a Custom Settings =============== -Custom Settings are used to create scalar-valued settings for an app. Four basic types of values are supported including ``string``, ``boolean``, ``integer``, and ``float``. Create Custom Settings by implementing the ``custom_setting()`` method in your :term:`app class`. This method should return a list of CustomSettings_ objects: +``CustomSettings`` are used to create scalar-valued settings for an app. Five basic types of values are supported including ``string``, ``boolean``, ``integer``, ``float``, and ``UUID``. There are two additional types of ``CustomSettings``: ``SecretCustomSettings`` and ``JSONCustomSettings``. The values of ``SecretCustomSettings`` are encrypted before being saved to the database to more securly store sensitive values like passwords and API keys. The ``JSONCustomSettings`` store JSON strings, but are retrieved as JSON dictionaries for storing more complex configuration for apps. Create ``CustomSettings`` by implementing the ``custom_setting()`` method in your :term:`app class`. This method should return a list of CustomSettings_ objects: .. automethod:: tethys_apps.base.TethysAppBase.custom_settings :noindex: -To retrieve the value of a Custom Setting, import your :term:`app class` and call the ``get_custom_setting()`` class method: +To retrieve the value of a ``CustomSetting``, import your :term:`app class` and call the ``get_custom_setting()`` class method: .. automethod:: tethys_apps.base.TethysAppBase.get_custom_setting :noindex: +To set the value of a ``CustomSetting`` dynamically, import your :term:`app class` and call the ``set_custom_setting()`` class method: + +.. automethod:: tethys_apps.base.TethysAppBase.set_custom_setting + :noindex: + .. _app_settings_ps_settings: Persistent Store Settings diff --git a/docs/whats_new.rst b/docs/whats_new.rst index b26ea6636..1140b22bb 100644 --- a/docs/whats_new.rst +++ b/docs/whats_new.rst @@ -4,181 +4,63 @@ What's New ********** -**Last Updated:** December 2022 +**Last Updated:** May 2023 Refer to this article for information about each new release of Tethys Platform. Release |version| ================== -Python 3.10 +Python 3.11 ----------- -* Tethys Platform formally updated to use Python 3.10 -* Should also support Python 3.7+ +* Verified Tethys Platform works using Python 3.11 -Django 3.2 ----------- - -* Django 2.2, the version Tethys 3 depended on, lost LTS status in April 11, 2022 -* Tethys was upgraded to be able to use **Django 3.2**, the new LTS version until April of 2024 - -See: `Django Supported Versions `_ - -Bootstrap 5 ------------ - -* Upgraded to use Bootstrap version 5 (Tethys 3 used version 3). -* Tethys Portal overhauled and re-themed using new capabilities of Bootstrap 5. - -See: `Boostrap 5 Documentation `_ - -Controller Decorators ---------------------- - -* Added three new decorators: ``controller``, ``consumer``, and ``handler``. -* Use these decorators for mapping controllers, consumers, and handlers to URLs. -* UrlMaps in app.py are no longer needed and the ``url_maps`` method is deprecated in favor of the new ``register_url_maps`` method. -* IMPORTANT: The ``url_maps`` method is temporarily supported in Tethys Platform 4.0.0 to make migration of apps from Tethys 3 to 4 easier, but will be removed in 4.1.0. - -See: :ref:`url_maps_api` - -WebSocket URLs --------------- +Secret and JSON Custom Settings +------------------------------- -* WebSocket URLs now begin with ``/apps/`` to be consistent with the other URLs that are generated by Tethys Platform (e.g.: ``/apps/my-first-app/ws/``). +* Added two new types of Custom App Settings: Secret and JSON. +* The values of Secret Custom settings are encrypted for additional security of sensitive data (e.g. passwords, API keys, etc.). +* JSON Custom settings store JSON strings and can be initialized from a JSON file. +* The app settings page provides an embedded JSON editor for JSON Custom settings. -See: :ref:`websockets` and :ref:`tutorials_websockets` +See: :ref:`app_settings_custom_settings`, :ref:`tethys_portal_secret_settings`, and :ref:`tethys_portal_json_settings` -Tethys Map Layout ------------------ +Tethys CLI +---------- -* The first Tethys Layout, a new way to quickly and easily add fully functioning views to Tethys Apps. -* A fully-featured, customizable map view with layer tree, address search, attribute popups, click-n-plot capability, and more. -* Subclass the ``MapLayout`` class and override the ``compose_layers`` method to add layers. -* Enable / disable functionality by setting class properties. +* Added Docker image (``-i``) name and tag (``-t``) options to the ``tethys docker`` command to allow users to override the default images installed by the ``init`` and ``update`` command. +* Added port (``-o``) option to tethys scheduler create-condor CLI command. +* Link Schedulers to App Settings using the ``tethys link`` command. -See: :ref:`sdk_layouts_api` and :ref:`map_layout` +See: :ref:`tethys_cli_docker`, :ref:`tethys_cli_schedulers`, and :ref:`tethys_cli_link` -Comprehensive Tethys Manage Command ------------------------------------ +Support for Other Databases +--------------------------- -* The ``tethys manage`` command now provides full range of ``manage.py`` commands. -* Use it to run any ``manage.py`` command, including commands provided by Django apps (e.g. ``django manage shell``). -* Use ``tethys manage path`` to get the path to the ``manage.py`` that Tethys is using. +* Removed PostgreSQL specific model code for the primary Tethys Platform database to allow using other database engines (MySQL, Microsoft SQL, SQLite, etc.). +* Made SQLite the default database engine for the Tethys Platform database. +* Note: Persistent stores still require PostgreSQL, but work is being done to support for more datbase engines. -See: :ref:`tethys_manage_cmd` -Tethys Docker Command +Miscellaneous Changes --------------------- -* The ``tethys docker`` command was updated to use the ``postgis/postgis`` image instead of the ``mdillon/postgis`` image. -* The ``latest`` version of ``postgis/postgis`` will be pulled which was 14_3.3 at time of writing (PostgreSQL 14, PostGIS 3.3). - -See: ``_ - -Static Dependencies -------------------- - -* Replaced vendored static dependencies with CDN-hosted equivalants -* Removed all vendored packages--almost 2000 files! -* Upgraded all static dependencies to the latest versions -* Added alternative to install static dependencies using NPM to allow self-hosting of dependencies instead of CDNs - -See: ``STATICFILES_USE_NPM`` setting at :ref:`tethys_configuration` - -Custom Job Actions ------------------- - -* The :doc:`tethys_sdk/gizmos/jobs_table` now allows custom actions to be defined and added. -* The order of the actions displayed in the actions dropdown menu can now be customized. - -See: :ref:`jobs-table` - -Scheduler App Settings ----------------------- - -* HTCondor and Dask Schedulers can now be assigned to apps using App Settings like other services. -* Tethys Dask Scheduler updated to be compatible to the latest version of Dask. - -See: :ref:`jobs_api_schedulers` - -Showcase Apps -------------- - -* The Developer pages, including the Gizmo Showcase, were removed from Tethys Portal. -* A new Gizmo Showcase App was developed to provide improved demonstrations and code examples of Tethys Gizmos. -* A new Layout Showcase App was developed to provide live demonstrations and code examples of the new Map Layout and future Layouts. - -See: :ref:`installation_showcase_apps` - -Apps Library ------------- - -* The apps in the apps library are now sorted alphabetically by default. -* Additionally, apps (including proxy apps) have a new ``order`` attribute that enables the app sorting to be customized. - -See: :ref:`tethys_portal_app_settings` - -App Settings ------------- - -* The ``color`` setting is now exposed on the App Settings page for an app, allowing it to be overriden by portal administrators. -* A new ``order`` setting give portal adminstrators control over the ordering of apps on the Apps Library page. Default ordering is alphabetical now. -* The ``icon`` setting now accepts URLs to images hosted on external websites. -* The new ``Scheduler Settings`` can be used to assign HTCondor and Dask Scheduler to apps as is done with other services. -* Added explanations of each of the common app settings to the documentation for :ref:`portal_admin_common_app_settings`. - -See: :ref:`portal_admin_apps_and_exts` - -Proxy Apps ----------- - -* Added documentation for Proxy Apps in the Tethys Portal :ref:`portal_admin_pages` documentation. -* Added two new properties for Proxy Apps: **Back url** and **Open in new tab**. -* **Back url**: specify a back URL that will be appended to the app endpoint as a query param (e.g. if the back url ``https://my.back-url.org/`` is provided the app endpoint link will become ``https://my.portal.org/apps/foo?back=https://my.back-url.org/``). -* **Open in new tab**: the proxy app will be opened in a new tab (default is to open proxy apps in a new tab now). -* The Exit button in apps will now redirect to the URL in the ``back`` query parameter if it is provided. -* This will allow for Proxy apps pointing to Tethys apps in other Tethys 4 portals to exit to the referring portal when the user is finished. - -See: :ref:`portal_admin_proxy_apps` - -Tethys Portal -------------- - -* Additional templates and styles can be overriden. -* The registration page can now be overridden with a custom controller using the ``REGISTER_CONTROLLER`` setting. -* Minor changes to the structure and naming of the site settings in the :file:`portal_config.yml` file. - -See: :ref:`tethys_configuration` and :doc:`tethys_portal/admin_pages` +* Removed unused site settings. +* Refactored base templates for user and account pages to allow for separation and more control with custom CSS settings. +* Various improvements for Production deployments (See `Pull Request 942 `_). Documentation ------------- -* App Migration Documentation for Tethys 3 to 4: :ref:`migrate_2_to_3` -* All tutorials updated for new Bootstrap 5, Django 3.2, and Tethys 4 syntax: :ref:`tutorials` -* Other documentation updates as discussed above. - -Miscellaneous Changes ---------------------- - -* Changed logging scope for Tethys apps from ``tethys.apps`` to ``tethysapp`` to allow for using ``__name__`` to get/name loggers. +* Updated the Docker Production Deployment Tutorial for Tethys 4 Bug Fixes --------- -* Fixed `Issue 763: Spatial Dataset Service created w/ CLI does not work until manually saved in admin pages `_ -* Fixed `Issue 714: Restore Defaults Option of Site Command Breaks Tethys Portal `_ -* Fixed `Issue 760: Logging configuration is broken `_ -* Fixed `Issue 718: Error to bind the THREDDS data directory on Windows `_ -* Fixed `Issue 777: tethys_quotas.UserQuota' has no ForeignKey to 'tethys_apps.ProxyApp `_ -* Fixed `Issue 833: Fix ensure_oauth decorator `_ - -Security Fixes --------------- - -* Updated GeoServer and THREDDS containers used by `tethys docker` command to address log4j vulnerabilities. -* Addressed `Issue 719: CSP requires unsafe-eval for plot_view `_. +* Fix `Issue 931 Map Layout Bug Fixes `_ +* Fix `Issue 940 Update THREDDS Docker version (4.6.20 no longer published) `_ +* Fix `Issue 946 Fixed issue with tethys install when libmamba is set to default solver `_ Prior Release Notes =================== diff --git a/docs/whats_new/prior_releases.rst b/docs/whats_new/prior_releases.rst index 206059cef..fa964a83f 100644 --- a/docs/whats_new/prior_releases.rst +++ b/docs/whats_new/prior_releases.rst @@ -2,10 +2,182 @@ Prior Release Notes ******************* -**Last Updated:** December 2021 +**Last Updated:** May 2023 Information about prior releases is shown here. +Release 4.0 +=========== + +Python 3.10 +----------- + +* Tethys Platform formally updated to use Python 3.10 +* Should also support Python 3.7+ + +Django 3.2 +---------- + +* Django 2.2, the version Tethys 3 depended on, lost LTS status in April 11, 2022 +* Tethys was upgraded to be able to use **Django 3.2**, the new LTS version until April of 2024 + +See: `Django Supported Versions `_ + +Bootstrap 5 +----------- + +* Upgraded to use Bootstrap version 5 (Tethys 3 used version 3). +* Tethys Portal overhauled and re-themed using new capabilities of Bootstrap 5. + +See: `Boostrap 5 Documentation `_ + +Controller Decorators +--------------------- + +* Added three new decorators: ``controller``, ``consumer``, and ``handler``. +* Use these decorators for mapping controllers, consumers, and handlers to URLs. +* UrlMaps in app.py are no longer needed and the ``url_maps`` method is deprecated in favor of the new ``register_url_maps`` method. +* IMPORTANT: The ``url_maps`` method is temporarily supported in Tethys Platform 4.0.0 to make migration of apps from Tethys 3 to 4 easier, but will be removed in 4.1.0. + +See: :ref:`url_maps_api` + +WebSocket URLs +-------------- + +* WebSocket URLs now begin with ``/apps/`` to be consistent with the other URLs that are generated by Tethys Platform (e.g.: ``/apps/my-first-app/ws/``). + +See: :ref:`websockets` and :ref:`tutorials_websockets` + +Tethys Map Layout +----------------- + +* The first Tethys Layout, a new way to quickly and easily add fully functioning views to Tethys Apps. +* A fully-featured, customizable map view with layer tree, address search, attribute popups, click-n-plot capability, and more. +* Subclass the ``MapLayout`` class and override the ``compose_layers`` method to add layers. +* Enable / disable functionality by setting class properties. + +See: :ref:`sdk_layouts_api` and :ref:`map_layout` + +Comprehensive Tethys Manage Command +----------------------------------- + +* The ``tethys manage`` command now provides full range of ``manage.py`` commands. +* Use it to run any ``manage.py`` command, including commands provided by Django apps (e.g. ``django manage shell``). +* Use ``tethys manage path`` to get the path to the ``manage.py`` that Tethys is using. + +See: :ref:`tethys_manage_cmd` + +Tethys Docker Command +--------------------- + +* The ``tethys docker`` command was updated to use the ``postgis/postgis`` image instead of the ``mdillon/postgis`` image. +* The ``latest`` version of ``postgis/postgis`` will be pulled which was 14_3.3 at time of writing (PostgreSQL 14, PostGIS 3.3). + +See: ``_ + +Static Dependencies +------------------- + +* Replaced vendored static dependencies with CDN-hosted equivalants +* Removed all vendored packages--almost 2000 files! +* Upgraded all static dependencies to the latest versions +* Added alternative to install static dependencies using NPM to allow self-hosting of dependencies instead of CDNs + +See: ``STATICFILES_USE_NPM`` setting at :ref:`tethys_configuration` + +Custom Job Actions +------------------ + +* The :doc:`../tethys_sdk/gizmos/jobs_table` now allows custom actions to be defined and added. +* The order of the actions displayed in the actions dropdown menu can now be customized. + +See: :ref:`jobs-table` + +Scheduler App Settings +---------------------- + +* HTCondor and Dask Schedulers can now be assigned to apps using App Settings like other services. +* Tethys Dask Scheduler updated to be compatible to the latest version of Dask. + +See: :ref:`jobs_api_schedulers` + +Showcase Apps +------------- + +* The Developer pages, including the Gizmo Showcase, were removed from Tethys Portal. +* A new Gizmo Showcase App was developed to provide improved demonstrations and code examples of Tethys Gizmos. +* A new Layout Showcase App was developed to provide live demonstrations and code examples of the new Map Layout and future Layouts. + +See: :ref:`installation_showcase_apps` + +Apps Library +------------ + +* The apps in the apps library are now sorted alphabetically by default. +* Additionally, apps (including proxy apps) have a new ``order`` attribute that enables the app sorting to be customized. + +See: :ref:`tethys_portal_app_settings` + +App Settings +------------ + +* The ``color`` setting is now exposed on the App Settings page for an app, allowing it to be overriden by portal administrators. +* A new ``order`` setting give portal adminstrators control over the ordering of apps on the Apps Library page. Default ordering is alphabetical now. +* The ``icon`` setting now accepts URLs to images hosted on external websites. +* The new ``Scheduler Settings`` can be used to assign HTCondor and Dask Scheduler to apps as is done with other services. +* Added explanations of each of the common app settings to the documentation for :ref:`portal_admin_common_app_settings`. + +See: :ref:`portal_admin_apps_and_exts` + +Proxy Apps +---------- + +* Added documentation for Proxy Apps in the Tethys Portal :ref:`portal_admin_pages` documentation. +* Added two new properties for Proxy Apps: **Back url** and **Open in new tab**. +* **Back url**: specify a back URL that will be appended to the app endpoint as a query param (e.g. if the back url ``https://my.back-url.org/`` is provided the app endpoint link will become ``https://my.portal.org/apps/foo?back=https://my.back-url.org/``). +* **Open in new tab**: the proxy app will be opened in a new tab (default is to open proxy apps in a new tab now). +* The Exit button in apps will now redirect to the URL in the ``back`` query parameter if it is provided. +* This will allow for Proxy apps pointing to Tethys apps in other Tethys 4 portals to exit to the referring portal when the user is finished. + +See: :ref:`portal_admin_proxy_apps` + +Tethys Portal +------------- + +* Additional templates and styles can be overriden. +* The registration page can now be overridden with a custom controller using the ``REGISTER_CONTROLLER`` setting. +* Minor changes to the structure and naming of the site settings in the :file:`portal_config.yml` file. + +See: :ref:`tethys_configuration` and :doc:`../tethys_portal/admin_pages` + +Documentation +------------- + +* App Migration Documentation for Tethys 3 to 4: :ref:`migrate_2_to_3` +* All tutorials updated for new Bootstrap 5, Django 3.2, and Tethys 4 syntax: :ref:`tutorials` +* Other documentation updates as discussed above. + +Miscellaneous Changes +--------------------- + +* Changed logging scope for Tethys apps from ``tethys.apps`` to ``tethysapp`` to allow for using ``__name__`` to get/name loggers. + +Bug Fixes +--------- + +* Fixed `Issue 763: Spatial Dataset Service created w/ CLI does not work until manually saved in admin pages `_ +* Fixed `Issue 714: Restore Defaults Option of Site Command Breaks Tethys Portal `_ +* Fixed `Issue 760: Logging configuration is broken `_ +* Fixed `Issue 718: Error to bind the THREDDS data directory on Windows `_ +* Fixed `Issue 777: tethys_quotas.UserQuota' has no ForeignKey to 'tethys_apps.ProxyApp `_ +* Fixed `Issue 833: Fix ensure_oauth decorator `_ + +Security Fixes +-------------- + +* Updated GeoServer and THREDDS containers used by `tethys docker` command to address log4j vulnerabilities. +* Addressed `Issue 719: CSP requires unsafe-eval for plot_view `_. + Release 3.4 =========== diff --git a/tethys_apps/base/app_base.py b/tethys_apps/base/app_base.py index 846388630..fdd56829a 100644 --- a/tethys_apps/base/app_base.py +++ b/tethys_apps/base/app_base.py @@ -489,7 +489,7 @@ def custom_settings(self): :: - from tethys_sdk.app_settings import CustomSetting + from tethys_sdk.app_settings import CustomSetting, SecretCustomSetting, JSONCustomSetting class MyFirstApp(TethysAppBase): @@ -521,7 +521,24 @@ def custom_settings(self): type=CustomSetting.TYPE_BOOLEAN, description='Enable this feature when True.', required=True - ) + ), + CustomSetting( + name='feature_id', + type=CustomSetting.TYPE_UUID, + description='Feature ID.', + required=True + ), + SecretCustomSetting( + name='api_key', + description='API key for data service.', + required=True + ), + JSONCustomSetting( + name='app_configuration', + description='Primary app configuration.', + required=True, + default={"display_plots": True, "default_dataset": "streamflow"} + ), ) return custom_settings