Merge branch 'master' into develop
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
<Button type="button" icon="pi pi-play" rounded
|
<Button type="button" icon="pi pi-play" rounded
|
||||||
@click="startIndividualngestion(slotProps.data.id)"
|
@click="startIndividualngestion(slotProps.data.id)"
|
||||||
v-tooltip.left="'Start Ingestion of document'"
|
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>
|
:class="{ 'p-button': slotProps.data.ingestionStatus === 'INGESTED' }"></Button>
|
||||||
<Button type="button" icon="pi pi-trash" rounded
|
<Button type="button" icon="pi pi-trash" rounded
|
||||||
@click="confirmDeleteFromVectorStore(slotProps.data.id)"
|
@click="confirmDeleteFromVectorStore(slotProps.data.id)"
|
||||||
@@ -163,7 +163,7 @@ const initFilters = () => {
|
|||||||
|
|
||||||
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(() => {
|
onMounted(() => {
|
||||||
userPrefStore.fetchUserData().then(() => {
|
userPrefStore.fetchUserData().then(() => {
|
||||||
@@ -171,7 +171,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
updateDocuments();
|
updateDocuments();
|
||||||
}, 10000);
|
}, 5000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -196,15 +196,15 @@ function updateDocuments() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const allDocumentsIngested = computed(() => {
|
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) => {
|
const getStatus = (data) => {
|
||||||
if (data.ingestionStatus === 'INGESTED') {
|
if (data.ingestionStatus == 'INGESTED') {
|
||||||
return 'success';
|
return 'success';
|
||||||
} else if (data.ingestionStatus === 'LOADED' || data.ingestionStatus === 'ERROR') {
|
} else if (data.ingestionStatus == 'LOADED' || data.ingestionStatus == 'ERROR') {
|
||||||
return 'danger';
|
return 'danger';
|
||||||
} else if (data.ingestionStatus === 'IN PROGRESS') {
|
} else if (data.ingestionStatus == 'IN PROGRESS' || data.ingestionStatus == 'INGESTION_QUEUE' || data.ingestionStatus == 'INGESTING') {
|
||||||
return 'info';
|
return 'info';
|
||||||
} else {
|
} else {
|
||||||
return 'warning';
|
return 'warning';
|
||||||
@@ -320,12 +320,12 @@ 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.value = "IN PROGRESS"
|
fe_status = "INGESTION_QUEUE"
|
||||||
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.value = "IN PROGRESS"
|
fe_status = "INGESTION_QUEUE"
|
||||||
}
|
}
|
||||||
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 });
|
||||||
|
|||||||
Reference in New Issue
Block a user