Compare commits
20 Commits
aedce50e6a
...
8eb8680bb1
| Author | SHA1 | Date | |
|---|---|---|---|
| 8eb8680bb1 | |||
| 0291546fca | |||
| ed5479de5b | |||
| 8dc495272d | |||
|
|
722af48aa6 | ||
| 79b943af65 | |||
| e297a5fa42 | |||
| 0b51206062 | |||
| 6e998b784b | |||
| 3269098801 | |||
| e7254c3d02 | |||
| c1ebf55545 | |||
| 5df8ba3bf4 | |||
| 62d3f3f16a | |||
| 4cb5ddcab0 | |||
| 32c3b5923c | |||
| 4b4d9cd53d | |||
| 4caa23efdb | |||
| 8a325afeb8 | |||
| f0c01ad7af |
@@ -201,11 +201,12 @@ const groupDocType = ref('');
|
||||
const uploadPercentage = ref(0);
|
||||
|
||||
const videoTypeOptions = ref([
|
||||
{ name: 'Functional video', value: 'functional_video' },
|
||||
{ name: 'Code Instruction video', value: 'code_instruction_video' },
|
||||
{ name: 'Specification video', value: 'specification_video' },
|
||||
{ name: 'Functional', value: 'functional_video' },
|
||||
{ name: 'Code Instruction', value: 'code_instruction_video' },
|
||||
{ name: 'Estimation', value: 'estimation_video' },
|
||||
{ name: 'Other', value: 'other_video' }
|
||||
]);
|
||||
|
||||
const availableAppOptions = ref([
|
||||
{ name: 'Cross', value: '' },
|
||||
...userPrefStore.availableApp.map(app => ({ name: app.internal_name, value: app.internal_name }))
|
||||
|
||||
@@ -361,27 +361,43 @@ const confirmDeleteFromVectorStore = (id) => {
|
||||
|
||||
// Funzione per cancellare record in stato LOADED
|
||||
const deleteLoadedRecord = async (id) => {
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
|
||||
const videoToDelete = ksVideos.value.find(video => video.id === id);
|
||||
if (!videoToDelete) {
|
||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Video not found', life: 3000 });
|
||||
return;
|
||||
}
|
||||
const requestPayload = {
|
||||
ksDocumentId: videoToDelete.id,
|
||||
ksIngestionInfoId: videoToDelete.ingestionInfo.id,
|
||||
ksDocType: videoToDelete.ingestionInfo.metadata.KsDoctype,
|
||||
ksDocSource: videoToDelete.ingestionInfo.metadata.KsDocSource,
|
||||
ksFileSource: videoToDelete.ingestionInfo.metadata.KsFileSource,
|
||||
ksApplicationName: videoToDelete.ingestionInfo.metadata.KsApplicationName,
|
||||
};
|
||||
try {
|
||||
await ksVideoStore.deleteKsVideoRecord(requestPayload);
|
||||
toast.add({ severity: 'success', summary: 'Success', detail: 'Record deleted', life: 3000 });
|
||||
updateVideos();
|
||||
} catch (error) {
|
||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
|
||||
}
|
||||
confirm.require({
|
||||
target: event.target,
|
||||
message: 'Are you sure you want to proceed?',
|
||||
icon: 'pi pi-exclamation-triangle',
|
||||
rejectProps: {
|
||||
label: 'Cancel',
|
||||
class: "p-button",
|
||||
outlined: true,
|
||||
},
|
||||
acceptProps: {
|
||||
label: 'Delete',
|
||||
severity: 'danger',
|
||||
},
|
||||
accept: async () => {
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
|
||||
const videoToDelete = ksVideos.value.find(video => video.id === id);
|
||||
if (!videoToDelete) {
|
||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Video not found', life: 3000 });
|
||||
return;
|
||||
}
|
||||
const requestPayload = {
|
||||
ksDocumentId: videoToDelete.id,
|
||||
ksIngestionInfoId: videoToDelete.ingestionInfo.id,
|
||||
ksDocType: videoToDelete.ingestionInfo.metadata.KsDoctype,
|
||||
ksDocSource: videoToDelete.ingestionInfo.metadata.KsDocSource,
|
||||
ksFileSource: videoToDelete.ingestionInfo.metadata.KsFileSource,
|
||||
ksApplicationName: videoToDelete.ingestionInfo.metadata.KsApplicationName,
|
||||
};
|
||||
try {
|
||||
await ksVideoStore.deleteKsVideoRecord(requestPayload);
|
||||
toast.add({ severity: 'success', summary: 'Success', detail: 'Record deleted', life: 3000 });
|
||||
updateVideos();
|
||||
} catch (error) {
|
||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -157,6 +157,7 @@ const initFilters = () => {
|
||||
'ingestionInfo.metadata.KsApplicationName': { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
|
||||
'ingestionInfo.metadata.KsFileSource': { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
|
||||
'ingestionInfo.metadata.KsDocSource': { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
|
||||
'ingestionInfo.metadata.KsDoctype': { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.STARTS_WITH }] },
|
||||
ingestionDateFormat: { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] },
|
||||
ingestionStatus: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
||||
};
|
||||
@@ -314,7 +315,7 @@ const confirmDeleteFromVectorStore = (id) => {
|
||||
console.log("Updated element", element)
|
||||
}
|
||||
});
|
||||
toast.add({ severity: 'success', summary: 'Success', detail: 'Deletion Completed', life: 3000 });
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Deletion started', life: 3000 });
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error deleting records: ', error)
|
||||
@@ -326,26 +327,42 @@ const confirmDeleteFromVectorStore = (id) => {
|
||||
|
||||
// Funzione per cancellare record in stato LOADED
|
||||
const deleteLoadedRecord = async (id) => {
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
|
||||
const documentToDelete = ksdocuments.value.find(doc => doc.id === id);
|
||||
if (!documentToDelete) {
|
||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Document not found', life: 3000 });
|
||||
return;
|
||||
}
|
||||
const requestPayload = {
|
||||
ksDocumentId: documentToDelete.id,
|
||||
ksIngestionInfoId: documentToDelete.ingestionInfo.id,
|
||||
ksDoctype: documentToDelete.ingestionInfo.metadata.KsDoctype,
|
||||
ksDocSource: documentToDelete.ingestionInfo.metadata.KsDocSource,
|
||||
ksFileSource: documentToDelete.ingestionInfo.metadata.KsFileSource,
|
||||
ksApplicationName: documentToDelete.ingestionInfo.metadata.KsApplicationName,
|
||||
};
|
||||
try {
|
||||
await ksDocumentStore.deleteKsDocumentRecord(requestPayload);
|
||||
toast.add({ severity: 'success', summary: 'Success', detail: 'Record deleted', life: 3000 });
|
||||
} catch (error) {
|
||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
|
||||
}
|
||||
confirm.require({
|
||||
target: event.target,
|
||||
message: 'Are you sure you want to proceed?',
|
||||
icon: 'pi pi-exclamation-triangle',
|
||||
rejectProps: {
|
||||
label: 'Cancel',
|
||||
class: "p-button",
|
||||
outlined: true,
|
||||
},
|
||||
acceptProps: {
|
||||
label: 'Delete',
|
||||
severity: 'danger',
|
||||
},
|
||||
accept: async () => {
|
||||
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
|
||||
const documentToDelete = ksdocuments.value.find(doc => doc.id === id);
|
||||
if (!documentToDelete) {
|
||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Document not found', life: 3000 });
|
||||
return;
|
||||
}
|
||||
const requestPayload = {
|
||||
ksDocumentId: documentToDelete.id,
|
||||
ksIngestionInfoId: documentToDelete.ingestionInfo.id,
|
||||
ksDoctype: documentToDelete.ingestionInfo.metadata.KsDoctype,
|
||||
ksDocSource: documentToDelete.ingestionInfo.metadata.KsDocSource,
|
||||
ksFileSource: documentToDelete.ingestionInfo.metadata.KsFileSource,
|
||||
ksApplicationName: documentToDelete.ingestionInfo.metadata.KsApplicationName,
|
||||
};
|
||||
try {
|
||||
await ksDocumentStore.deleteKsDocumentRecord(requestPayload);
|
||||
toast.add({ severity: 'success', summary: 'Success', detail: 'Record deleted', life: 3000 });
|
||||
} catch (error) {
|
||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
|
||||
}
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
//ingestion
|
||||
@@ -423,8 +440,7 @@ const mapDocType = (type) => {
|
||||
const mapping = {
|
||||
'functional': 'Functional',
|
||||
'code_instruction': 'Code Instruction',
|
||||
'specification': 'Specification',
|
||||
'other': 'Other'
|
||||
'estimation': 'Estimation'
|
||||
};
|
||||
return mapping[type] || type;
|
||||
};
|
||||
|
||||
@@ -208,7 +208,7 @@ const required = ref([]);
|
||||
const ingestionResult = ref('');
|
||||
const fileUploaded = ref(false);
|
||||
const minChunkSize = ref(50);
|
||||
const maxNumberOfChunks = ref(1000);
|
||||
const maxNumberOfChunks = ref(10000);
|
||||
const minChunkSizeToEmbed = ref(50);
|
||||
const fileUpload = ref(null);
|
||||
const selectedFile = ref(null);
|
||||
@@ -222,8 +222,7 @@ const uploadPercentage = ref(0);
|
||||
const documentTypeOptions = ref([
|
||||
{ name: 'Functional', value: 'functional' },
|
||||
{ name: 'Code Instruction', value: 'code_instruction' },
|
||||
{ name: 'Specification', value: 'specification' },
|
||||
{ name: 'Other', value: 'other' }
|
||||
{ name: 'Estimation', value: 'estimation' }
|
||||
]);
|
||||
const availableAppOptions = ref([
|
||||
{ name: 'Cross', value: '' },
|
||||
@@ -245,7 +244,7 @@ const formData = ref({
|
||||
ksDocSource: '',
|
||||
defaultChunkSize: 2000,
|
||||
minChunkSize: 50,
|
||||
maxNumberOfChunks: 1000,
|
||||
maxNumberOfChunks: 10000,
|
||||
minChunkSizeToEmbed: 50
|
||||
});
|
||||
|
||||
@@ -262,7 +261,7 @@ watch(
|
||||
);
|
||||
watch(
|
||||
() => formData.value.maxNumberOfChunks,
|
||||
(newValue) => validateField("maxNumberOfChunks", newValue, maxNumberOfChunks.value, 2000)
|
||||
(newValue) => validateField("maxNumberOfChunks", newValue, maxNumberOfChunks.value, 20000)
|
||||
);
|
||||
watch(
|
||||
() => formData.value.minChunkSizeToEmbed,
|
||||
|
||||
Reference in New Issue
Block a user