Compare commits
20 Commits
aedce50e6a
...
master
| 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 uploadPercentage = ref(0);
|
||||||
|
|
||||||
const videoTypeOptions = ref([
|
const videoTypeOptions = ref([
|
||||||
{ name: 'Functional video', value: 'functional_video' },
|
{ name: 'Functional', value: 'functional_video' },
|
||||||
{ name: 'Code Instruction video', value: 'code_instruction_video' },
|
{ name: 'Code Instruction', value: 'code_instruction_video' },
|
||||||
{ name: 'Specification video', value: 'specification_video' },
|
{ name: 'Estimation', value: 'estimation_video' },
|
||||||
{ name: 'Other', value: 'other_video' }
|
{ name: 'Other', value: 'other_video' }
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const availableAppOptions = ref([
|
const availableAppOptions = ref([
|
||||||
{ name: 'Cross', value: '' },
|
{ name: 'Cross', value: '' },
|
||||||
...userPrefStore.availableApp.map(app => ({ name: app.internal_name, value: app.internal_name }))
|
...userPrefStore.availableApp.map(app => ({ name: app.internal_name, value: app.internal_name }))
|
||||||
|
|||||||
@@ -361,6 +361,20 @@ const confirmDeleteFromVectorStore = (id) => {
|
|||||||
|
|
||||||
// Funzione per cancellare record in stato LOADED
|
// Funzione per cancellare record in stato LOADED
|
||||||
const deleteLoadedRecord = async (id) => {
|
const deleteLoadedRecord = async (id) => {
|
||||||
|
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 });
|
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
|
||||||
const videoToDelete = ksVideos.value.find(video => video.id === id);
|
const videoToDelete = ksVideos.value.find(video => video.id === id);
|
||||||
if (!videoToDelete) {
|
if (!videoToDelete) {
|
||||||
@@ -382,6 +396,8 @@ const deleteLoadedRecord = async (id) => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
|
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.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.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.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 }] },
|
ingestionDateFormat: { operator: FilterOperator.AND, constraints: [{ value: null, matchMode: FilterMatchMode.DATE_IS }] },
|
||||||
ingestionStatus: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
ingestionStatus: { operator: FilterOperator.OR, constraints: [{ value: null, matchMode: FilterMatchMode.EQUALS }] }
|
||||||
};
|
};
|
||||||
@@ -314,7 +315,7 @@ const confirmDeleteFromVectorStore = (id) => {
|
|||||||
console.log("Updated element", element)
|
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 => {
|
.catch(error => {
|
||||||
console.error('Error deleting records: ', error)
|
console.error('Error deleting records: ', error)
|
||||||
@@ -326,6 +327,20 @@ const confirmDeleteFromVectorStore = (id) => {
|
|||||||
|
|
||||||
// Funzione per cancellare record in stato LOADED
|
// Funzione per cancellare record in stato LOADED
|
||||||
const deleteLoadedRecord = async (id) => {
|
const deleteLoadedRecord = async (id) => {
|
||||||
|
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 });
|
toast.add({ severity: 'info', summary: 'Info', detail: 'Deleting record...', life: 3000 });
|
||||||
const documentToDelete = ksdocuments.value.find(doc => doc.id === id);
|
const documentToDelete = ksdocuments.value.find(doc => doc.id === id);
|
||||||
if (!documentToDelete) {
|
if (!documentToDelete) {
|
||||||
@@ -346,6 +361,8 @@ const deleteLoadedRecord = async (id) => {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
|
toast.add({ severity: 'error', summary: 'Error', detail: 'Error deleting record', life: 3000 });
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
//ingestion
|
//ingestion
|
||||||
@@ -423,8 +440,7 @@ const mapDocType = (type) => {
|
|||||||
const mapping = {
|
const mapping = {
|
||||||
'functional': 'Functional',
|
'functional': 'Functional',
|
||||||
'code_instruction': 'Code Instruction',
|
'code_instruction': 'Code Instruction',
|
||||||
'specification': 'Specification',
|
'estimation': 'Estimation'
|
||||||
'other': 'Other'
|
|
||||||
};
|
};
|
||||||
return mapping[type] || type;
|
return mapping[type] || type;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ const required = ref([]);
|
|||||||
const ingestionResult = ref('');
|
const ingestionResult = ref('');
|
||||||
const fileUploaded = ref(false);
|
const fileUploaded = ref(false);
|
||||||
const minChunkSize = ref(50);
|
const minChunkSize = ref(50);
|
||||||
const maxNumberOfChunks = ref(1000);
|
const maxNumberOfChunks = ref(10000);
|
||||||
const minChunkSizeToEmbed = ref(50);
|
const minChunkSizeToEmbed = ref(50);
|
||||||
const fileUpload = ref(null);
|
const fileUpload = ref(null);
|
||||||
const selectedFile = ref(null);
|
const selectedFile = ref(null);
|
||||||
@@ -222,8 +222,7 @@ const uploadPercentage = ref(0);
|
|||||||
const documentTypeOptions = ref([
|
const documentTypeOptions = ref([
|
||||||
{ name: 'Functional', value: 'functional' },
|
{ name: 'Functional', value: 'functional' },
|
||||||
{ name: 'Code Instruction', value: 'code_instruction' },
|
{ name: 'Code Instruction', value: 'code_instruction' },
|
||||||
{ name: 'Specification', value: 'specification' },
|
{ name: 'Estimation', value: 'estimation' }
|
||||||
{ name: 'Other', value: 'other' }
|
|
||||||
]);
|
]);
|
||||||
const availableAppOptions = ref([
|
const availableAppOptions = ref([
|
||||||
{ name: 'Cross', value: '' },
|
{ name: 'Cross', value: '' },
|
||||||
@@ -245,7 +244,7 @@ const formData = ref({
|
|||||||
ksDocSource: '',
|
ksDocSource: '',
|
||||||
defaultChunkSize: 2000,
|
defaultChunkSize: 2000,
|
||||||
minChunkSize: 50,
|
minChunkSize: 50,
|
||||||
maxNumberOfChunks: 1000,
|
maxNumberOfChunks: 10000,
|
||||||
minChunkSizeToEmbed: 50
|
minChunkSizeToEmbed: 50
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -262,7 +261,7 @@ watch(
|
|||||||
);
|
);
|
||||||
watch(
|
watch(
|
||||||
() => formData.value.maxNumberOfChunks,
|
() => formData.value.maxNumberOfChunks,
|
||||||
(newValue) => validateField("maxNumberOfChunks", newValue, maxNumberOfChunks.value, 2000)
|
(newValue) => validateField("maxNumberOfChunks", newValue, maxNumberOfChunks.value, 20000)
|
||||||
);
|
);
|
||||||
watch(
|
watch(
|
||||||
() => formData.value.minChunkSizeToEmbed,
|
() => formData.value.minChunkSizeToEmbed,
|
||||||
|
|||||||
Reference in New Issue
Block a user