Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
web-dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ThiefSil
web-dashboard
Compare revisions
198b2614c833b52f66765cbe248e86fc9d8ef141 to ab01620c49ee4daffd71dc8fce35d25d18afed4b
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
thiefsil/thiefsil.ajousw.kr
Select target project
No results found
ab01620c49ee4daffd71dc8fce35d25d18afed4b
Select Git revision
Branches
main
1 result
Swap
Target
thiefsil/thiefsil.ajousw.kr
Select target project
thiefsil/thiefsil.ajousw.kr
1 result
198b2614c833b52f66765cbe248e86fc9d8ef141
Select Git revision
Branches
main
1 result
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (5)
feat: 사용자 목록 페이지 RFID UID 컬럼 추가
· 02069435
한동현
authored
5 months ago
02069435
chore: README.md 스크린샷 추가
· a44a788b
한동현
authored
5 months ago
a44a788b
fix: 운전자 정보 형식 UID로 변경
· 9566cc3f
한동현
authored
5 months ago
9566cc3f
fix: 더미 데이터가 중복 생성되는 문제 해결
· 522233bc
한동현
authored
5 months ago
522233bc
fix: 타이틀바 배경이 투명한 문제 해결
· ab01620c
한동현
authored
5 months ago
ab01620c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
src/pages/Home.tsx
+9
-9
9 additions, 9 deletions
src/pages/Home.tsx
src/pages/Root.tsx
+1
-1
1 addition, 1 deletion
src/pages/Root.tsx
src/pages/Users.tsx
+3
-0
3 additions, 0 deletions
src/pages/Users.tsx
with
15 additions
and
10 deletions
README.md
View file @
ab01620c
...
...
@@ -5,6 +5,8 @@
GitLab Pages를 통해 자동으로 빌드 및 배포 되고 있습니다.
[
https://thiefsil.ajousw.kr
](
https://thiefsil.ajousw.kr
)

## 주요 기능
-
실시간 충전기 주차 상태 모니터링
...
...
This diff is collapsed.
Click to expand it.
src/pages/Home.tsx
View file @
ab01620c
...
...
@@ -21,6 +21,8 @@ export default function Home() {
const
{
wsUrl
}
=
useServer
();
useEffect
(()
=>
{
if
(
!
wsUrl
)
return
;
const
ws
=
new
WebSocket
(
`
${
wsUrl
}
/ws/list`
);
ws
.
onopen
=
()
=>
{
...
...
@@ -43,10 +45,6 @@ export default function Home() {
console
.
error
(
'
WebSocket error:
'
,
error
);
};
ws
.
onclose
=
()
=>
{
console
.
log
(
'
WebSocket connection closed
'
);
};
const
dummyWs
=
new
WebSocket
(
`
${
wsUrl
}
/ws/charger`
);
let
intervalId
:
NodeJS
.
Timeout
;
...
...
@@ -65,7 +63,7 @@ export default function Home() {
dummyWs
.
send
(
`
${
chargerNumber
}
-PARK`
);
await
delay
(
500
);
dummyWs
.
send
(
`
${
chargerNumber
}
-d
1
`
);
dummyWs
.
send
(
`
${
chargerNumber
}
-d
A5D9C0B0
`
);
await
delay
(
500
);
intervalId
=
setInterval
(()
=>
{
...
...
@@ -83,8 +81,13 @@ export default function Home() {
};
return
()
=>
{
if
(
intervalId
)
{
clearInterval
(
intervalId
);
}
try
{
ws
.
close
();
console
.
log
(
'
WebSocket connection(list) closed
'
);
}
catch
{
console
.
error
(
'
WebSocket connection already closed
'
);
}
...
...
@@ -93,14 +96,11 @@ export default function Home() {
if
(
dummyWs
.
readyState
===
WebSocket
.
OPEN
)
{
dummyWs
.
send
(
`
${
chargerNumber
}
-EXIT`
);
dummyWs
.
close
();
console
.
log
(
'
WebSocket connection(charger) closed
'
);
}
}
catch
{
console
.
error
(
'
WebSocket connection already closed
'
);
}
if
(
intervalId
)
{
clearInterval
(
intervalId
);
}
};
},
[
wsUrl
]);
...
...
This diff is collapsed.
Click to expand it.
src/pages/Root.tsx
View file @
ab01620c
...
...
@@ -9,7 +9,7 @@ export default function Root() {
<
SidebarProvider
>
<
AppSidebar
/>
<
SidebarInset
>
<
header
className
=
"flex sticky top-0 bg-white h-16 shrink-0 items-center gap-2 border-b px-4"
>
<
header
className
=
"flex sticky top-0 bg-white h-16 shrink-0 items-center gap-2 border-b px-4
z-10
"
>
<
SidebarTrigger
className
=
"-ml-1"
/>
<
Separator
orientation
=
"vertical"
className
=
"mr-2 h-4"
/>
<
Link
to
=
"/"
className
=
"text-lg md:text-base font-semibold whitespace-nowrap"
>
...
...
This diff is collapsed.
Click to expand it.
src/pages/Users.tsx
View file @
ab01620c
...
...
@@ -7,6 +7,7 @@ import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from '@
interface
User
{
id
:
number
;
name
:
string
;
uid
:
string
;
email
:
string
;
}
...
...
@@ -43,6 +44,7 @@ export default function Users() {
<
TableRow
>
<
TableHead
className
=
"w-16 text-center"
>
ID
</
TableHead
>
<
TableHead
className
=
"w-32 text-center"
>
이름
</
TableHead
>
<
TableHead
className
=
"w-48 text-center"
>
RFID UID
</
TableHead
>
<
TableHead
>
이메일
</
TableHead
>
</
TableRow
>
</
TableHeader
>
...
...
@@ -51,6 +53,7 @@ export default function Users() {
<
TableRow
key
=
{
user
.
id
}
>
<
TableCell
className
=
"text-center"
>
{
user
.
id
}
</
TableCell
>
<
TableCell
className
=
"text-center"
>
{
user
.
name
}
</
TableCell
>
<
TableCell
className
=
"text-center"
>
{
user
.
uid
}
</
TableCell
>
<
TableCell
>
{
user
.
email
}
</
TableCell
>
</
TableRow
>
))
}
...
...
This diff is collapsed.
Click to expand it.