Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8ec8598
feat: make configurable action buttons shared component
martin-trajanovski Aug 25, 2025
b562e62
more general naming in the component inputs and add new action type xhr
martin-trajanovski Aug 26, 2025
f5093d7
Merge branch 'master' into SWAP-4889-configurable-action-buttons
martin-trajanovski Aug 26, 2025
6f16350
add the configurable buttons in the dataset selection view
martin-trajanovski Aug 26, 2025
3f4de3f
Merge branch 'master' into SWAP-4889-configurable-action-buttons
martin-trajanovski Aug 29, 2025
fdcc888
Resolved conflicts after merging master
nitrosx Sep 10, 2025
ffc3bcb
WIP of the day
nitrosx Sep 11, 2025
b31492a
work of the day
nitrosx Sep 15, 2025
08ce450
Merge branch 'master' of https://github.com/SciCatProject/frontend in…
martin-trajanovski Sep 16, 2025
aace2ef
Merge branch 'SWAP-4889-configurable-action-buttons' of https://githu…
nitrosx Sep 16, 2025
575ecac
first draft of configurable actions
nitrosx Oct 9, 2025
f7b044d
saving work done so far
nitrosx Nov 6, 2025
4816ee8
fixed linting
nitrosx Nov 12, 2025
af2d7fe
merged with master
nitrosx Nov 12, 2025
e6d5f49
solving conflicts and fixing tests
nitrosx Nov 13, 2025
89d790a
fixing tests
nitrosx Nov 13, 2025
66a76eb
added data file for testing configurable actions
nitrosx Nov 13, 2025
1567cc6
resolving merge issues
nitrosx Nov 13, 2025
a7b12cf
fixed all issues with standalone properties
nitrosx Nov 13, 2025
1b6c5c5
Fixed all the tests for configurable actions
nitrosx Nov 18, 2025
3c396df
fixing linting
nitrosx Nov 18, 2025
53a95fe
completed linting
nitrosx Nov 19, 2025
738210a
solved conflicts and merged master
nitrosx Nov 19, 2025
4b57a5e
Fixed test for actions
nitrosx Nov 19, 2025
c9a6fd3
Added AI generated documentation
nitrosx Nov 19, 2025
edede4b
Added notes about AI generation
nitrosx Nov 19, 2025
752ba77
import missing model and remove incorrect bindings
Junjiequan Nov 19, 2025
97a620a
include fallback for sortedActionsConfig() function
Junjiequan Nov 19, 2025
efcfc5a
minor fix
Junjiequan Nov 19, 2025
0d100af
resolve budget exceeding error
Junjiequan Nov 19, 2025
f1b7ea3
fix unit test
Junjiequan Nov 20, 2025
1077303
restored original actions on datasets list and selection
nitrosx Nov 20, 2025
672fbf6
Fixed CI configurable actions config, fixed errors from configuration
nitrosx Nov 21, 2025
f97d85b
fixed linting
nitrosx Nov 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"name": "Debug SciCat frontend in Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200/#",
"webRoot": "${workspaceFolder}"
"url": "http://localhost:4200",
"webRoot": "${workspaceFolder}",
"sourceMaps": true,
"trace": true
},
{
"name": "ng test",
Expand Down
208 changes: 193 additions & 15 deletions CI/e2e/frontend.config.e2e.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"accessTokenPrefix": "Bearer ",
"addDatasetEnabled": false,
"allowConfigOverrides": true,
"archiveWorkflowEnabled": false,
"datasetReduceEnabled": true,
"datasetJsonScientificMetadata": true,
Expand All @@ -10,8 +11,10 @@
"editPublishedData": true,
"addSampleEnabled": false,
"externalAuthEndpoint": "/api/v3/auth/msad",
"facility": "SciCat Vanilla",
"facility": "SciCat Vanilla CI Test",
"siteIcon": "site-header-logo.png",
"sitetitle": "",
"siteSciCatLogo": "",
"loginFacilityLabel": "SciCat Vanilla",
"loginLdapLabel": "Ldap",
"loginLocalLabel": "Local",
Expand All @@ -24,12 +27,20 @@
"ingestManual": null,
"jobsEnabled": true,
"jsonMetadataEnabled": true,
"jupyterHubUrl": "",
"landingPage": "doi.ess.eu/detail/",
"lbBaseURL": "http://localhost:3000",
"ingestorComponent": {
"ingestorEnabled": false,
"ingestorAutodiscoveryOptions": [
{
"mailDomain": "university.ch",
"description": "University/facility of Choice",
"facilityBackend": "http://localhost:8888"
}
]
},
"logbookEnabled": true,
"loginFormEnabled": true,
"maxDirectDownloadSize": 1047521824,
"thumbnailFetchLimitPerPage": 100,
"metadataPreviewEnabled": true,
"metadataStructure": "",
Expand All @@ -38,7 +49,7 @@
"oAuth2Endpoints": [
{
"authURL": "api/v3/auth/oidc",
"displayText": "ESS One Identity"
"displayText": "CI Test Identity"
}
],
"policiesEnabled": true,
Expand All @@ -50,6 +61,9 @@
"searchSamples": true,
"sftpHost": "",
"shareEnabled": true,
"sourceFolder": "/data/scicat/vanilla",
"maxDirectDownloadSize": 5000000000,
"maxFileSizeWarning": "Some files are above <maxDirectDownloadSize> and cannot be downloaded directly. These file can be downloaded via sftp host: <sftpHost> in directory: <sourceFolder>",
"shoppingCartEnabled": true,
"shoppingCartOnHeader": true,
"tableSciDataEnabled": true,
Expand All @@ -60,52 +74,216 @@
"datafilesActions": [
{
"id": "eed8efec-4354-11ef-a3b5-d75573a5d37f",
"order": 4,
"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": "http://localhost:4200/download/all",
"target": "_blank",
"enabled": "#SizeLimit",
"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",
"order": 3,
"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": "http://localhost:4200/download/selected",
"target": "_blank",
"enabled": "#Selected && #SizeLimit",
"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",
"order": 2,
"label": "Notebook All",
"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": "http://localhost:4200/notebook/all",
"url": "http://localhost:4200/notebook/all/form",
"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": 1,
"label": "Notebook Selected",
"order": 4,
"label": "Notebook Selected (Form)",
"files": "selected",
"icon": "/assets/icons/jupyter_logo.png",
"type": "form",
"url": "http://localhost:4200/notebook/selected",
"url": "http://localhost:4200/notebook/selected/form",
"target": "_blank",
"enabled": "#Selected",
"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": "http://localhost:4200/notebook/all/json",
"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-to-download",
"icon": "/assets/icons/jupyter_logo.png",
"url": "http://localhost:4200/notebook/selected/json",
"target": "_blank",
"enabled": "#Length(@files) > 0",
"authorization": ["#datasetAccess", "#datasetPublic"],
"variables" : {
"pid": "#Dataset0Pid",
"files": "#Dataset0SelectedFilesPath",
"selected": "#Dataset0SelectedFilesCount",
"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": "action",
"method" : "PATCH",
"url": "http://localhost:4200/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": "action",
"method" : "PATCH",
"url": "http://localhost:4200/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": "http://localhost:4200/external",
"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": [
{
Expand Down
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "4mb"
"maximumError": "4.5mb"
},
{
"type": "anyComponentStyle",
Expand Down
Loading
Loading