diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1a04f7a77..aed30c1b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: # biome-format Format the committed files # biome-lint Lint and apply safe fixes to the committed files - repo: https://github.com/biomejs/pre-commit - rev: v2.5.2 + rev: v2.5.8 hooks: - id: biome-check additional_dependencies: ["@biomejs/biome@^1.9.4"] @@ -58,7 +58,7 @@ repos: # runs the ruff linter and formatter - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.20 + rev: v0.16.3 hooks: # linter - id: ruff-check # runs ruff check --force-exclude @@ -95,14 +95,14 @@ repos: # linter for django templates - repo: https://github.com/Riverside-Healthcare/djLint - rev: v1.40.4 + rev: v1.44.2 hooks: - id: djlint-reformat-django - id: djlint-django # linter for markdown files - see .rumdl.toml to configure rules - repo: https://github.com/rvben/rumdl-pre-commit - rev: v0.2.27 + rev: v0.2.55 hooks: - id: rumdl # Lint only (fails on issues) - id: rumdl-fmt # Auto-format and fail if issues remain @@ -110,7 +110,7 @@ repos: # runs pyrefly type checker on the sdk project - repo: https://github.com/facebook/pyrefly-pre-commit - rev: 1.2.0.dev1 + rev: 1.3.0.dev1 hooks: - id: pyrefly-check name: pyrefly-check (sdk) diff --git a/gateway/pyproject.toml b/gateway/pyproject.toml index 841ea7ca4..bdd44a5de 100644 --- a/gateway/pyproject.toml +++ b/gateway/pyproject.toml @@ -207,7 +207,7 @@ format_js = true # TODO: remove T002 when fixed https://github.com/djlint/djLint/issues/687 # https://www.djlint.com/docs/configuration/#ignore - ignore = "H006,H030,H031,T002" + ignore = "H006,H030,H031,T002,T038" include = "H017,H035" indent = 4 max_line_length = 119 diff --git a/gateway/sds_gateway/templates/account/login.html b/gateway/sds_gateway/templates/account/login.html index b09cdc55b..b144c5cdb 100644 --- a/gateway/sds_gateway/templates/account/login.html +++ b/gateway/sds_gateway/templates/account/login.html @@ -15,12 +15,12 @@ {% if not SOCIALACCOUNT_ONLY %} {% setvar link %} - {% endsetvar %} - {% setvar end_link %} - - {% endsetvar %} - {% element p %} - {% blocktranslate %}New here? {{ link }}Create an account{{ end_link }}.{% endblocktranslate %} + {% endsetvar %} + {% setvar end_link %} + +{% endsetvar %} +{% element p %} +{% blocktranslate %}New here? {{ link }}Create an account{{ end_link }}.{% endblocktranslate %} {% endelement %} {% url 'account_login' as login_url %} {% element form form=form method="post" action=login_url tags="entrance,login" %} diff --git a/gateway/sds_gateway/templates/admin/base_site.html b/gateway/sds_gateway/templates/admin/base_site.html index 5531a088c..ecbee7a1f 100644 --- a/gateway/sds_gateway/templates/admin/base_site.html +++ b/gateway/sds_gateway/templates/admin/base_site.html @@ -13,8 +13,7 @@

Django Administration · {{ ADMIN_CONSOLE_ENV }} · {{ SDS_SITE_FQDN }} {% if ADMIN_MONITORING_STATUS %} - + overall: {{ ADMIN_MONITORING_STATUS.overall_status }} {% endif %} diff --git a/gateway/sds_gateway/templates/allauth/elements/field.html b/gateway/sds_gateway/templates/allauth/elements/field.html index cb2803bb9..58fc8ad7e 100644 --- a/gateway/sds_gateway/templates/allauth/elements/field.html +++ b/gateway/sds_gateway/templates/allauth/elements/field.html @@ -6,18 +6,18 @@
-
- +{% endslot %} + + + {% elif attrs.type == "radio" %}
diff --git a/gateway/sds_gateway/templates/users/components/asset_list_table.html b/gateway/sds_gateway/templates/users/components/asset_list_table.html index 5baa2b2ea..092edd9ae 100644 --- a/gateway/sds_gateway/templates/users/components/asset_list_table.html +++ b/gateway/sds_gateway/templates/users/components/asset_list_table.html @@ -14,43 +14,42 @@ {# Wrapper for ListRefreshManager; omitted when injecting into existing wrapper #} {% if not ajax_fragment %}
{% endif %} - - {% if page_obj.object_list %} -
- - {{ page_obj.paginator.count }} {{ asset_type|default:"asset" }}{{ page_obj.paginator.count|pluralize }} found - -
- {% endif %} - -
-
-
- {% if not page_obj.object_list %} - - - {% include "users/components/asset_list_table_thead.html" %} -
Your {{ asset_type|default:"asset" }} list
- - {% else %} - - - {% include "users/components/asset_list_table_thead.html" %} - - {% for asset in page_obj %} - {% if "dataset_list_table_row" in asset_row_template %} - {% include asset_row_template with dataset=asset dropdown_menu_items=asset.dropdown_menu_items %} - {% else %} - {% include asset_row_template with capture=asset dropdown_menu_items=asset.dropdown_menu_items %} - {% endif %} - {% endfor %} - -
Your {{ asset_type|default:"asset" }} list
- {% endif %} -
+ +{% if page_obj.object_list %} +
+ + {{ page_obj.paginator.count }} {{ asset_type|default:"asset" }}{{ page_obj.paginator.count|pluralize }} found + +
+{% endif %} + +
+
+
+ {% if not page_obj.object_list %} + + + {% include "users/components/asset_list_table_thead.html" %} +
Your {{ asset_type|default:"asset" }} list
+ + {% else %} + + + {% include "users/components/asset_list_table_thead.html" %} + + {% for asset in page_obj %} + {% if "dataset_list_table_row" in asset_row_template %} + {% include asset_row_template with dataset=asset dropdown_menu_items=asset.dropdown_menu_items %} + {% else %} + {% include asset_row_template with capture=asset dropdown_menu_items=asset.dropdown_menu_items %} + {% endif %} + {% endfor %} + +
Your {{ asset_type|default:"asset" }} list
+ {% endif %}
{% if page_obj and page_obj.has_other_pages %} @@ -101,6 +100,7 @@

No {{ asset_type|default:"asset" }}s yet

{% endif %} - {% if not ajax_fragment %} +
+{% if not ajax_fragment %}
{% endif %} diff --git a/gateway/sds_gateway/templates/users/components/capture_list_table_row.html b/gateway/sds_gateway/templates/users/components/capture_list_table_row.html index cbeb7b3d7..5f116c72b 100644 --- a/gateway/sds_gateway/templates/users/components/capture_list_table_row.html +++ b/gateway/sds_gateway/templates/users/components/capture_list_table_row.html @@ -43,16 +43,16 @@ {% if capture.capture.created_at %} {% localtime on %} -
- {{ capture.capture.created_at|date:"Y-m-d" }} - {{ capture.capture.created_at|date:"H:i:s T" }} -
- {% endlocaltime %} - {% else %} - - - {% endif %} - - - {% include "users/components/dropdown_menu.html" with items=dropdown_menu_items %} - +
+ {{ capture.capture.created_at|date:"Y-m-d" }} + {{ capture.capture.created_at|date:"H:i:s T" }} +
+ {% endlocaltime %} + {% else %} + - + {% endif %} + + + {% include "users/components/dropdown_menu.html" with items=dropdown_menu_items %} + diff --git a/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html b/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html index 5eb9a9835..a27e66be8 100644 --- a/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html +++ b/gateway/sds_gateway/templates/users/components/dataset_details_modal_body.html @@ -73,72 +73,73 @@

{% if dataset_updated_at %} {% localtime on %} - {{ dataset_updated_at|date:"M j, Y, g:i A" }} - {% endlocaltime %} - {% else %} - — - {% endif %} -

+ {{ dataset_updated_at|date:"M j, Y, g:i A" }} + {% endlocaltime %} + {% else %} + — + {% endif %} +

+
- -
- -

{{ dataset.description|default:"No description provided" }}

-
-
- -
- {% if dataset.keywords %} - {% for keyword in dataset.keywords %}{{ keyword }}{% endfor %} - {% else %} - No keywords - {% endif %} +
+ +

{{ dataset.description|default:"No description provided" }}

+
+
+ +
+ {% if dataset.keywords %} + {% for keyword in dataset.keywords %}{{ keyword }}{% endfor %} + {% else %} + No keywords + {% endif %} +
- -
-
-
-
-
- File Summary -
-
-
-
-
-
-
-
Total Files
-

{{ statistics.total_files }}

+
+
+
+
+
+ File Summary +
+
+
+
+
+
+
+
Total Files
+

{{ statistics.total_files }}

+
-
-
-
-
-
Capture Files
-

{{ statistics.captures }}

+
+
+
+
Capture Files
+

{{ statistics.captures }}

+
-
-
-
-
-
Artifact Files
-

{{ statistics.artifacts }}

+
+
+
+
Artifact Files
+

{{ statistics.artifacts }}

+
-
-
-
-
-
Total Size
-

{{ statistics.total_size|filesizeformat }}

+
+
+
+
Total Size
+

{{ statistics.total_size|filesizeformat }}

+
@@ -146,19 +147,18 @@
Total Size
-
-
-
diff --git a/gateway/sds_gateway/templates/users/components/dataset_list_table_row.html b/gateway/sds_gateway/templates/users/components/dataset_list_table_row.html index 6775bf3e8..2d4b49f9f 100644 --- a/gateway/sds_gateway/templates/users/components/dataset_list_table_row.html +++ b/gateway/sds_gateway/templates/users/components/dataset_list_table_row.html @@ -72,18 +72,18 @@ {% if dataset.created_at %} {% localtime on %} -
- {{ dataset.created_at|date:"Y-m-d" }} - {{ dataset.created_at|date:"H:i:s T" }} -
- {% endlocaltime %} - {% else %} - - - {% endif %} - - - {% if dropdown_menu_items %} - {% include "users/components/dropdown_menu.html" with items=dropdown_menu_items %} - {% endif %} - +
+ {{ dataset.created_at|date:"Y-m-d" }} + {{ dataset.created_at|date:"H:i:s T" }} +
+ {% endlocaltime %} + {% else %} + - + {% endif %} + + + {% if dropdown_menu_items %} + {% include "users/components/dropdown_menu.html" with items=dropdown_menu_items %} + {% endif %} + diff --git a/gateway/sds_gateway/templates/users/partials/file_browser.html b/gateway/sds_gateway/templates/users/partials/file_browser.html index 2c0ec5f8d..5660c197c 100644 --- a/gateway/sds_gateway/templates/users/partials/file_browser.html +++ b/gateway/sds_gateway/templates/users/partials/file_browser.html @@ -68,7 +68,7 @@
- +
No datasets found

{% if dataset.created_at %} {% localtime on %} -
- {{ dataset.created_at|date:"Y-m-d" }} - {{ dataset.created_at|date:"H:i:s T" }} +
+ {{ dataset.created_at|date:"Y-m-d" }} + {{ dataset.created_at|date:"H:i:s T" }} +
+ {% endlocaltime %} + {% else %} + - + {% endif %} + + {% if user.is_authenticated and not dataset.is_federated %} + + - {% endlocaltime %} - {% else %} - - + + {% elif user.is_authenticated %} + — {% endif %} - - {% if user.is_authenticated and not dataset.is_federated %} - - - - {% elif user.is_authenticated %} - — - {% endif %} - - {% endfor %} - - - {% endif %} -
- - -{% if page_obj and page_obj.has_other_pages %} - + {% endif %} diff --git a/gateway/sds_gateway/templates/users/partials/share_modal.html b/gateway/sds_gateway/templates/users/partials/share_modal.html index e27a594ba..224d5ae8f 100644 --- a/gateway/sds_gateway/templates/users/partials/share_modal.html +++ b/gateway/sds_gateway/templates/users/partials/share_modal.html @@ -263,17 +263,17 @@
{% endif %} - - {% else %} - - - {{ user.permission_level|title }} - - {% endif %} + + {% else %} + + + {{ user.permission_level|title }} + + {% endif %} + - - - + + {% endif %} {% endfor %} diff --git a/gateway/sds_gateway/templates/users/user_api_key.html b/gateway/sds_gateway/templates/users/user_api_key.html index 2adae12f1..3e6d2afdf 100644 --- a/gateway/sds_gateway/templates/users/user_api_key.html +++ b/gateway/sds_gateway/templates/users/user_api_key.html @@ -89,132 +89,132 @@

API Keys

{% if key.created %} {% localtime on %} - {{ key.created|date:"Y-m-d" }} - {{ key.created|date:"H:i:s T" }} - {% endlocaltime %} - {% else %} - - - {% endif %} - - - {% if key.expiry_date %} - {% localtime on %} - {{ key.expiry_date|date:"Y-m-d" }} - {{ key.expiry_date|date:"H:i:s T" }} - {% endlocaltime %} - {% else %} - Does not expire - {% endif %} - - - {% if key.revoked %} - Yes - {% else %} - No - {% endif %} - - - {% if key.revoked %} - - {% else %} - - {% endif %} - - - {% endfor %} - - - {% else %} -
-

You currently do not have any API Keys.

+ +
+ {% endif %} + + + {% endfor %} + + + {% else %} +
+

You currently do not have any API Keys.

+
+ {% endif %} +
+ Back to Top +
- {% endif %} -
- Back to Top
- - - -