diff --git a/components/BiolucidaViewer/BiolucidaViewer.vue b/components/BiolucidaViewer/BiolucidaViewer.vue index 22f6b57b..eae7a41b 100644 --- a/components/BiolucidaViewer/BiolucidaViewer.vue +++ b/components/BiolucidaViewer/BiolucidaViewer.vue @@ -95,17 +95,21 @@ export default { '' ) const [ + blv_info, view_info, image_info, ] = await Promise.all([ + biolucida.getBLVLink(image_identifier), biolucida.decodeViewParameter(viewId), biolucida.getImageInfo(image_identifier), ]) + const blv_link = props.data.blv_link ? props.data.blv_link : blv_info['link'] const BASE_URL = `blv:${config.public.BL_SERVER_URL}` const queryParameters = `image_id=${image_identifier}&type=${view_info[1]}${view_info[2]}&filename=${image_info.name}` const webNeurolucidaLink = BASE_URL + '/image_view?' + queryParameters return { + blv_link, webNeurolucidaLink } } catch (e) { @@ -120,7 +124,7 @@ export default { }, methods: { launchViewer() { - window.open(this.data.blv_link, '_blank') + window.open(this.blv_link, '_blank') }, launchNL360C() { biolucida diff --git a/components/DatasetDetails/DatasetFilesInfo.vue b/components/DatasetDetails/DatasetFilesInfo.vue index a9acbc44..c29f10b5 100644 --- a/components/DatasetDetails/DatasetFilesInfo.vue +++ b/components/DatasetDetails/DatasetFilesInfo.vue @@ -146,16 +146,14 @@

Dataset Files

-
- - Dataset size: {{ formatMetric(datasetInfo.size) }} - - + +
+
+ Dataset size: {{ formatMetric(datasetInfo.size) }} +
{ return response.text() @@ -133,10 +131,8 @@ export default { const html = MarkedMixin.methods.parseMarkdown(readme_markdown) const data_collection = extractSection(/data collect[^:]+:/i, html) - const blv_link = blv_info['link'] return { data_collection, - blv_link, xmp_metadata } } catch (e) { diff --git a/pages/apps/maps/index.vue b/pages/apps/maps/index.vue index a75457b6..c8cd8dcb 100644 --- a/pages/apps/maps/index.vue +++ b/pages/apps/maps/index.vue @@ -259,7 +259,7 @@ const restoreStateWithUUID = async (route, $axios, sparcApi) => { return [uuid, state, successMessage, failMessage] } -const openViewWithQuery = async (route, $axios, sparcApi, algoliaIndex, discover_api, $pennsieveApiClient) => { +const openViewWithQuery = async (router, route, $axios, sparcApi, algoliaIndex, discover_api, $pennsieveApiClient) => { //Open the map with specific view defined by the query. //First get the bucket and facets information if available let s3Bucket = undefined @@ -300,6 +300,9 @@ const openViewWithQuery = async (route, $axios, sparcApi, algoliaIndex, discover return await processEntry(route) } else if (route.query.type === 'wholebody') { startingMap = "WholeBody" + } else { + router.replace({ ...router.currentRoute, query: { type: 'ac' } }) + failMessage = 'Invalid parameters were detected. Default parameters will now be used.' } return [startingMap, organ_name, currentEntry, successMessage, failMessage, facets] @@ -310,6 +313,7 @@ export default { async setup() { const config = useRuntimeConfig() const { $algoliaClient, $axios, $pennsieveApiClient } = useNuxtApp() + const router = useRouter() const route = useRoute() let startingMap = "AC" let organ_name = undefined @@ -347,7 +351,7 @@ export default { successMessage, failMessage, facets - ] = await openViewWithQuery(route, $axios, options.sparcApi, algoliaIndex, + ] = await openViewWithQuery(router, route, $axios, options.sparcApi, algoliaIndex, config.public.discover_api_host, $pennsieveApiClient) } diff --git a/pages/datasets/file/[datasetId]/[datasetVersion]/index.vue b/pages/datasets/file/[datasetId]/[datasetVersion]/index.vue index 01b8fd7a..aa85fa10 100644 --- a/pages/datasets/file/[datasetId]/[datasetVersion]/index.vue +++ b/pages/datasets/file/[datasetId]/[datasetVersion]/index.vue @@ -7,6 +7,11 @@
+ + + Find out more about the {{ helpers[activeTabId].name }} + + @@ -225,7 +230,21 @@ export default { tabs: [], file: {}, zipData: '', - zipitUrl: config.public.zipit_api_host + zipitUrl: config.public.zipit_api_host, + helpers: { + imageViewer: { + name: 'Biolucida Viewer', + link: 'image-viewer-overview' + }, + segmentationViewer: { + name: 'Segmentation Viewer', + link: 'segmentation-viewer-overview' + }, + plotViewer: { + name: 'Plot Viewer', + link: 'plot-viewer' + } + } } }, @@ -368,3 +387,12 @@ export default { } } + + \ No newline at end of file diff --git a/tests/cypress/e2e/datasets.cy.js b/tests/cypress/e2e/datasets.cy.js index 83c4180e..022e78ec 100644 --- a/tests/cypress/e2e/datasets.cy.js +++ b/tests/cypress/e2e/datasets.cy.js @@ -320,7 +320,7 @@ datasetIds.forEach(datasetId => { cy.get('.el-dialog__headerbtn').click(); // Check for files breadcrumb - cy.get('.inline > .dataset-link').should('have.attr', 'href', 'https://docs.sparc.science/docs/navigating-a-sparc-dataset'); + cy.get('.mb-16 > .dataset-link').should('have.attr', 'href', 'https://docs.sparc.science/docs/navigating-a-sparc-dataset'); cy.get('.breadcrumb-link').should('have.class', 'breadcrumb-link'); cy.get('.breadcrumb-link').should('have.attr', 'href').and('contain', 'datasetDetailsTab=files&path=files'); cy.get('tbody').then(($ele) => {