Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SWLab UI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
SWD
SWLab UI
Commits
5a2af70d
Commit
5a2af70d
authored
Aug 29, 2024
by
minseok.park
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test login check api
parent
20abfb90
Pipeline
#20710
failed with stages
in 2 minutes
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
47 deletions
+17
-47
09-check-login.js
src/js/09-check-login.js
+17
-0
09-session.js
src/js/09-session.js
+0
-47
No files found.
src/js/09-check-login.js
0 → 100644
View file @
5a2af70d
/* eslint-disable no-undef */
;(
function
()
{
'use strict'
fetch
(
'web/dms/api/auth/status'
)
.
then
((
response
)
=>
{
console
.
log
(
'response login >>>>> '
,
response
)
if
(
response
.
url
===
'https://swlab.bwg.co.kr/web/dms/login'
)
{
document
.
location
.
href
=
'https://swlab.bwg.co.kr/web/dms/home'
}
})
.
catch
((
error
)
=>
{
console
.
error
(
'Error checking login status:'
,
error
)
})
})()
src/js/09-session.js
deleted
100644 → 0
View file @
20abfb90
// ;(function () {
// 'use strict'
// const logo = document.getElementById('logo')
// function getCookie (name) {
// const cookies = document.cookie.split(';')
// for (let i = 0; i < cookies.length; i++) {
// const cookie = cookies[i].trim()
// if (cookie.startsWith(name + '=')) {
// return cookie.substring(name.length + 1)
// }
// }
// return null
// }
// document.addEventListener('DOMContentLoaded', function () {
// const jsessionid = getCookie('JSESSIONID')
// if (jsessionid) {
// // JSESSIONID 쿠키 값이 있을 경우 추가할 a 태그 생성
// const newLink = document.createElement('a')
// newLink.className = 'navbar-item'
// newLink.href = 'https://swlab.bwg.co.kr/web/docs/bxm/swlab-docs-bxm-s/current/concepts/overview.html'
// newLink.textContent = 'BXM Concepts Overview'
// // 기존 BXM 링크 바로 아래에 삽입
// const bxmLink = document.querySelector(
// '.navbar-dropdown .navbar-item[href="https://swlab.bwg.co.kr/web/docs/bxm/swlab-docs-bxm/current/index.html"]'
// )
// if (bxmLink) {
// bxmLink.insertAdjacentElement('afterend', newLink)
// }
// }
// // logo 클릭 이벤트
// logo.addEventListener('click', function (event) {
// if (jsessionid) {
// // JSESSIONID 쿠키 값이 있을 경우
// window.location.href = 'https://swlab.bwg.co.kr/web/dms/home'
// } else {
// // JSESSIONID 쿠키 값이 없을 경우
// window.location.href = 'https://swlab.bwg.co.kr/web/main/'
// }
// })
// })
// })()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment