diff --git a/aether-kernel/aether/kernel/admin.py b/aether-kernel/aether/kernel/admin.py index 89ff6facb..de5530b20 100644 --- a/aether-kernel/aether/kernel/admin.py +++ b/aether-kernel/aether/kernel/admin.py @@ -22,9 +22,21 @@ from .api import models if settings.MULTITENANCY: # pragma: no cover - PROJECT_LIST_FILTER = ('mt__realm',) - CHILD_LIST_FILTER = ('project__mt__realm', 'project__active',) - ATTACH_LIST_FILTER = ('submission__project__mt__realm', 'submission__project__active',) + PROJECT_LIST_FILTER = ( + ('mt__realm', admin.EmptyFieldListFilter), + 'mt__realm', + ) + CHILD_LIST_FILTER = ( + 'project__active', + ('project__mt__realm', admin.EmptyFieldListFilter), + 'project__mt__realm', + ) + ATTACH_LIST_FILTER = ( + 'submission__project__active', + ('submission__project__mt__realm', admin.EmptyFieldListFilter), + 'submission__project__mt__realm', + ) + else: # pragma: no cover PROJECT_LIST_FILTER = [] CHILD_LIST_FILTER = ('project__active',) @@ -50,12 +62,12 @@ class MappingSetAdmin(BaseAdmin): class MappingAdmin(BaseAdmin): - list_display = ('id', 'name', 'revision', 'mappingset',) + list_display = ('id', 'name', 'revision', 'mappingset', 'project',) list_filter = ('is_active', 'is_read_only',) + CHILD_LIST_FILTER class SubmissionAdmin(BaseAdmin): - list_display = ('id', 'mappingset', 'is_extracted',) + list_display = ('id', 'mappingset', 'is_extracted', 'project',) list_filter = ('is_extracted',) + CHILD_LIST_FILTER @@ -67,6 +79,7 @@ class AttachmentAdmin(BaseAdmin): class SchemaAdmin(BaseAdmin): list_display = ('id', 'name', 'family',) + list_filter = ('schemadecorators', admin.EmptyFieldListFilter), class SchemaDecoratorAdmin(BaseAdmin): @@ -76,8 +89,16 @@ class SchemaDecoratorAdmin(BaseAdmin): class EntityAdmin(BaseAdmin): date_hierarchy = 'created' - list_display = ('id', 'status', 'submission', 'mapping',) - list_filter = ('status',) + CHILD_LIST_FILTER + list_display = ( + 'id', 'status', + 'submission', 'mapping', + 'project', 'schema', + ) + list_filter = ( + 'status', + ('project', admin.EmptyFieldListFilter), + ('schema', admin.EmptyFieldListFilter), + ) + CHILD_LIST_FILTER class ExportTaskAdmin(BaseAdmin): diff --git a/aether-kernel/conf/pip/requirements.txt b/aether-kernel/conf/pip/requirements.txt index 364493e4c..2261a19d0 100644 --- a/aether-kernel/conf/pip/requirements.txt +++ b/aether-kernel/conf/pip/requirements.txt @@ -18,8 +18,8 @@ asgiref==3.4.1 attrs==21.2.0 autopep8==1.5.7 avro-python3==1.10.2 -boto3==1.18.65 -botocore==1.21.65 +boto3==1.19.1 +botocore==1.22.1 cachetools==4.2.4 certifi==2021.10.8 charset-normalizer==2.0.7 @@ -76,7 +76,7 @@ openpyxl==3.0.9 packaging==21.0 ply==3.11 prometheus-client==0.11.0 -protobuf==3.18.1 +protobuf==3.19.0 psycopg2-binary==2.9.1 pyasn1==0.4.8 pyasn1-modules==0.2.8 diff --git a/aether-odk-module/aether/odk/admin.py b/aether-odk-module/aether/odk/admin.py index cdd7b07d0..283bb17e0 100644 --- a/aether-odk-module/aether/odk/admin.py +++ b/aether-odk-module/aether/odk/admin.py @@ -29,9 +29,19 @@ ) if settings.MULTITENANCY: # pragma: no cover - PROJECT_LIST_FILTER = ('mt__realm',) - XFORM_LIST_FILTER = ('project__mt__realm',) - MEDIAFILE_LIST_FILTER = ('xform__project__mt__realm',) + PROJECT_LIST_FILTER = ( + ('mt__realm', admin.EmptyFieldListFilter), + 'mt__realm', + ) + XFORM_LIST_FILTER = ( + ('project__mt__realm', admin.EmptyFieldListFilter), + 'project__mt__realm', + ) + MEDIAFILE_LIST_FILTER = ( + ('xform__project__mt__realm', admin.EmptyFieldListFilter), + 'xform__project__mt__realm', + ) + else: # pragma: no cover PROJECT_LIST_FILTER = [] XFORM_LIST_FILTER = [] @@ -111,7 +121,7 @@ def propagate(self, request, queryset): 'version', 'active', ) - list_filter = ('active',) + XFORM_LIST_FILTER + list_filter = ('active', 'project__active',) + XFORM_LIST_FILTER date_hierarchy = 'modified_at' readonly_fields = ( 'title', 'form_id', 'version', 'md5sum', @@ -143,7 +153,7 @@ def propagate(self, request, queryset): class MediaFileAdmin(BaseAdmin): list_display = ('xform', 'name', 'md5sum', 'media_file',) - list_filter = MEDIAFILE_LIST_FILTER + list_filter = ('xform__active', 'xform__project__active',) + MEDIAFILE_LIST_FILTER readonly_fields = ('md5sum',) search_fields = ('xform', 'name',) ordering = list_display diff --git a/aether-odk-module/conf/pip/primary-requirements.txt b/aether-odk-module/conf/pip/primary-requirements.txt index 310f6ce68..945a2af16 100644 --- a/aether-odk-module/conf/pip/primary-requirements.txt +++ b/aether-odk-module/conf/pip/primary-requirements.txt @@ -22,5 +22,5 @@ aether.sdk[cache,server,storage,test] # xForm and data manipulation lxml python-dateutil -pyxform +pyxform # https://github.com/XLSForm/pyxform spavro diff --git a/aether-odk-module/conf/pip/requirements.txt b/aether-odk-module/conf/pip/requirements.txt index 71eb32cec..4482e0015 100644 --- a/aether-odk-module/conf/pip/requirements.txt +++ b/aether-odk-module/conf/pip/requirements.txt @@ -15,8 +15,8 @@ aether.sdk==1.4.0 asgiref==3.4.1 autopep8==1.5.7 -boto3==1.18.65 -botocore==1.21.65 +boto3==1.19.1 +botocore==1.22.1 cachetools==4.2.4 certifi==2021.10.8 charset-normalizer==2.0.7 @@ -38,7 +38,6 @@ djangorestframework==3.12.4 drf-dynamic-fields==0.3.1 flake8==4.0.1 flake8-quotes==3.3.1 -FormEncode==1.3.1 funcy==1.16 google-api-core==2.1.1 google-auth==2.3.0 @@ -52,14 +51,13 @@ greenlet==1.1.2 idna==3.3 Jinja2==3.0.2 jmespath==0.10.0 -linecache2==1.0.0 lxml==4.6.3 Markdown==3.3.4 MarkupSafe==2.0.1 mccabe==0.6.1 minio==6.0.2 prometheus-client==0.11.0 -protobuf==3.18.1 +protobuf==3.19.0 psycopg2-binary==2.9.1 pyasn1==0.4.8 pyasn1-modules==0.2.8 @@ -69,7 +67,7 @@ Pygments==2.10.0 python-dateutil==2.8.2 python-json-logger==2.0.2 pytz==2021.3 -pyxform==1.6.0 +pyxform==1.7.0 redis==3.5.3 requests==2.26.0 rsa==4.7.2 @@ -81,9 +79,6 @@ SQLAlchemy==1.4.26 sqlparse==0.4.2 tblib==1.7.0 toml==0.10.2 -traceback2==1.4.0 -unicodecsv==0.14.1 -unittest2==1.1.0 urllib3==1.26.7 uWSGI==2.0.20 xlrd==1.2.0 diff --git a/aether-ui/aether/ui/admin.py b/aether-ui/aether/ui/admin.py index d4f4714fa..c8f9e529e 100644 --- a/aether-ui/aether/ui/admin.py +++ b/aether-ui/aether/ui/admin.py @@ -23,9 +23,19 @@ from .api import models, utils if settings.MULTITENANCY: # pragma: no cover - PROJECT_LIST_FILTER = ('mt__realm',) - PIPELINE_LIST_FILTER = ('project__mt__realm',) - CONTRACT_LIST_FILTER = ('pipeline__project__mt__realm',) + PROJECT_LIST_FILTER = ( + ('mt__realm', admin.EmptyFieldListFilter), + 'mt__realm', + ) + PIPELINE_LIST_FILTER = ( + ('project__mt__realm', admin.EmptyFieldListFilter), + 'project__mt__realm', + ) + CONTRACT_LIST_FILTER = ( + ('pipeline__project__mt__realm', admin.EmptyFieldListFilter), + 'pipeline__project__mt__realm', + ) + else: # pragma: no cover PROJECT_LIST_FILTER = [] PIPELINE_LIST_FILTER = [] diff --git a/aether-ui/conf/pip/requirements.txt b/aether-ui/conf/pip/requirements.txt index fe5c8c9be..f599c74bd 100644 --- a/aether-ui/conf/pip/requirements.txt +++ b/aether-ui/conf/pip/requirements.txt @@ -15,8 +15,8 @@ aether.sdk==1.4.0 asgiref==3.4.1 autopep8==1.5.7 -boto3==1.18.65 -botocore==1.21.65 +boto3==1.19.1 +botocore==1.22.1 cachetools==4.2.4 certifi==2021.10.8 charset-normalizer==2.0.7 @@ -58,7 +58,7 @@ MarkupSafe==2.0.1 mccabe==0.6.1 minio==6.0.2 prometheus-client==0.11.0 -protobuf==3.18.1 +protobuf==3.19.0 psycopg2-binary==2.9.1 pyasn1==0.4.8 pyasn1-modules==0.2.8