Open nitrosx opened 2 days ago
Configuration for the current dataset details view could be the following: Some fields might be missing.
[
{
"name" : "general_information",
"label" : "General Information",
"color" : "#ffffff",
"order" : 10,
"fields" : [
{
"name" : "datasetName",
"label" : "Dataset Name",
"order" : 10,
},
{
"name" : "description",
"label" : "Description",
"order" : 20,
},
{
"name" : "pid",
"label" : "Dataset Id (PID)",
"order" : 20,
},
{
"name" : "type",
"label" : "Dataset Type",
"order" : 30,
},
{
"name" : "creationTime",
"label" : "Creation Type",
"order" : 40,
},
{
"name" : "keywords",
"label" : "Keywords",
"order" : 80,
}
]
},
{
"name" : "creator_information",
"label" : "Creator Information",
"classes" : "",
"order" : 20,
"fields" : [
{
"name" : "owner",
"label" : "Owner",
"order" : 10,
},
{
"name" : "principalInvestigator",
"label" : "Principal Investigator",
"order" : 20,
},
{
"name" : "orcid",
"label" : "Orcid",
"order" : 30,
},
{
"name" : "contactEmail",
"label" : "Contact Email",
"order" : 40,
},
{
"name" : "ownerGroup",
"label" : "Owner Group",
"order" : 50,
},
{
"name" : "access_groups",
"label" : "Access Groups",
"order" : 60,
},
]
},
{
"name" : "file_information",
"label" : "File Information",
"classes" : "",
"order" : 30,
"fields" : [
{
"name" : "sourceFolder",
"label" : "Source Folder",
"order" : 10,
},
{
"name" : "sourceFolderHost",
"label" : "Data Host",
"order" : 20,
},
{
"name" : "size",
"label" : "Size",
"order" : 30,
},
{
"name" : "dataFormat",
"label" : "Data Format",
"order" : 40,
},
]
},
{
"name" : "related_documents",
"label" : "Related Documents",
"color" : "#ffffff",
"order" : 50,
"fields" : [
{
"name" : "proposal.Name",
"label" : "Proposal",
"order" : 10,
},
{
"name" : "instrument.name",
"label" : "Instrument",
"order" : 20,
},
{
"name" : "sample.name",
"label" : "Sample",
"order" : 30,
},
{
"name" : "creationLocation",
"label" : "Creation Location",
"order" : 40,
},
{
"name" : "inputDatasets",
"label" : "Input Datasets",
"order" : 50,
},
]
},
{
"name" : "scientific_metadata",
"label" : "Scientific Metadata",
"color" : "#ffffff",
"order" : 60,
"widget" : scientific_metadata
}
}
The configuration that would meet our needs at ESS would be the following:
[
{
"name" : "general_information",
"label" : "General Information",
"color" : "#ffffff",
"order" : 10,
"fields" : [
{
"name" : "datasetName",
"label" : "Dataset Name",
"order" : 10,
},
{
"name" : "description",
"label" : "Description",
"order" : 20,
},
{
"name" : "startTime",
"label" : "Start Date and Time",
"order" : 30,
},
{
"name" : "endTime",
"label" : "End Date and Time",
"order" : 40,
},
{
"name" : "principalInvestigator",
"label" : "Principal Investigator",
"order" : 50,
},
{
"name" : "proposalId",
"label" : "Proposal Id",
"order" : 60,
},
{
"name" : "runNumber",
"label" : "Run Number",
"order" : 70,
},
{
"name" : "keywords",
"label" : "Keywords",
"order" : 80,
}
]
},
{
"name" : "dataset_information",
"label" : "Dataset Information",
"color" : "#ffffff",
"order" : 20,
"fields" : [
{
"name" : "datasetName",
"label" : "Dataset Name",
"order" : 10,
},
{
"name" : "pid",
"label" : "Dataset Id (PID)",
"order" : 20,
},
{
"name" : "type",
"label" : "Dataset Type",
"order" : 30,
},
{
"name" : "creationTime",
"label" : "Creation Type",
"order" : 40,
},
]
},
{
"name" : "contact_information",
"label" : "Contact Information",
"color" : "#ffffff",
"order" : 30,
"fields" : [
{
"name" : "principalInvestigator",
"label" : "Principal Investigator",
"order" : 10,
},
{
"name" : "contactEmail",
"label" : "Contact Email",
"order" : 20,
},
]
},
{
"name" : "files_information",
"label" : "Files Information",
"color" : "#ffffff",
"order" : 40,
"fields" : [
{
"name" : "sourceFolder",
"label" : "Source Folder",
"order" : 10,
},
{
"name" : "sourceFolderHost",
"label" : "Data Host",
"order" : 20,
},
{
"name" : "numberOfFiles",
"label" : "Number of Files",
"order" : 30,
},
{
"name" : "size",
"label" : "Total Size",
"order" : 40,
},
{
"name" : "numberOfFilesArchived",
"label" : "Number of Files Archived",
"order" : 50,
},
{
"name" : "packedSize",
"label" : "Total Size Archived",
"order" : 60,
},
]
},
{
"name" : "related_documents",
"label" : "Related Documents",
"color" : "#ffffff",
"order" : 50,
"fields" : [
{
"name" : "proposalId",
"label" : "Proposal Id",
"order" : 10,
},
{
"name" : "proposal.Name",
"label" : "Proposal Name",
"order" : 20,
},
{
"name" : "instrumentId",
"label" : "Instrument Id",
"order" : 30,
},
{
"name" : "instrument.name",
"label" : "Proposal Name",
"order" : 40,
},
{
"name" : "creationLocation",
"label" : "Creation Location",
"order" : 50,
},
{
"name" : "inputDatasets",
"label" : "Input Datasets",
"order" : 60,
},
]
},
{
"name" : "scientific_metadata",
"label" : "Scientific Metadata",
"color" : "#ffffff",
"order" : 60,
"widget" : scientific_metadata
},
{
"name" : "authorization",
"label" : "Authorization",
"color" : "#ffffff",
"access" : ["Admin", "SIMS"],
"order" : 70,
"fields" : [
{
"name" : "ownerGroup",
"label" : "Owner Group",
"order" : 10,
},
{
"name" : "access_groups",
"label" : "Access Groups",
"order" : 20,
},
]
}
}
which will create a dataset detail page with the following structure and labels:
- General Information
- Dataset Name
- Description
- Start Date and Time
- End Date and Time
- Principal Investigator
- Proposal Id
- Run Number
- Keywords
- Dataset Information
- Dataset Name
- Dataset Id (PID)
- Dataset Type
- Creation Type
- Contact Information
- Principal Investigator
- Contact Email
- Files Information
- Source Folders
- Source Host
- Number of Files
- Total Size
- Number of Files archived
- Total size archived
- Related Documents
- Proposal Id
- Proposal Name
- Instrument Id
- Instrument Name
- Creation Location
- Input Datasets
- Scientific Metadata
- Authorization (only admin)
- Owner Group
- Access Groups
After some brainstorming here at ESS, we might think that separate Dataset details components might be the way to go. I will add more details soon.
Here the link to the relevant documentation to load component dynamically: https://angular.dev/guide/components/programmatic-rendering
Additional references on how to dynamically load modules: https://medium.com/lacolaco-blog/angular-dynamic-importing-large-libraries-8ec079603d0
After internal brainstorming, we thing that it might be more useful create a dataset details interface, which allows anybody to contribute customized details pages. The only issue is that the all the custom components will need to be included in core and the image of the releases. We would also need a rule based mechanism, that allows to select the correct component for each dataset.
Issue Name
Make Dataset Details page configurable through site configuration
Summary
Currently the dataset details page is hard coded as is. There is no option to customize labels, fields order, and which field is in which tile. We would like to be able to do so by the page structure in configuration. This feature request arise from the need to restructure such page according to the facility requirements. In our case, the librarian is providing valuable feedback about how to present the dataset information in the most user friendly way. Unfortunately, we would nee to change the FE code to follow up, which will impact other facilities instances.