Aggiorna la gestione degli stati di ingestione e modifica l'intervallo di aggiornamento dei documenti
This commit is contained in:
@@ -162,7 +162,7 @@ const initFilters = () => {
|
||||
|
||||
initFilters();
|
||||
|
||||
const statuses = ref(['NEW', 'LOADED', 'INGESTED', 'FAILED', 'ERROR']); // Add your statuses here
|
||||
const statuses = ref(['NEW', 'LOADED', 'INGESTED', 'FAILED', 'ERROR', 'INGESTION_QUEUE', 'INGESTING']); // Add your statuses here
|
||||
|
||||
onMounted(() => {
|
||||
userPrefStore.fetchUserData().then(() => {
|
||||
@@ -170,7 +170,7 @@ onMounted(() => {
|
||||
|
||||
setInterval(() => {
|
||||
updateDocuments();
|
||||
}, 10000);
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
|
||||
@@ -195,15 +195,15 @@ function updateDocuments() {
|
||||
};
|
||||
|
||||
const allDocumentsIngested = computed(() => {
|
||||
return ksdocuments.value && ksdocuments.value.every(doc => doc.ingestionStatus === 'INGESTED');
|
||||
return ksdocuments.value && ksdocuments.value.every(doc => doc.ingestionStatus == 'INGESTED');
|
||||
});
|
||||
|
||||
const getStatus = (data) => {
|
||||
if (data.ingestionStatus === 'INGESTED') {
|
||||
if (data.ingestionStatus == 'INGESTED') {
|
||||
return 'success';
|
||||
} else if (data.ingestionStatus === 'LOADED' || data.ingestionStatus === 'ERROR') {
|
||||
} else if (data.ingestionStatus == 'LOADED' || data.ingestionStatus == 'ERROR') {
|
||||
return 'danger';
|
||||
} else if (data.ingestionStatus === 'IN PROGRESS') {
|
||||
} else if (data.ingestionStatus == 'IN PROGRESS' || data.ingestionStatus == 'INGESTION_QUEUE' || data.ingestionStatus == 'INGESTING') {
|
||||
return 'info';
|
||||
} else {
|
||||
return 'warning';
|
||||
@@ -319,12 +319,12 @@ const confirmDeleteFromVectorStore = (id) => {
|
||||
//ingestion
|
||||
const startIndividualngestion = (id) => {
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Starting Ingestion', life: 3000 });
|
||||
fe_status = "IN PROGRESS"
|
||||
fe_status = "INGESTION_QUEUE"
|
||||
axios.get(`/test/ingest_document/${id}`)
|
||||
.then(response => {
|
||||
if (response.data.status == "OK") {
|
||||
toast.add({ severity: 'success', summary: 'Success', detail: 'Document ingestion started...', life: 3000 });
|
||||
fe_status = "IN PROGRESS"
|
||||
fe_status = "INGESTION_QUEUE"
|
||||
}
|
||||
if (response.data.status == "ERROR") {
|
||||
toast.add({ severity: 'error', summary: 'Success', detail: 'Error ingesting document:' + response.data.message, life: 3000 });
|
||||
|
||||
Reference in New Issue
Block a user