diff --git a/components/content/RefseqDb.vue b/components/content/RefseqDb.vue index 5da0f238e1ebfefa95793034cde754045be26316..aa541cc79f3c0596ac52bca277dc54e8c37a3ae8 100644 --- a/components/content/RefseqDb.vue +++ b/components/content/RefseqDb.vue @@ -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>