Merge branch 'master' into develop
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
<Button type="button" icon="pi pi-play" rounded
|
||||
@click="startIndividualngestion(slotProps.data.id)"
|
||||
v-tooltip.left="'Start Ingestion of document'"
|
||||
:disabled="slotProps.data.ingestionStatus === 'INGESTED' || slotProps.data.ingestionStatus == 'IN PROGRESS'"
|
||||
:disabled="slotProps.data.ingestionStatus === 'INGESTED' || slotProps.data.ingestionStatus == 'IN PROGRESS' || slotProps.data.ingestionStatus == 'INGESTING' || slotProps.data.ingestionStatus == 'INGESTION_QUEUE'"
|
||||
:class="{ 'p-button': slotProps.data.ingestionStatus === 'INGESTED' }"></Button>
|
||||
<Button type="button" icon="pi pi-trash" rounded
|
||||
@click="confirmDeleteFromVectorStore(slotProps.data.id)"
|
||||
@@ -163,7 +163,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(() => {
|
||||
@@ -171,7 +171,7 @@ onMounted(() => {
|
||||
|
||||
setInterval(() => {
|
||||
updateDocuments();
|
||||
}, 10000);
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
|
||||
@@ -196,15 +196,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';
|
||||
@@ -320,12 +320,12 @@ const confirmDeleteFromVectorStore = (id) => {
|
||||
//ingestion
|
||||
const startIndividualngestion = (id) => {
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Starting Ingestion', life: 3000 });
|
||||
fe_status.value = "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.value = "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