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

run on client via onMounted hook getAllHits requests

parent d3f526a7
No related branches found
No related tags found
No related merge requests found
Pipeline #125951 waiting for manual action
......@@ -17,6 +17,7 @@ const sortBy: Ref<SortItem[]> = ref([{ key: 'type', order: "asc" }])
const itemValue = ref("id");
const { width } = useDisplay();
const dbName = ref("refseq")
const taxonomyFacet = ref<Record<string, any> | undefined>(undefined)
......@@ -30,7 +31,17 @@ onBeforeMount(async () => {
}
})
await getAllHits({
index: toValue(dbName), query: "", params: {
facets: ["*"],
filter: [],
// page: 1,
// hitsPerPage: 25,
limit: 500000,
sort: ["type:asc"]
}
})
autocompleteMeiliFacetsProps.value.facetDistribution = toValue(data)?.facetDistribution
// allHitsDb.value = toValue(data)?.hits
const { data: taxo } = await useAsyncMeiliSearch({
......@@ -43,8 +54,6 @@ onBeforeMount(async () => {
})
taxonomyFacet.value = toValue(taxo)?.facetDistribution
})
const taxonomyFacet = ref<Record<string, any> | undefined>(undefined)
// const allHitsDb = ref<Record<string, any>[] | undefined>(undefined)
onMounted(async () => {
const { data } = await useAsyncMeiliSearch({
......@@ -57,7 +66,17 @@ onMounted(async () => {
// sort: ["type:asc"]
}
})
await getAllHits({
index: toValue(dbName), query: "", params: {
facets: ["*"],
filter: [],
// page: 1,
// hitsPerPage: 25,
limit: 500000,
sort: ["type:asc"]
}
})
autocompleteMeiliFacetsProps.value.facetDistribution = toValue(data)?.facetDistribution
// allHitsDb.value = toValue(data)?.hits
......@@ -580,19 +599,19 @@ async function downloadPng(component: ComponentPublicInstance | null, filename:
<template #[`item.type`]="{ item }">
<v-chip color="info" link size="small" :to="`/defense-systems/${item.type.toLowerCase()}`"
target="_blank"> {{
item.type }}
item.type }}
</v-chip>
</template>
<template #[`item.Assembly`]="{ item }">
<v-chip color="info" link size="small"
:href="`https://www.ncbi.nlm.nih.gov/datasets/genome/${item.Assembly}`" target="_blank"> {{
item.Assembly }}
item.Assembly }}
</v-chip>
</template>
<template #[`item.replicon`]="{ item }">
<v-chip color="info" link size="small" :href="`https://www.ncbi.nlm.nih.gov/nuccore/${item.replicon}`"
target="_blank"> {{
item.replicon }}
<v-chip color="info" link size="small"
:href="`https://www.ncbi.nlm.nih.gov/nuccore/${item.replicon}`" target="_blank"> {{
item.replicon }}
</v-chip>
</template>
......@@ -600,7 +619,7 @@ async function downloadPng(component: ComponentPublicInstance | null, filename:
<template #[`item.subtype`]="{ item }">
<v-chip color="info" link size="small" :to="`/defense-systems/${item.type.toLowerCase()}`"
target="_blank"> {{
item.subtype }}
item.subtype }}
</v-chip>
</template>
</ServerDbTable>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment