Merge branch 'master' of https://dev.azure.com/olympusai/Olympus/_git/apollo-fe
This commit is contained in:
@@ -90,7 +90,7 @@ watch(() => userPrefStore.getSelApp, appUpdated, { immediate: true });
|
|||||||
|
|
||||||
<div class="topbar-project">
|
<div class="topbar-project">
|
||||||
<button @click="redirectProject()" class="p-button p-button-outlined"
|
<button @click="redirectProject()" class="p-button p-button-outlined"
|
||||||
v-tooltip="'Click to change the project'"> {{ userPrefStore.user.selectedProject.fe_name
|
v-tooltip.left="'Click to change the project'"> {{ userPrefStore.user.selectedProject.fe_name
|
||||||
}}</button>
|
}}</button>
|
||||||
</div>
|
</div>
|
||||||
<button class="layout-topbar-menu-button layout-topbar-action"
|
<button class="layout-topbar-menu-button layout-topbar-action"
|
||||||
|
|||||||
@@ -2,14 +2,16 @@
|
|||||||
import { useLayout } from '@/layout/composables/layout';
|
import { useLayout } from '@/layout/composables/layout';
|
||||||
import { useAuth } from '@websanova/vue-auth/src/v3.js';
|
import { useAuth } from '@websanova/vue-auth/src/v3.js';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
//import logo from '@/assets/Logo_Apollo_Transparent.png';
|
//import logo from '@/assets/Logo_Apollo_Transparent.png';
|
||||||
import logo from '@/assets/apollo.jpg';
|
import logo from '@/assets/apollo.jpg';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
const auth = useAuth();
|
const auth = useAuth();
|
||||||
|
|
||||||
const { isDarkTheme } = useLayout();
|
const { isDarkTheme } = useLayout();
|
||||||
const username = ref('');
|
const username = ref('');
|
||||||
const password = ref('');
|
const password = ref('');
|
||||||
|
const error = ref('');
|
||||||
|
const visible = ref(false);
|
||||||
const logoSrc = ref(logo);
|
const logoSrc = ref(logo);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
@@ -20,18 +22,18 @@ const logoUrl = computed(() => {
|
|||||||
const login = async () => {
|
const login = async () => {
|
||||||
try {
|
try {
|
||||||
await auth.login({
|
await auth.login({
|
||||||
data: {
|
data:{
|
||||||
"username": username.value,
|
"username":username.value,
|
||||||
"password": password.value
|
"password":password.value
|
||||||
},
|
},
|
||||||
fetchUser: true
|
fetchUser: true
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
console.log("1 user :", response.data.data);
|
console.log("1 user :" , response.data.data);
|
||||||
|
|
||||||
if (!response.data.data.selectedProject) {
|
if (!response.data.data.selectedProject) {
|
||||||
router.push({ name: 'projects-list' });
|
router.push({ name: 'projects-list' });
|
||||||
} else {
|
} else {
|
||||||
router.push({ path: '/ksdocuments' });
|
router.push({ name: 'ksdocuments' });
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("response", response);
|
console.log("response", response);
|
||||||
@@ -47,7 +49,6 @@ const login = async () => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('Error ' + err);
|
console.log('Error ' + err);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -86,15 +87,15 @@ const login = async () => {
|
|||||||
<label for="password1" class="block text-surface-900 dark:text-surface-0 font-medium text-xl mb-2">Password</label>
|
<label for="password1" class="block text-surface-900 dark:text-surface-0 font-medium text-xl mb-2">Password</label>
|
||||||
<Password id="password1" v-model="password" placeholder="Password" :toggleMask="true" class="w-full mb-4" inputClass="w-full" :inputStyle="{ padding: '1rem' }"></Password>
|
<Password id="password1" v-model="password" placeholder="Password" :toggleMask="true" class="w-full mb-4" inputClass="w-full" :inputStyle="{ padding: '1rem' }"></Password>
|
||||||
|
|
||||||
<!-- <div class="flex items-center justify-between mb-8 gap-8">
|
<!--div class="flex items-center justify-between mb-8 gap-8">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<Checkbox v-model="checked" id="rememberme1" binary class="mr-2"></Checkbox>
|
<Checkbox v-model="checked" id="rememberme1" binary class="mr-2"></Checkbox>
|
||||||
<label for="rememberme1">Remember me</label>
|
<label for="rememberme1">Remember me</label>
|
||||||
</div>
|
</div>
|
||||||
<a class="font-medium no-underline ml-2 text-right cursor-pointer" style="color: var(--primary-color)">Forgot password?</a>
|
<a class="font-medium no-underline ml-2 text-right cursor-pointer"
|
||||||
</div>
|
style="color: var(--primary-color)">Forgot password?</a>
|
||||||
-->
|
</div> -->
|
||||||
<Button @click="login" label="Sign In" class="w-full p-4 text-xl"></Button>
|
<Button label="Sign In" @click="login" class="w-full p-4 text-xl"></Button>
|
||||||
|
|
||||||
<Message v-if="visible" severity="error" :life="3000" class="mt-2 error-message">{{ error }}</Message>
|
<Message v-if="visible" severity="error" :life="3000" class="mt-2 error-message">{{ error }}</Message>
|
||||||
|
|
||||||
@@ -142,4 +143,12 @@ const login = async () => {
|
|||||||
/* Ensures the logo scales nicely within the circle */
|
/* Ensures the logo scales nicely within the circle */
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error-message {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
width: 100%; /* Ensure the message takes the full width of its container */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ const filters = ref();
|
|||||||
const userPrefStore = UserPrefStore();
|
const userPrefStore = UserPrefStore();
|
||||||
const ksDocumentStore = KsDocumentStore();
|
const ksDocumentStore = KsDocumentStore();
|
||||||
const loadingStore = LoadingStore();
|
const loadingStore = LoadingStore();
|
||||||
|
const fe_status = ref("");
|
||||||
|
|
||||||
const initFilters = () => {
|
const initFilters = () => {
|
||||||
filters.value = {
|
filters.value = {
|
||||||
@@ -328,11 +329,11 @@ const startIndividualngestion = (id) => {
|
|||||||
}
|
}
|
||||||
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 });
|
||||||
fe_status = "ERROR"
|
fe_status.value = "ERROR"
|
||||||
}
|
}
|
||||||
ksdocuments.value.forEach(element => {
|
ksdocuments.value.forEach(element => {
|
||||||
if (element.id == id) {
|
if (element.id == id) {
|
||||||
element.ingestionStatus = fe_status
|
element.ingestionStatus = fe_status.value
|
||||||
console.log("Updated element", element)
|
console.log("Updated element", element)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<StepPanels>
|
<StepPanels>
|
||||||
<StepPanel value="1" v-slot="{ activateCallback }">
|
<StepPanel value="1" v-slot="{ activateCallback }">
|
||||||
<div class="flex flex-col h-48">
|
<div class="flex flex-col h-48">
|
||||||
<FileUpload ref="fileUpload" :maxFileSize="10000000000" chooseLabel="Select File" class="p-button"
|
<FileUpload ref="fileUpload" :maxFileSize="52428800" chooseLabel="Select File (max 50 MB)" class="p-button"
|
||||||
style="width: 150px;" @select="onFileSelect" @remove="onFileRemove" :showUploadButton="false"
|
style="width: 150px;" @select="onFileSelect" @remove="onFileRemove" :showUploadButton="false"
|
||||||
:showCancelButton="false" v-model:files="selectedFile" :fileLimit=1>
|
:showCancelButton="false" v-model:files="selectedFile" :fileLimit=1>
|
||||||
<template #empty>
|
<template #empty>
|
||||||
|
|||||||
@@ -76,17 +76,8 @@ const doctypeOptions = ref([
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log('SimilaritySearch page mounted');
|
console.log('SimilaritySearch page mounted');
|
||||||
if (ksDocumentStore.getSelectedKsDocument == null) {
|
if (ksDocumentStore.getSelectedKsDocument == null) {
|
||||||
if (userPrefStore.getSelApp == null) {
|
|
||||||
filterQuery.value = "'KsProjectName' == '" + userPrefStore.selectedProject.internal_name
|
filterQuery.value = "'KsProjectName' == '" + userPrefStore.selectedProject.internal_name
|
||||||
+ "'";
|
+ "'";
|
||||||
} else {
|
|
||||||
filterQuery.value = "'KsApplicationName' == '" + userPrefStore.getSelApp.internal_name
|
|
||||||
+ "' AND " + "'KsProjectName' == '" + userPrefStore.selectedProject.internal_name
|
|
||||||
+ "'";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
filterQuery.value = "'KsApplicationName' == '" + doc.ingestionInfo.metadata.KsApplicationName
|
filterQuery.value = "'KsApplicationName' == '" + doc.ingestionInfo.metadata.KsApplicationName
|
||||||
+ "' AND " + "'KsProjectName' == '" + doc.ingestionInfo.metadata.KsProjectName
|
+ "' AND " + "'KsProjectName' == '" + doc.ingestionInfo.metadata.KsProjectName
|
||||||
@@ -98,16 +89,8 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function updateQuery() {
|
function updateQuery() {
|
||||||
|
|
||||||
if (userPrefStore.getSelApp == null) {
|
|
||||||
filterQuery.value = "'KsProjectName' == '" + userPrefStore.selectedProject.internal_name
|
filterQuery.value = "'KsProjectName' == '" + userPrefStore.selectedProject.internal_name
|
||||||
+ "'";
|
+ "'";
|
||||||
} else {
|
|
||||||
filterQuery.value = "'KsApplicationName' == '" + userPrefStore.getSelApp.internal_name
|
|
||||||
+ "' AND " + "'KsProjectName' == '" + userPrefStore.selectedProject.internal_name
|
|
||||||
+ "'";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectedDoctype.value && selectedDoctype.value.value !== "all") {
|
if (selectedDoctype.value && selectedDoctype.value.value !== "all") {
|
||||||
filterQuery.value = filterQuery.value + " AND 'KsDoctype' == '" + selectedDoctype.value.value + "'";
|
filterQuery.value = filterQuery.value + " AND 'KsDoctype' == '" + selectedDoctype.value.value + "'";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user