diff --git a/client/src/app/admin/components/criteria-family/criteria-family-form.component.html b/client/src/app/admin/components/criteria-family/criteria-family-form.component.html index 9efb6a0cc13b15b3870c4319a07fd39dc0f8a96a..d8b5a066c7d055c812f993aca5f7dd9311a9d62e 100644 --- a/client/src/app/admin/components/criteria-family/criteria-family-form.component.html +++ b/client/src/app/admin/components/criteria-family/criteria-family-form.component.html @@ -7,6 +7,10 @@ <label for="display">Display</label> <input type="number" class="form-control" name="display" formControlName="display"> </div> + <div class="custom-control custom-switch mb-3"> + <input class="custom-control-input" type="checkbox" id="opened" name="opened" formControlName="opened"> + <label class="custom-control-label" for="opened">Opened</label> + </div> <div class="form-group"> <ng-content></ng-content> </div> diff --git a/client/src/app/admin/components/criteria-family/criteria-family-form.component.ts b/client/src/app/admin/components/criteria-family/criteria-family-form.component.ts index ee12b1eefbb66e74216c31c5339a98e62db63be6..9013e5e8f208926c91e230563e160b181e342acc 100644 --- a/client/src/app/admin/components/criteria-family/criteria-family-form.component.ts +++ b/client/src/app/admin/components/criteria-family/criteria-family-form.component.ts @@ -22,7 +22,8 @@ export class CriteriaFamilyFormComponent { public form = new FormGroup({ label: new FormControl('', [Validators.required]), - display: new FormControl('', [Validators.required]) + display: new FormControl('', [Validators.required]), + opened: new FormControl(true) }); ngOnInit() { diff --git a/client/src/app/admin/components/dataset-family/dataset-family-form.component.html b/client/src/app/admin/components/dataset-family/dataset-family-form.component.html index f55dbbd1e0bd7e7b7acfa83f9e75935bec2feae3..0da5da147f927b7235a573bbb921cde5edc0e086 100644 --- a/client/src/app/admin/components/dataset-family/dataset-family-form.component.html +++ b/client/src/app/admin/components/dataset-family/dataset-family-form.component.html @@ -7,6 +7,10 @@ <label for="display">Display</label> <input type="number" class="form-control" id="display" name="display" formControlName="display"> </div> + <div class="custom-control custom-switch mb-3"> + <input class="custom-control-input" type="checkbox" id="opened" name="opened" formControlName="opened"> + <label class="custom-control-label" for="opened">Opened</label> + </div> <div class="form-group"> <ng-content></ng-content> </div> diff --git a/client/src/app/admin/components/dataset-family/dataset-family-form.component.ts b/client/src/app/admin/components/dataset-family/dataset-family-form.component.ts index 2d1e8a1de085f2b05e0612f5eadd042f1b486834..c79513ee27d64c79d3d5282ed2190294287bb89c 100644 --- a/client/src/app/admin/components/dataset-family/dataset-family-form.component.ts +++ b/client/src/app/admin/components/dataset-family/dataset-family-form.component.ts @@ -22,7 +22,8 @@ export class DatasetFamilyFormComponent implements OnInit { public form = new FormGroup({ label: new FormControl('', [Validators.required]), - display: new FormControl('', [Validators.required]) + display: new FormControl('', [Validators.required]), + opened: new FormControl(true) }); ngOnInit() { diff --git a/client/src/app/admin/components/output-family/output-family-form.component.html b/client/src/app/admin/components/output-family/output-family-form.component.html index 9efb6a0cc13b15b3870c4319a07fd39dc0f8a96a..d8b5a066c7d055c812f993aca5f7dd9311a9d62e 100644 --- a/client/src/app/admin/components/output-family/output-family-form.component.html +++ b/client/src/app/admin/components/output-family/output-family-form.component.html @@ -7,6 +7,10 @@ <label for="display">Display</label> <input type="number" class="form-control" name="display" formControlName="display"> </div> + <div class="custom-control custom-switch mb-3"> + <input class="custom-control-input" type="checkbox" id="opened" name="opened" formControlName="opened"> + <label class="custom-control-label" for="opened">Opened</label> + </div> <div class="form-group"> <ng-content></ng-content> </div> diff --git a/client/src/app/admin/components/output-family/output-family-form.component.ts b/client/src/app/admin/components/output-family/output-family-form.component.ts index 1193be901a77b08124305df7364e9bc0c5155771..c36881070df6452534407ace8f0596584491026d 100644 --- a/client/src/app/admin/components/output-family/output-family-form.component.ts +++ b/client/src/app/admin/components/output-family/output-family-form.component.ts @@ -22,7 +22,8 @@ export class OutputFamilyFormComponent { public form = new FormGroup({ label: new FormControl('', [Validators.required]), - display: new FormControl('', [Validators.required]) + display: new FormControl('', [Validators.required]), + opened: new FormControl(true) }); ngOnInit() { diff --git a/client/src/app/instance/search/components/criteria/criteria-tabs.component.html b/client/src/app/instance/search/components/criteria/criteria-tabs.component.html index 45c654c3ff635409fc76494de4c80068ec530675..fa9d3aef3286c6ac5d3fb9cdd32279b4c00f2d3b 100644 --- a/client/src/app/instance/search/components/criteria/criteria-tabs.component.html +++ b/client/src/app/instance/search/components/criteria/criteria-tabs.component.html @@ -1,21 +1,6 @@ -<div *ngIf="criteriaFamilyList.length == 1 && (attributeList | attributeListByFamily:criteriaFamilyList[0].id).length > 0"> - <div class="border rounded my-2"> - <p class="border-bottom bg-light text-primary py-4 pl-4">{{ criteriaFamilyList[0].label }}</p> - <div class="px-3"> - <app-criteria-by-family - [attributeList]="attributeList | attributeListByFamily:criteriaFamilyList[0].id" - [criteriaList]="criteriaList" - (addCriterion)="emitAdd($event)" - (deleteCriterion)="emitDelete($event)"> - </app-criteria-by-family> - </div> - </div> -</div> - -<accordion *ngIf="criteriaFamilyList.length > 1" [isAnimated]="true"> +<accordion [isAnimated]="true"> <ng-container *ngFor="let family of criteriaFamilyList"> - <accordion-group #ag *ngIf="(attributeList | attributeListByFamily:family.id).length > 0" [panelClass]="'custom-accordion'" - [isOpen]="true" class="my-2"> + <accordion-group #ag *ngIf="(attributeList | attributeListByFamily:family.id).length > 0" [panelClass]="'custom-accordion'" [isOpen]="family.opened" class="my-2"> <button class="btn btn-link btn-block clearfix" accordion-heading> <span class="pull-left float-left"> {{ family.label }} diff --git a/client/src/app/instance/search/components/dataset/dataset-tabs.component.html b/client/src/app/instance/search/components/dataset/dataset-tabs.component.html index 08d61aae5a4772c90ef815b17ac4f262ec6e483a..0407fe894237ab475740462f635d1a57adb70ce5 100644 --- a/client/src/app/instance/search/components/dataset/dataset-tabs.component.html +++ b/client/src/app/instance/search/components/dataset/dataset-tabs.component.html @@ -1,26 +1,6 @@ -<div *ngIf="datasetFamilyList.length === 1"> - <div class="border rounded my-2"> - <p *ngIf="(datasetList | datasetListByFamily:datasetFamilyList[0].id).length === 1" class="border-bottom bg-light text-primary py-4 pl-4">Dataset</p> - <p *ngIf="(datasetList | datasetListByFamily:datasetFamilyList[0].id).length > 1" class="border-bottom bg-light text-primary py-4 pl-4">List of datasets</p> - <ul class="p-0"> - <li *ngFor="let dataset of (datasetList | datasetListByFamily:datasetFamilyList[0].id); last as isLast" - class="list-unstyled px-3 pt-3 pb-0"> - <app-dataset-card - [dataset]="dataset" - [survey]="surveyList | surveyByName:dataset.survey_name" - [instanceSelected]="instanceSelected" - [datasetSelected]="datasetSelected"> - </app-dataset-card> - <hr *ngIf="!isLast"> - </li> - </ul> - </div> -</div> - -<accordion *ngIf="datasetFamilyList.length > 1" [isAnimated]="true"> +<accordion [isAnimated]="true"> <ng-container *ngFor="let family of datasetFamilyList"> - <accordion-group #ag *ngIf="(datasetList | datasetListByFamily:family.id).length > 0" [panelClass]="'custom-accordion'" - [isOpen]="true" class="my-2"> + <accordion-group #ag *ngIf="(datasetList | datasetListByFamily:family.id).length > 0" [panelClass]="'custom-accordion'" [isOpen]="family.opened" class="my-2"> <button class="btn btn-link btn-block clearfix" accordion-heading> <span class="pull-left float-left"> {{ family.label }} diff --git a/client/src/app/instance/search/components/output/output-tabs.component.html b/client/src/app/instance/search/components/output/output-tabs.component.html index f8bc426ab79aa87ed0cab768dde80db7e4c44047..b90fc7bfb85065a187230e8cdb22202d2a304f73 100644 --- a/client/src/app/instance/search/components/output/output-tabs.component.html +++ b/client/src/app/instance/search/components/output/output-tabs.component.html @@ -1,22 +1,5 @@ -<div *ngIf="outputFamilyList.length == 1"> - <div class="border rounded my-2"> - <p class="border-bottom bg-light text-primary py-4 pl-4 mb-0">{{ outputFamilyList[0].label }}</p> - <div class="px-3 pb-3 pt-0"> - <app-output-by-family - [outputFamily]="outputFamilyList[0]" - [attributeList]="attributeList" - [outputCategoryList]="outputCategoryList" - [outputList]="outputList" - [designColor]="designColor" - (change)="change.emit($event)"> - </app-output-by-family> - </div> - </div> -</div> - -<accordion *ngIf="outputFamilyList.length > 1" [isAnimated]="true"> - <accordion-group #ag *ngFor="let family of outputFamilyList" - [panelClass]="'custom-accordion-output'" class="my-2" [isOpen]="true"> +<accordion [isAnimated]="true"> + <accordion-group #ag *ngFor="let family of outputFamilyList" [panelClass]="'custom-accordion-output'" class="my-2" [isOpen]="family.opened"> <button class="btn btn-link btn-block clearfix" accordion-heading> <span class="pull-left float-left"> {{ family.label }} diff --git a/client/src/app/metamodel/models/criteria-family.model.ts b/client/src/app/metamodel/models/criteria-family.model.ts index 568bb380173cddeabccd0ec17670af448b7c8db4..aeb7f90aa539d50d73eadad7016bbf1986c4fba1 100644 --- a/client/src/app/metamodel/models/criteria-family.model.ts +++ b/client/src/app/metamodel/models/criteria-family.model.ts @@ -11,4 +11,5 @@ export interface CriteriaFamily { id: number; label: string; display: number; + opened: boolean; } diff --git a/client/src/app/metamodel/models/dataset-family.model.ts b/client/src/app/metamodel/models/dataset-family.model.ts index f9e0f25addcfe908b79188d0a3f990b6f9a4a0fb..391f90392ee3e08741ef0b34ff73ad65cdb81569 100644 --- a/client/src/app/metamodel/models/dataset-family.model.ts +++ b/client/src/app/metamodel/models/dataset-family.model.ts @@ -11,4 +11,5 @@ export interface DatasetFamily { id: number; label: string; display: number; + opened: boolean; } diff --git a/client/src/app/metamodel/models/output-family.model.ts b/client/src/app/metamodel/models/output-family.model.ts index a673a0a5f0419aa6b5ed1d68c86ee81a9e7c7fc4..d1d1e076bba1a1bdba4a83c4f48705b8eed3b334 100644 --- a/client/src/app/metamodel/models/output-family.model.ts +++ b/client/src/app/metamodel/models/output-family.model.ts @@ -11,4 +11,5 @@ export interface OutputFamily { id: number; label: string; display: number; + opened: boolean; } diff --git a/conf-dev/create-db.sh b/conf-dev/create-db.sh index 3f1568ea4ace7b969114abae30ede37e03192add..464504e5a199237a333cf52dd96c6e720fd1ffbd 100644 --- a/conf-dev/create-db.sh +++ b/conf-dev/create-db.sh @@ -67,9 +67,9 @@ curl -d '{"name":"svom","label":"SVOM","description":"Survey used for testing"," curl -d '{"name":"iris","label":"IRiS","description":"Survey used for testing","link":"http://iris.lam.fr","manager":"S. Basa","id_database":1}' --header 'Content-Type: application/json' -X POST http://localhost/survey # Add dataset families -curl -d '{"label":"Default dataset family","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/instance/default/dataset-family -curl -d '{"label":"SVOM dataset family","display":20}' --header 'Content-Type: application/json' -X POST http://localhost/instance/default/dataset-family -curl -d '{"label":"IRiS dataset family","display":30}' --header 'Content-Type: application/json' -X POST http://localhost/instance/default/dataset-family +curl -d '{"label":"Default dataset family","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/instance/default/dataset-family +curl -d '{"label":"SVOM dataset family","display":20,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/instance/default/dataset-family +curl -d '{"label":"IRiS dataset family","display":30,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/instance/default/dataset-family # Add datasets curl -d '{"name":"vipers_dr2_w1","table_ref":"aspic_vipers_dr2_w1","label":"VIPERS-W1 (DR2)","description":"VIPERS W1 dataset","display":10,"data_path":"\/ASPIC\/VIPERS_DR2","config":{"images":[],"cone_search":{"cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"cone_search_sdss_enabled":true,"cone_search_sdss_display":10,"cone_search_background":[]},"download":{"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true},"summary":{"summary_enabled":true,"summary_opened":false},"server_link":{"server_link_enabled":false,"server_link_opened":false},"samp":{"samp_enabled":false,"samp_opened":false},"datatable":{"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false}},"public":true,"survey_name":"anis_survey"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset @@ -78,8 +78,8 @@ curl -d '{"name":"observations","table_ref":"v_observation","label":"IRiS obs"," curl -d '{"name":"vvds_f02_udeep","table_ref":"aspic_vvds_f02_udeep","label":"VVDS2h Ultra Deep","description":"VVDS2h Ultra Deep","display":20,"data_path":"","config":{"images":[],"cone_search":{"cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"cone_search_sdss_enabled":true,"cone_search_sdss_display":10,"cone_search_background":[]},"download":{"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true},"summary":{"summary_enabled":true,"summary_opened":false},"server_link":{"server_link_enabled":false,"server_link_opened":false},"samp":{"samp_enabled":false,"samp_opened":false},"datatable":{"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false}},"public":true,"survey_name":"anis_survey"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset # Add vipers_dr2_w1 attributes -curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vipers_dr2_w1/criteria-family -curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vipers_dr2_w1/output-family +curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vipers_dr2_w1/criteria-family +curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vipers_dr2_w1/output-family curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/output-family/1/output-category curl -d '{"id":1,"name":"num","label":"num","form_label":"num","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"field","type":"decimal","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"detail","renderer_config":{"display":"text","blank":true},"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":true,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":1,"id_output_category":1}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vipers_dr2_w1/attribute @@ -99,8 +99,8 @@ curl -d '{"id":57,"name":"spec1dnoise","label":"spec1dnoise","form_label":"spec1 curl -d '{"id":58,"name":"spec1dsky","label":"spec1dsky","form_label":"spec1dsky","description":null,"output_display":580,"criteria_display":580,"search_flag":null,"search_type":null,"type":"text","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"download","renderer_config":{"display":"icon-button","text":"DOWNLOAD","icon":"fas fa-download"},"display_detail":580,"selected":true,"order_by":false,"order_display":580,"detail":true,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":1}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vipers_dr2_w1/attribute # Add sp_cards attributes -curl -d '{"label":"Card","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/criteria-family -curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/output-family +curl -d '{"label":"Card","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/criteria-family +curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/output-family curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/output-family/2/output-category curl -d '{"id":1,"name":"acronym","label":"acronym","form_label":"Product Acronym","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":"select","type":"string","operator":"eq","min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":[],"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":[{"label":"LAMTEST","value":"LAMTEST","display":10},{"label":"LAMTEST_DC1","value":"LAMTEST_DC1","display":20},{"label":"MXT-EVT-CAL","value":"MXT-EVT-CAL","display":30}],"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":2,"id_output_category":2}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/attribute @@ -114,8 +114,8 @@ curl -d '{"id":8,"name":"search_kw","label":"search_kw","form_label":"KWs search curl -d '{"id":9,"name":"json_schema_uploaded","label":"json_schema_uploaded","form_label":"json_schema_uploaded","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":null,"type":"json","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":null}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/sp_cards/attribute # Add observations attributes -curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/observations/criteria-family -curl -d '{"label":"Default parameters","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/observations/output-family +curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/observations/criteria-family +curl -d '{"label":"Default parameters","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/observations/output-family curl -d '{"label":"Astrometry","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/output-family/3/output-category curl -d '{"label":"Observation","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/output-family/3/output-category @@ -130,8 +130,8 @@ curl -d '{"id":8,"name":"fits_file","label":"fits_file","form_label":"fits_file" curl -d '{"id":9,"name":"fits_png","label":"fits_png","form_label":"fits_png","description":null,"output_display":90,"criteria_display":90,"search_flag":null,"search_type":null,"type":"string","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":"image","renderer_config":{"type":"fits","display":"modal","width":"50","height":"50"},"display_detail":90,"selected":true,"order_by":false,"order_display":90,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":4}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/observations/attribute # Add vvds_f02_udeep attributes -curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vvds_f02_udeep/criteria-family -curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vvds_f02_udeep/output-family +curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vvds_f02_udeep/criteria-family +curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vvds_f02_udeep/output-family curl -d '{"label":"Default","display":10}' --header 'Content-Type: application/json' -X POST http://localhost/output-family/4/output-category curl -d '{"id":1,"name":"vvds_ident","label":"vvds_ident","form_label":"vvds_ident","description":null,"output_display":10,"criteria_display":10,"search_flag":"ID","search_type":null,"type":"decimal","operator":null,"min":null,"max":null,"placeholder_min":null,"placeholder_max":null,"renderer":null,"renderer_config":null,"display_detail":10,"selected":true,"order_by":false,"order_display":10,"detail":false,"renderer_detail":null,"renderer_detail_config":null,"options":null,"vo_utype":null,"vo_ucd":null,"vo_unit":null,"vo_description":null,"vo_datatype":null,"vo_size":null,"id_criteria_family":null,"id_output_category":5}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vvds_f02_udeep/attribute diff --git a/server/doctrine-proxy/__CG__AppEntityCriteriaFamily.php b/server/doctrine-proxy/__CG__AppEntityCriteriaFamily.php index 5b8e0972de7ecbab90fee3d1b7d269d2f45bc8ee..91114f9e5a4685514555781c1cb694a899bb0c6c 100644 --- a/server/doctrine-proxy/__CG__AppEntityCriteriaFamily.php +++ b/server/doctrine-proxy/__CG__AppEntityCriteriaFamily.php @@ -66,10 +66,10 @@ class CriteriaFamily extends \App\Entity\CriteriaFamily implements \Doctrine\ORM public function __sleep() { if ($this->__isInitialized__) { - return ['__isInitialized__', 'id', 'label', 'display', 'dataset']; + return ['__isInitialized__', 'id', 'label', 'display', 'opened', 'dataset']; } - return ['__isInitialized__', 'id', 'label', 'display', 'dataset']; + return ['__isInitialized__', 'id', 'label', 'display', 'opened', 'dataset']; } /** @@ -235,6 +235,28 @@ class CriteriaFamily extends \App\Entity\CriteriaFamily implements \Doctrine\ORM return parent::setDisplay($display); } + /** + * {@inheritDoc} + */ + public function getOpened() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOpened', []); + + return parent::getOpened(); + } + + /** + * {@inheritDoc} + */ + public function setOpened($opened) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOpened', [$opened]); + + return parent::setOpened($opened); + } + /** * {@inheritDoc} */ diff --git a/server/doctrine-proxy/__CG__AppEntityDatasetFamily.php b/server/doctrine-proxy/__CG__AppEntityDatasetFamily.php index 0adf9739fc645ed4e6fd2806935e7181826e8f17..f86a2a919859acdc727ad38ebab8c9ffcea322a0 100644 --- a/server/doctrine-proxy/__CG__AppEntityDatasetFamily.php +++ b/server/doctrine-proxy/__CG__AppEntityDatasetFamily.php @@ -66,10 +66,10 @@ class DatasetFamily extends \App\Entity\DatasetFamily implements \Doctrine\ORM\P public function __sleep() { if ($this->__isInitialized__) { - return ['__isInitialized__', 'id', 'label', 'display', 'instance', 'datasets']; + return ['__isInitialized__', 'id', 'label', 'display', 'opened', 'instance', 'datasets']; } - return ['__isInitialized__', 'id', 'label', 'display', 'instance', 'datasets']; + return ['__isInitialized__', 'id', 'label', 'display', 'opened', 'instance', 'datasets']; } /** @@ -235,6 +235,28 @@ class DatasetFamily extends \App\Entity\DatasetFamily implements \Doctrine\ORM\P return parent::setDisplay($display); } + /** + * {@inheritDoc} + */ + public function getOpened() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOpened', []); + + return parent::getOpened(); + } + + /** + * {@inheritDoc} + */ + public function setOpened($opened) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOpened', [$opened]); + + return parent::setOpened($opened); + } + /** * {@inheritDoc} */ diff --git a/server/doctrine-proxy/__CG__AppEntityOutputFamily.php b/server/doctrine-proxy/__CG__AppEntityOutputFamily.php index 2b372a634fdbf3cea0f38e99569b0abbb15c525e..6f3aedeb8794fdffc104b41d00bc3e6e2013f679 100644 --- a/server/doctrine-proxy/__CG__AppEntityOutputFamily.php +++ b/server/doctrine-proxy/__CG__AppEntityOutputFamily.php @@ -66,10 +66,10 @@ class OutputFamily extends \App\Entity\OutputFamily implements \Doctrine\ORM\Pro public function __sleep() { if ($this->__isInitialized__) { - return ['__isInitialized__', 'id', 'label', 'display', 'dataset']; + return ['__isInitialized__', 'id', 'label', 'display', 'opened', 'dataset']; } - return ['__isInitialized__', 'id', 'label', 'display', 'dataset']; + return ['__isInitialized__', 'id', 'label', 'display', 'opened', 'dataset']; } /** @@ -235,6 +235,28 @@ class OutputFamily extends \App\Entity\OutputFamily implements \Doctrine\ORM\Pro return parent::getDisplay(); } + /** + * {@inheritDoc} + */ + public function getOpened() + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'getOpened', []); + + return parent::getOpened(); + } + + /** + * {@inheritDoc} + */ + public function setOpened($opened) + { + + $this->__initializer__ && $this->__initializer__->__invoke($this, 'setOpened', [$opened]); + + return parent::setOpened($opened); + } + /** * {@inheritDoc} */ diff --git a/server/src/Action/CriteriaFamilyAction.php b/server/src/Action/CriteriaFamilyAction.php index 74489ad88dfa2291b80d1dc110c7533f08e102a9..2f4a4bbd4872d805ea682a3add2aeec143670c9b 100644 --- a/server/src/Action/CriteriaFamilyAction.php +++ b/server/src/Action/CriteriaFamilyAction.php @@ -59,7 +59,7 @@ final class CriteriaFamilyAction extends AbstractAction if ($request->getMethod() === PUT) { $parsedBody = $request->getParsedBody(); - $fields = array('label', 'display'); + $fields = array('label', 'display', 'opened'); foreach ($fields as $a) { if ($this->isEmptyField($a, $parsedBody)) { throw new HttpBadRequestException( @@ -96,6 +96,7 @@ final class CriteriaFamilyAction extends AbstractAction { $family->setLabel($parsedBody['label']); $family->setDisplay($parsedBody['display']); + $family->setOpened($parsedBody['opened']); $this->em->flush(); } } diff --git a/server/src/Action/CriteriaFamilyListAction.php b/server/src/Action/CriteriaFamilyListAction.php index cd4a2afa83d0b95d60aff208bb6ed9b02194c425..cb05722614036fd45d5109c47016f306e3c5622e 100644 --- a/server/src/Action/CriteriaFamilyListAction.php +++ b/server/src/Action/CriteriaFamilyListAction.php @@ -63,7 +63,7 @@ final class CriteriaFamilyListAction extends AbstractAction $parsedBody = $request->getParsedBody(); // To work this action needs information - foreach (array('label', 'display') as $a) { + foreach (array('label', 'display', 'opened') as $a) { if ($this->isEmptyField($a, $parsedBody)) { throw new HttpBadRequestException( $request, @@ -94,6 +94,7 @@ final class CriteriaFamilyListAction extends AbstractAction $family = new CriteriaFamily($dataset); $family->setLabel($parsedBody['label']); $family->setDisplay($parsedBody['display']); + $family->setOpened($parsedBody['opened']); $this->em->persist($family); $this->em->flush(); diff --git a/server/src/Action/DatasetFamilyAction.php b/server/src/Action/DatasetFamilyAction.php index 5d78b77b3b5564dfdc37d6600d3934e2fe5349f2..774ba164e37915038045a202bef9257e0add99c6 100644 --- a/server/src/Action/DatasetFamilyAction.php +++ b/server/src/Action/DatasetFamilyAction.php @@ -59,7 +59,7 @@ final class DatasetFamilyAction extends AbstractAction if ($request->getMethod() === PUT) { $parsedBody = $request->getParsedBody(); - $fields = array('label', 'display'); + $fields = array('label', 'display', 'opened'); foreach ($fields as $a) { if ($this->isEmptyField($a, $parsedBody)) { throw new HttpBadRequestException( @@ -96,6 +96,7 @@ final class DatasetFamilyAction extends AbstractAction { $family->setLabel($parsedBody['label']); $family->setDisplay($parsedBody['display']); + $family->setOpened($parsedBody['opened']); $this->em->flush(); } } diff --git a/server/src/Action/DatasetFamilyListAction.php b/server/src/Action/DatasetFamilyListAction.php index 408c1efd60d2d2a9d8e6e979c2829448f631b4e2..628d56267b2c45f7a55714de77f8a436dbfcf9b4 100644 --- a/server/src/Action/DatasetFamilyListAction.php +++ b/server/src/Action/DatasetFamilyListAction.php @@ -60,7 +60,7 @@ final class DatasetFamilyListAction extends AbstractAction $parsedBody = $request->getParsedBody(); // To work this action needs information - foreach (array('label', 'display') as $a) { + foreach (array('label', 'display', 'opened') as $a) { if ($this->isEmptyField($a, $parsedBody)) { throw new HttpBadRequestException( $request, @@ -91,6 +91,7 @@ final class DatasetFamilyListAction extends AbstractAction $family = new DatasetFamily($instance); $family->setLabel($parsedBody['label']); $family->setDisplay($parsedBody['display']); + $family->setOpened($parsedBody['opened']); $this->em->persist($family); $this->em->flush(); diff --git a/server/src/Action/OutputFamilyAction.php b/server/src/Action/OutputFamilyAction.php index a13c399d0e23550d1cc552071f02212637f65f8e..fc0b92b41975b9c64083b2a9786e567c898b4555 100644 --- a/server/src/Action/OutputFamilyAction.php +++ b/server/src/Action/OutputFamilyAction.php @@ -59,7 +59,7 @@ final class OutputFamilyAction extends AbstractAction if ($request->getMethod() === PUT) { $parsedBody = $request->getParsedBody(); - $fields = array('label', 'display'); + $fields = array('label', 'display', 'opened'); foreach ($fields as $a) { if ($this->isEmptyField($a, $parsedBody)) { throw new HttpBadRequestException( @@ -96,6 +96,7 @@ final class OutputFamilyAction extends AbstractAction { $family->setLabel($parsedBody['label']); $family->setDisplay($parsedBody['display']); + $family->setOpened($parsedBody['opened']); $this->em->flush(); } } diff --git a/server/src/Action/OutputFamilyListAction.php b/server/src/Action/OutputFamilyListAction.php index ce4b642619a497effdc9b698187b23d2706a87e4..6e112af0811b436d38b7d5243c295c451150d9f4 100644 --- a/server/src/Action/OutputFamilyListAction.php +++ b/server/src/Action/OutputFamilyListAction.php @@ -63,7 +63,7 @@ final class OutputFamilyListAction extends AbstractAction $parsedBody = $request->getParsedBody(); // To work this action needs information - foreach (array('label', 'display') as $a) { + foreach (array('label', 'display', 'opened') as $a) { if ($this->isEmptyField($a, $parsedBody)) { throw new HttpBadRequestException( $request, @@ -92,6 +92,7 @@ final class OutputFamilyListAction extends AbstractAction $family = new OutputFamily($dataset); $family->setLabel($parsedBody['label']); $family->setDisplay($parsedBody['display']); + $family->setOpened($parsedBody['opened']); $this->em->persist($family); $this->em->flush(); diff --git a/server/src/Entity/CriteriaFamily.php b/server/src/Entity/CriteriaFamily.php index 91e661224adff6142561700cc690da5e4782b2b5..b238afd04f2db80cfd8024c22715c8a4780d136e 100644 --- a/server/src/Entity/CriteriaFamily.php +++ b/server/src/Entity/CriteriaFamily.php @@ -44,6 +44,13 @@ class CriteriaFamily implements \JsonSerializable */ protected $display; + /** + * @var bool + * + * @Column(type="boolean", nullable=false) + */ + protected $opened; + /** * @var Dataset * @@ -82,12 +89,23 @@ class CriteriaFamily implements \JsonSerializable $this->display = $display; } + public function getOpened() + { + return $this->opened; + } + + public function setOpened($opened) + { + $this->opened = $opened; + } + public function jsonSerialize() { return [ 'id' => $this->getId(), 'label' => $this->getLabel(), - 'display' => $this->getDisplay() + 'display' => $this->getDisplay(), + 'opened' => $this->getOpened() ]; } } diff --git a/server/src/Entity/DatasetFamily.php b/server/src/Entity/DatasetFamily.php index df0b25ae7747ff8e131dc7da23467fa19f4b4c18..4a53a1325a22f4df96e8fbbd826f36b4190c0e17 100644 --- a/server/src/Entity/DatasetFamily.php +++ b/server/src/Entity/DatasetFamily.php @@ -44,6 +44,13 @@ class DatasetFamily implements \JsonSerializable */ protected $display; + /** + * @var bool + * + * @Column(type="boolean", nullable=false) + */ + protected $opened; + /** * @var Instance * @@ -89,6 +96,16 @@ class DatasetFamily implements \JsonSerializable $this->display = $display; } + public function getOpened() + { + return $this->opened; + } + + public function setOpened($opened) + { + $this->opened = $opened; + } + public function getInstance() { return $this->instance; @@ -104,7 +121,8 @@ class DatasetFamily implements \JsonSerializable return [ 'id' => $this->getId(), 'label' => $this->getLabel(), - 'display' => $this->getDisplay() + 'display' => $this->getDisplay(), + 'opened' => $this->getOpened() ]; } } diff --git a/server/src/Entity/OutputFamily.php b/server/src/Entity/OutputFamily.php index 278954ead0009dc0dab91af0af14241c3d877559..1e10fd6b142876e49122142c5e6fc4bd9a0aa043 100644 --- a/server/src/Entity/OutputFamily.php +++ b/server/src/Entity/OutputFamily.php @@ -44,6 +44,13 @@ class OutputFamily implements \JsonSerializable */ protected $display; + /** + * @var bool + * + * @Column(type="boolean", nullable=false) + */ + protected $opened; + /** * @var Dataset * @@ -82,12 +89,23 @@ class OutputFamily implements \JsonSerializable return $this->display; } + public function getOpened() + { + return $this->opened; + } + + public function setOpened($opened) + { + $this->opened = $opened; + } + public function jsonSerialize() { return [ 'id' => $this->getId(), 'label' => $this->getLabel(), - 'display' => $this->getDisplay() + 'display' => $this->getDisplay(), + 'opened' => $this->getOpened() ]; } } diff --git a/server/tests/Action/CriteriaFamilyActionTest.php b/server/tests/Action/CriteriaFamilyActionTest.php index 5b9e3fd12ee72d14dbc560b0fcbdb5ed9d8cdedb..51e6fd73cddc6ded6d43103fea4ba68b3317aff7 100644 --- a/server/tests/Action/CriteriaFamilyActionTest.php +++ b/server/tests/Action/CriteriaFamilyActionTest.php @@ -77,7 +77,8 @@ final class CriteriaFamilyActionTest extends TestCase $fields = array( 'label' => 'Modfied family', - 'display' => 20 + 'display' => 20, + 'opened' => true ); $request = $this->getRequest('PUT')->withParsedBody($fields); diff --git a/server/tests/Action/CriteriaFamilyListActionTest.php b/server/tests/Action/CriteriaFamilyListActionTest.php index 9eab6362ec81043ab644c1538a5bda9fc158f54c..b0cd8314ae01916c71f176fa81085c4092d6626e 100644 --- a/server/tests/Action/CriteriaFamilyListActionTest.php +++ b/server/tests/Action/CriteriaFamilyListActionTest.php @@ -85,7 +85,8 @@ final class CriteriaFamilyListActionTest extends TestCase $fields = array( 'label' => 'Default criteria family', - 'display' => 10 + 'display' => 10, + 'opened' => true ); $request = $this->getRequest('POST')->withParsedBody($fields); $response = ($this->action)($request, new Response(), array('name' => 'obs_cat')); diff --git a/server/tests/Action/DatasetFamilyActionTest.php b/server/tests/Action/DatasetFamilyActionTest.php index f2b162c0abb2d05f5f0b61380e7664532077115d..429e434578e8462597e2116405fa8718c039c991 100644 --- a/server/tests/Action/DatasetFamilyActionTest.php +++ b/server/tests/Action/DatasetFamilyActionTest.php @@ -77,7 +77,8 @@ final class DatasetFamilyActionTest extends TestCase $fields = array( 'label' => 'Modfied family', - 'display' => 20 + 'display' => 20, + 'opened' => true ); $request = $this->getRequest('PUT')->withParsedBody($fields); ($this->action)($request, new Response(), array('id' => 1)); diff --git a/server/tests/Action/DatasetFamilyListActionTest.php b/server/tests/Action/DatasetFamilyListActionTest.php index f184e3b21cc208b02669ac7c34e1eea1f1a79bfa..cfbcb25aa71b90dd44726c27d06bb2f9524b6795 100644 --- a/server/tests/Action/DatasetFamilyListActionTest.php +++ b/server/tests/Action/DatasetFamilyListActionTest.php @@ -84,7 +84,8 @@ final class DatasetFamilyListActionTest extends TestCase $fields = array( 'label' => 'Default family', - 'display' => 10 + 'display' => 10, + 'opened' => true ); $request = $this->getRequest('POST')->withParsedBody($fields); diff --git a/server/tests/Action/OutputFamilyActionTest.php b/server/tests/Action/OutputFamilyActionTest.php index 73c391b17662c098416fe98c312f38191f4a74b5..948c359cda3774386f0b1d0fc294023582744e74 100644 --- a/server/tests/Action/OutputFamilyActionTest.php +++ b/server/tests/Action/OutputFamilyActionTest.php @@ -77,7 +77,8 @@ final class OutputFamilyActionTest extends TestCase $fields = array( 'label' => 'Modfied family', - 'display' => 20 + 'display' => 20, + 'opened' => true ); $request = $this->getRequest('PUT')->withParsedBody($fields); diff --git a/server/tests/Action/OutputFamilyListActionTest.php b/server/tests/Action/OutputFamilyListActionTest.php index 9f5953d7b52644fd5e0af761dd44ea21145137e8..f094c9c22366520a9ace48a7fd247a88ce09898c 100644 --- a/server/tests/Action/OutputFamilyListActionTest.php +++ b/server/tests/Action/OutputFamilyListActionTest.php @@ -85,7 +85,8 @@ final class OutputFamilyListActionTest extends TestCase $fields = array( 'label' => 'Default output family', - 'display' => 10 + 'display' => 10, + 'opened' => true ); $request = $this->getRequest('POST')->withParsedBody($fields);