From 0c0844f01d698854951f99a0b68f7a30926c2851 Mon Sep 17 00:00:00 2001 From: Rubel <rubel.mozumder@outlook.com> Date: Thu, 12 Sep 2024 15:20:40 +0200 Subject: [PATCH] Include nexus file as hdf5 file in hdf5Reference feature. --- gui/src/components/archive/ArchiveBrowser.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/src/components/archive/ArchiveBrowser.js b/gui/src/components/archive/ArchiveBrowser.js index a81363fb00..7681cefab8 100644 --- a/gui/src/components/archive/ArchiveBrowser.js +++ b/gui/src/components/archive/ArchiveBrowser.js @@ -819,9 +819,10 @@ export const QuantityValue = React.memo(function QuantityValue({value, def}) { } else if (def.type?.type_data === 'nomad.datamodel.hdf5.HDF5Dataset' || def.type?.type_data === 'nomad.datamodel.hdf5.HDF5Reference') { const h5Path = value.match(/(?:\/uploads\/(?<uploadId>.+?)\/(?<source>.+?)\/)*(?<filename>.+?)#(?<path>.+)/) const h5UploadId = h5Path.groups.uploadId || uploadId - const h5Source = h5Path.groups.source || (h5Path.groups.filename.endsWith('.h5') ? 'raw' : 'archive') + const h5File = h5Path.groups.filename + const h5Source = h5Path.groups.source || ((h5File.endsWith('.h5') || h5File.endsWith('.nxs')) ? 'raw' : 'archive') return <Compartment title='hdf5'> - <H5Web upload_id={h5UploadId} filename={h5Path.groups.filename} initialPath={h5Path.groups.path} source={h5Source} sidebarOpen={false}></H5Web> + <H5Web upload_id={h5UploadId} filename={h5File} initialPath={h5Path.groups.path} source={h5Source} sidebarOpen={false}></H5Web> </Compartment> } else if (def?.type?.type_kind === 'custom' && def?.type?.type_data === 'nomad.datamodel.data.Query') { return <Query value={value} def={def}/> -- GitLab