Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve error handling #28

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/views/BrowseView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import ResultTable from "@/views/search/ResultTable.vue";
import { computed, onMounted, ref, type Ref } from "vue";
const searchState = usePageState();
const entries: Ref<BakrepSearchResultEntry[]> = ref([]);
const pageState = usePageState();

const api = useApi();
const pagination: Ref<PaginationData> = ref(empty());

Expand All @@ -26,7 +24,7 @@ export type FilterTuple = {
};

const sizeTuple = ref<FilterTuple>({ from: 0, to: 9999999 });
const gcTuple = ref<FilterTuple>({ from: 0, to: 75 });
const gcTuple = ref<FilterTuple>({ from: 0, to: 100 });
const contigTuple = ref<FilterTuple>({ from: 0, to: 1000 });
const qualityTuple = ref<FilterTuple>({ from: 0, to: 100 });
const contaminationTuple = ref<FilterTuple>({ from: 0, to: 100 });
Expand Down Expand Up @@ -90,7 +88,7 @@ function filter(offset = 0) {
pagination.value.offset = r.offset;
pagination.value.total = r.total;
})
.catch((err) => pageState.value.setError(err));
.catch((err) => searchState.value.setError(err));
}
const positionInResults: Ref<PositionInResult> = computed(() =>
toPosition(pagination.value),
Expand All @@ -104,7 +102,6 @@ onMounted(filter);
<div class="row">
<h2>Browse BakRep Genomes</h2>
</div>
<loading :state="pageState">
<div class="row">
<div class="col">
<div class="rounded bg-body-secondary p-4 mb-4">
Expand Down Expand Up @@ -133,7 +130,6 @@ onMounted(filter);
/>
</div>
</Loading>
</loading>
</main>
</template>
<style></style>