diff --git a/client/src/app/admin/instance/dataset/components/attribute/design/index.ts b/client/src/app/admin/instance/dataset/components/attribute/design/index.ts deleted file mode 100644 index e2a18cde45ee5821f4cbbdff63ac2ebf00d12480..0000000000000000000000000000000000000000 --- a/client/src/app/admin/instance/dataset/components/attribute/design/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file is part of Anis Client. - * - * @copyright Laboratoire d'Astrophysique de Marseille / CNRS - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -import { TableDesignComponent } from './table-design.component'; -import { TrDesignComponent } from './tr-design.component'; - -export const designComponents = [ - TableDesignComponent, - TrDesignComponent -]; diff --git a/client/src/app/admin/instance/dataset/components/attribute/design/table-design.component.ts b/client/src/app/admin/instance/dataset/components/attribute/design/table-design.component.ts deleted file mode 100644 index 4ca4666de803c2c57e84ff169e20140aad1b5861..0000000000000000000000000000000000000000 --- a/client/src/app/admin/instance/dataset/components/attribute/design/table-design.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * This file is part of Anis Client. - * - * @copyright Laboratoire d'Astrophysique de Marseille / CNRS - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-table-design', - templateUrl: 'table-design.component.html' -}) -export class TableDesignComponent { } diff --git a/client/src/app/admin/instance/dataset/components/attribute/add-attribute.component.html b/client/src/app/admin/instance/dataset/components/attribute/general/add-attribute.component.html similarity index 100% rename from client/src/app/admin/instance/dataset/components/attribute/add-attribute.component.html rename to client/src/app/admin/instance/dataset/components/attribute/general/add-attribute.component.html diff --git a/client/src/app/admin/instance/dataset/components/attribute/add-attribute.component.ts b/client/src/app/admin/instance/dataset/components/attribute/general/add-attribute.component.ts similarity index 100% rename from client/src/app/admin/instance/dataset/components/attribute/add-attribute.component.ts rename to client/src/app/admin/instance/dataset/components/attribute/general/add-attribute.component.ts diff --git a/client/src/app/admin/instance/dataset/components/attribute/general/index.ts b/client/src/app/admin/instance/dataset/components/attribute/general/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..84d512b62a9431d496241b6185d0bf0aa4276ffa --- /dev/null +++ b/client/src/app/admin/instance/dataset/components/attribute/general/index.ts @@ -0,0 +1,18 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { AddAttributeComponent } from './add-attribute.component'; +import { TableGeneralComponent } from './table-general.component'; +import { TrGeneralComponent } from './tr-general.component'; + +export const generalComponents = [ + AddAttributeComponent, + TableGeneralComponent, + TrGeneralComponent +]; diff --git a/client/src/app/admin/instance/dataset/components/attribute/design/table-design.component.html b/client/src/app/admin/instance/dataset/components/attribute/general/table-general.component.html similarity index 66% rename from client/src/app/admin/instance/dataset/components/attribute/design/table-design.component.html rename to client/src/app/admin/instance/dataset/components/attribute/general/table-general.component.html index f1f6179acf52ffa10ed0554bdc02e56284a9d296..46abb92b1263ab72852abed9825bf9bfb8abd990 100644 --- a/client/src/app/admin/instance/dataset/components/attribute/design/table-design.component.html +++ b/client/src/app/admin/instance/dataset/components/attribute/general/table-general.component.html @@ -1,3 +1,16 @@ +<div class="row mb-1"> + <div class="col-12"> + <app-add-attribute + [columnList]="columnList" + [columnListIsLoading]="columnListIsLoading" + [columnListIsLoaded]="columnListIsLoaded" + [attributeList]="attributeList" + (loadColumnList)="loadColumnList.emit()" + (add)="addAttribute.emit($event)"> + </app-add-attribute> + </div> +</div> + <div class="table-responsive"> <table class="table table-bordered" aria-describedby="Edit attributes design"> <thead> diff --git a/client/src/app/admin/instance/dataset/components/attribute/general/table-general.component.ts b/client/src/app/admin/instance/dataset/components/attribute/general/table-general.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..537fdd8e7269ade8f611a0827344f91e21eec507 --- /dev/null +++ b/client/src/app/admin/instance/dataset/components/attribute/general/table-general.component.ts @@ -0,0 +1,26 @@ +/** + * This file is part of Anis Client. + * + * @copyright Laboratoire d'Astrophysique de Marseille / CNRS + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import { Component, Input, Output, EventEmitter } from '@angular/core'; + +import { Column } from 'src/app/admin/store/models'; +import { Attribute } from 'src/app/metamodel/models'; + +@Component({ + selector: 'app-table-general', + templateUrl: 'table-general.component.html' +}) +export class TableGeneralComponent { + @Input() columnList: Column[]; + @Input() columnListIsLoading: boolean; + @Input() columnListIsLoaded: boolean; + @Input() attributeList: Attribute[]; + @Output() loadColumnList: EventEmitter<{}> = new EventEmitter(); + @Output() addAttribute: EventEmitter<Attribute> = new EventEmitter(); +} diff --git a/client/src/app/admin/instance/dataset/components/attribute/design/tr-design.component.html b/client/src/app/admin/instance/dataset/components/attribute/general/tr-general.component.html similarity index 100% rename from client/src/app/admin/instance/dataset/components/attribute/design/tr-design.component.html rename to client/src/app/admin/instance/dataset/components/attribute/general/tr-general.component.html diff --git a/client/src/app/admin/instance/dataset/components/attribute/design/tr-design.component.ts b/client/src/app/admin/instance/dataset/components/attribute/general/tr-general.component.ts similarity index 91% rename from client/src/app/admin/instance/dataset/components/attribute/design/tr-design.component.ts rename to client/src/app/admin/instance/dataset/components/attribute/general/tr-general.component.ts index a1a67897ec3a2a8d453a2379c01002fd91378618..7b4c7ee84f43c18d0728190802c77dfc932dd00f 100644 --- a/client/src/app/admin/instance/dataset/components/attribute/design/tr-design.component.ts +++ b/client/src/app/admin/instance/dataset/components/attribute/general/tr-general.component.ts @@ -13,12 +13,12 @@ import { FormControl, FormGroup, Validators } from '@angular/forms'; import { Attribute, SelectOption } from 'src/app/metamodel/models'; @Component({ - selector: '[design]', - templateUrl: 'tr-design.component.html', + selector: '[general]', + templateUrl: 'tr-general.component.html', styleUrls: [ '../tr.component.scss' ], changeDetection: ChangeDetectionStrategy.OnPush }) -export class TrDesignComponent implements OnInit { +export class TrGeneralComponent implements OnInit { @Input() attribute: Attribute @Input() searchFlags: SelectOption[]; @Output() save: EventEmitter<Attribute> = new EventEmitter(); diff --git a/client/src/app/admin/instance/dataset/components/attribute/index.ts b/client/src/app/admin/instance/dataset/components/attribute/index.ts index fc2f19be83072e0b31e0947c6cacdeeca9ceb864..92a8597ae2e17287848ba705eac7dbf72377aeb9 100644 --- a/client/src/app/admin/instance/dataset/components/attribute/index.ts +++ b/client/src/app/admin/instance/dataset/components/attribute/index.ts @@ -7,8 +7,7 @@ * file that was distributed with this source code. */ -import { AddAttributeComponent } from './add-attribute.component'; -import { designComponents } from './design'; +import { generalComponents } from './general'; import { criteriaComponents } from './criteria'; import { outputComponents } from './output'; import { resultComponents } from './result'; @@ -16,8 +15,7 @@ import { detailComponents } from './detail'; import { voComponents } from './vo'; export const attributeComponents = [ - AddAttributeComponent, - designComponents, + generalComponents, criteriaComponents, outputComponents, resultComponents, diff --git a/client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.html b/client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.html index 9367f18d4f8cb6a855c4c81415b48fcecbc2eba4..4c129724e7ad52a528fdfefede88e3ad4cee8328 100644 --- a/client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.html +++ b/client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.html @@ -63,25 +63,11 @@ <label class="custom-control-label" for="private"><span class="fas fa-lock"></span> Private</label> </div> </accordion-group> - <accordion-group heading="Info survey" [isOpen]="true"> - <div class="custom-control custom-switch"> - <input class="custom-control-input" type="checkbox" id="info_survey_enabled" name="info_survey_enabled" formControlName="info_survey_enabled" (change)="checkInfoSurveyDisableOpened()"> - <label class="custom-control-label" for="info_survey_enabled">Enabled</label> - </div> - <div class="form-group"> - <label for="info_survey_label">Label</label> - <input type="text" class="form-control" id="info_survey_label" name="info_survey_label" formControlName="info_survey_label"> - </div> - </accordion-group> <accordion-group heading="Download" [isOpen]="true"> <div class="custom-control custom-switch"> <input class="custom-control-input" type="checkbox" id="download_enabled" name="download_enabled" formControlName="download_enabled" (change)="checkDownloadDisableOpened()"> <label class="custom-control-label" for="download_enabled">Enabled</label> </div> - <div class="custom-control custom-switch"> - <input class="custom-control-input" type="checkbox" id="download_opened" name="download_opened" formControlName="download_opened"> - <label class="custom-control-label" for="download_opened">Opened</label> - </div> <div class="custom-control custom-switch"> <input class="custom-control-input" type="checkbox" id="download_json" name="download_json" formControlName="download_json"> <label class="custom-control-label" for="download_json">Display download results button in JSON format</label> @@ -99,35 +85,17 @@ <label class="custom-control-label" for="download_vo">Display download results button in VO format</label> </div> </accordion-group> - <accordion-group heading="Summary" [isOpen]="true"> - <div class="custom-control custom-switch"> - <input class="custom-control-input" type="checkbox" id="summary_enabled" name="summary_enabled" formControlName="summary_enabled" (change)="checkSummaryDisableOpened()"> - <label class="custom-control-label" for="summary_enabled">Enabled</label> - </div> - <div class="custom-control custom-switch"> - <input class="custom-control-input" type="checkbox" id="summary_opened" name="summary_opened" formControlName="summary_opened"> - <label class="custom-control-label" for="summary_opened">Opened</label> - </div> - </accordion-group> <accordion-group heading="Server link" [isOpen]="true"> <div class="custom-control custom-switch"> - <input class="custom-control-input" type="checkbox" id="server_link_enabled" name="server_link_enabled" formControlName="server_link_enabled" (change)="checkServerLinkDisableOpened()"> + <input class="custom-control-input" type="checkbox" id="server_link_enabled" name="server_link_enabled" formControlName="server_link_enabled"> <label class="custom-control-label" for="server_link_enabled">Enabled</label> </div> - <div class="custom-control custom-switch"> - <input class="custom-control-input" type="checkbox" id="server_link_opened" name="server_link_opened" formControlName="server_link_opened"> - <label class="custom-control-label" for="server_link_opened">Opened</label> - </div> </accordion-group> <accordion-group heading="Datatable" [isOpen]="true"> <div class="custom-control custom-switch"> <input class="custom-control-input" type="checkbox" id="datatable_enabled" name="datatable_enabled" formControlName="datatable_enabled" (change)="checkDatatableDisablOpened()"> <label class="custom-control-label" for="datatable_enabled">Enabled</label> </div> - <div class="custom-control custom-switch"> - <input class="custom-control-input" type="checkbox" id="datatable_opened" name="datatable_opened" formControlName="datatable_opened"> - <label class="custom-control-label" for="datatable_opened">Open the results datatable accordion</label> - </div> <div class="custom-control custom-switch"> <input class="custom-control-input" type="checkbox" id="datatable_selectable_rows" name="datatable_selectable_rows" formControlName="datatable_selectable_rows"> <label class="custom-control-label" for="datatable_selectable_rows">Datatable rows selectable</label> diff --git a/client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.ts b/client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.ts index 9819ca21eb2593f669969d2bd51bf810f1458398..f98832959af7d9a656c48b10e5a3cf5b52521931 100644 --- a/client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.ts +++ b/client/src/app/admin/instance/dataset/components/dataset/dataset-form.component.ts @@ -37,29 +37,22 @@ export class DatasetFormComponent implements OnInit, OnChanges { public form = new FormGroup({ name: new FormControl('', [Validators.required]), - label: new FormControl('', [Validators.required]), - survey_name: new FormControl('', [Validators.required]), table_ref: new FormControl('', [Validators.required]), - id_dataset_family: new FormControl('', [Validators.required]), + label: new FormControl('', [Validators.required]), description: new FormControl('', [Validators.required]), - data_path: new FormControl(''), display: new FormControl('', [Validators.required]), - info_survey_enabled: new FormControl(false), - info_survey_label: new FormControl('More about this survey', [Validators.required]), + data_path: new FormControl(''), + public: new FormControl('', [Validators.required]), + survey_name: new FormControl('', [Validators.required]), + id_dataset_family: new FormControl('', [Validators.required]), download_enabled: new FormControl(true), - download_opened: new FormControl(false), download_json: new FormControl(true), download_csv: new FormControl(true), download_ascii: new FormControl(true), download_vo: new FormControl(false), - summary_enabled: new FormControl(false), - summary_opened: new FormControl({value: false, disabled: true}), server_link_enabled: new FormControl(false), - server_link_opened: new FormControl({value: false, disabled: true}), datatable_enabled: new FormControl(true), - datatable_opened: new FormControl(true), - datatable_selectable_rows: new FormControl(false), - public: new FormControl('', [Validators.required]) + datatable_selectable_rows: new FormControl(false) }); ngOnInit() { @@ -72,10 +65,7 @@ export class DatasetFormComponent implements OnInit, OnChanges { this.form.controls.id_dataset_family.setValue(this.idDatasetFamily); } - this.checkInfoSurveyDisableOpened(); this.checkDownloadDisableOpened(); - this.checkSummaryDisableOpened(); - this.checkServerLinkDisableOpened(); this.checkDatatableDisablOpened(); } @@ -111,25 +101,13 @@ export class DatasetFormComponent implements OnInit, OnChanges { this.loadRootDirectory.emit(`${this.instance.data_path}${path}`); } - checkInfoSurveyDisableOpened() { - if (this.form.controls.info_survey_enabled.value) { - this.form.controls.info_survey_label.enable(); - } else { - this.form.controls.info_survey_enabled.setValue(false); - this.form.controls.info_survey_label.disable(); - } - } - checkDownloadDisableOpened() { if (this.form.controls.download_enabled.value) { - this.form.controls.download_opened.enable(); this.form.controls.download_json.enable(); this.form.controls.download_csv.enable(); this.form.controls.download_ascii.enable(); this.form.controls.download_vo.enable(); } else { - this.form.controls.download_opened.setValue(false); - this.form.controls.download_opened.disable(); this.form.controls.download_json.setValue(false); this.form.controls.download_json.disable(); this.form.controls.download_csv.setValue(false); @@ -141,31 +119,10 @@ export class DatasetFormComponent implements OnInit, OnChanges { } } - checkSummaryDisableOpened() { - if (this.form.controls.summary_enabled.value) { - this.form.controls.summary_opened.enable(); - } else { - this.form.controls.summary_opened.setValue(false); - this.form.controls.summary_opened.disable(); - } - } - - checkServerLinkDisableOpened() { - if (this.form.controls.server_link_enabled.value) { - this.form.controls.server_link_opened.enable(); - } else { - this.form.controls.server_link_opened.setValue(false); - this.form.controls.server_link_opened.disable(); - } - } - checkDatatableDisablOpened() { if (this.form.controls.datatable_enabled.value) { - this.form.controls.datatable_opened.enable(); this.form.controls.datatable_selectable_rows.enable(); } else { - this.form.controls.datatable_opened.setValue(false); - this.form.controls.datatable_opened.disable(); this.form.controls.datatable_selectable_rows.setValue(false); this.form.controls.datatable_selectable_rows.disable(); } diff --git a/client/src/app/admin/instance/dataset/containers/configure-dataset.component.html b/client/src/app/admin/instance/dataset/containers/configure-dataset.component.html index 4113084c441c08794497770af90ef84fe1886856..0e5c27113ca24979a76dc24a8904249f8385f98d 100644 --- a/client/src/app/admin/instance/dataset/containers/configure-dataset.component.html +++ b/client/src/app/admin/instance/dataset/containers/configure-dataset.component.html @@ -33,19 +33,6 @@ </nav> <div class="row mt-1"> - <div class="col-12"> - <div class="btn-toolbar mb-3" role="toolbar" aria-label="Toolbar with button groups"> - <app-add-attribute - [columnList]="columnList | async" - [columnListIsLoading]="columnListIsLoading | async" - [columnListIsLoaded]="columnListIsLoaded | async" - [attributeList]="attributeList | async" - (loadColumnList)="loadColumnList()" - (add)="addAttribute($event)"> - </app-add-attribute> - </div> - </div> - <div class="col-12"> <div *ngIf="(attributeList | async).length < 1" class="alert alert-warning" role="alert"> <span class="fas fa-exclamation-triangle"></span> You must add at least one attribute to use this dataset @@ -90,15 +77,22 @@ </ul> </div> <div class="card-body" [ngSwitch]="tabSelected | async"> - <app-table-design *ngSwitchCase="'general'"> + <app-table-general + *ngSwitchCase="'general'" + [columnList]="columnList | async" + [columnListIsLoading]="columnListIsLoading | async" + [columnListIsLoaded]="columnListIsLoaded | async" + [attributeList]="attributeList | async" + (loadColumnList)="loadColumnList()" + (add)="addAttribute($event)"> <tr *ngFor="let attribute of (attributeList | async)" - design + general [attribute]="attribute" [searchFlags]="selectOptionList | async | optionListBySelect:'search_flag'" (save)="editAttribute($event)" (delete)="deleteAttribute($event)"> </tr> - </app-table-design> + </app-table-general> <app-table-criteria *ngSwitchCase="'criteria'"> <tr *ngFor="let attribute of (attributeList | async)" criteria diff --git a/client/src/app/instance/search/components/dataset/dataset-card.component.html b/client/src/app/instance/search/components/dataset/dataset-card.component.html index 91e9561b367369306b527ea0e9cc12b38656c911..175f9cd70d8c214147737494260b2b778907994e 100644 --- a/client/src/app/instance/search/components/dataset/dataset-card.component.html +++ b/client/src/app/instance/search/components/dataset/dataset-card.component.html @@ -10,18 +10,6 @@ <div class="row"> <p class="my-3">{{ dataset.description }}</p> </div> - <div *ngIf="dataset.info_survey_enabled" class="row"> - <button class="btn btn-link p-0" - popover="{{ survey.description }}" - popoverTitle="{{ survey.label }}" - placement="bottom" - [outsideClick]="true" - triggers="mouseenter:mouseleave"> - <small> - {{ dataset.info_survey_label }} <span class="fas fa-question-circle"></span> - </small> - </button> - </div> </div> <div class="col-auto"> <button *ngIf="dataset.name !== datasetSelected" diff --git a/client/src/app/metamodel/models/dataset.model.ts b/client/src/app/metamodel/models/dataset.model.ts index 67a2c68dbba92c2da8b60c2453dd481b1129d948..8ed53e7fe8ff7597d1ed6aa7c9108c514c16e1b7 100644 --- a/client/src/app/metamodel/models/dataset.model.ts +++ b/client/src/app/metamodel/models/dataset.model.ts @@ -20,21 +20,13 @@ export interface Dataset { display: number; data_path: string; public: boolean; - info_survey_enabled: boolean; - info_survey_label: string; download_enabled: boolean; - download_opened: boolean; download_json: boolean; download_csv: boolean; download_ascii: boolean; download_vo: boolean; - download_archive: boolean; - summary_enabled: boolean; - summary_opened: boolean; server_link_enabled: boolean; - server_link_opened: boolean; datatable_enabled: boolean; - datatable_opened: boolean; datatable_selectable_rows: boolean; cone_search_config_id: number; survey_name: string; diff --git a/conf-dev/create-db.sh b/conf-dev/create-db.sh index 00a5f5c3b7baa0acaf2539d24ec93638523b4cb1..e9d7d859987a4b3ca4bdd107bb08d99c998e52a3 100644 --- a/conf-dev/create-db.sh +++ b/conf-dev/create-db.sh @@ -62,11 +62,11 @@ curl -d '{"label":"SVOM dataset family","display":20,"opened":true}' --header 'C 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","public":true,"info_survey_enabled":true,"info_survey_label":"More about this survey","download_enabled":true,"download_opened":false,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"summary_enabled":true,"summary_opened":false,"server_link_enabled":false,"server_link_opened":false,"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false,"survey_name":"anis_survey"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset -curl -d '{"name":"sp_cards","table_ref":"sp_cards","label":"SP Metadata","description":"Contains metadata of scientific products (Core Program & General Program)","display":30,"data_path":"","public":true,"info_survey_enabled":true,"info_survey_label":"More about this survey","download_enabled":true,"download_opened":false,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"summary_enabled":true,"summary_opened":false,"server_link_enabled":false,"server_link_opened":false,"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false,"survey_name":"svom"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/2/dataset -curl -d '{"name":"observations","table_ref":"v_observation","label":"IRiS obs","description":"IRiS observations","display":10,"data_path":"\/IRIS\/observations","public":true,"info_survey_enabled":true,"info_survey_label":"More about this survey","download_enabled":true,"download_opened":false,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"summary_enabled":true,"summary_opened":false,"server_link_enabled":false,"server_link_opened":false,"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false,"survey_name":"iris"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/3/dataset -curl -d '{"name":"vvds_f02_udeep","table_ref":"aspic_vvds_f02_udeep","label":"VVDS2h Ultra Deep","description":"VVDS2h Ultra Deep","display":20,"data_path":"","public":true,"info_survey_enabled":true,"info_survey_label":"More about this survey","download_enabled":true,"download_opened":false,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"summary_enabled":true,"summary_opened":false,"server_link_enabled":false,"server_link_opened":false,"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false,"survey_name":"anis_survey"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset -curl -d '{"name":"products","table_ref":"products","label":"Scientific Products","description":"SR3 & SR4 products list","display":20,"data_path":"","public":true,"info_survey_enabled":true,"info_survey_label":"More about this survey","download_enabled":true,"download_opened":false,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"summary_enabled":true,"summary_opened":false,"server_link_enabled":false,"server_link_opened":false,"datatable_enabled":true,"datatable_opened":false,"datatable_selectable_rows":false,"survey_name":"svom"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/2/dataset +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","public":true,"download_enabled":true,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"server_link_enabled":false,"datatable_enabled":true,"datatable_selectable_rows":false,"survey_name":"anis_survey"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset +curl -d '{"name":"sp_cards","table_ref":"sp_cards","label":"SP Metadata","description":"Contains metadata of scientific products (Core Program & General Program)","display":30,"data_path":"","public":true,"download_enabled":true,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"server_link_enabled":false,"datatable_enabled":true,"datatable_selectable_rows":false,"survey_name":"svom"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/2/dataset +curl -d '{"name":"observations","table_ref":"v_observation","label":"IRiS obs","description":"IRiS observations","display":10,"data_path":"\/IRIS\/observations","public":true,"download_enabled":true,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"server_link_enabled":false,"datatable_enabled":true,"datatable_selectable_rows":false,"survey_name":"iris"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/3/dataset +curl -d '{"name":"vvds_f02_udeep","table_ref":"aspic_vvds_f02_udeep","label":"VVDS2h Ultra Deep","description":"VVDS2h Ultra Deep","display":20,"data_path":"","public":true,"download_enabled":true,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"server_link_enabled":false,"datatable_enabled":true,"datatable_selectable_rows":false,"survey_name":"anis_survey"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/1/dataset +curl -d '{"name":"products","table_ref":"products","label":"Scientific Products","description":"SR3 & SR4 products list","display":20,"data_path":"","public":true,"download_enabled":true,"download_json":true,"download_csv":true,"download_ascii":true,"download_vo":false,"server_link_enabled":false,"datatable_enabled":true,"datatable_selectable_rows":false,"survey_name":"svom"}' --header 'Content-Type: application/json' -X POST http://localhost/dataset-family/2/dataset # Add vipers_dr2_w1 attributes curl -d '{"label":"Default","display":10,"opened":true}' --header 'Content-Type: application/json' -X POST http://localhost/dataset/vipers_dr2_w1/criteria-family diff --git a/server/doctrine-proxy/__CG__AppEntityDataset.php b/server/doctrine-proxy/__CG__AppEntityDataset.php index fbc36a64510cef1bb6ce26e8a9b3a5a910844dd0..f20ff747ca3ecca682afa9580bd4b4bbd6bbeebf 100644 --- a/server/doctrine-proxy/__CG__AppEntityDataset.php +++ b/server/doctrine-proxy/__CG__AppEntityDataset.php @@ -67,10 +67,10 @@ class Dataset extends \App\Entity\Dataset implements \Doctrine\ORM\Proxy\Proxy public function __sleep() { if ($this->__isInitialized__) { - return ['__isInitialized__', 'name', 'tableRef', 'label', 'description', 'display', 'dataPath', 'public', 'infoSurveyEnabled', 'infoSurveyLabel', 'downloadEnabled', 'downloadOpened', 'downloadJson', 'downloadCsv', 'downloadAscii', 'downloadVo', 'summaryEnabled', 'summaryOpened', 'serverLinkEnabled', 'serverLinkOpened', 'datatableEnabled', 'datatableOpened', 'datatableSelectableRows', '' . "\0" . 'App\\Entity\\Dataset' . "\0" . 'coneSearchConfig', 'survey', 'datasetFamily', 'attributes']; + return ['__isInitialized__', 'name', 'tableRef', 'label', 'description', 'display', 'dataPath', 'public', 'downloadEnabled', 'downloadJson', 'downloadCsv', 'downloadAscii', 'downloadVo', 'serverLinkEnabled', 'datatableEnabled', 'datatableSelectableRows', '' . "\0" . 'App\\Entity\\Dataset' . "\0" . 'coneSearchConfig', 'survey', 'datasetFamily', 'attributes']; } - return ['__isInitialized__', 'name', 'tableRef', 'label', 'description', 'display', 'dataPath', 'public', 'infoSurveyEnabled', 'infoSurveyLabel', 'downloadEnabled', 'downloadOpened', 'downloadJson', 'downloadCsv', 'downloadAscii', 'downloadVo', 'summaryEnabled', 'summaryOpened', 'serverLinkEnabled', 'serverLinkOpened', 'datatableEnabled', 'datatableOpened', 'datatableSelectableRows', '' . "\0" . 'App\\Entity\\Dataset' . "\0" . 'coneSearchConfig', 'survey', 'datasetFamily', 'attributes']; + return ['__isInitialized__', 'name', 'tableRef', 'label', 'description', 'display', 'dataPath', 'public', 'downloadEnabled', 'downloadJson', 'downloadCsv', 'downloadAscii', 'downloadVo', 'serverLinkEnabled', 'datatableEnabled', 'datatableSelectableRows', '' . "\0" . 'App\\Entity\\Dataset' . "\0" . 'coneSearchConfig', 'survey', 'datasetFamily', 'attributes']; } /** @@ -324,61 +324,6 @@ class Dataset extends \App\Entity\Dataset implements \Doctrine\ORM\Proxy\Proxy return parent::setPublic($public); } - /** - * {@inheritDoc} - */ - public function getSurvey() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSurvey', []); - - return parent::getSurvey(); - } - - /** - * {@inheritDoc} - */ - public function getInfoSurveyEnabled() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getInfoSurveyEnabled', []); - - return parent::getInfoSurveyEnabled(); - } - - /** - * {@inheritDoc} - */ - public function setInfoSurveyEnabled($infoSurveyEnabled) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setInfoSurveyEnabled', [$infoSurveyEnabled]); - - return parent::setInfoSurveyEnabled($infoSurveyEnabled); - } - - /** - * {@inheritDoc} - */ - public function getInfoSurveyLabel() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getInfoSurveyLabel', []); - - return parent::getInfoSurveyLabel(); - } - - /** - * {@inheritDoc} - */ - public function setInfoSurveyLabel($infoSurveyLabel) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setInfoSurveyLabel', [$infoSurveyLabel]); - - return parent::setInfoSurveyLabel($infoSurveyLabel); - } - /** * {@inheritDoc} */ @@ -401,28 +346,6 @@ class Dataset extends \App\Entity\Dataset implements \Doctrine\ORM\Proxy\Proxy return parent::setDownloadEnabled($downloadEnabled); } - /** - * {@inheritDoc} - */ - public function getDownloadOpened() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDownloadOpened', []); - - return parent::getDownloadOpened(); - } - - /** - * {@inheritDoc} - */ - public function setDownloadOpened($downloadOpened) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDownloadOpened', [$downloadOpened]); - - return parent::setDownloadOpened($downloadOpened); - } - /** * {@inheritDoc} */ @@ -511,50 +434,6 @@ class Dataset extends \App\Entity\Dataset implements \Doctrine\ORM\Proxy\Proxy return parent::setDownloadVo($downloadVo); } - /** - * {@inheritDoc} - */ - public function getSummaryEnabled() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSummaryEnabled', []); - - return parent::getSummaryEnabled(); - } - - /** - * {@inheritDoc} - */ - public function setSummaryEnabled($summaryEnabled) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSummaryEnabled', [$summaryEnabled]); - - return parent::setSummaryEnabled($summaryEnabled); - } - - /** - * {@inheritDoc} - */ - public function getSummaryOpened() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getSummaryOpened', []); - - return parent::getSummaryOpened(); - } - - /** - * {@inheritDoc} - */ - public function setSummaryOpened($summaryOpened) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSummaryOpened', [$summaryOpened]); - - return parent::setSummaryOpened($summaryOpened); - } - /** * {@inheritDoc} */ @@ -577,28 +456,6 @@ class Dataset extends \App\Entity\Dataset implements \Doctrine\ORM\Proxy\Proxy return parent::setServerLinkEnabled($serverLinkEnabled); } - /** - * {@inheritDoc} - */ - public function getServerLinkOpened() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getServerLinkOpened', []); - - return parent::getServerLinkOpened(); - } - - /** - * {@inheritDoc} - */ - public function setServerLinkOpened($serverLinkOpened) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setServerLinkOpened', [$serverLinkOpened]); - - return parent::setServerLinkOpened($serverLinkOpened); - } - /** * {@inheritDoc} */ @@ -621,28 +478,6 @@ class Dataset extends \App\Entity\Dataset implements \Doctrine\ORM\Proxy\Proxy return parent::setDatatableEnabled($datatableEnabled); } - /** - * {@inheritDoc} - */ - public function getDatatableOpened() - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'getDatatableOpened', []); - - return parent::getDatatableOpened(); - } - - /** - * {@inheritDoc} - */ - public function setDatatableOpened($datatableOpened) - { - - $this->__initializer__ && $this->__initializer__->__invoke($this, 'setDatatableOpened', [$datatableOpened]); - - return parent::setDatatableOpened($datatableOpened); - } - /** * {@inheritDoc} */ diff --git a/server/src/Action/DatasetAction.php b/server/src/Action/DatasetAction.php index c55912d6464836cce44bb9df5eb38c795e9ce058..3a5847393dbbc7ec05baf101890b18007c5a3327 100644 --- a/server/src/Action/DatasetAction.php +++ b/server/src/Action/DatasetAction.php @@ -121,20 +121,13 @@ final class DatasetAction extends AbstractAction $dataset->setDisplay($parsedBody['display']); $dataset->setDataPath($parsedBody['data_path']); $dataset->setPublic($parsedBody['public']); - $dataset->setInfoSurveyEnabled($parsedBody['info_survey_enabled']); - $dataset->setInfoSurveyLabel($parsedBody['info_survey_label']); $dataset->setDownloadEnabled($parsedBody['download_enabled']); - $dataset->setDownloadOpened($parsedBody['download_opened']); $dataset->setDownloadJson($parsedBody['download_json']); $dataset->setDownloadCsv($parsedBody['download_csv']); $dataset->setDownloadAscii($parsedBody['download_ascii']); $dataset->setDownloadVo($parsedBody['download_vo']); - $dataset->setSummaryEnabled($parsedBody['summary_enabled']); - $dataset->setSummaryOpened($parsedBody['summary_opened']); $dataset->setServerLinkEnabled($parsedBody['server_link_enabled']); - $dataset->setServerLinkOpened($parsedBody['server_link_opened']); $dataset->setDatatableEnabled($parsedBody['datatable_enabled']); - $dataset->setDatatableOpened($parsedBody['datatable_opened']); $dataset->setDatatableSelectableRows($parsedBody['datatable_selectable_rows']); $this->em->flush(); diff --git a/server/src/Action/DatasetListAction.php b/server/src/Action/DatasetListAction.php index af444db2b78b2db6b01ebb5a87cfd86b6ba5ccbb..bc3f8b5ba9998483701b7acf4434542f353a0ce7 100644 --- a/server/src/Action/DatasetListAction.php +++ b/server/src/Action/DatasetListAction.php @@ -125,20 +125,13 @@ final class DatasetListAction extends AbstractAction $dataset->setDisplay($parsedBody['display']); $dataset->setDataPath($parsedBody['data_path']); $dataset->setPublic($parsedBody['public']); - $dataset->setInfoSurveyEnabled($parsedBody['info_survey_enabled']); - $dataset->setInfoSurveyLabel($parsedBody['info_survey_label']); $dataset->setDownloadEnabled($parsedBody['download_enabled']); - $dataset->setDownloadOpened($parsedBody['download_opened']); $dataset->setDownloadJson($parsedBody['download_json']); $dataset->setDownloadCsv($parsedBody['download_csv']); $dataset->setDownloadAscii($parsedBody['download_ascii']); $dataset->setDownloadVo($parsedBody['download_vo']); - $dataset->setSummaryEnabled($parsedBody['summary_enabled']); - $dataset->setSummaryOpened($parsedBody['summary_opened']); $dataset->setServerLinkEnabled($parsedBody['server_link_enabled']); - $dataset->setServerLinkOpened($parsedBody['server_link_opened']); $dataset->setDatatableEnabled($parsedBody['datatable_enabled']); - $dataset->setDatatableOpened($parsedBody['datatable_opened']); $dataset->setDatatableSelectableRows($parsedBody['datatable_selectable_rows']); $dataset->setSurvey($survey); $dataset->setDatasetFamily($datasetFamily); diff --git a/server/src/Entity/Dataset.php b/server/src/Entity/Dataset.php index 8e296f447a17690dfb2889b523688c7d0e246b31..c3a4f876e3b3fa0b975d4c4f74fcb19f209ee5db 100644 --- a/server/src/Entity/Dataset.php +++ b/server/src/Entity/Dataset.php @@ -73,20 +73,6 @@ class Dataset implements \JsonSerializable */ protected $public; - /** - * @var bool - * - * @Column(type="boolean", name="info_survey_enabled", nullable=false) - */ - protected $infoSurveyEnabled; - - /** - * @var string - * - * @Column(type="string", name="info_survey_label", nullable=false) - */ - protected $infoSurveyLabel; - /** * @var bool * @@ -94,13 +80,6 @@ class Dataset implements \JsonSerializable */ protected $downloadEnabled; - /** - * @var bool - * - * @Column(type="boolean", name="download_opened", nullable=false) - */ - protected $downloadOpened; - /** * @var bool * @@ -129,20 +108,6 @@ class Dataset implements \JsonSerializable */ protected $downloadVo; - /** - * @var bool - * - * @Column(type="boolean", name="summary_enabled", nullable=false) - */ - protected $summaryEnabled; - - /** - * @var bool - * - * @Column(type="boolean", name="summary_opened", nullable=false) - */ - protected $summaryOpened; - /** * @var bool * @@ -150,13 +115,6 @@ class Dataset implements \JsonSerializable */ protected $serverLinkEnabled; - /** - * @var bool - * - * @Column(type="boolean", name="server_link_opened", nullable=false) - */ - protected $serverLinkOpened; - /** * @var bool * @@ -164,13 +122,6 @@ class Dataset implements \JsonSerializable */ protected $datatableEnabled; - /** - * @var bool - * - * @Column(type="boolean", name="datatable_opened", nullable=false) - */ - protected $datatableOpened; - /** * @var bool * @@ -280,31 +231,6 @@ class Dataset implements \JsonSerializable $this->public = $public; } - public function getSurvey() - { - return $this->survey; - } - - public function getInfoSurveyEnabled() - { - return $this->infoSurveyEnabled; - } - - public function setInfoSurveyEnabled($infoSurveyEnabled) - { - $this->infoSurveyEnabled = $infoSurveyEnabled; - } - - public function getInfoSurveyLabel() - { - return $this->infoSurveyLabel; - } - - public function setInfoSurveyLabel($infoSurveyLabel) - { - $this->infoSurveyLabel = $infoSurveyLabel; - } - public function getDownloadEnabled() { return $this->downloadEnabled; @@ -315,16 +241,6 @@ class Dataset implements \JsonSerializable $this->downloadEnabled = $downloadEnabled; } - public function getDownloadOpened() - { - return $this->downloadOpened; - } - - public function setDownloadOpened($downloadOpened) - { - $this->downloadOpened = $downloadOpened; - } - public function getDownloadJson() { return $this->downloadJson; @@ -365,26 +281,6 @@ class Dataset implements \JsonSerializable $this->downloadVo = $downloadVo; } - public function getSummaryEnabled() - { - return $this->summaryEnabled; - } - - public function setSummaryEnabled($summaryEnabled) - { - $this->summaryEnabled = $summaryEnabled; - } - - public function getSummaryOpened() - { - return $this->summaryOpened; - } - - public function setSummaryOpened($summaryOpened) - { - $this->summaryOpened = $summaryOpened; - } - public function getServerLinkEnabled() { return $this->serverLinkEnabled; @@ -395,16 +291,6 @@ class Dataset implements \JsonSerializable $this->serverLinkEnabled = $serverLinkEnabled; } - public function getServerLinkOpened() - { - return $this->serverLinkOpened; - } - - public function setServerLinkOpened($serverLinkOpened) - { - $this->serverLinkOpened = $serverLinkOpened; - } - public function getDatatableEnabled() { return $this->datatableEnabled; @@ -415,16 +301,6 @@ class Dataset implements \JsonSerializable $this->datatableEnabled = $datatableEnabled; } - public function getDatatableOpened() - { - return $this->datatableOpened; - } - - public function setDatatableOpened($datatableOpened) - { - $this->datatableOpened = $datatableOpened; - } - public function getDatatableSelectableRows() { return $this->datatableSelectableRows; @@ -450,6 +326,11 @@ class Dataset implements \JsonSerializable $this->survey = $survey; } + public function getSurvey() + { + return $this->survey; + } + public function getDatasetFamily() { return $this->datasetFamily; @@ -480,20 +361,13 @@ class Dataset implements \JsonSerializable 'display' => $this->getDisplay(), 'data_path' => $this->getDataPath(), 'public' => $this->getPublic(), - 'info_survey_enabled' => $this->getInfoSurveyEnabled(), - 'info_survey_label' => $this->getInfoSurveyLabel(), 'download_enabled' => $this->getDownloadEnabled(), - 'download_opened' => $this->getDownloadOpened(), 'download_json' => $this->getDownloadJson(), 'download_csv' => $this->getDownloadCsv(), 'download_ascii' => $this->getDownloadAscii(), 'download_vo' => $this->getDownloadVo(), - 'summary_enabled' => $this->getSummaryEnabled(), - 'summary_opened' => $this->getSummaryOpened(), 'server_link_enabled' => $this->getServerLinkEnabled(), - 'server_link_opened' => $this->getServerLinkOpened(), 'datatable_enabled' => $this->getDatatableEnabled(), - 'datatable_opened' => $this->getDatatableOpened(), 'datatable_selectable_rows' => $this->getDatatableSelectableRows(), 'cone_search_config_id' => is_null($this->getConeSearchConfig()) ? null : $this->getConeSearchConfig()->getId(), 'survey_name' => $this->getSurvey()->getName(),