Bug ingestion status
This commit is contained in:
@@ -147,6 +147,7 @@ const filters = ref();
|
|||||||
const userPrefStore = UserPrefStore();
|
const userPrefStore = UserPrefStore();
|
||||||
const ksDocumentStore = KsDocumentStore();
|
const ksDocumentStore = KsDocumentStore();
|
||||||
const loadingStore = LoadingStore();
|
const loadingStore = LoadingStore();
|
||||||
|
const fe_status = ref("");
|
||||||
|
|
||||||
const initFilters = () => {
|
const initFilters = () => {
|
||||||
filters.value = {
|
filters.value = {
|
||||||
@@ -319,20 +320,20 @@ const confirmDeleteFromVectorStore = (id) => {
|
|||||||
//ingestion
|
//ingestion
|
||||||
const startIndividualngestion = (id) => {
|
const startIndividualngestion = (id) => {
|
||||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Starting Ingestion', life: 3000 });
|
toast.add({ severity: 'info', summary: 'Info', detail: 'Starting Ingestion', life: 3000 });
|
||||||
fe_status = "IN PROGRESS"
|
fe_status.value = "IN PROGRESS"
|
||||||
axios.get(`/test/ingest_document/${id}`)
|
axios.get(`/test/ingest_document/${id}`)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.data.status == "OK") {
|
if (response.data.status == "OK") {
|
||||||
toast.add({ severity: 'success', summary: 'Success', detail: 'Document ingestion started...', life: 3000 });
|
toast.add({ severity: 'success', summary: 'Success', detail: 'Document ingestion started...', life: 3000 });
|
||||||
fe_status = "IN PROGRESS"
|
fe_status.value = "IN PROGRESS"
|
||||||
}
|
}
|
||||||
if (response.data.status == "ERROR") {
|
if (response.data.status == "ERROR") {
|
||||||
toast.add({ severity: 'error', summary: 'Success', detail: 'Error ingesting document:' + response.data.message, life: 3000 });
|
toast.add({ severity: 'error', summary: 'Success', detail: 'Error ingesting document:' + response.data.message, life: 3000 });
|
||||||
fe_status = "ERROR"
|
fe_status.value = "ERROR"
|
||||||
}
|
}
|
||||||
ksdocuments.value.forEach(element => {
|
ksdocuments.value.forEach(element => {
|
||||||
if (element.id == id) {
|
if (element.id == id) {
|
||||||
element.ingestionStatus = fe_status
|
element.ingestionStatus = fe_status.value
|
||||||
console.log("Updated element", element)
|
console.log("Updated element", element)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user