diff --git a/CI/e2e/frontend.config.e2e.json b/CI/e2e/frontend.config.e2e.json index 462b82d983..41eb80d8a8 100644 --- a/CI/e2e/frontend.config.e2e.json +++ b/CI/e2e/frontend.config.e2e.json @@ -6,7 +6,6 @@ "checkBoxFilterClickTrigger": false, "accessTokenPrefix": "Bearer ", "addDatasetEnabled": false, - "allowConfigOverrides": true, "archiveWorkflowEnabled": false, "datasetReduceEnabled": true, "datasetJsonScientificMetadata": true, @@ -19,8 +18,8 @@ "facility": "SciCat Vanilla CI Test", "siteIcon": "site-header-logo.png", "siteHeaderLogoUrl": "https://my.facility.site", - "sitetitle": "SciCat FE CI repo", - "siteSciCatLogo": "full", + "siteTitle": "SciCat FE CI repo", + "siteSciCatLogo": "full", "loginFacilityLabel": "SciCat Vanilla", "loginLdapLabel": "Ldap", "loginLocalLabel": "Local", @@ -77,7 +76,7 @@ "datasetDetailsShowMissingProposalId": false, "notificationInterceptorEnabled": true, "metadataEditingUnitListDisabled": true, - "hideEmptyMetadataTable": false, + "hideEmptyMetadataTable": false, "datafilesActionsEnabled": true, "datafilesActions": [ { @@ -154,7 +153,7 @@ "item[]" : "@pid", "directory[]" : "@folder", "files[]": "@files" - }, + }, "authorization": ["#datasetAccess", "#datasetPublic"] }, { @@ -221,7 +220,7 @@ }, "payload": "{\"template_id\":\"c975455e-ede3-11ef-94fb-138c9cd51fc0\",\"parameters\":{\"dataset\":\"{{ @pid }}\",\"directory\":\"{{ @folder }}\",\"files\": {{ @files[] }},\"jwt\":\"{{ #jwt }}\",\"scicat_url\":\"https://staging.scicat.ess.url\",\"file_server_url\":\"sftserver2.esss.dk\",\"file_server_port\":\"22\"}}", "filename": "{{ #uuid }}.ipynb" - }, + }, { "id": "9c6a11b6-a526-11f0-8795-6f025b320cc3", "description": "This action let users make a call an arbitrary URL and store the reply in the store", @@ -279,8 +278,8 @@ ], "datasetDetailsActionsEnabled": false, "datasetDetailsActions": [], - "selectionActionsEnabled": true, - "selectionActions": [], + "datasetSelectionActionsEnabled": true, + "datasetSelectionActions": [], "labelMaps": { "filters": { "LocationFilter": "Location", diff --git a/src/app/admin/schema/frontend.config.jsonforms.json b/src/app/admin/schema/frontend.config.jsonforms.json index c1bf7aaa04..d70d818919 100644 --- a/src/app/admin/schema/frontend.config.jsonforms.json +++ b/src/app/admin/schema/frontend.config.jsonforms.json @@ -17,7 +17,6 @@ } }, "skipSciCatLoginPageEnabled": { "type": "boolean" }, - "allowConfigOverrides": { "type": "boolean" }, "checkBoxFilterClickTrigger": { "type": "boolean" }, "dateFormat": { "type": "string" }, "accessTokenPrefix": { "type": "string" }, @@ -436,7 +435,6 @@ "type": "Control", "scope": "#/properties/skipSciCatLoginPageEnabled" }, - { "type": "Control", "scope": "#/properties/allowConfigOverrides" }, { "type": "Control", "scope": "#/properties/archiveWorkflowEnabled" }, { "type": "Control", "scope": "#/properties/datasetReduceEnabled" }, { diff --git a/src/app/app-config.defaults.ts b/src/app/app-config.defaults.ts new file mode 100644 index 0000000000..20a1399c75 --- /dev/null +++ b/src/app/app-config.defaults.ts @@ -0,0 +1,996 @@ +import { AppConfigInterface } from "./app-config.service"; + +export const DEFAULT_CONFIG: AppConfigInterface = { + additionalConfigs: ["/assets/config.json"], + accessTokenPrefix: "Bearer ", + addDatasetEnabled: false, + archiveWorkflowEnabled: false, + datasetReduceEnabled: true, + datasetJsonScientificMetadata: true, + editDatasetEnabled: true, + editDatasetSampleEnabled: true, + editMetadataEnabled: true, + editPublishedData: true, + addSampleEnabled: true, + externalAuthEndpoint: "/auth/msad", + facility: "SciCat FE vanilla", + siteIcon: "site-header-logo.png", + siteTitle: "SciCat FE repo", + siteSciCatLogo: "full", + siteHeaderLogo: "", + siteLoginBackground: "", + siteLoginLogo: "", + loginFacilityLabel: "SciCat Vanilla", + loginLdapLabel: "Ldap", + loginLocalLabel: "Local", + loginFacilityEnabled: true, + loginLdapEnabled: false, + loginLocalEnabled: true, + fileColorEnabled: true, + fileDownloadEnabled: true, + gettingStarted: null, + ingestManual: null, + jobsEnabled: true, + jsonMetadataEnabled: true, + jupyterHubUrl: "", + landingPage: "detail/", + lbBaseURL: "", + ingestorComponent: { + ingestorEnabled: false, + ingestorAutodiscoveryOptions: [], + }, + logbookEnabled: true, + loginFormEnabled: true, + thumbnailFetchLimitPerPage: 100, + metadataPreviewEnabled: true, + metadataStructure: "", + multipleDownloadAction: null, + multipleDownloadEnabled: true, + oAuth2Endpoints: [ + { + authURL: "api/v3/auth/oidc", + displayText: "SciCat Vanilla OIDC", + }, + ], + policiesEnabled: true, + retrieveDestinations: [], + riotBaseUrl: null, + scienceSearchEnabled: false, + scienceSearchUnitsEnabled: true, + searchPublicDataEnabled: true, + searchSamples: true, + sftpHost: null, + shareEnabled: true, + sourceFolder: "/source/data/folder", + maxDirectDownloadSize: 5000000000, + maxFileSizeWarning: + "Some files are above and cannot be downloaded directly. These file can be downloaded via sftp host: in directory: ", + shoppingCartEnabled: true, + shoppingCartOnHeader: true, + tableSciDataEnabled: true, + datasetDetailsShowMissingProposalId: false, + notificationInterceptorEnabled: true, + metadataEditingUnitListDisabled: true, + hideEmptyMetadataTable: false, + datafilesActionsEnabled: true, + datafilesActions: [ + { + id: "eed8efec-4354-11ef-a3b5-d75573a5d37f", + description: + "This action let users download all files using the zip service", + order: 1, + label: "Download All", + files: "all", + mat_icon: "download", + type: "form", + url: "https://zip.scicatproject.org/download/all", + target: "_blank", + variables: { + pid: "#Dataset0Pid", + files: "#Dataset0FilesPath", + totalSize: "#Dataset0FilesTotalSize", + folder: "#Dataset0SourceFolder", + }, + enabled: "#MaxDownloadableSize(@totalSize)", + inputs: { + "item[]": "@pid", + "directory[]": "@folder", + "files[]": "@files", + }, + authorization: ["#datasetAccess", "#datasetPublic"], + }, + { + id: "3072fafc-4363-11ef-b9f9-ebf568222d26", + description: + "This action let users download selected files using the zip service", + order: 2, + label: "Download Selected", + files: "selected", + mat_icon: "download", + type: "form", + url: "https://zip.scicatproject.org/download/selected", + target: "_blank", + variables: { + pid: "#Dataset0Pid", + files: "#Dataset0SelectedFilesPath", + selected: "#Dataset0SelectedFilesCount", + totalSize: "#Dataset0SelectedFilesTotalSize", + folder: "#Dataset0SourceFolder", + }, + inputs: { + auth_token: "#tokenBearer", + jwt: "#jwt", + "item[]": "@pid", + "directory[]": "@folder", + "files[]": "@files", + }, + enabled: "#Length(@files) && #MaxDownloadableSize(@totalSize)", + authorization: ["#datasetAccess", "#datasetPublic"], + }, + { + id: "4f974f0e-4364-11ef-9c63-03d19f813f4e", + description: + "This action let users download jupyter notebook properly populated with dataset pid and all files using an instance of sciwyrm", + order: 3, + label: "Notebook All (Form)", + files: "all", + icon: "/assets/icons/jupyter_logo.png", + type: "form", + url: "https://www.scicat.info/notebook/all", + target: "_blank", + variables: { + pid: "#Dataset0Pid", + files: "#Dataset0FilesPath", + totalSize: "#Dataset0FilesTotalSize", + folder: "#Dataset0SourceFolder", + }, + enabled: "", + inputs: { + auth_token: "#token", + jwt: "#jwt", + "item[]": "@pid", + "directory[]": "@folder", + "files[]": "@files", + }, + authorization: ["#datasetAccess", "#datasetPublic"], + }, + { + id: "fa3ce6ee-482d-11ef-95e9-ff2c80dd50bd", + order: 4, + label: "Notebook Selected (Form)", + files: "selected", + icon: "/assets/icons/jupyter_logo.png", + type: "form", + url: "https://www.scicat.info/notebook/selected", + target: "_blank", + variables: { + pid: "#Dataset0Pid", + files: "#Dataset0SelectedFilesPath", + selected: "#Dataset0SelectedFilesCount", + totalSize: "#Dataset0SelectedFilesTotalSize", + folder: "#Dataset0SourceFolder", + }, + inputs: { + auth_token: "#token", + jwt: "#jwt", + "item[]": "@pid", + "directory[]": "@folder", + "files[]": "@files", + }, + enabled: "#Length(@files) > 0", + authorization: ["#datasetAccess", "#datasetPublic"], + }, + { + id: "0cd5b592-0b1a-11f0-a42c-23e177127ee7", + description: + "This action let users download jupyter notebook properly populated with dataset pid and all files using an instance of sciwyrm", + order: 5, + label: "Notebook All (Download JSON)", + files: "all", + type: "json-download", + icon: "/assets/icons/jupyter_logo.png", + url: "https://www.sciwyrm.info/notebook", + target: "_blank", + authorization: ["#datasetAccess", "#datasetPublic"], + variables: { + pid: "#Dataset0Pid", + files: "#Dataset0FilesPath", + folder: "#Dataset0SourceFolder", + }, + payload: + '{"template_id":"c975455e-ede3-11ef-94fb-138c9cd51fc0","parameters":{"dataset":"{{ @pid }}","directory":"{{ @folder }}","files": {{ @files[] }},"jwt":"{{ #jwt }}","scicat_url":"https://staging.scicat.ess.url","file_server_url":"sftserver2.esss.dk","file_server_port":"22"}}', + filename: "{{ #uuid }}.ipynb", + }, + { + id: "a414773a-a526-11f0-a7f2-ff1026e5dba9", + description: + "This action let users download jupyter notebook properly populated with dataset pid and selected files using an instance of sciwyrm", + order: 6, + label: "Notebook Selected (Download JSON)", + type: "json-download", + icon: "/assets/icons/jupyter_logo.png", + url: "https://www.sciwyrm.info/notebook", + target: "_blank", + enabled: "#Length(@files) > 0", + authorization: ["#datasetAccess", "#datasetPublic"], + variables: { + pid: "#Dataset0Pid", + files: "#Dataset0SelectedFilesPath", + selected: "#Dataset0SelectedFiles", + folder: "#Dataset0SourceFolder", + }, + payload: + '{"template_id":"c975455e-ede3-11ef-94fb-138c9cd51fc0","parameters":{"dataset":"{{ @pid }}","directory":"{{ @folder }}","files": {{ @files[] }},"jwt":"{{ #jwt }}","scicat_url":"https://staging.scicat.ess.url","file_server_url":"sftserver2.esss.dk","file_server_port":"22"}}', + filename: "{{ #uuid }}.ipynb", + }, + { + id: "9c6a11b6-a526-11f0-8795-6f025b320cc3", + description: + "This action let users make a call an arbitrary URL and store the reply in the store", + order: 7, + label: "Publish", + type: "xhr", + mat_icon: "lock_open", + method: "PATCH", + url: "http://localhost:3000/dataset/{{ @pid }}/", + target: "_blank", + enabled: "(#datasetOwner || #userIsAdmin) && !@isPublished", + authorization: "#datasetOwner && !@isPublished", + variables: { + pid: "@Dataset0Pid", + isPublished: "#Dataset[0]Field[isPublished]", + }, + payload: '{"isPublished":"true"}', + headers: { + "Content-Type": "application/json", + Authorization: "#tokenBearer", + }, + }, + { + id: "94a1d694-a526-11f0-947b-038d53cd837a", + description: + "This action let users make a call an arbitrary URL and store the reply in the store", + order: 8, + label: "Unpublish", + type: "xhr", + mat_icon: "lock", + method: "PATCH", + url: "http://localhost:3000/dataset/{{ @pid }}/", + target: "_blank", + enabled: "(#datasetOwner || #userIsAdmin) && @isPublished", + authorization: "#datasetOwner && @isPublished", + variables: { + pid: "#Dataset0Pid", + isPublished: "#Dataset[0]Field[isPublished]", + }, + payload: '{"isPublished":"false"}', + headers: { + "Content-Type": "application/json", + Authorization: "#tokenBearer", + }, + }, + { + id: "c3bcbd40-a526-11f0-915a-93eeff0860ab", + description: "This action let users jump to another URL entirely", + order: 9, + label: "ESS", + type: "link", + icon: "/assets/icons/button_ess.png", + url: "https://ess.eu", + target: "_blank", + }, + ], + datasetDetailsActionsEnabled: false, + datasetDetailsActions: [], + datasetSelectionActionsEnabled: true, + datasetSelectionActions: [], + datasetActionsEnabled: false, + datasetActions: [], + labelMaps: { + filters: { + LocationFilter: "Location", + PidFilter: "Pid", + GroupFilter: "Group", + TypeFilter: "Type", + KeywordFilter: "Keyword", + DateRangeFilter: "Start Date - End Date", + TextFilter: "Text", + }, + }, + defaultDatasetsListSettings: { + columns: [ + { + order: 0, + name: "select", + type: "standard", + width: 120, + enabled: true, + }, + { + order: 1, + name: "pid", + type: "standard", + width: 130, + enabled: true, + }, + { + order: 2, + name: "datasetName", + type: "standard", + width: 250, + enabled: true, + }, + { + order: 3, + name: "runNumber", + type: "standard", + width: 120, + enabled: true, + }, + { + order: 4, + name: "sourceFolder", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 5, + name: "sourceFolderHost", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 6, + name: "size", + type: "standard", + width: 150, + enabled: true, + }, + { + order: 7, + name: "numberOfFiles", + type: "standard", + width: 120, + enabled: false, + }, + { + order: 8, + name: "creationTime", + type: "date", + enabled: true, + width: 200, + format: "yyyy-mm-dd HH:MM", + }, + { + order: 9, + name: "keywords", + type: "standard", // TODO: was 'list' + enabled: false, + width: 200, + }, + { + order: 10, + name: "description", + type: "hoverContent", + enabled: false, + width: 150, + }, + { + order: 11, + name: "type", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 12, + name: "image", + type: "standard", + width: 250, + enabled: true, + }, + { + order: 13, + name: "scientificMetadata", + type: "hoverContent", + width: 200, + enabled: false, + }, + { + order: 14, + name: "scientificMetadataSchema", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 15, + name: "scientificMetadataValid", + type: "standard", + width: 100, + enabled: false, + }, + { + order: 16, + name: "owner", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 17, + name: "ownerEmail", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 18, + name: "orcidOfOwner", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 19, + name: "contactEmail", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 20, + name: "proposalId", + type: "standard", + width: 200, + enabled: true, + }, + { + order: 21, + name: "proposalIds", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 22, + name: "license", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 23, + name: "isPublished", + type: "standard", + width: 100, + enabled: false, + }, + { + order: 24, + name: "techniques", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 25, + name: "comment", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 26, + name: "dataQualityMetrics", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 27, + + name: "principalInvestigator", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 28, + name: "startTime", + type: "date", + width: 200, + enabled: false, + format: "yyyy-mm-dd HH:MM", + }, + { + order: 29, + name: "endTime", + type: "date", + width: 200, + enabled: false, + format: "yyyy-mm-dd HH:MM", + }, + { + order: 30, + name: "creationLocation", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 31, + name: "sampleIds", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 32, + name: "ownerGroup", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 33, + name: "dataStatus", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 34, + name: "accessGroups", + type: "standard", + width: 200, + enabled: false, + }, + ], + filters: [ + { + key: "creationLocation", + label: "Location", + type: "multiSelect", + description: "Filter by creation location on the dataset", + enabled: true, + }, + { + key: "pid", + label: "Pid", + type: "text", + description: "Filter by dataset pid", + enabled: true, + }, + { + key: "ownerGroup", + label: "Group", + type: "multiSelect", + description: "Filter by owner group of the dataset", + enabled: true, + }, + { + key: "type", + label: "Type", + type: "multiSelect", + description: "Filter by dataset type", + enabled: true, + }, + { + key: "keywords", + label: "Keyword", + type: "multiSelect", + description: "Filter by keywords in the dataset", + enabled: true, + }, + { + key: "creationTime", + label: "Creation Time", + type: "dateRange", + description: "Filter by creation time of the dataset", + enabled: true, + }, + ], + conditions: [], + }, + defaultProposalsListSettings: { + columns: [ + { + order: 0, + name: "proposalId", + type: "standard", + width: 130, + enabled: true, + }, + { + order: 1, + name: "title", + type: "standard", + width: 250, + enabled: true, + }, + { + order: 2, + name: "abstract", + type: "hoverContent", + width: 150, + enabled: true, + }, + { + order: 3, + name: "startTime", + type: "date", + format: "yyyy-MM-dd", + width: 200, + enabled: true, + }, + { + order: 4, + name: "pi_lastname", + type: "standard", + enabled: true, + width: 200, + }, + { + order: 5, + name: "numberOfDatasets", + type: "standard", + width: 150, + enabled: true, + }, + { + order: 6, + name: "pi_firstname", + type: "standard", + width: 200, + enabled: false, + }, + { + order: 7, + name: "pi_email", + type: "standard", + width: 150, + enabled: false, + }, + { + order: 8, + type: "standard", + name: "firstname", + width: 200, + enabled: false, + }, + { + order: 9, + type: "standard", + name: "lastname", + width: 200, + enabled: false, + }, + { + order: 10, + type: "standard", + name: "email", + width: 150, + enabled: false, + }, + { + order: 11, + name: "endTime", + type: "date", + format: "yyyy-MM-dd", + width: 200, + enabled: false, + }, + { + order: 12, + type: "standard", + name: "parentProposalId", + width: 130, + enabled: false, + }, + { + order: 13, + type: "standard", + name: "type", + width: 200, + enabled: false, + }, + ], + filters: [ + { + key: "instrumentIds", + label: "Instrument", + type: "checkbox", + description: "Filter by instrument name", + enabled: true, + }, + { + key: "pi_lastname", + label: "PI Last Name", + type: "checkbox", + description: "Filter by dataset start time", + enabled: true, + }, + { + key: "startTime", + label: "Start Time", + type: "dateRange", + description: "Filter by dataset start time", + enabled: true, + }, + ], + }, + labelsLocalization: { + dataset: { + pid: "PID", + description: "Description", + principalInvestigator: "Principal Investigator", + keywords: "Keywords", + creationTime: "Creation Time", + scientificMetadata: "Scientific Metadata", + metadataJsonView: "Metadata JsonView", + datasetName: "Dataset Name", + "scientificMetadata.run_number.value": "Run Number", + "scientificMetadata.start_time": "Start Time", + runNumber: "Run Number", + size: "Size", + image: "Image", + proposalId: "Proposal Id", + startTime: "Start Time", + endTime: "End Time", + }, + proposal: { + "General Information": "Proposal Information", + Title: "Proposal Title", + Abstract: "Abstract", + "Proposal Id": "Proposal Id", + "Proposal Type": "Proposal Type", + "Parent Proposal": "Parent Proposal", + "Start Time": "Start Time", + "End Time": "End Time", + "Creator Information": "People", + "Main Proposer": "Proposal Submitted By", + "Principal Investigator": "Principal Investigator", + Metadata: "Additional Information", + proposalId: "Proposal Id", + startTime: "Start Date", + title: "Proposal Title", + abstract: "Abstract", + pi_lastname: "PI Last Name", + pi_firstname: "PI First Name", + pi_email: "PI Email", + firstname: "Proposer First Name", + lastname: "Proposer Last Name", + email: "Proposer Email", + endTime: "End Date", + type: "Type", + parentProposalId: "Parent Proposal Id", + instrumentIds: "Instrument", + numberOfDatasets: "Number of Datasets", + }, + }, + dateFormat: "yyyy-MM-dd HH:mm", + datasetDetailComponent: { + enableCustomizedComponent: true, + customization: [ + { + type: "regular", + label: "General Information", + order: 0, + row: 1, + col: 8, + fields: [ + { + element: "text", + source: "scientificMetadata.start_time", + order: 0, + }, + { + element: "copy", + source: "scientificMetadata.run_number.value", + order: 1, + }, + { + element: "text", + source: "creationTime", + order: 2, + }, + { + element: "text", + source: "type", + order: 3, + }, + { + element: "text", + source: "datasetName", + order: 4, + }, + { + element: "tag", + source: "keywords", + order: 5, + }, + ], + }, + { + type: "attachments", + label: "Gallery", + order: 1, + col: 2, + row: 2, + options: { + limit: 5, + size: "medium", + }, + }, + { + type: "regular", + label: "Contact Information", + order: 2, + col: 2, + row: 1, + fields: [ + { + element: "text", + source: "principalInvestigator", + order: 0, + }, + { + element: "linky", + source: "contactEmail", + order: 1, + }, + ], + }, + { + type: "regular", + label: "Files Information", + order: 3, + col: 2, + row: 1, + fields: [ + { + element: "text", + source: "scientificMetadata.runnumber", + order: 0, + }, + { + element: "text", + source: "sourceFolderHost", + order: 1, + }, + { + element: "text", + source: "numberOfFiles", + order: 2, + }, + { + element: "text", + source: "size", + order: 3, + }, + { + element: "text", + source: "numberOfFilesArchived", + order: 4, + }, + { + element: "text", + source: "packedSize", + order: 5, + }, + ], + }, + { + type: "regular", + label: "Related Documents", + order: 4, + col: 4, + row: 1, + fields: [ + { + element: "internalLink", + source: "proposalIds", + order: 0, + }, + { + element: "internalLink", + source: "instrumentIds", + order: 1, + }, + { + element: "tag", + source: "sampleIds", + order: 2, + }, + { + element: "tag", + source: "inputDatasets", + order: 3, + }, + { + element: "internalLink", + source: "creationLocation", + order: 4, + }, + ], + }, + { + type: "attachments", + label: "Gallery", + order: 5, + col: 1, + row: 1, + options: { + limit: 2, + size: "small", + }, + }, + { + type: "scientificMetadata", + label: "Scientific Metadata Table", + viewMode: "table", + order: 6, + col: 9, + row: 1, + }, + { + type: "scientificMetadata", + label: "Scientific Metadata JSON", + viewMode: "json", + order: 7, + col: 9, + row: 1, + }, + { + type: "scientificMetadata", + label: "Scientific Metadata Tree", + viewMode: "tree", + order: 8, + col: 9, + row: 1, + }, + { + type: "datasetJsonView", + label: "Dataset Json View", + order: 9, + col: 10, + row: 2, + }, + ], + }, + defaultMainPage: { + nonAuthenticatedUser: "DATASETS", + authenticatedUser: "DATASETS", + }, + checkBoxFilterClickTrigger: false, + mainMenu: { + nonAuthenticatedUser: { + datasets: true, + files: false, + instruments: true, + jobs: false, + policies: false, + proposals: true, + publishedData: true, + samples: false, + ingestor: false, + }, + authenticatedUser: { + datasets: true, + files: true, + instruments: true, + jobs: true, + policies: false, + proposals: true, + publishedData: true, + samples: true, + ingestor: false, + }, + }, + multipleDownloadUseAuthToken: false, + fileserverBaseURL: "", + fileserverButtonLabel: "", +}; diff --git a/src/app/app-config.service.ts b/src/app/app-config.service.ts index 7debb96695..0644d84d25 100644 --- a/src/app/app-config.service.ts +++ b/src/app/app-config.service.ts @@ -10,6 +10,7 @@ import { ListSettings, TableColumn, } from "state-management/models"; +import { DEFAULT_CONFIG } from "./app-config.defaults"; export interface OAuth2Endpoint { authURL: string; @@ -77,7 +78,6 @@ export class DefaultTab { } export interface AppConfigInterface { - allowConfigOverrides?: boolean; skipSciCatLoginPageEnabled?: boolean; accessTokenPrefix: string; addDatasetEnabled: boolean; @@ -141,6 +141,7 @@ export interface AppConfigInterface { shoppingCartEnabled: boolean; shoppingCartOnHeader: boolean; siteTitle: string | null; + siteIcon: string | null; siteSciCatLogo: string | null; siteHeaderLogo: string | null; siteLoginBackground: string | null; @@ -169,6 +170,10 @@ export interface AppConfigInterface { defaultTab?: DefaultTab; statusBannerMessage?: string; statusBannerCode?: "INFO" | "WARN"; + labelMaps?: { + filters?: Record; + }; + additionalConfigs?: string[]; } function isMainPageConfiguration(obj: any): obj is MainPageConfiguration { @@ -186,56 +191,65 @@ function isMainPageConfiguration(obj: any): obj is MainPageConfiguration { }) export class AppConfigService { private appConfig: object = {}; + private mergedConfigUrls = new Set(); // Processed config URLs to prevent circular references constructor(private http: HttpClient) {} - private async mergeConfig(): Promise { - const config = await firstValueFrom( - this.http.get>("/assets/config.json").pipe( - catchError(() => { - console.error("No config provided."); + /** + * Custom merge to replace arrays instead of merging them + */ + private mergeObjects(config: AppConfigInterface, overrides: Partial): AppConfigInterface { + return mergeWith( + config, + overrides, + (objVal, srcVal) => + Array.isArray(objVal) && Array.isArray(srcVal) ? srcVal : undefined, + ); + } + + private loadConfigFromUrl(url: string): Promise> { + return firstValueFrom( + this.http.get>(url) + .pipe(timeout(2000)) + .pipe(catchError(() => { + console.error(`Error loading config from ${url}`); return of({} as Partial); }), ), ); - let configOverrideRequest: Partial = {}; - if (config?.allowConfigOverrides) { - configOverrideRequest = await firstValueFrom( - this.http - .get>("/assets/config.override.json") - .pipe( - catchError(() => { - console.error( - "allowConfigOverrides set to true but no config.override provided.", - ); - return of({} as Partial); - }), - ), - ); + } + + /** + * Depth-first merging of config files + * + * Only the first occurrence of each additional config URL will be merged to prevent + * circular references. + */ + private async loadAdditionalConfigs(config: AppConfigInterface): Promise { + if (!config.additionalConfigs) { + return config; } - // Custom merge to replace arrays instead of merging them - return mergeWith( - {}, - config ?? {}, - configOverrideRequest ?? {}, - (objVal, srcVal) => - Array.isArray(objVal) && Array.isArray(srcVal) ? srcVal : undefined, - ); + for (const url of config.additionalConfigs) { + if (this.mergedConfigUrls.has(url)) { + continue; + } + const additionalConfig = await this.loadConfigFromUrl(url); + config = this.mergeObjects(config, additionalConfig); + this.mergedConfigUrls.add(url); + config = await this.loadAdditionalConfigs(config); + } + return config; } async loadAppConfig(): Promise { - try { - const config = await firstValueFrom( - this.http.get("/api/v3/admin/config").pipe(timeout(2000)), - ); + // Load config from the frontend + // This is done first to provide lbBaseURL + let configObject = DEFAULT_CONFIG; + configObject = await this.loadAdditionalConfigs(configObject); - this.appConfig = Object.assign({}, this.appConfig, config); - } catch (err) { - console.log("No config available in backend, trying with local config."); - const config = await this.mergeConfig(); - this.appConfig = Object.assign({}, this.appConfig, config); - } + this.appConfig = Object.assign({}, this.appConfig, configObject); + // Set some defaults const config: AppConfigInterface = this.appConfig as AppConfigInterface; if ( "defaultMainPage" in config && diff --git a/src/app/state-management/models/index.ts b/src/app/state-management/models/index.ts index 9a2b5ab649..33c3a21c34 100644 --- a/src/app/state-management/models/index.ts +++ b/src/app/state-management/models/index.ts @@ -74,7 +74,7 @@ export interface CustomizationItem { } export interface Field { - element: FieldType; + element: `${DatasetViewFieldType}`; source: string; order: number; path?: string; @@ -87,9 +87,6 @@ type CustomizationType = | "datasetJsonView" | "attachments"; -// Type alias for allowed field types -type FieldType = "text" | "copy" | "linky" | "tag" | "date"; - export interface ListSettings { columns?: TableColumn[]; filters?: FilterConfig[]; diff --git a/src/assets/config.json b/src/assets/config.json index c02b0f24d3..190b919bcd 100644 --- a/src/assets/config.json +++ b/src/assets/config.json @@ -1,915 +1,3 @@ { - "accessTokenPrefix": "Bearer ", - "addDatasetEnabled": false, - "allowConfigOverrides": true, - "archiveWorkflowEnabled": false, - "datasetReduceEnabled": true, - "datasetJsonScientificMetadata": true, - "editDatasetEnabled": true, - "editDatasetSampleEnabled": true, - "editMetadataEnabled": true, - "editPublishedData": true, - "addSampleEnabled": true, - "externalAuthEndpoint": "/auth/msad", - "facility": "SciCat FE vanilla", - "siteIcon": "site-header-logo.png", - "sitetitle": "SciCat FE repo", - "siteSciCatLogo": "full", - "loginFacilityLabel": "SciCat Vanilla", - "loginLdapLabel": "Ldap", - "loginLocalLabel": "Local", - "loginFacilityEnabled": true, - "loginLdapEnabled": false, - "loginLocalEnabled": true, - "fileColorEnabled": true, - "fileDownloadEnabled": true, - "gettingStarted": null, - "ingestManual": null, - "jobsEnabled": true, - "jsonMetadataEnabled": true, - "JupyterHubUrl": "", - "landingPage": "doi.ess.eu/detail/", - "lbBaseURL": "http://127.0.0.1:3000", - "ingestorComponent": { - "ingestorEnabled": false, - "ingestorAutodiscoveryOptions": [ - { - "mailDomain": "university.ch", - "description": "University/facility of Choice", - "facilityBackend": "http://localhost:8888" - } - ] - }, - "logbookEnabled": true, - "loginFormEnabled": true, - "thumbnailFetchLimitPerPage": 100, - "metadataPreviewEnabled": true, - "metadataStructure": "", - "multipleDownloadAction": "http://localhost:3012/zip", - "multipleDownloadEnabled": true, - "oAuth2Endpoints": [ - { - "authURL": "api/v3/auth/oidc", - "displayText": "SciCat Vanilla OIDC" - } - ], - "policiesEnabled": true, - "retrieveDestinations": [], - "riotBaseUrl": "http://scichat.swap.ess.eu", - "scienceSearchEnabled": false, - "scienceSearchUnitsEnabled": true, - "searchPublicDataEnabled": true, - "searchSamples": true, - "sftpHost": "your.sftp.server", - "shareEnabled": true, - "sourceFolder": "/source/data/folder", - "maxDirectDownloadSize": 5000000000, - "maxFileSizeWarning": "Some files are above and cannot be downloaded directly. These file can be downloaded via sftp host: in directory: ", - "shoppingCartEnabled": true, - "shoppingCartOnHeader": true, - "tableSciDataEnabled": true, - "datasetDetailsShowMissingProposalId": false, - "notificationInterceptorEnabled": true, - "metadataEditingUnitListDisabled": true, - "hideEmptyMetadataTable": false, - "datafilesActionsEnabled": true, - "datafilesActions": [ - { - "id": "eed8efec-4354-11ef-a3b5-d75573a5d37f", - "description": "This action let users download all files using the zip service", - "order": 1, - "label": "Download All", - "files": "all", - "mat_icon": "download", - "type": "form", - "url": "https://zip.scicatproject.org/download/all", - "target": "_blank", - "variables" : { - "pid": "#Dataset0Pid", - "files": "#Dataset0FilesPath", - "totalSize": "#Dataset0FilesTotalSize", - "folder": "#Dataset0SourceFolder" - }, - "enabled": "#MaxDownloadableSize(@totalSize)", - "inputs" : { - "item[]" : "@pid", - "directory[]" : "@folder", - "files[]": "@files" - }, - "authorization": ["#datasetAccess", "#datasetPublic"] - }, - { - "id": "3072fafc-4363-11ef-b9f9-ebf568222d26", - "description": "This action let users download selected files using the zip service", - "order": 2, - "label": "Download Selected", - "files": "selected", - "mat_icon": "download", - "type": "form", - "url": "https://zip.scicatproject.org/download/selected", - "target": "_blank", - "variables" : { - "pid": "#Dataset0Pid", - "files": "#Dataset0SelectedFilesPath", - "selected": "#Dataset0SelectedFilesCount", - "totalSize": "#Dataset0SelectedFilesTotalSize", - "folder": "#Dataset0SourceFolder" - }, - "inputs" : { - "auth_token" : "#tokenBearer", - "jwt" : "#jwt", - "item[]" : "@pid", - "directory[]" : "@folder", - "files[]": "@files" - }, - "enabled": "#Length(@files) && #MaxDownloadableSize(@totalSize)", - "authorization": ["#datasetAccess", "#datasetPublic"] - }, - { - "id": "4f974f0e-4364-11ef-9c63-03d19f813f4e", - "description": "This action let users download jupyter notebook properly populated with dataset pid and all files using an instance of sciwyrm", - "order": 3, - "label": "Notebook All (Form)", - "files": "all", - "icon": "/assets/icons/jupyter_logo.png", - "type": "form", - "url": "https://www.scicat.info/notebook/all", - "target": "_blank", - "variables" : { - "pid": "#Dataset0Pid", - "files": "#Dataset0FilesPath", - "totalSize": "#Dataset0FilesTotalSize", - "folder": "#Dataset0SourceFolder" - }, - "enabled": "", - "inputs" : { - "auth_token" : "#token", - "jwt" : "#jwt", - "item[]" : "@pid", - "directory[]" : "@folder", - "files[]": "@files" - }, - "authorization": ["#datasetAccess", "#datasetPublic"] - }, - { - "id": "fa3ce6ee-482d-11ef-95e9-ff2c80dd50bd", - "order": 4, - "label": "Notebook Selected (Form)", - "files": "selected", - "icon": "/assets/icons/jupyter_logo.png", - "type": "form", - "url": "https://www.scicat.info/notebook/selected", - "target": "_blank", - "variables" : { - "pid": "#Dataset0Pid", - "files": "#Dataset0SelectedFilesPath", - "selected": "#Dataset0SelectedFilesCount", - "totalSize": "#Dataset0SelectedFilesTotalSize", - "folder": "#Dataset0SourceFolder" - }, - "inputs" : { - "auth_token" : "#token", - "jwt" : "#jwt", - "item[]" : "@pid", - "directory[]" : "@folder", - "files[]": "@files" - }, - "enabled": "#Length(@files) > 0", - "authorization": ["#datasetAccess", "#datasetPublic"] - }, - { - "id": "0cd5b592-0b1a-11f0-a42c-23e177127ee7", - "description": "This action let users download jupyter notebook properly populated with dataset pid and all files using an instance of sciwyrm", - "order": 5, - "label": "Notebook All (Download JSON)", - "files": "all", - "type": "json-download", - "icon": "/assets/icons/jupyter_logo.png", - "url": "https://www.sciwyrm.info/notebook", - "target": "_blank", - "authorization": ["#datasetAccess", "#datasetPublic"], - "variables" : { - "pid": "#Dataset0Pid", - "files": "#Dataset0FilesPath", - "folder": "#Dataset0SourceFolder" - }, - "payload": "{\"template_id\":\"c975455e-ede3-11ef-94fb-138c9cd51fc0\",\"parameters\":{\"dataset\":\"{{ @pid }}\",\"directory\":\"{{ @folder }}\",\"files\": {{ @files[] }},\"jwt\":\"{{ #jwt }}\",\"scicat_url\":\"https://staging.scicat.ess.url\",\"file_server_url\":\"sftserver2.esss.dk\",\"file_server_port\":\"22\"}}", - "filename": "{{ #uuid }}.ipynb" - }, - { - "id": "a414773a-a526-11f0-a7f2-ff1026e5dba9", - "description": "This action let users download jupyter notebook properly populated with dataset pid and selected files using an instance of sciwyrm", - "order": 6, - "label": "Notebook Selected (Download JSON)", - "type": "json-download", - "icon": "/assets/icons/jupyter_logo.png", - "url": "https://www.sciwyrm.info/notebook", - "target": "_blank", - "enabled": "#Length(@files) > 0", - "authorization": ["#datasetAccess", "#datasetPublic"], - "variables" : { - "pid": "#Dataset0Pid", - "files": "#Dataset0SelectedFilesPath", - "selected": "#Dataset0SelectedFiles", - "folder": "#Dataset0SourceFolder" - }, - "payload": "{\"template_id\":\"c975455e-ede3-11ef-94fb-138c9cd51fc0\",\"parameters\":{\"dataset\":\"{{ @pid }}\",\"directory\":\"{{ @folder }}\",\"files\": {{ @files[] }},\"jwt\":\"{{ #jwt }}\",\"scicat_url\":\"https://staging.scicat.ess.url\",\"file_server_url\":\"sftserver2.esss.dk\",\"file_server_port\":\"22\"}}", - "filename": "{{ #uuid }}.ipynb" - }, - { - "id": "9c6a11b6-a526-11f0-8795-6f025b320cc3", - "description": "This action let users make a call an arbitrary URL and store the reply in the store", - "order": 7, - "label": "Publish", - "type": "xhr", - "mat_icon": "lock_open", - "method" : "PATCH", - "url": "http://localhost:3000/dataset/{{ @pid }}/", - "target": "_blank", - "enabled": "(#datasetOwner || #userIsAdmin) && !@isPublished", - "authorization": "#datasetOwner && !@isPublished", - "variables" : { - "pid": "@Dataset0Pid", - "isPublished" : "#Dataset[0]Field[isPublished]" - }, - "payload": "{\"isPublished\":\"true\"}", - "headers": { - "Content-Type": "application/json", - "Authorization": "#tokenBearer" - } - }, - { - "id": "94a1d694-a526-11f0-947b-038d53cd837a", - "description": "This action let users make a call an arbitrary URL and store the reply in the store", - "order": 8, - "label": "Unpublish", - "type": "xhr", - "mat_icon": "lock", - "method" : "PATCH", - "url": "http://localhost:3000/dataset/{{ @pid }}/", - "target": "_blank", - "enabled": "(#datasetOwner || #userIsAdmin) && @isPublished", - "authorization": "#datasetOwner && @isPublished", - "variables" : { - "pid": "#Dataset0Pid", - "isPublished" : "#Dataset[0]Field[isPublished]" - }, - "payload": "{\"isPublished\":\"false\"}", - "headers": { - "Content-Type": "application/json", - "Authorization": "#tokenBearer" - } - }, - { - "id": "c3bcbd40-a526-11f0-915a-93eeff0860ab", - "description": "This action let users jump to another URL entirely", - "order": 9, - "label": "ESS", - "type": "link", - "icon": "/assets/icons/button_ess.png", - "url": "https://ess.eu", - "target": "_blank" - } - ], - "datasetDetailsActionsEnabled": false, - "datasetDetailsActions": [], - "selectionActionsEnabled": true, - "selectionActions": [], - "labelMaps": { - "filters": { - "LocationFilter": "Location", - "PidFilter": "Pid", - "GroupFilter": "Group", - "TypeFilter": "Type", - "KeywordFilter": "Keyword", - "DateRangeFilter": "Start Date - End Date", - "TextFilter": "Text" - } - }, - "defaultDatasetsListSettings": { - "columns": [ - { - "name": "select", - "type": "standard", - "width": 120, - "enabled": true - }, - { - "name": "pid", - "type": "standard", - "width": 130, - "enabled": true - }, - { - "name": "datasetName", - "type": "standard", - "width": 250, - "enabled": true - }, - { - "name": "runNumber", - "type": "standard", - "width": 120, - "enabled": true - }, - { - "name": "sourceFolder", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "sourceFolderHost", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "size", - "type": "standard", - "width": 150, - "enabled": true - }, - { - "name": "numberOfFiles", - "type": "standard", - "width": 120, - "enabled": false - }, - { - "name": "creationTime", - "type": "date", - "enabled": true, - "width": 200, - "format": "yyyy-mm-dd HH:MM" - }, - { - "name": "keywords", - "type": "list", - "enabled": false, - "width": 200 - }, - { - "name": "description", - "type": "hovercontent", - "enabled": false, - "width": 150 - }, - { - "name": "type", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "image", - "type": "standard", - "width": 250, - "enabled": true - }, - { - "name": "scientificMetadata", - "type": "hovercontent", - "width": 200, - "enabled": false - }, - { - "name": "scientificMetadataSchema", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "scientificMetadataValid", - "type": "standard", - "width": 100, - "enabled": false - }, - { - "name": "owner", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "ownerEmail", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "orcidOfOwner", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "contactEmail", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "proposalId", - "type": "standard", - "width": 200, - "enabled": true - }, - { - "name": "proposalIds", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "license", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "isPublished", - "type": "standard", - "width": 100, - "enabled": false - }, - { - "name": "techniques", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "comment", - "type": "editable", - "width": 200, - "enabled": false - }, - { - "name": "dataQualityMetrics", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "principalInvestigator", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "startTime", - "type": "date", - "width": 200, - "enabled": false, - "format": "yyyy-mm-dd HH:MM" - }, - { - "name": "endTime", - "type": "date", - "width": 200, - "enabled": false, - "format": "yyyy-mm-dd HH:MM" - }, - { - "name": "creationLocation", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "sampleIds", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "ownerGroup", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "dataStatus", - "type": "standard", - "width": 200, - "enabled": false - }, - { - "name": "accessGroups", - "type": "standard", - "width": 200, - "enabled": false - } - ], - "filters": [ - { - "key": "creationLocation", - "label": "Location", - "type": "multiSelect", - "description": "Filter by creation location on the dataset", - "enabled": true - }, - { - "key": "pid", - "label": "Pid", - "type": "text", - "description": "Filter by dataset pid", - "enabled": true - }, - { - "key": "ownerGroup", - "label": "Group", - "type": "multiSelect", - "description": "Filter by owner group of the dataset", - "enabled": true - }, - { - "key": "type", - "label": "Type", - "type": "multiSelect", - "description": "Filter by dataset type", - "enabled": true - }, - { - "key": "keywords", - "label": "Keyword", - "type": "multiSelect", - "description": "Filter by keywords in the dataset", - "enabled": true - }, - { - "key": "creationTime", - "label": "Creation Time", - "type": "dateRange", - "description": "Filter by creation time of the dataset", - "enabled": true - } - ], - "conditions": [] - }, - "defaultProposalsListSettings": { - "columns": [ - { - "name": "proposalId", - "width": 130, - "enabled": true - }, - { - "name": "title", - "width": 250, - "enabled": true - }, - { - "name": "abstract", - "type": "hoverContent", - "width": 150, - "enabled": true - }, - { - "name": "startTime", - "type": "date", - "format": "yyyy-MM-dd", - "width": 200, - "enabled": true - }, - { - "name": "pi_lastname", - "enabled": true, - "width": 200 - }, - { - "name": "numberOfDatasets", - "width": 150, - "enabled": true - }, - { - "name": "pi_firstname", - "width": 200, - "enabled": false - }, - { - "name": "pi_email", - "width": 150, - "enabled": false - }, - { - "name": "firstname", - "width": 200, - "enabled": false - }, - { - "name": "lastname", - "width": 200, - "enabled": false - }, - { - "name": "email", - "width": 150, - "enabled": false - }, - { - "name": "endTime", - "type": "date", - "format": "yyyy-MM-dd", - "width": 200, - "enabled": false - }, - { - "name": "parentProposalId", - "width": 130, - "enabled": false - }, - { - "name": "type", - "width": 200, - "enabled": false - } - ], - "filters": [ - { - "key": "instrumentIds", - "label": "Instrument", - "type": "checkbox", - "description": "Filter by instrument name", - "enabled": true - }, - { - "key": "pi_lastname", - "label": "PI Last Name", - "type": "checkbox", - "description": "Filter by dataset start time", - "enabled": true - }, - { - "key": "startTime", - "label": "Start Time", - "type": "dateRange", - "description": "Filter by dataset start time", - "enabled": true - } - ] - }, - "labelsLocalization": { - "dataset": { - "pid": "PID", - "description": "Description", - "principalInvestigator": "Principal Investigator", - "keywords": "Keywords", - "creationTime": "Creation Time", - "scientificMetadata": "Scientific Metadata", - "metadataJsonView": "Metadata JsonView", - "datasetName": "Dataset Name", - "scientificMetadata.run_number.value": "Run Number", - "scientificMetadata.start_time": "Start Time", - "runNumber": "Run Number", - "size": "Size", - "image": "Image", - "proposalId": "Proposal Id", - "startTime": "Start Time", - "endTime": "End Time" - }, - "proposal": { - "General Information": "Proposal Information", - "Title": "Proposal Title", - "Abstract": "Abstract", - "Proposal Id": "Proposal Id", - "Proposal Type": "Proposal Type", - "Parent Proposal": "Parent Proposal", - "Start Time": "Start Time", - "End Time": "End Time", - "Creator Information": "People", - "Main Proposer": "Proposal Submitted By", - "Principal Investigator": "Principal Investigator", - "Metadata": "Additional Information", - "proposalId": "Proposal Id", - "startTime": "Start Date", - "title": "Proposal Title", - "abstract": "Abstract", - "pi_lastname": "PI Last Name", - "pi_firstname": "PI First Name", - "pi_email": "PI Email", - "firstname": "Proposer First Name", - "lastname": "Proposer Last Name", - "email": "Proposer Email", - "endTime": "End Date", - "type": "Type", - "parentProposalId": "Parent Proposal Id", - "instrumentIds": "Instrument", - "numberOfDatasets": "Number of Datasets" - } - }, - "dateFormat": "yyyy-MM-dd HH:mm", - "datasetDetailComponent": { - "enableCustomizedComponent": false, - "customization": [ - { - "type": "regular", - "label": "General Information", - "order": 0, - "row": 1, - "col": 8, - "fields": [ - { - "element": "text", - "source": "scientificMetadata.start_time", - "order": 0 - }, - { - "element": "copy", - "source": "scientificMetadata.run_number.value", - "order": 1 - }, - { - "element": "text", - "source": "creationTime", - "order": 2 - }, - { - "element": "text", - "source": "type", - "order": 3 - }, - { - "element": "text", - "source": "datasetName", - "order": 4 - }, - { - "element": "tag", - "source": "keywords", - "order": 5 - } - ] - }, - { - "type": "attachments", - "label": "Gallery", - "order": 1, - "col": 2, - "row": 2, - "options": { - "limit": 5, - "size": "medium" - } - }, - { - "type": "regular", - "label": "Contact Information", - "order": 2, - "col": 2, - "row": 1, - "fields": [ - { - "element": "text", - "source": "principalInvestigator", - "order": 0 - }, - { - "element": "linky", - "source": "contactEmail", - "order": 1 - } - ] - }, - { - "type": "regular", - "label": "Files Information", - "order": 3, - "col": 2, - "row": 1, - "fields": [ - { - "element": "text", - "source": "scientificMetadata.runnumber", - "order": 0 - }, - { - "element": "text", - "source": "sourceFolderHost", - "order": 1 - }, - { - "element": "text", - "source": "numberOfFiles", - "order": 2 - }, - { - "element": "text", - "source": "size", - "order": 3 - }, - { - "element": "text", - "source": "numberOfFilesArchived", - "order": 4 - }, - { - "element": "text", - "source": "packedSize", - "order": 5 - } - ] - }, - { - "type": "regular", - "label": "Related Documents", - "order": 4, - "col": 4, - "row": 1, - "fields": [ - { - "element": "internalLink", - "source": "proposalIds", - "order": 0 - }, - { - "element": "internalLink", - "source": "instrumentIds", - "order": 1 - }, - { - "element": "tag", - "source": "sampleIds", - "order": 2 - }, - { - "element": "tag", - "source": "inputDatasets", - "order": 3 - }, - { - "element": "internalLink", - "source": "creationLocation", - "order": 4 - } - ] - }, - { - "type": "attachments", - "label": "Gallery", - "order": 5, - "col": 1, - "row": 1, - "options": { - "limit": 2, - "size": "small" - } - }, - { - "type": "scientificMetadata", - "label": "Scientific Metadata Table", - "viewMode": "table", - "order": 6, - "col": 9, - "row": 1 - }, - { - "type": "scientificMetadata", - "label": "Scientific Metadata JSON", - "viewMode": "json", - "order": 6 - }, - { - "type": "scientificMetadata", - "label": "Scientific Metadata Tree", - "viewMode": "tree", - "order": 6 - }, - { - "type": "datasetJsonView", - "label": "Dataset Json View", - "order": 7, - "col": 10, - "row": 2 - } - ] - }, - "defaultMainPage": { - "nonAuthenticatedUser": "DATASETS", - "authenticatedUser": "DATASETS" - }, - "checkBoxFilterClickTrigger": false, - "mainMenu": { - "nonAuthenticatedUser": { - "datasets": true, - "files": false, - "instruments": true, - "jobs": false, - "policies": false, - "proposals": true, - "publishedData": true, - "samples": false - }, - "authenticatedUser": { - "datasets": true, - "files": true, - "instruments": true, - "jobs": true, - "policies": false, - "proposals": true, - "publishedData": true, - "samples": true - } - } + "additionalConfigs": ["/api/v3/admin/config"] }