Skip to content

Commit

Permalink
Merge pull request #2329 from Agenta-AI/AGE-1398/-you-should-not-be-a…
Browse files Browse the repository at this point in the history
…ble-to-open-a-running-evaluation

(frontend)[AGE-1398]: You should not be able to open a running evaluation
  • Loading branch information
mmabrouk authored Dec 3, 2024
2 parents 8839177 + b27a322 commit 8287d07
Showing 1 changed file with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,15 @@ const AutoEvaluation = () => {
icon: <Note size={16} />,
onClick: (e) => {
e.domEvent.stopPropagation()
router.push(
`/apps/${appId}/evaluations/results/${record.id}`,
)
if (
record.status.value === EvaluationStatus.FINISHED ||
record.status.value ===
EvaluationStatus.FINISHED_WITH_ERRORS
) {
router.push(
`/apps/${appId}/evaluations/results/${record.id}`,
)
}
},
},
{
Expand Down Expand Up @@ -605,7 +611,14 @@ const AutoEvaluation = () => {
pagination={false}
onRow={(record) => ({
style: {cursor: "pointer"},
onClick: () => router.push(`/apps/${appId}/evaluations/results/${record.id}`),
onClick: () => {
if (
record.status.value === EvaluationStatus.FINISHED ||
record.status.value === EvaluationStatus.FINISHED_WITH_ERRORS
) {
router.push(`/apps/${appId}/evaluations/results/${record.id}`)
}
},
})}
/>

Expand Down

0 comments on commit 8287d07

Please sign in to comment.