Skip to content
Snippets Groups Projects
Commit 94f063a9 authored by markus.kuehbach's avatar markus.kuehbach
Browse files

Recovered the from commit d5a97c10 onwards...

Recovered the from commit d5a97c10 onwards removed H5Web preview in the files browser of an upload but this does not work for all file formats, sometimes showing that the files are not found even though they are physically contained in the upload, for processed nxs files it now seems to work but more testing is required
parent 1db15fb0
No related branches found
No related tags found
1 merge request!1322Updates north + pynxtools apm test branch
Pipeline #176951 failed
......@@ -25,6 +25,7 @@ import InfiniteScroll from 'react-infinite-scroller'
import { useApi } from '../api'
import { apiBase } from '../../config'
import { parseCifStructures } from 'crystcif-parse'
import H5Web from '../visualization/H5Web'
import Structure from '../visualization/Structure'
import { isWaitingForUpdateTestId } from '../../utils'
import {useLane} from './Browser'
......@@ -99,6 +100,13 @@ const viewerPDF = {
}
}
const viewerHdfFive = {
name: 'hdf5',
fileExtensions: ['h4', 'hd4', 'hdf4', 'hdf', 'h5', 'hd5', 'hdf5', 'hd5', 'nxs', 'h5oina', 'edaxh5', 'emd', 'dream3d'],
maxSizeAutoPreview: 10e6,
width: 'fit-content',
render: ({uploadId, path}) => <H5Web upload_id={uploadId} filename={path}/>
}
const viewerCif = {
name: 'cif',
fileExtensions: ['cif'],
......@@ -124,7 +132,8 @@ const viewerCif = {
)
}
}
export const viewers = [viewerText, viewerImg, viewerJSON, viewerPDF, viewerCif]
export const viewers = [viewerText, viewerImg, viewerJSON, viewerPDF, viewerHdfFive, viewerCif]
const FilePreview = React.memo(({uploadId, path, size}) => {
const classes = useFilePreviewStyles()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment