Skip to content
Snippets Groups Projects
Commit 67b25417 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

fix bugs on structure table

parent 5358a8e8
No related branches found
No related tags found
No related merge requests found
Pipeline #133789 waiting for manual action with stages
in 8 minutes and 38 seconds
...@@ -6,9 +6,6 @@ import { useSlots } from 'vue' ...@@ -6,9 +6,6 @@ import { useSlots } from 'vue'
import { useDisplay } from "vuetify"; import { useDisplay } from "vuetify";
import { toValue, useThrottleFn } from '@vueuse/core' import { toValue, useThrottleFn } from '@vueuse/core'
import type { FacetInputItem, FilterItem } from '@/components/AutocompleteMeiliFacets.vue' import type { FacetInputItem, FilterItem } from '@/components/AutocompleteMeiliFacets.vue'
import { useMeiliSearch } from "#imports"
import type { SearchResponse } from 'meilisearch'
// import { saveAs } from "file-saver";
export interface SortItem { export interface SortItem {
key: string, key: string,
order: boolean | 'asc' | 'desc' order: boolean | 'asc' | 'desc'
...@@ -79,8 +76,6 @@ const computedTableHeight = computed(() => { ...@@ -79,8 +76,6 @@ const computedTableHeight = computed(() => {
}) })
const pendingDownloadData = ref(false) const pendingDownloadData = ref(false)
const toRefNumericalFilters = toRef(props.numericalFilters)
// const meiliFilters = ref<string | undefined>(undefined)
const filterInputValues = computed(() => { const filterInputValues = computed(() => {
if (filterOrSearch.value != null) { if (filterOrSearch.value != null) {
......
...@@ -443,6 +443,7 @@ const scaleType = ref("linear") ...@@ -443,6 +443,7 @@ const scaleType = ref("linear")
const systemsDistributionPlot = ref<ComponentPublicInstance | null>(null) const systemsDistributionPlot = ref<ComponentPublicInstance | null>(null)
const taxonomicDistributionPlot = ref<ComponentPublicInstance | null>(null) const taxonomicDistributionPlot = ref<ComponentPublicInstance | null>(null)
const heatmapPlot = ref<ComponentPublicInstance | null>(null) const heatmapPlot = ref<ComponentPublicInstance | null>(null)
function downloadSvg(component: ComponentPublicInstance | null, filename: string) { function downloadSvg(component: ComponentPublicInstance | null, filename: string) {
const blob = toValue(serialize(toValue(component))) const blob = toValue(serialize(toValue(component)))
if (blob !== undefined) { if (blob !== undefined) {
...@@ -454,7 +455,6 @@ async function downloadPng(component: ComponentPublicInstance | null, filename: ...@@ -454,7 +455,6 @@ async function downloadPng(component: ComponentPublicInstance | null, filename:
const blob = await rasterize(toValue(component), filename)?.then((blob) => { const blob = await rasterize(toValue(component), filename)?.then((blob) => {
download(blob, filename) download(blob, filename)
}) })
} }
</script> </script>
......
...@@ -10,7 +10,8 @@ import type { StructureItem } from "~/types/structure" ...@@ -10,7 +10,8 @@ import type { StructureItem } from "~/types/structure"
interface Item { interface Item {
Foldseek_name: string Foldseek_name: string
system: string system: string,
pdb: string
} }
...@@ -129,7 +130,8 @@ const dataTableServerProps = computed(() => { ...@@ -129,7 +130,8 @@ const dataTableServerProps = computed(() => {
function toFolseekUrl(item: Item) { function toFolseekUrl(item: Item) {
const url = joinURL("/" + item.system, item.Foldseek_name) const url = joinURL("/" + item.system, item.pdb.replace(/\.pdb$/i, ".html"))
console.log(url)
const { refinedUrl } = useRefinedUrl(url) const { refinedUrl } = useRefinedUrl(url)
return toValue(refinedUrl) return toValue(refinedUrl)
} }
...@@ -164,6 +166,7 @@ function buildStructureUrl(item: StructureItem) { ...@@ -164,6 +166,7 @@ function buildStructureUrl(item: StructureItem) {
function displayStructure(item: StructureItem) { function displayStructure(item: StructureItem) {
const structureUrls = buildStructureUrl(item) const structureUrls = buildStructureUrl(item)
console.log(structureUrls)
structureBasket.set(structureUrls.map(url => { structureBasket.set(structureUrls.map(url => {
const refinedUrl = useRefinedUrl(url).refinedUrl const refinedUrl = useRefinedUrl(url).refinedUrl
return toValue(refinedUrl) return toValue(refinedUrl)
...@@ -241,7 +244,7 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz") ...@@ -241,7 +244,7 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz")
</v-card-text> </v-card-text>
</template> </template>
<template #[`item.Foldseek_name`]="{ item }"> <template #[`item.Foldseek_name`]="{ item }">
<FoldseekDialog v-if="item.Foldseek_name !== 'na'" :foldseek-path="toFolseekUrl(item)"></FoldseekDialog> <FoldseekDialog :foldseek-path="toFolseekUrl(item)"></FoldseekDialog>
</template> </template>
<template #[`item.proteins_in_the_prediction`]="{ item }"> <template #[`item.proteins_in_the_prediction`]="{ item }">
...@@ -266,7 +269,7 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz") ...@@ -266,7 +269,7 @@ const { refinedUrl: downloadAllCifUrl } = useRefinedUrl("/df-all-cifs.tar.gz")
icon="md:download" class="ml-1" v-bind="props"></v-btn> icon="md:download" class="ml-1" v-bind="props"></v-btn>
</template> </template>
<v-list> <v-list>
<v-list-item v-for="(url, index) in item.structuresUrls" :key="index" :value="index" <v-list-item v-for="(url, index) in buildStructureUrl(item)" :key="index" :value="index"
:href="url"> :href="url">
<v-list-item-title>{{ url.split('.').slice(-1)[0] }}</v-list-item-title> <v-list-item-title>{{ url.split('.').slice(-1)[0] }}</v-list-item-title>
</v-list-item> </v-list-item>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment