diff --git a/CI/e2e/frontend.config.e2e.json b/CI/e2e/frontend.config.e2e.json
index 717eecc75..99dfd1068 100644
--- a/CI/e2e/frontend.config.e2e.json
+++ b/CI/e2e/frontend.config.e2e.json
@@ -24,7 +24,6 @@
"ingestManual": null,
"jobsEnabled": true,
"jsonMetadataEnabled": true,
- "jupyterHubUrl": "",
"landingPage": "doi.ess.eu/detail/",
"lbBaseURL": "http://localhost:3000",
"logbookEnabled": true,
@@ -106,6 +105,75 @@
"authorization": ["#datasetAccess", "#datasetPublic"]
}
],
+ "datasetDetailsActionsEnabled": true,
+ "datasetDetailsActions": [
+ {
+ "id": "01",
+ "order": 1,
+ "type": "xhr",
+ "method": "PATCH",
+ "description": "Publish dataset",
+ "label": "Publish",
+ "hidden": "#isPublished",
+ "mat_icon": "",
+ "url": "/api/v3/datasets/{{id}}",
+ "payload": "{\"isPublished\": true}"
+ },
+ {
+ "id": "02",
+ "order": 2,
+ "type": "xhr",
+ "method": "PATCH",
+ "description": "Unpublish published dataset",
+ "label": "Unpublish",
+ "hidden": "#!isPublished",
+ "mat_icon": "",
+ "url": "/api/v3/datasets/{{id}}",
+ "payload": "{\"isPublished\": false}"
+ },
+ {
+ "id": "03",
+ "order": 3,
+ "type": "form",
+ "method": "GET",
+ "description": "Jupyter hub",
+ "label": "Jupyter hub",
+ "mat_icon": "",
+ "url": "https://jupyterhub.esss.lu.se/",
+ "target": "_blank"
+ }
+ ],
+ "datasetSelectionActionsEnabled": true,
+ "datasetSelectionActions": [
+ {
+ "id": "01",
+ "order": 1,
+ "type": "link",
+ "description": "Publish datasets",
+ "label": "Publish",
+ "mat_icon": "school",
+ "url": "/datasets/batch/publish"
+ },
+ {
+ "id": "02",
+ "order": 2,
+ "type": "link",
+ "description": "Share datasets",
+ "label": "Share",
+ "mat_icon": "share",
+ "url": "/datasets/batch?share=true"
+ },
+ {
+ "id": "03",
+ "order": 3,
+ "type": "link",
+ "hidden": "!archiveWorkflowEnabled",
+ "description": "Retrieve datasets",
+ "label": "Retrieve",
+ "mat_icon": "cloud_download",
+ "url": "/datasets/batch?retrieve=true"
+ }
+ ],
"labelMaps": {
"filters": {
"LocationFilter": "Location",
diff --git a/src/app/app-config.service.ts b/src/app/app-config.service.ts
index a31c5e63a..972b9dacd 100644
--- a/src/app/app-config.service.ts
+++ b/src/app/app-config.service.ts
@@ -71,8 +71,14 @@ export interface AppConfigInterface {
datasetJsonScientificMetadata: boolean;
datasetReduceEnabled: boolean;
datasetDetailsShowMissingProposalId: boolean;
+ datasetActionsEnabled: boolean;
+ datasetActions: any[];
datafilesActionsEnabled: boolean;
datafilesActions: any[];
+ datasetDetailsActionsEnabled: boolean;
+ datasetDetailsActions: any[];
+ datasetSelectionActionsEnabled: boolean;
+ datasetSelectionActions: any[];
editDatasetEnabled: boolean;
editDatasetSampleEnabled: boolean;
editMetadataEnabled: boolean;
diff --git a/src/app/datasets/batch-view/batch-view.component.html b/src/app/datasets/batch-view/batch-view.component.html
index 948d9296c..8267d0a1d 100644
--- a/src/app/datasets/batch-view/batch-view.component.html
+++ b/src/app/datasets/batch-view/batch-view.component.html
@@ -1,93 +1,15 @@
-
-
-
-
-
-
-
-
+ [actionItems]="actionItems"
+ [visible]="appConfig.datafilesActionsEnabled"
+ >
{
{ provide: AppConfigService, useValue: { getConfig } },
{ provide: AuthService, useValue: MockAuthService },
{
- provide: DatafilesActionsComponent,
+ provide: ConfigurableActionsComponent,
useClass: MockDatafilesActionsComponent,
},
{ provide: FileSizePipe },
diff --git a/src/app/datasets/datafiles/datafiles.component.ts b/src/app/datasets/datafiles/datafiles.component.ts
index e57a10bf6..761754b25 100644
--- a/src/app/datasets/datafiles/datafiles.component.ts
+++ b/src/app/datasets/datafiles/datafiles.component.ts
@@ -35,7 +35,7 @@ import { submitJobAction } from "state-management/actions/jobs.actions";
import { AppConfigService } from "app-config.service";
import { NgForm } from "@angular/forms";
import { DataFiles_File } from "./datafiles.interfaces";
-import { ActionDataset } from "datasets/datafiles-actions/datafiles-action.interfaces";
+import { ActionItemDataset, ActionItems } from "shared/modules/configurable-actions/configurable-action.interfaces";
import { AuthService } from "shared/services/auth/auth.service";
@Component({
@@ -69,7 +69,7 @@ export class DatafilesComponent
files: Array = [];
datasetPid = "";
- actionDataset: ActionDataset;
+ actionItems: ActionItems;
count = 0;
pageSize = 25;
@@ -96,7 +96,6 @@ export class DatafilesComponent
icon: "save",
sort: false,
inList: true,
- // pipe: FilePathTruncate,
},
{
name: "size",
@@ -248,9 +247,7 @@ export class DatafilesComponent
this.subscriptions.push(
this.dataset$.subscribe((dataset) => {
if (dataset) {
- this.sourceFolder = dataset.sourceFolder;
- this.datasetPid = dataset.pid;
- this.actionDataset = dataset;
+ this.actionItems.datasets = [dataset];
}
}),
);
@@ -269,6 +266,7 @@ export class DatafilesComponent
this.tableData = files.slice(0, this.pageSize);
this.files = files;
this.tooLargeFile = this.hasTooLargeFiles(this.files);
+ this.actionItems.datasets[0].files = files;
}
}),
);
diff --git a/src/app/datasets/dataset-detail/dataset-detail-dynamic/dataset-detail-dynamic.component.html b/src/app/datasets/dataset-detail/dataset-detail-dynamic/dataset-detail-dynamic.component.html
index 0910b29dd..4efb98147 100644
--- a/src/app/datasets/dataset-detail/dataset-detail-dynamic/dataset-detail-dynamic.component.html
+++ b/src/app/datasets/dataset-detail/dataset-detail-dynamic/dataset-detail-dynamic.component.html
@@ -13,6 +13,11 @@
Jupyter Hub
+
diff --git a/src/app/datasets/dataset-detail/dataset-detail/dataset-detail.component.html b/src/app/datasets/dataset-detail/dataset-detail/dataset-detail.component.html
index 7fe0851b5..b434a7c0e 100644
--- a/src/app/datasets/dataset-detail/dataset-detail/dataset-detail.component.html
+++ b/src/app/datasets/dataset-detail/dataset-detail/dataset-detail.component.html
@@ -1,34 +1,18 @@
-
+
0 ? '90%' : '100%'">
@@ -169,7 +153,9 @@
@@ -208,8 +194,10 @@
@@ -233,7 +221,9 @@
@@ -347,10 +337,11 @@
-