Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
upgrade-data-crawler-fe
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ThinhNC
upgrade-data-crawler-fe
Commits
a9a76793
Commit
a9a76793
authored
Sep 11, 2026
by
ThinhNC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add crawl job detail page and corresponding API service
parent
d6084364
Pipeline
#53120
passed with stage
in 2 minutes and 4 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
12 deletions
+35
-12
page.tsx
src/app/crawl-jobs/[id]/page.tsx
+5
-6
crawl-job.service.ts
src/services/crawl-job.service.ts
+30
-6
No files found.
src/app/crawl-jobs/[id]/page.tsx
View file @
a9a76793
...
...
@@ -585,11 +585,10 @@ export default function CrawlJobDetailPage({ params }: PageProps) {
id
:
"pages"
,
label
:
t
.
jobDetail
.
pagesTab
,
icon
:
FileText
,
count
:
(
pagesData
?.
total
&&
pagesData
.
total
>
0
)
count
:
pagesData
?.
total
!==
undefined
&&
pagesData
.
total
>
0
?
pagesData
.
total
:
isJobRunning
&&
job
?.
successPages
?
job
.
successPages
:
0
,
:
(
job
?.
successPages
??
0
),
},
{
id
:
"diff"
,
label
:
t
.
jobDetail
.
diffTab
,
icon
:
Sparkles
,
count
:
diffData
?.
summary
?.
changeRate
?
`${Math.round(diffData.summary.changeRate * 100)}%`
:
undefined
},
].
map
((
tabItem
)
=>
{
...
...
@@ -857,7 +856,7 @@ export default function CrawlJobDetailPage({ params }: PageProps) {
<
p
className=
"text-xs text-muted-foreground"
>
{
t
.
jobDetail
.
pages
.
subtitle
}
</
p
>
</
div
>
<
Badge
variant=
"secondary"
className=
"rounded-full"
>
{
pagesData
?.
total
||
0
}
{
t
.
jobDetail
.
pages
.
pagesExtracted
}
{
pagesData
?.
total
??
job
?.
successPages
??
0
}
{
t
.
jobDetail
.
pages
.
pagesExtracted
}
</
Badge
>
</
div
>
...
...
src/services/crawl-job.service.ts
View file @
a9a76793
...
...
@@ -219,15 +219,39 @@ export const crawlJobService = {
const
response
=
await
apiClient
.
get
<
ApiResponse
<
{
items
:
CrawlPagePreview
[];
total
:
number
;
page
:
number
;
limit
:
number
;
totalPages
:
number
;
total
?:
number
;
page
?:
number
;
limit
?:
number
;
totalPages
?:
number
;
meta
?:
{
total
?:
number
;
page
?:
number
;
limit
?:
number
;
totalPages
?:
number
;
};
}
>
>
(
`/crawl-jobs/
${
id
}
/pages/preview?
${
params
.
toString
()}
`
);
if
(
response
.
data
?.
data
)
{
return
response
.
data
.
data
;
const
raw
=
response
.
data
?.
data
;
if
(
raw
)
{
const
total
=
raw
.
total
??
raw
.
meta
?.
total
??
(
Array
.
isArray
(
raw
.
items
)
?
raw
.
items
.
length
:
0
);
const
totalPages
=
raw
.
totalPages
??
raw
.
meta
?.
totalPages
??
Math
.
max
(
1
,
Math
.
ceil
(
total
/
limit
));
const
pageNum
=
raw
.
page
??
raw
.
meta
?.
page
??
page
;
const
limitNum
=
raw
.
limit
??
raw
.
meta
?.
limit
??
limit
;
return
{
items
:
raw
.
items
||
[],
total
,
page
:
pageNum
,
limit
:
limitNum
,
totalPages
,
};
}
throw
new
Error
(
"Invalid pages preview response"
);
},
...
...
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