diff --git a/ldvspec/lofardata/forms.py b/ldvspec/lofardata/forms.py index 1d2cf1d1ddc0d989290af65ce3ee5d17a901f143..d8b53597142da3a3739500e0dd6742fd4258081c 100644 --- a/ldvspec/lofardata/forms.py +++ b/ldvspec/lofardata/forms.py @@ -30,14 +30,14 @@ class WorkSpecificationForm(ModelForm): class Meta: model = WorkSpecification fields = ['filters', 'selected_workflow', 'selected_workflow_tag', 'processing_site', - 'predecessor_specification', 'batch_size', - 'is_auto_submit'] + 'predecessor_specification', 'batch_size', 'group', 'is_auto_submit'] labels = { 'selected_workflow': 'Selected workflow', 'selected_workflow_tag': 'Workflow tag', 'processing_site': 'Processing Site (ATDB)', 'predecessor_specification': 'Predecessor', 'batch_size': 'Files per task', + 'group': 'Group', 'is_auto_submit': 'Auto submit' } help_texts = {'selected_workflow': "The pipeline to run on the processing site.", @@ -45,6 +45,7 @@ class WorkSpecificationForm(ModelForm): 'processing_site': "The ATDB processing site to run a specific workflow in.", 'predecessor_specification': "The related predecessor of the current work specification.", 'batch_size': "The number of files every task generated by this work specification should have. Example: 10 files in total can be split into 5 tasks of 2 files.", + 'group': "Include the work specification to a group. Note that it will inherit the group's processing site and workflow specifications.", 'is_auto_submit': "By checking this box, the work specification will be directly sent to the processing site and thus does not need inspection." } diff --git a/ldvspec/lofardata/templates/lofardata/index.html b/ldvspec/lofardata/templates/lofardata/index.html index 1e9895a21068cd7651afe5b57d94530f52e2a240..7f7dc9237bfca25a09e6faab9a067ef8334e7dbd 100644 --- a/ldvspec/lofardata/templates/lofardata/index.html +++ b/ldvspec/lofardata/templates/lofardata/index.html @@ -14,6 +14,7 @@ href="{% url 'specification-create' %}"> <span class="icon icon--plus"></span></a> <a class="button button--secondary button--icon-button margin-left" + style="display: none" title="Create a new group" href="{% url 'group-create' %}"> <span class="icon icon--layer-plus"></span></a> diff --git a/ldvspec/lofardata/templates/lofardata/workspecification/create_update.html b/ldvspec/lofardata/templates/lofardata/workspecification/create_update.html index a0d3be019dfdd37fcacc1408aa6a45f5aa705cb0..bcb708c992d973507d9784b18aa4fe78006ce392 100644 --- a/ldvspec/lofardata/templates/lofardata/workspecification/create_update.html +++ b/ldvspec/lofardata/templates/lofardata/workspecification/create_update.html @@ -24,6 +24,18 @@ <!-- Standard input fields --> <div class="custom--div-margin"> <h3 class="text text--primary text--title">Selection</h3> + <div class="flex-wrapper flex-wrapper--row" id="div_id_group" style="display: none"> + <div class="flex-wrapper flex-wrapper--row custom__input--fixed-min-width"> + <label class="input__label" + for="id_group">{{ form.group.label }}</label> + <a class="tooltip-dias tooltip-dias-right custom--tooltip" + data-tooltip="{{ form.group.help_text }}">m</a> + </div> + <div class="input-select-wrapper icon--inline icon-after icon-after--angle-down margin-left margin-bottom"> + {% render_field form.group class="input input--select custom__input--fixed-width" %} + </div> + </div> + <div class="flex-wrapper flex-wrapper--row" id="div_id_processing_site"> <div class="flex-wrapper flex-wrapper--row custom__input--fixed-min-width"> <label class="input__label">{{ form.processing_site.label }}*</label> @@ -89,7 +101,6 @@ </div> </div> - <div class="flex-wrapper flex-wrapper--row" id="div_id_predecessor"> <div class="flex-wrapper flex-wrapper--row custom__input--fixed-min-width"> <label class="input__label"