localhost removed
This commit is contained in:
@@ -13,6 +13,9 @@ import '@/assets/styles.scss';
|
|||||||
import '@/assets/tailwind.css';
|
import '@/assets/tailwind.css';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
|
axios.defaults.baseURL = import.meta.env.VITE_BACKEND_URL; //'http://localhost:8082'
|
||||||
|
console.log(import.meta.env.VITE_BACKEND_URL);
|
||||||
|
|
||||||
import { createAuth } from '@websanova/vue-auth';
|
import { createAuth } from '@websanova/vue-auth';
|
||||||
import driverAuthBearer from '@websanova/vue-auth/dist/drivers/auth/bearer.esm.js';
|
import driverAuthBearer from '@websanova/vue-auth/dist/drivers/auth/bearer.esm.js';
|
||||||
import driverHttpAxios from '@websanova/vue-auth/dist/drivers/http/axios.1.x.esm.js';
|
import driverHttpAxios from '@websanova/vue-auth/dist/drivers/http/axios.1.x.esm.js';
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ initFilters();
|
|||||||
const statuses = ref(['NEW', 'INGESTED', 'FAILED']); // Add your statuses here
|
const statuses = ref(['NEW', 'INGESTED', 'FAILED']); // Add your statuses here
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
axios.get('http://localhost:8082/fe-api/ksdocuments')
|
axios.get('/fe-api/ksdocuments')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
ksdocuments.value = getCustomDatewithAllResponse(response.data);
|
ksdocuments.value = getCustomDatewithAllResponse(response.data);
|
||||||
console.log(ksdocuments.value);
|
console.log(ksdocuments.value);
|
||||||
@@ -231,7 +231,7 @@ const deleteRecordsFromVectorStore = (id) => {
|
|||||||
ksApplicationName: documentToDelete.ingestionInfo.metadata.KsApplicationName,
|
ksApplicationName: documentToDelete.ingestionInfo.metadata.KsApplicationName,
|
||||||
};
|
};
|
||||||
|
|
||||||
axios.post('http://localhost:8082/fe-api/vector-store/deleteRecords', requestPayload)
|
axios.post('/fe-api/vector-store/deleteRecords', requestPayload)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
console.log('Delete resource:', response.data)
|
console.log('Delete resource:', response.data)
|
||||||
ksdocuments.value = ksdocuments.value.filter(doc => doc.id !== id);
|
ksdocuments.value = ksdocuments.value.filter(doc => doc.id !== id);
|
||||||
@@ -243,8 +243,8 @@ const deleteRecordsFromVectorStore = (id) => {
|
|||||||
|
|
||||||
//ingestion
|
//ingestion
|
||||||
const startIndividualngestion = (id) => {
|
const startIndividualngestion = (id) => {
|
||||||
axios.get(`http://localhost:8082/test/ingest_document/${id}`)
|
axios.get(`/test/ingest_document/${id}`)
|
||||||
//axios.get('http://localhost:8082/test/ingestion_loop')
|
//axios.get('/test/ingestion_loop')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
ingestionResult.value = response.data;
|
ingestionResult.value = response.data;
|
||||||
if (response.data.status == "OK") {
|
if (response.data.status == "OK") {
|
||||||
@@ -265,7 +265,7 @@ const startIndividualngestion = (id) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const startlngestion = () => {
|
const startlngestion = () => {
|
||||||
axios.get('http://localhost:8082/test/ingestion_loop')
|
axios.get('/test/ingestion_loop')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
ingestionResult.value = response.data;
|
ingestionResult.value = response.data;
|
||||||
if (response.data.status == "OK") {
|
if (response.data.status == "OK") {
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ const submitForm = async () => {
|
|||||||
formDataToSend.append('minChunkSizeToEmbed', formData.value.minChunkSizeToEmbed);
|
formDataToSend.append('minChunkSizeToEmbed', formData.value.minChunkSizeToEmbed);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await axios.post('http://localhost:8082/upload', formDataToSend, {
|
const response = await axios.post('/upload', formDataToSend, {
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'multipart/form-data'
|
'Content-Type': 'multipart/form-data'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ const dropdownItems = [
|
|||||||
const sendQuery = async () => {
|
const sendQuery = async () => {
|
||||||
if (query.value.trim() !== '' && filterQuery) {
|
if (query.value.trim() !== '' && filterQuery) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`http://localhost:8082/test/query_vector?query="${query.value}"&filterQuery=${filterQuery.value}`);
|
const response = await fetch(`/test/query_vector?query="${query.value}"&filterQuery=${filterQuery.value}`);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
console.log('API response:', data);
|
console.log('API response:', data);
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ const loading = ref(true);
|
|||||||
const filters = ref();
|
const filters = ref();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
axios.get('http://localhost:8082/fe-api/vector-store/details')
|
axios.get('/fe-api/vector-store/details')
|
||||||
.then(response => {
|
.then(response => {
|
||||||
vectorDetails.value = response.data;
|
vectorDetails.value = response.data;
|
||||||
console.log(vectorDetails.value)
|
console.log(vectorDetails.value)
|
||||||
|
|||||||
Reference in New Issue
Block a user