From b4c6d9791f970b9f80d8523e3ca510630919414d Mon Sep 17 00:00:00 2001 From: Sumedh Date: Wed, 23 Oct 2024 13:41:09 +0000 Subject: [PATCH 1/5] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 167aa17..54c9e66 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,7 +35,7 @@ docker-build: --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${DOCKER_IMAGE_NAME}" - --build-arg "VITE_BACKEND_URL=http://olympus-api-gateway.olympusai.live/apollo" + --build-arg "VITE_BACKEND_URL=http://olympus-api-gateway-aks.olympusai.live/apollo" # Run this job in a branch where a Dockerfile exists rules: From 3e813af6214d5a6f21da242d44750e347428f689 Mon Sep 17 00:00:00 2001 From: "andrea.terzani" Date: Wed, 23 Oct 2024 17:47:30 +0000 Subject: [PATCH 2/5] Update main.js --- src/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.js b/src/main.js index 42d02db..de536ac 100644 --- a/src/main.js +++ b/src/main.js @@ -36,10 +36,10 @@ var auth = createAuth({ options:{ notFoundRedirect: '/auth/login', authRedirect: '/auth/login', - loginData: {url: '../api/auth/login', method: 'POST', redirect: '/'}, - logoutData: {url:'../api/auth/logout', redirect: '/auth/login'}, - fetchData: {url: '../api/auth/fetch-user', method: 'GET', enabled: true}, - refreshData: {url: '../api/auth/refresh-token', method: 'GET', enabled: true} + loginData: {url: '/api/auth/login', method: 'POST', redirect: '/'}, + logoutData: {url:'/api/auth/logout', redirect: '/auth/login'}, + fetchData: {url: '/api/auth/fetch-user', method: 'GET', enabled: true}, + refreshData: {url: '/api/auth/refresh-token', method: 'GET', enabled: true} } }); From 311255bde830319e853d7dde28578bcd70880e19 Mon Sep 17 00:00:00 2001 From: Emanuele Ferrelli Date: Mon, 4 Nov 2024 16:20:50 +0100 Subject: [PATCH 3/5] fixed login bug --- src/views/pages/auth/Login.vue | 50 ++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/src/views/pages/auth/Login.vue b/src/views/pages/auth/Login.vue index cb1a7a9..729a303 100644 --- a/src/views/pages/auth/Login.vue +++ b/src/views/pages/auth/Login.vue @@ -2,6 +2,7 @@ import { useLayout } from '@/layout/composables/layout'; import { useAuth } from '@websanova/vue-auth/src/v3.js'; import { computed, ref } from 'vue'; +import { useRouter } from 'vue-router'; //import logo from '@/assets/Logo_Apollo_Transparent.png'; import logo from '@/assets/apollo.jpg'; const auth = useAuth(); @@ -9,25 +10,39 @@ const auth = useAuth(); const { isDarkTheme } = useLayout(); const username = ref(''); const password = ref(''); +const error = ref(''); +const visible = ref(false); +const router = useRouter(); const logoSrc = ref(logo); const logoUrl = computed(() => { return `/layout/images/${isDarkTheme ? 'logo-white' : 'logo-dark'}.svg`; }); -const login = () => { - console.log('Username: ', username.value); - - auth.login({ - data: { - "username": username.value, - "password": password.value - }, - redirect: '/ksdocuments', - fetchUser: true, - //url: '/api/auth/login' - }); +const login = async () => { + try { + await auth.login({ + data:{ + "username":username.value, + "password":password.value + }, + fetchUser: true + }).then((response) => { + console.log("1 user :" , response.data.data); + router.push({ name: 'ksdocuments' }); + console.log("response", response); + }).catch((err) => { + console.log("error", err); + error.value = 'Incorrect username or password. Please try again.'; + visible.value = true; + setTimeout(() => { + visible.value = false; + }, 3500); + }); + } catch (err) { + console.log('Error ' + err); + } } @@ -70,6 +85,9 @@ const login = () => { style="color: var(--primary-color)">Forgot password? --> + + {{ error }} + @@ -98,4 +116,12 @@ const login = () => { /* Ensures the logo scales nicely within the circle */ 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 */ +} From 396027ae4c0f214dcd64cd682513607a7da2f3b4 Mon Sep 17 00:00:00 2001 From: Emanuele Ferrelli Date: Mon, 24 Mar 2025 11:40:51 +0100 Subject: [PATCH 4/5] Update tooltip topbar --- src/layout/AppTopbar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/AppTopbar.vue b/src/layout/AppTopbar.vue index 7629cdf..d75228e 100644 --- a/src/layout/AppTopbar.vue +++ b/src/layout/AppTopbar.vue @@ -90,7 +90,7 @@ watch(() => userPrefStore.getSelApp, appUpdated, { immediate: true });