diff --git a/atdb/taskdatabase/migrations/0026_task_calculated_quality.py b/atdb/taskdatabase/migrations/0026_task_calculated_quality.py new file mode 100644 index 0000000000000000000000000000000000000000..18f5d36c154b8ae1662f0e8c0b0e99e7cd5b0403 --- /dev/null +++ b/atdb/taskdatabase/migrations/0026_task_calculated_quality.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1.4 on 2023-06-20 07:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('taskdatabase', '0025_auto_20230509_1631'), + ] + + operations = [ + migrations.AddField( + model_name='task', + name='calculated_quality', + field=models.CharField(blank=True, max_length=10, null=True), + ), + ] diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py index eb3b467daa118d16710b0771bbffe936a197e2cf..bee87c796d2f6116762481fa224b87ddb2ed5337 100644 --- a/atdb/taskdatabase/models.py +++ b/atdb/taskdatabase/models.py @@ -111,6 +111,7 @@ class Task(models.Model): new_status = models.CharField(max_length=50, default="defining", null=True) status = models.CharField(db_index=True, default="unknown", max_length=50,blank=True, null=True) quality = models.CharField(max_length=10,blank=True, null=True) + calculated_quality = models.CharField(max_length=10, blank=True, null=True) resume = models.BooleanField(verbose_name="Resume", default=True) creationTime = models.DateTimeField(verbose_name="CreationTime",default=datetime.utcnow, blank=True) diff --git a/atdb/taskdatabase/serializers.py b/atdb/taskdatabase/serializers.py index b7aec35769c4465710e5d6033646e403c861a0dd..82b0240a7dbdef4aee997519c66c2f009997f885 100644 --- a/atdb/taskdatabase/serializers.py +++ b/atdb/taskdatabase/serializers.py @@ -41,7 +41,7 @@ class TaskWriteSerializer(serializers.ModelSerializer): 'project','sas_id','priority','purge_policy','cleanup_policy','resume', 'new_workflow_id','new_workflow_uri','workflow', 'stage_request_id', - 'status','new_status','quality', + 'status','new_status','quality','calculated_quality', 'inputs','outputs','metrics','status_history','remarks', 'size_to_process','size_processed','total_processing_time', 'log_entries','meta_scheduling','environment','archive' @@ -95,7 +95,7 @@ class TaskReadSerializer(serializers.ModelSerializer): 'project','sas_id','priority','purge_policy','cleanup_policy','resume', 'workflow', 'stage_request_id', - 'status','new_status','quality', + 'status','new_status','quality','calculated_quality', 'inputs','outputs','metrics','remarks','status_history', 'size_to_process', 'size_processed', 'total_processing_time', 'log_entries','meta_scheduling','environment','archive' @@ -126,7 +126,7 @@ class TaskReadSerializerFast(serializers.ModelSerializer): 'project','sas_id','priority','purge_policy','cleanup_policy','resume', 'workflow', 'stage_request_id', - 'status','new_status','quality', + 'status','new_status','quality','calculated_quality', 'inputs','outputs','metrics','archive', 'size_to_process', 'size_processed', 'total_processing_time', ] diff --git a/atdb/taskdatabase/views.py b/atdb/taskdatabase/views.py index f732752c3c9e233ec80401fb66263f7ea9124041..9ea5e92def3b69884d6ec8250cd10fa4ed2fbe76 100644 --- a/atdb/taskdatabase/views.py +++ b/atdb/taskdatabase/views.py @@ -61,6 +61,7 @@ class TaskFilter(filters.FilterSet): 'sas_id': ['exact', 'icontains', 'in'], 'status': ['exact', 'icontains', 'in', 'startswith'], 'quality': ['exact', 'icontains', 'in', 'startswith'], + 'calculated_quality': ['exact', 'icontains', 'in'], 'purge_policy': ['exact'], 'cleanup_policy': ['exact','icontains','in'], 'priority': ['exact', 'lte', 'gte'],