Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/dashboards/graphql/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def capacity_and_resources(self, queryset, value: list[strawberry.ID], prefix: s
class CapacityAndResourceFilter:
id: strawberry.ID | None = strawberry.UNSET
is_active: bool | None = strawberry.UNSET
title: strawberry.auto

@strawberry_django.filter_field
def search(self, value: str, prefix: str) -> Q:
Expand Down
4 changes: 3 additions & 1 deletion apps/reports/graphql/types.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import strawberry
import strawberry_django
from asgiref.sync import sync_to_async

from apps.reports.models import (
DocumentExtraction,
Expand Down Expand Up @@ -56,7 +57,7 @@ class ReportType:
iframe_url: strawberry.auto
visibility: ReportVisibility
report_type: ReportTypeEnum
thematic_area_id: strawberry.ID
thematic_area_id: strawberry.ID | None

@strawberry.field
def content_type_display(self) -> str:
Expand All @@ -67,6 +68,7 @@ def visibility_display(self) -> str:
return self.get_visibility_display() # type: ignore[reportAttributeAccessIssue]

@strawberry.field
@sync_to_async
def report_type_display(self) -> str:
return self.get_report_type_display() # type: ignore[reportAttributeAccessIssue]

Expand Down
22 changes: 12 additions & 10 deletions helm/snapshots/alpha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ stringData:
POSTGRES_PASSWORD: "test-password"
POSTGRES_PORT: "5432"
POSTGRES_USER: "postgres"
SENTRY_DSN: "https://sentry.test.com"

---
# Source: ercs-backend-helm/charts/app/charts/minio/templates/provisioning-configmap.yaml
Expand Down Expand Up @@ -256,6 +257,7 @@ data:
CSRF_COOKIE_DOMAIN: ".example.com"
DJANGO_DEBUG: "false"
FRONTEND_DOMAIN: "https://ercs-frontend.test.com"
SENTRY_ENABLED: "false"
SESSION_COOKIE_DOMAIN: ".example.com"

---
Expand Down Expand Up @@ -561,8 +563,8 @@ spec:
template:
metadata:
annotations:
checksum/secret: 9323ef98ced6d9a505d3f0c1e990e52e7df25cb26d497b22d6150a5c6eb76abb
checksum/configmap: 6ba5453622d2a176dcdcf3399bdffaa20a6a38105a9e6a0654a92baa1a0da3fd
checksum/secret: e77f1403534ce3ff6cd39b1662c58f90d38491605f9729a6986ce723a0aad6ed
checksum/configmap: 287a079f9e9782396ed4d04a5aeba0aff708103af9eebda1d1bf1b21da310e7b
labels:
app: release-name-app
component: api
Expand Down Expand Up @@ -616,8 +618,8 @@ spec:
template:
metadata:
annotations:
checksum/secret: 9323ef98ced6d9a505d3f0c1e990e52e7df25cb26d497b22d6150a5c6eb76abb
checksum/configmap: 6ba5453622d2a176dcdcf3399bdffaa20a6a38105a9e6a0654a92baa1a0da3fd
checksum/secret: e77f1403534ce3ff6cd39b1662c58f90d38491605f9729a6986ce723a0aad6ed
checksum/configmap: 287a079f9e9782396ed4d04a5aeba0aff708103af9eebda1d1bf1b21da310e7b
labels:
app: release-name-app
component: worker-beat
Expand Down Expand Up @@ -675,8 +677,8 @@ spec:
template:
metadata:
annotations:
checksum/secret: 9323ef98ced6d9a505d3f0c1e990e52e7df25cb26d497b22d6150a5c6eb76abb
checksum/configmap: 6ba5453622d2a176dcdcf3399bdffaa20a6a38105a9e6a0654a92baa1a0da3fd
checksum/secret: e77f1403534ce3ff6cd39b1662c58f90d38491605f9729a6986ce723a0aad6ed
checksum/configmap: 287a079f9e9782396ed4d04a5aeba0aff708103af9eebda1d1bf1b21da310e7b
labels:
app: release-name-app
component: worker
Expand Down Expand Up @@ -913,8 +915,8 @@ spec:
template:
metadata:
annotations:
checksum/secret: 9323ef98ced6d9a505d3f0c1e990e52e7df25cb26d497b22d6150a5c6eb76abb
checksum/configmap: 6ba5453622d2a176dcdcf3399bdffaa20a6a38105a9e6a0654a92baa1a0da3fd
checksum/secret: e77f1403534ce3ff6cd39b1662c58f90d38491605f9729a6986ce723a0aad6ed
checksum/configmap: 287a079f9e9782396ed4d04a5aeba0aff708103af9eebda1d1bf1b21da310e7b
labels:
app: release-name-app
component: argo-hooks
Expand Down Expand Up @@ -956,8 +958,8 @@ spec:
template:
metadata:
annotations:
checksum/secret: 9323ef98ced6d9a505d3f0c1e990e52e7df25cb26d497b22d6150a5c6eb76abb
checksum/configmap: 6ba5453622d2a176dcdcf3399bdffaa20a6a38105a9e6a0654a92baa1a0da3fd
checksum/secret: e77f1403534ce3ff6cd39b1662c58f90d38491605f9729a6986ce723a0aad6ed
checksum/configmap: 287a079f9e9782396ed4d04a5aeba0aff708103af9eebda1d1bf1b21da310e7b
labels:
app: release-name-app
component: argo-hooks
Expand Down
1 change: 1 addition & 0 deletions helm/tests/alpha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ app:
DJANGO_SECRET_KEY: "django-secret-key"
CELERY_REDIS_URL: "redis://redis:6379/0"
CACHE_REDIS_URL: "redis://redis:6379/1"
SENTRY_DSN: "https://sentry.test.com"
4 changes: 4 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ app:
FRONTEND_DOMAIN: "{{ required \".app.env.FRONTEND_DOMAIN\" nil }}"
SESSION_COOKIE_DOMAIN: "{{ required \".app.env.SESSION_COOKIE_DOMAIN\" nil }}"
CSRF_COOKIE_DOMAIN: "{{ required \".app.env.CSRF_COOKIE_DOMAIN\" nil }}"
# Sentry
SENTRY_ENABLED: "false"

secrets:
DJANGO_SECRET_KEY: "{{ required \".Values.secrets.DJANGO_SECRET_KEY\" nil }}"
Expand All @@ -169,3 +171,5 @@ app:
# Redis
CELERY_REDIS_URL: "redis://{{ printf \"%s-master\" (include \"common.names.fullname\" $.Subcharts.redis) }}:6379/0"
CACHE_REDIS_URL: "redis://{{ printf \"%s-master\" (include \"common.names.fullname\" $.Subcharts.redis) }}:6379/1"
# sentry
SENTRY_DSN: "{{ required \".app.secrets.SENTRY_DSN\" nil }}"
3 changes: 2 additions & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ input CapacityAndResourceCreateInput {
input CapacityAndResourceFilter {
id: ID
isActive: Boolean
title: StrFilterLookup
AND: CapacityAndResourceFilter
OR: CapacityAndResourceFilter
NOT: CapacityAndResourceFilter
Expand Down Expand Up @@ -1034,7 +1035,7 @@ type ReportType {
iframeUrl: String
visibility: ReportVisibility!
reportType: ReportTypeEnum!
thematicAreaId: ID!
thematicAreaId: ID
regionId: ID
disasterType: String
owner: String
Expand Down