Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
proxy-manager-frontend
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
aolda
proxy-manager-frontend
Compare revisions
c548c6ce484874d02b8dfb432127b9da5311742e to 859383abf198cfe036a4bf3b60d9d152b5098304
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
aolda/proxy-manager-frontend
Select target project
No results found
859383abf198cfe036a4bf3b60d9d152b5098304
Select Git revision
Branches
main
1 result
Swap
Target
aolda/proxy-manager-frontend
Select target project
aolda/proxy-manager-frontend
1 result
c548c6ce484874d02b8dfb432127b9da5311742e
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 (2)
feat: 조회 페이지 키워드 검색 API 연동
· c92c5bd1
한동현
authored
1 month ago
c92c5bd1
fix: 로그 조회 요청 쿼리 오류 수정
· 859383ab
한동현
authored
1 month ago
859383ab
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/pages/forwarding/List.tsx
+31
-8
31 additions, 8 deletions
src/pages/forwarding/List.tsx
src/pages/log/List.tsx
+5
-1
5 additions, 1 deletion
src/pages/log/List.tsx
src/pages/routing/List.tsx
+31
-8
31 additions, 8 deletions
src/pages/routing/List.tsx
with
67 additions
and
17 deletions
src/pages/forwarding/List.tsx
View file @
859383ab
import
{
useEffect
,
useState
}
from
'
react
'
;
import
{
Link
}
from
'
react-router
'
;
import
{
Link
,
useSearchParams
}
from
'
react-router
'
;
import
{
Filter
,
Plus
,
Pencil
,
Trash
}
from
'
lucide-react
'
;
import
{
toast
}
from
'
sonner
'
;
import
{
useAuthStore
}
from
'
@/stores/authStore
'
;
...
...
@@ -23,11 +23,15 @@ import {
export
default
function
ForwardingList
()
{
const
{
authFetch
,
selectedProject
}
=
useAuthStore
();
const
[
searchParams
,
setSearchParams
]
=
useSearchParams
();
const
[
forwardings
,
setForwardings
]
=
useState
<
Forwarding
[]
|
null
>
(
null
);
const
[
selectedForwarding
,
setSelectedForwarding
]
=
useState
<
Forwarding
|
null
>
(
null
);
useEffect
(()
=>
{
authFetch
(
`/api/forwardings?projectId=
${
selectedProject
?.
id
}
`
)
const
apiSearchParams
=
new
URLSearchParams
(
searchParams
);
apiSearchParams
.
set
(
'
projectId
'
,
selectedProject
?.
id
||
''
);
authFetch
(
`/api/forwardings?
${
apiSearchParams
.
toString
()}
`
)
.
then
((
response
)
=>
{
if
(
!
response
.
ok
)
throw
Error
(
`포트포워딩 목록 조회 실패:
${
response
.
status
}
`
);
...
...
@@ -40,7 +44,7 @@ export default function ForwardingList() {
console
.
error
(
error
);
toast
.
error
(
'
포트포워딩 정보를 조회할 수 없습니다.
'
);
});
},
[
authFetch
,
selectedProject
]);
},
[
authFetch
,
selectedProject
,
searchParams
]);
const
handleDelete
=
()
=>
{
if
(
selectedForwarding
===
null
)
throw
Error
(
'
selectedForwarding is null
'
);
...
...
@@ -81,11 +85,30 @@ export default function ForwardingList() {
</
div
>
<
Card
>
<
CardContent
>
<
div
className
=
"flex w-full items-center space-x-2 mb-4"
>
<
Filter
className
=
"mr-3"
/>
<
Input
placeholder
=
"이름, 포트, 인스턴스 IP로 검색..."
/>
<
Button
variant
=
"secondary"
>
검색
</
Button
>
</
div
>
<
form
onSubmit
=
{
(
e
)
=>
{
e
.
preventDefault
();
const
formData
=
new
FormData
(
e
.
currentTarget
);
const
query
=
formData
.
get
(
'
query
'
)?.
toString
();
if
(
query
)
{
setSearchParams
({
query
});
}
else
{
setSearchParams
({});
}
}
}
>
<
div
className
=
"flex w-full items-center space-x-2 mb-4"
>
<
Filter
className
=
"mr-3"
/>
<
Input
name
=
"query"
placeholder
=
"이름, 포트, 인스턴스 IP로 검색..."
defaultValue
=
{
searchParams
.
get
(
'
query
'
)
||
''
}
/>
<
Button
type
=
"submit"
variant
=
"secondary"
>
검색
</
Button
>
</
div
>
</
form
>
<
Table
>
<
TableHeader
>
<
TableRow
>
...
...
This diff is collapsed.
Click to expand it.
src/pages/log/List.tsx
View file @
859383ab
...
...
@@ -51,7 +51,11 @@ export default function LogList() {
useEffect
(()
=>
{
setLogs
(
null
);
authFetch
(
`/api/logs?projectId=
${
selectedProject
?.
id
}
&page=
${
page
-
1
}
&
${
searchParams
.
toString
()}
`
)
const
apiSearchParams
=
new
URLSearchParams
(
searchParams
);
apiSearchParams
.
set
(
'
page
'
,
`
${
page
-
1
}
`
);
apiSearchParams
.
set
(
'
projectId
'
,
selectedProject
?.
id
||
''
);
authFetch
(
`/api/logs?
${
apiSearchParams
.
toString
()}
`
)
.
then
((
response
):
Promise
<
LogListResponse
>
=>
{
if
(
!
response
.
ok
)
throw
new
Error
(
`로그 목록 조회 실패: (
${
response
.
status
}
)`
);
...
...
This diff is collapsed.
Click to expand it.
src/pages/routing/List.tsx
View file @
859383ab
import
{
useEffect
,
useState
}
from
'
react
'
;
import
{
Link
}
from
'
react-router
'
;
import
{
Link
,
useSearchParams
}
from
'
react-router
'
;
import
{
Filter
,
Plus
,
Check
,
X
,
Pencil
,
Trash
}
from
'
lucide-react
'
;
import
{
toast
}
from
'
sonner
'
;
import
{
Button
}
from
'
@/components/ui/button
'
;
...
...
@@ -24,11 +24,15 @@ import { Routing } from '@/types/routing';
export
default
function
RoutingList
()
{
const
{
authFetch
,
selectedProject
}
=
useAuthStore
();
const
[
searchParams
,
setSearchParams
]
=
useSearchParams
();
const
[
routings
,
setRoutings
]
=
useState
<
Routing
[]
|
null
>
(
null
);
const
[
selectedRouting
,
setSelectedRouting
]
=
useState
<
Routing
|
null
>
(
null
);
useEffect
(()
=>
{
authFetch
(
`/api/routings?projectId=
${
selectedProject
?.
id
}
`
)
const
apiSearchParams
=
new
URLSearchParams
(
searchParams
);
apiSearchParams
.
set
(
'
projectId
'
,
selectedProject
?.
id
||
''
);
authFetch
(
`/api/routings?
${
apiSearchParams
.
toString
()}
`
)
.
then
((
response
)
=>
{
if
(
!
response
.
ok
)
throw
Error
(
`라우팅 목록 조회 실패:
${
response
.
status
}
`
);
...
...
@@ -41,7 +45,7 @@ export default function RoutingList() {
console
.
error
(
error
);
toast
.
error
(
'
라우팅 정보를 조회할 수 없습니다.
'
);
});
},
[
authFetch
,
selectedProject
]);
},
[
authFetch
,
selectedProject
,
searchParams
]);
const
handleDelete
=
()
=>
{
if
(
selectedRouting
===
null
)
throw
Error
(
'
selectedRouting is null
'
);
...
...
@@ -82,11 +86,30 @@ export default function RoutingList() {
</
div
>
<
Card
>
<
CardContent
>
<
div
className
=
"flex w-full items-center space-x-2 mb-4"
>
<
Filter
className
=
"mr-3"
/>
<
Input
placeholder
=
"이름, 도메인, 인스턴스 IP로 검색..."
/>
<
Button
variant
=
"secondary"
>
검색
</
Button
>
</
div
>
<
form
onSubmit
=
{
(
e
)
=>
{
e
.
preventDefault
();
const
formData
=
new
FormData
(
e
.
currentTarget
);
const
query
=
formData
.
get
(
'
query
'
)?.
toString
();
if
(
query
)
{
setSearchParams
({
query
});
}
else
{
setSearchParams
({});
}
}
}
>
<
div
className
=
"flex w-full items-center space-x-2 mb-4"
>
<
Filter
className
=
"mr-3"
/>
<
Input
name
=
"query"
placeholder
=
"이름, 도메인, 인스턴스 IP로 검색..."
defaultValue
=
{
searchParams
.
get
(
'
query
'
)
||
''
}
/>
<
Button
type
=
"submit"
variant
=
"secondary"
>
검색
</
Button
>
</
div
>
</
form
>
<
Table
>
<
TableHeader
>
<
TableRow
>
...
...
This diff is collapsed.
Click to expand it.