Skip to content

Commit 228d79c

Browse files
committed
reindex fix
1 parent 970a282 commit 228d79c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

admin/components/ai_config/AIConfig.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}"
2222
:defaultSort="{'prop': 'name'}">
2323
<template v-slot:extra-card-bottom="{item}">
24-
<el-button class="bottom-card-button" @click="callRagReindex(item.id, $t)" :disabled="item.disabled || item.index_up_to_date">
24+
<el-button class="bottom-card-button" @click="callRagReindex($axios, item.id, $t)" :disabled="item.disabled || item.index_up_to_date">
2525
<span>{{ $t("reindex") }}</span>
2626
<el-icon>
2727
<Refresh/>

admin/components/dashboard/Dashboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<Card v-for="rag in rags" @click-delete="initItems" @click-edit="() => goTo('ai_config')" :item="rag"
1515
:cardProps="cardPropsRAG" :itemSchema="itemSchemaRAG" :apiUrl="RAGAPIUrl">
1616
<template v-slot:extra-card-bottom="{item}">
17-
<el-button class="bottom-card-button" @click="callRagReindex(item.id, $t)"
17+
<el-button class="bottom-card-button" @click="callRagReindex($axios, item.id, $t)"
1818
:disabled="item.disabled || item.index_up_to_date">
1919
<span>{{ $t("reindex") }}</span>
2020
<el-icon>

admin/utils/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export async function deleteItem(id, itemsStore, apiUrl, t, $axios) {
8787
}
8888

8989

90-
export async function callRagReindex(ragId, t) {
90+
export async function callRagReindex($axios, ragId, t) {
9191
try {
9292
await $axios.get(`/back/api/language-model/rag-configs/${ragId}/trigger-reindex/`);
9393
} catch (e) {
@@ -97,7 +97,7 @@ export async function callRagReindex(ragId, t) {
9797
type: "error",
9898
position: "top-right",
9999
});
100-
return;
100+
throw e
101101
}
102102
ElNotification({
103103
title: "Success",

0 commit comments

Comments
 (0)