Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
77bf4eac
authored
Aug 13, 2025
by
heheer
Committed by
GitHub
Aug 13, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix log chart display (#5449)
parent
ef56912e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
projects/app/src/pageComponents/app/detail/Logs/LogChart.tsx
+10
-5
projects/app/src/pageComponents/app/detail/Workflow/components/SaveButton.tsx
+1
-1
No files found.
projects/app/src/pageComponents/app/detail/Logs/LogChart.tsx
View file @
77bf4eac
...
@@ -255,7 +255,7 @@ const LogChart = ({
...
@@ -255,7 +255,7 @@ const LogChart = ({
pointsPerChat
,
pointsPerChat
,
errorCount
:
item
.
summary
.
errorCount
,
errorCount
:
item
.
summary
.
errorCount
,
errorRate
:
item
.
summary
.
chatItemCount
errorRate
:
item
.
summary
.
chatItemCount
?
Number
((
item
.
summary
.
errorCount
/
item
.
summary
.
chatItemCount
).
toFixed
(
2
))
?
Number
((
(
item
.
summary
.
errorCount
/
item
.
summary
.
chatItemCount
)
*
100
).
toFixed
(
2
))
:
0
:
0
};
};
}
,
}
,
...
@@ -304,8 +304,7 @@ const LogChart = ({
...
@@ -304,8 +304,7 @@ const LogChart = ({
chatItemCount
:
'sum'
,
chatItemCount
:
'sum'
,
chatCount
:
'sum'
,
chatCount
:
'sum'
,
pointsPerChat
:
'avg'
,
pointsPerChat
:
'avg'
,
errorCount
:
'sum'
,
errorCount
:
'sum'
errorRate
:
'avg'
}),
}),
...
calculateStats
(
app
,
{
...
calculateStats
(
app
,
{
goodFeedBackCount
:
'sum'
,
goodFeedBackCount
:
'sum'
,
...
@@ -314,6 +313,11 @@ const LogChart = ({
...
@@ -314,6 +313,11 @@ const LogChart = ({
})
})
}
;
}
;
const totalChatItems = cumulative.chatItemCount || 0;
const totalErrors = cumulative.errorCount || 0;
cumulative.errorRate =
totalChatItems
>
0 ? Number(((totalErrors / totalChatItems) * 100).toFixed(2)) : 0;
return
{
user
,
chat
,
app
,
cumulative
}
;
return
{
user
,
chat
,
app
,
cumulative
}
;
}, [
}, [
feConfigs?.isPlus,
feConfigs?.isPlus,
...
@@ -468,7 +472,7 @@ const LogChart = ({
...
@@ -468,7 +472,7 @@ const LogChart = ({
averageKey=
"points"
averageKey=
"points"
HeaderRightChildren=
{
HeaderRightChildren=
{
<
Flex
alignItems=
{
'center'
}
fontSize=
{
'sm'
}
color=
{
'myGray.600'
}
>
<
Flex
alignItems=
{
'center'
}
fontSize=
{
'sm'
}
color=
{
'myGray.600'
}
>
{
t
(
'app:logs_total'
)
}
:
{
formatChartData
.
cumulative
.
points
}
{
t
(
'app:logs_total'
)
}
:
{
formatChartData
.
cumulative
.
points
.
toFixed
(
2
)
}
</
Flex
>
</
Flex
>
}
}
blur=
{
!
feConfigs
?.
isPlus
}
blur=
{
!
feConfigs
?.
isPlus
}
...
@@ -599,7 +603,8 @@ const LogChart = ({
...
@@ -599,7 +603,8 @@ const LogChart = ({
{
{
label
:
t
(
'app:logs_error_rate'
),
label
:
t
(
'app:logs_error_rate'
),
dataKey
:
'errorRate'
,
dataKey
:
'errorRate'
,
color
:
theme
.
colors
.
primary
[
'400'
]
color
:
theme
.
colors
.
primary
[
'400'
],
formatter
:
(
value
)
=>
`${value}%`
}
}
]
}
]
}
HeaderRightChildren=
{
HeaderRightChildren=
{
...
...
projects/app/src/pageComponents/app/detail/Workflow/components/SaveButton.tsx
View file @
77bf4eac
...
@@ -44,7 +44,7 @@ const SaveButton = ({
...
@@ -44,7 +44,7 @@ const SaveButton = ({
placement=
{
'bottom-end'
}
placement=
{
'bottom-end'
}
hasArrow=
{
false
}
hasArrow=
{
false
}
offset=
{
[
2
,
4
]
}
offset=
{
[
2
,
4
]
}
w=
{
'1
16
px'
}
w=
{
'1
24
px'
}
onOpenFunc=
{
()
=>
setIsSave
(
true
)
}
onOpenFunc=
{
()
=>
setIsSave
(
true
)
}
onCloseFunc=
{
()
=>
setIsSave
(
false
)
}
onCloseFunc=
{
()
=>
setIsSave
(
false
)
}
trigger=
{
'hover'
}
trigger=
{
'hover'
}
...
...
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