From 276c39e4b6eff511835ad32c3da74a449d88fdd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Agneray?= <francois.agneray@lam.fr>
Date: Fri, 25 Mar 2022 11:00:23 +0100
Subject: [PATCH] Del cone search plot opened property

---
 .../dataset/dataset-form.component.html       |  4 --
 .../dataset/dataset-form.component.ts         |  1 -
 .../dataset-by-family.component.spec.ts       |  2 -
 .../dataset-card-doc.component.spec.ts        |  1 -
 .../cone-search-plot-tab.component.html       | 19 ------
 .../result/cone-search-plot-tab.component.ts  | 48 --------------
 .../result/datatable-actions.component.ts     | 13 +---
 .../result/datatable-tab.component.html       | 65 ++++++++++---------
 .../result/datatable-tab.component.ts         | 16 +++++
 .../result/download.component.spec.ts         |  6 --
 .../search/components/result/index.ts         |  2 -
 .../result/reminder.component.spec.ts         |  4 --
 .../result/url-display.component.spec.ts      |  4 --
 .../components/summary.component.spec.ts      |  2 -
 .../search/containers/result.component.html   | 10 +--
 .../src/app/metamodel/models/dataset.model.ts |  1 -
 client/src/test-data.ts                       |  3 -
 conf-dev/create-db.sh                         | 10 +--
 server/src/Action/DatasetAction.php           |  1 -
 server/src/Action/DatasetListAction.php       |  1 -
 server/src/Entity/Dataset.php                 | 18 -----
 server/tests/Action/DatasetActionTest.php     |  1 -
 server/tests/Action/DatasetListActionTest.php |  1 -
 23 files changed, 58 insertions(+), 175 deletions(-)
 delete mode 100644 client/src/app/instance/search/components/result/cone-search-plot-tab.component.html
 delete mode 100644 client/src/app/instance/search/components/result/cone-search-plot-tab.component.ts

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 e1ec916a..6c2a8cfc 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
@@ -99,10 +99,6 @@
                 <input class="custom-control-input" type="checkbox" id="cone_search_plot_enabled" name="cone_search_plot_enabled" formControlName="cone_search_plot_enabled" (change)="checkConeSearchPlotDisableOpened()">
                 <label class="custom-control-label" for="cone_search_plot_enabled">Plot enabled</label>
             </div>
-            <div class="custom-control custom-switch">
-                <input class="custom-control-input" type="checkbox" id="cone_search_plot_opened" name="cone_search_plot_opened" formControlName="cone_search_plot_opened">
-                <label class="custom-control-label" for="cone_search_plot_opened">Plot opened</label>
-            </div>
         </accordion-group>
         <accordion-group heading="Download" [isOpen]="true">
             <div class="custom-control custom-switch">
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 87b0f8f2..3e7080a1 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
@@ -51,7 +51,6 @@ export class DatasetFormComponent implements OnInit, OnChanges {
         cone_search_column_ra: new FormControl({value: false, disabled: true}),
         cone_search_column_dec: new FormControl({value: false, disabled: true}),
         cone_search_plot_enabled: new FormControl(false),
-        cone_search_plot_opened: new FormControl({value: false, disabled: true}),
         download_enabled: new FormControl(true),
         download_opened: new FormControl(false),
         download_csv: new FormControl(true),
diff --git a/client/src/app/instance/documentation/components/dataset-by-family.component.spec.ts b/client/src/app/instance/documentation/components/dataset-by-family.component.spec.ts
index 9feede02..3878a0cd 100644
--- a/client/src/app/instance/documentation/components/dataset-by-family.component.spec.ts
+++ b/client/src/app/instance/documentation/components/dataset-by-family.component.spec.ts
@@ -26,7 +26,6 @@ const DATASET_LIST: Dataset[] = [
         cone_search_column_ra: 1,
         cone_search_column_dec: 2,
         cone_search_plot_enabled: false,
-        cone_search_plot_opened: false,
         download_enabled: true,
         download_opened: true,
         download_csv: true,
@@ -59,7 +58,6 @@ const DATASET_LIST: Dataset[] = [
         cone_search_column_ra: 1,
         cone_search_column_dec: 2,
         cone_search_plot_enabled: false,
-        cone_search_plot_opened: false,
         download_enabled: true,
         download_opened: true,
         download_csv: true,
diff --git a/client/src/app/instance/documentation/components/dataset-card-doc.component.spec.ts b/client/src/app/instance/documentation/components/dataset-card-doc.component.spec.ts
index 264884af..43226caf 100644
--- a/client/src/app/instance/documentation/components/dataset-card-doc.component.spec.ts
+++ b/client/src/app/instance/documentation/components/dataset-card-doc.component.spec.ts
@@ -33,7 +33,6 @@ const DATASET: Dataset = {
     cone_search_column_ra: 1,
     cone_search_column_dec: 2,
     cone_search_plot_enabled: false,
-    cone_search_plot_opened: false,
     download_enabled: true,
     download_opened: true,
     download_csv: true,
diff --git a/client/src/app/instance/search/components/result/cone-search-plot-tab.component.html b/client/src/app/instance/search/components/result/cone-search-plot-tab.component.html
deleted file mode 100644
index 4c73ee00..00000000
--- a/client/src/app/instance/search/components/result/cone-search-plot-tab.component.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<accordion *ngIf="(datasetList | datasetByName:datasetSelected).cone_search_plot_enabled && coneSearch" [isAnimated]="true">
-    <accordion-group #ag [isOpen]="(datasetList | datasetByName:datasetSelected).cone_search_plot_opened" [panelClass]="'custom-accordion'" class="my-2">
-        <button class="btn btn-link btn-block clearfix" accordion-heading>
-            <span class="pull-left float-left">
-                Display cone-search plot
-                &nbsp;
-                <span *ngIf="ag.isOpen"><span class="fas fa-chevron-up"></span></span>
-                <span *ngIf="!ag.isOpen"><span class="fas fa-chevron-down"></span></span>
-            </span>
-        </button>
-        <app-spinner *ngIf="(dataIsLoading)"></app-spinner>
-
-        <app-cone-search-plot 
-            *ngIf="(dataIsLoaded)"
-            [coneSearch]="coneSearch"
-            [data]="getData()">
-        </app-cone-search-plot>
-    </accordion-group>
-</accordion>
diff --git a/client/src/app/instance/search/components/result/cone-search-plot-tab.component.ts b/client/src/app/instance/search/components/result/cone-search-plot-tab.component.ts
deleted file mode 100644
index f4a7ba6d..00000000
--- a/client/src/app/instance/search/components/result/cone-search-plot-tab.component.ts
+++ /dev/null
@@ -1,48 +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, Input, ChangeDetectionStrategy } from '@angular/core';
-
-import { Dataset, Attribute } from 'src/app/metamodel/models';
-import { ConeSearch } from 'src/app/instance/store/models';
-
-/**
- * @class
- * @classdesc Cone-search plot tab component.
- */
-@Component({
-    selector: 'app-cone-search-plot-tab',
-    templateUrl: 'cone-search-plot-tab.component.html',
-    changeDetection: ChangeDetectionStrategy.OnPush
-})
-export class ConeSearchPlotTabComponent {
-    @Input() datasetSelected: string;
-    @Input() datasetList: Dataset[];
-    @Input() attributeList: Attribute[];
-    @Input() coneSearch: ConeSearch;
-    @Input() data: any;
-    @Input() dataIsLoading: boolean;
-    @Input() dataIsLoaded: boolean;
-
-    getData() {
-        const dataset = this.getDataset();
-        const columnRa = this.attributeList.find(a => a.id === dataset.cone_search_column_ra);
-        const columnDec = this.attributeList.find(a => a.id === dataset.cone_search_column_dec);
-        return this.data.map(d => ({ "x": +d[columnRa.label], "y": +d[columnDec.label] }));
-    }
-
-    /**
-     * Returns selected dataset for the search.
-     *
-     * @return Dataset
-     */
-    getDataset(): Dataset {
-        return this.datasetList.find(dataset => dataset.name === this.datasetSelected);
-    }
-}
diff --git a/client/src/app/instance/search/components/result/datatable-actions.component.ts b/client/src/app/instance/search/components/result/datatable-actions.component.ts
index 58331ce1..ac49911e 100644
--- a/client/src/app/instance/search/components/result/datatable-actions.component.ts
+++ b/client/src/app/instance/search/components/result/datatable-actions.component.ts
@@ -1,7 +1,6 @@
 import { Component, Input, Output, EventEmitter } from '@angular/core';
 
-import { Dataset, Attribute } from 'src/app/metamodel/models';
-import { Criterion, ConeSearch } from 'src/app/instance/store/models';
+import { Dataset } from 'src/app/metamodel/models';
 
 @Component({
     selector: 'app-datatable-actions',
@@ -11,11 +10,6 @@ export class DatatableActionsComponent {
     @Input() selectedData: any[] = [];
     @Input() datasetSelected: string;
     @Input() datasetList: Dataset[];
-    @Input() attributeList: Attribute[];
-    @Input() criteriaList: Criterion[];
-    @Input() outputList: number[];
-    @Input() coneSearch: ConeSearch;
-    @Input() dataLength: number;
     @Input() sampRegistered: boolean;
     @Output() startTaskCreateResult: EventEmitter<{ format: string, selectedData: boolean, broadcastVo: boolean }> = new EventEmitter();
     @Output() startTaskCreateArchive: EventEmitter<{ selectedData: boolean }> = new EventEmitter();
@@ -35,11 +29,6 @@ export class DatatableActionsComponent {
         return this.datasetList.find(d => d.name === this.datasetSelected);
     }
 
-    getCriterionSelectedData() {
-        const attributeId = this.attributeList.find(a => a.search_flag === 'ID');
-        return `${attributeId.id}::in::${this.selectedData.join('|')}`;
-    }
-
     downloadResult(format: string) {
         this.startTaskCreateResult.emit({
             format,
diff --git a/client/src/app/instance/search/components/result/datatable-tab.component.html b/client/src/app/instance/search/components/result/datatable-tab.component.html
index c40a535f..1eaf2442 100644
--- a/client/src/app/instance/search/components/result/datatable-tab.component.html
+++ b/client/src/app/instance/search/components/result/datatable-tab.component.html
@@ -8,35 +8,40 @@
                 <span *ngIf="!ag.isOpen"><span class="fas fa-chevron-down"></span></span>
             </span>
         </button>
-        <app-datatable-actions 
-            [selectedData]="selectedData"
-            [datasetSelected]="datasetSelected"
-            [datasetList]="datasetList"
-            [attributeList]="attributeList"
-            [criteriaList]="criteriaList"
-            [outputList]="outputList"
-            [coneSearch]="coneSearch"
-            [dataLength]="dataLength"
-            [sampRegistered]="sampRegistered"
-            (broadcast)="broadcast.emit($event)"
-            (startTaskCreateResult)="startTaskCreateResult.emit($event)"
-            (startTaskCreateArchive)="startTaskCreateArchive.emit($event)">
-        </app-datatable-actions>
-        <app-datatable
-            [dataset]="datasetList | datasetByName:datasetSelected"
-            [instance]="instance"
-            [attributeList]="attributeList"
-            [outputList]="outputList"
-            [queryParams]="queryParams"
-            [dataLength]="dataLength"
-            [data]="data"
-            [dataIsLoading]="dataIsLoading"
-            [dataIsLoaded]="dataIsLoaded"
-            [selectedData]="selectedData"
-            (retrieveData)="retrieveData.emit($event)"
-            (addSelectedData)="addSelectedData.emit($event)"
-            (deleteSelectedData)="deleteSelectedData.emit($event)"
-            (downloadFile)="downloadFile.emit($event)">
-        </app-datatable>
+        <div class="row">
+            <div class="col-5" *ngIf="coneSearch">
+                <app-cone-search-plot *ngIf="dataIsLoaded"
+                    [coneSearch]="coneSearch"
+                    [data]="getData()">
+                </app-cone-search-plot>
+            </div>
+            <div class="col">
+                <app-datatable-actions 
+                    [selectedData]="selectedData"
+                    [datasetSelected]="datasetSelected"
+                    [datasetList]="datasetList"
+                    [sampRegistered]="sampRegistered"
+                    (broadcast)="broadcast.emit($event)"
+                    (startTaskCreateResult)="startTaskCreateResult.emit($event)"
+                    (startTaskCreateArchive)="startTaskCreateArchive.emit($event)">
+                </app-datatable-actions>
+                <app-datatable
+                    [dataset]="datasetList | datasetByName:datasetSelected"
+                    [instance]="instance"
+                    [attributeList]="attributeList"
+                    [outputList]="outputList"
+                    [queryParams]="queryParams"
+                    [dataLength]="dataLength"
+                    [data]="data"
+                    [dataIsLoading]="dataIsLoading"
+                    [dataIsLoaded]="dataIsLoaded"
+                    [selectedData]="selectedData"
+                    (retrieveData)="retrieveData.emit($event)"
+                    (addSelectedData)="addSelectedData.emit($event)"
+                    (deleteSelectedData)="deleteSelectedData.emit($event)"
+                    (downloadFile)="downloadFile.emit($event)">
+                </app-datatable>
+            </div>
+        </div>
     </accordion-group>
 </accordion>
diff --git a/client/src/app/instance/search/components/result/datatable-tab.component.ts b/client/src/app/instance/search/components/result/datatable-tab.component.ts
index 97335f09..8d3b912d 100644
--- a/client/src/app/instance/search/components/result/datatable-tab.component.ts
+++ b/client/src/app/instance/search/components/result/datatable-tab.component.ts
@@ -43,4 +43,20 @@ export class DatatableTabComponent {
     @Output() startTaskCreateResult: EventEmitter<{ format: string, selectedData: boolean, broadcastVo: boolean }> = new EventEmitter();
     @Output() startTaskCreateArchive: EventEmitter<{ selectedData: boolean }> = new EventEmitter();
     @Output() downloadFile: EventEmitter<{url: string, fileId: string, datasetName: string, filename: string}> = new EventEmitter();
+
+    getData() {
+        const dataset = this.getDataset();
+        const columnRa = this.attributeList.find(a => a.id === dataset.cone_search_column_ra);
+        const columnDec = this.attributeList.find(a => a.id === dataset.cone_search_column_dec);
+        return this.data.map(d => ({ "x": +d[columnRa.label], "y": +d[columnDec.label] }));
+    }
+
+    /**
+     * Returns selected dataset for the search.
+     *
+     * @return Dataset
+     */
+     getDataset(): Dataset {
+        return this.datasetList.find(dataset => dataset.name === this.datasetSelected);
+    }
 }
diff --git a/client/src/app/instance/search/components/result/download.component.spec.ts b/client/src/app/instance/search/components/result/download.component.spec.ts
index 75338251..a98834b7 100644
--- a/client/src/app/instance/search/components/result/download.component.spec.ts
+++ b/client/src/app/instance/search/components/result/download.component.spec.ts
@@ -50,7 +50,6 @@ describe('[Instance][Search][Component][Result] DownloadComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -83,7 +82,6 @@ describe('[Instance][Search][Component][Result] DownloadComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: false,
                 download_opened: false,
                 download_csv: false,
@@ -125,7 +123,6 @@ describe('[Instance][Search][Component][Result] DownloadComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -158,7 +155,6 @@ describe('[Instance][Search][Component][Result] DownloadComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: false,
                 download_opened: false,
                 download_csv: false,
@@ -200,7 +196,6 @@ describe('[Instance][Search][Component][Result] DownloadComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -233,7 +228,6 @@ describe('[Instance][Search][Component][Result] DownloadComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: false,
                 download_opened: false,
                 download_csv: false,
diff --git a/client/src/app/instance/search/components/result/index.ts b/client/src/app/instance/search/components/result/index.ts
index f0fea021..80f3a16b 100644
--- a/client/src/app/instance/search/components/result/index.ts
+++ b/client/src/app/instance/search/components/result/index.ts
@@ -5,7 +5,6 @@ import { UrlDisplayComponent } from './url-display.component';
 import { DatatableComponent } from './datatable.component';
 import { DatatableActionsComponent } from './datatable-actions.component';
 import { DownloadFileTabComponent } from './download-file-tab.component';
-import { ConeSearchPlotTabComponent } from './cone-search-plot-tab.component';
 import { ConeSearchPlotComponent } from './cone-search-plot.component';
 import { rendererComponents } from './renderer';
 
@@ -17,7 +16,6 @@ export const resultComponents = [
     DatatableComponent,
     DatatableActionsComponent,
     DownloadFileTabComponent,
-    ConeSearchPlotTabComponent,
     ConeSearchPlotComponent,
     rendererComponents
 ];
diff --git a/client/src/app/instance/search/components/result/reminder.component.spec.ts b/client/src/app/instance/search/components/result/reminder.component.spec.ts
index 8ba8e69d..6e648e0a 100644
--- a/client/src/app/instance/search/components/result/reminder.component.spec.ts
+++ b/client/src/app/instance/search/components/result/reminder.component.spec.ts
@@ -49,7 +49,6 @@ describe('[Instance][Search][Component][Result] ReminderComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -82,7 +81,6 @@ describe('[Instance][Search][Component][Result] ReminderComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -124,7 +122,6 @@ describe('[Instance][Search][Component][Result] ReminderComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -157,7 +154,6 @@ describe('[Instance][Search][Component][Result] ReminderComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
diff --git a/client/src/app/instance/search/components/result/url-display.component.spec.ts b/client/src/app/instance/search/components/result/url-display.component.spec.ts
index 05822c7f..e09ba2f9 100644
--- a/client/src/app/instance/search/components/result/url-display.component.spec.ts
+++ b/client/src/app/instance/search/components/result/url-display.component.spec.ts
@@ -53,7 +53,6 @@ describe('[Instance][Search][Component][Result] UrlDisplayComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -86,7 +85,6 @@ describe('[Instance][Search][Component][Result] UrlDisplayComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -128,7 +126,6 @@ describe('[Instance][Search][Component][Result] UrlDisplayComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -161,7 +158,6 @@ describe('[Instance][Search][Component][Result] UrlDisplayComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
diff --git a/client/src/app/instance/search/components/summary.component.spec.ts b/client/src/app/instance/search/components/summary.component.spec.ts
index 3188cbff..1a49dfa7 100644
--- a/client/src/app/instance/search/components/summary.component.spec.ts
+++ b/client/src/app/instance/search/components/summary.component.spec.ts
@@ -49,7 +49,6 @@ describe('[Instance][Search][Component] SummaryComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
@@ -82,7 +81,6 @@ describe('[Instance][Search][Component] SummaryComponent', () => {
                 cone_search_column_ra: 1,
                 cone_search_column_dec: 2,
                 cone_search_plot_enabled: false,
-                cone_search_plot_opened: false,
                 download_enabled: true,
                 download_opened: true,
                 download_csv: true,
diff --git a/client/src/app/instance/search/containers/result.component.html b/client/src/app/instance/search/containers/result.component.html
index 2734d842..5237bf3a 100644
--- a/client/src/app/instance/search/containers/result.component.html
+++ b/client/src/app/instance/search/containers/result.component.html
@@ -71,15 +71,6 @@
                 [outputList]="outputList | async"
                 [coneSearch]="coneSearch | async">
             </app-url-display>
-            <app-cone-search-plot-tab
-                [datasetSelected]="datasetSelected | async"
-                [datasetList]="datasetList | async"
-                [attributeList]="attributeList | async"
-                [coneSearch]="coneSearch | async"
-                [data]="data | async"
-                [dataIsLoading]="dataIsLoading | async"
-                [dataIsLoaded]="dataIsLoaded | async">
-            </app-cone-search-plot-tab>
             <app-datatable-tab
                 [datasetSelected]="datasetSelected | async"
                 [instance]="instance | async"
@@ -87,6 +78,7 @@
                 [attributeList]="attributeList | async | sortByOutputDisplay"
                 [criteriaList]="criteriaList | async"
                 [outputList]="outputList | async"
+                [coneSearch]="coneSearch | async"
                 [queryParams]="queryParams | async"
                 [dataLength]="dataLength | async"
                 [sampRegistered]="sampRegistered | async"
diff --git a/client/src/app/metamodel/models/dataset.model.ts b/client/src/app/metamodel/models/dataset.model.ts
index 4e44417d..eb041a85 100644
--- a/client/src/app/metamodel/models/dataset.model.ts
+++ b/client/src/app/metamodel/models/dataset.model.ts
@@ -27,7 +27,6 @@ export interface Dataset {
     cone_search_column_ra: number;
     cone_search_column_dec: number;
     cone_search_plot_enabled: boolean;
-    cone_search_plot_opened: boolean;
     download_enabled: boolean;
     download_opened: boolean;
     download_csv: boolean;
diff --git a/client/src/test-data.ts b/client/src/test-data.ts
index 314b31f0..1f984854 100644
--- a/client/src/test-data.ts
+++ b/client/src/test-data.ts
@@ -206,7 +206,6 @@ export const DATASET_LIST: Dataset[] = [
         cone_search_column_ra: 1,
         cone_search_column_dec: 2,
         cone_search_plot_enabled: false,
-        cone_search_plot_opened: false,
         download_enabled: true,
         download_opened: true,
         download_csv: true,
@@ -239,7 +238,6 @@ export const DATASET_LIST: Dataset[] = [
         cone_search_column_ra: 1,
         cone_search_column_dec: 2,
         cone_search_plot_enabled: false,
-        cone_search_plot_opened: false,
         download_enabled: true,
         download_opened: true,
         download_csv: true,
@@ -274,7 +272,6 @@ export const DATASET: Dataset = {
     cone_search_column_ra: 1,
     cone_search_column_dec: 2,
     cone_search_plot_enabled: false,
-    cone_search_plot_opened: false,
     download_enabled: true,
     download_opened: true,
     download_csv: true,
diff --git a/conf-dev/create-db.sh b/conf-dev/create-db.sh
index ddce165b..8fb223cc 100644
--- a/conf-dev/create-db.sh
+++ b/conf-dev/create-db.sh
@@ -73,11 +73,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","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_plot_opened":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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","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_plot_opened":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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","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_plot_opened":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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","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_plot_opened":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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","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_plot_opened":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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,"info_survey_enabled":true,"info_survey_label":"More about this survey","cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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","cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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","cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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","cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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","cone_search_enabled":false,"cone_search_opened":true,"cone_search_column_ra":null,"cone_search_column_dec":null,"cone_search_plot_enabled":false,"download_enabled":true,"download_opened":false,"download_csv":true,"download_ascii":true,"download_vo":false,"download_archive":true,"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
 
 # 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/src/Action/DatasetAction.php b/server/src/Action/DatasetAction.php
index 5d5edcc5..e4cb81c4 100644
--- a/server/src/Action/DatasetAction.php
+++ b/server/src/Action/DatasetAction.php
@@ -128,7 +128,6 @@ final class DatasetAction extends AbstractAction
         $dataset->setConeSearchColumnRa($parsedBody['cone_search_column_ra']);
         $dataset->setConeSearchColumnDec($parsedBody['cone_search_column_dec']);
         $dataset->setConeSearchPlotEnabled($parsedBody['cone_search_plot_enabled']);
-        $dataset->setConeSearchPlotOpened($parsedBody['cone_search_plot_opened']);
         $dataset->setDownloadEnabled($parsedBody['download_enabled']);
         $dataset->setDownloadOpened($parsedBody['download_opened']);
         $dataset->setDownloadCsv($parsedBody['download_csv']);
diff --git a/server/src/Action/DatasetListAction.php b/server/src/Action/DatasetListAction.php
index 83fcef87..9f73779d 100644
--- a/server/src/Action/DatasetListAction.php
+++ b/server/src/Action/DatasetListAction.php
@@ -132,7 +132,6 @@ final class DatasetListAction extends AbstractAction
         $dataset->setConeSearchColumnRa($parsedBody['cone_search_column_ra']);
         $dataset->setConeSearchColumnDec($parsedBody['cone_search_column_dec']);
         $dataset->setConeSearchPlotEnabled($parsedBody['cone_search_plot_enabled']);
-        $dataset->setConeSearchPlotOpened($parsedBody['cone_search_plot_opened']);
         $dataset->setDownloadEnabled($parsedBody['download_enabled']);
         $dataset->setDownloadOpened($parsedBody['download_opened']);
         $dataset->setDownloadCsv($parsedBody['download_csv']);
diff --git a/server/src/Entity/Dataset.php b/server/src/Entity/Dataset.php
index 20aff056..3c78fddf 100644
--- a/server/src/Entity/Dataset.php
+++ b/server/src/Entity/Dataset.php
@@ -122,13 +122,6 @@ class Dataset implements \JsonSerializable
      */
     protected $coneSearchPlotEnabled;
 
-    /**
-     * @var bool
-     *
-     * @Column(type="boolean", name="cone_search_plot_opened", nullable=false)
-     */
-    protected $coneSearchPlotOpened;
-
     /**
      * @var bool
      *
@@ -389,16 +382,6 @@ class Dataset implements \JsonSerializable
         $this->coneSearchPlotEnabled = $coneSearchPlotEnabled;
     }
 
-    public function getConeSearchPlotOpened()
-    {
-        return $this->coneSearchPlotOpened;
-    }
-
-    public function setConeSearchPlotOpened($coneSearchPlotOpened)
-    {
-        $this->coneSearchPlotOpened = $coneSearchPlotOpened;
-    }
-
     public function getDownloadEnabled()
     {
         return $this->downloadEnabled;
@@ -571,7 +554,6 @@ class Dataset implements \JsonSerializable
             'cone_search_column_ra' => $this->getConeSearchColumnRa(),
             'cone_search_column_dec' => $this->getConeSearchColumnDec(),
             'cone_search_plot_enabled' => $this->getConeSearchPlotEnabled(),
-            'cone_search_plot_opened' => $this->getConeSearchPlotOpened(),
             'download_enabled' => $this->getDownloadEnabled(),
             'download_opened' => $this->getDownloadOpened(),
             'download_csv' => $this->getDownloadCsv(),
diff --git a/server/tests/Action/DatasetActionTest.php b/server/tests/Action/DatasetActionTest.php
index 4624bf68..b33db343 100644
--- a/server/tests/Action/DatasetActionTest.php
+++ b/server/tests/Action/DatasetActionTest.php
@@ -134,7 +134,6 @@ final class DatasetActionTest extends TestCase
             'cone_search_column_ra' => null,
             'cone_search_column_dec' => null,
             'cone_search_plot_enabled' => false,
-            'cone_search_plot_opened' => false,
             'download_enabled' => true,
             'download_opened' => false,
             'download_csv' => true,
diff --git a/server/tests/Action/DatasetListActionTest.php b/server/tests/Action/DatasetListActionTest.php
index d7e4a3aa..d6e843b6 100644
--- a/server/tests/Action/DatasetListActionTest.php
+++ b/server/tests/Action/DatasetListActionTest.php
@@ -130,7 +130,6 @@ final class DatasetListActionTest extends TestCase
             'cone_search_column_ra' => null,
             'cone_search_column_dec' => null,
             'cone_search_plot_enabled' => false,
-            'cone_search_plot_opened' => false,
             'download_enabled' => true,
             'download_opened' => false,
             'download_csv' => true,
-- 
GitLab