+ Evaluations
+
+
+
+ )
+}
+
+export default EvaluationsPage
diff --git a/agenta-web/src/pages/apps/[app_id]/evaluations/new-evaluator.tsx b/agenta-web/src/pages/apps/[app_id]/evaluations/new-evaluator.tsx
deleted file mode 100644
index 563726775..000000000
--- a/agenta-web/src/pages/apps/[app_id]/evaluations/new-evaluator.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import Evaluators from "@/components/pages/evaluations/evaluators/Evaluators"
-import {useAppId} from "@/hooks/useAppId"
-import {evaluatorConfigsAtom, evaluatorsAtom} from "@/lib/atoms/evaluation"
-import {fetchAllEvaluatorConfigs, fetchAllEvaluators} from "@/services/evaluations/api"
-import {useAtom} from "jotai"
-import React, {useEffect} from "react"
-
-const NewEvaluator = () => {
- const appId = useAppId()
- const setEvaluators = useAtom(evaluatorsAtom)[1]
- const setEvaluatorConfigs = useAtom(evaluatorConfigsAtom)[1]
-
- useEffect(() => {
- Promise.all([fetchAllEvaluators(), fetchAllEvaluatorConfigs(appId)]).then(
- ([evaluators, configs]) => {
- setEvaluators(evaluators)
- setEvaluatorConfigs(configs)
- },
- )
- }, [appId])
-
- return
-
-
- = [
+ {
+ title: "Name",
+ dataIndex: "name",
+ key: "name",
+ onHeaderCell: () => ({
+ style: {minWidth: 220},
+ }),
+ },
+ {
+ title: "Date Modified",
+ dataIndex: "updated_at",
+ key: "updated_at",
+ onHeaderCell: () => ({
+ style: {minWidth: 220},
+ }),
+ render: (date: string) => {
+ return formatDate(date)
+ },
+ },
+ {
+ title: "Date created",
+ dataIndex: "created_at",
+ key: "created_at",
+ render: (date: string) => {
+ return formatDate(date)
+ },
+ onHeaderCell: () => ({
+ style: {minWidth: 220},
+ }),
+ },
+ {
+ title: ,
+ key: "key",
+ width: 56,
+ fixed: "right",
+ align: "center",
+ render: (_, record) => {
+ return (
+ ,
+ onClick: (e) => {
+ e.domEvent.stopPropagation()
+ router.push(`/apps/${appId}/testsets/${record._id}`)
+ },
+ },
+ {
+ key: "clone",
+ label: "Clone",
+ icon: ,
+ onClick: (e) => {
+ e.domEvent.stopPropagation()
+ setTestsetCreationMode("clone")
+ setEditTestsetValues(record)
+ setCurrent(1)
+ setIsCreateTestsetModalOpen(true)
+ },
+ },
+ {type: "divider"},
+ {
+ key: "rename",
+ label: "Rename",
+ icon: ,
+ onClick: (e) => {
+ e.domEvent.stopPropagation()
+ setTestsetCreationMode("rename")
+ setEditTestsetValues(record)
+ setCurrent(1)
+ setIsCreateTestsetModalOpen(true)
+ },
+ },
+ {
+ key: "delete_eval",
+ label: "Delete",
+ icon: ,
+ danger: true,
+ onClick: (e) => {
+ e.domEvent.stopPropagation()
+ onDelete([record._id])
+ },
+ },
+ ],
+ }}
+ >
+ e.stopPropagation()}
+ type="text"
+ icon={ }
+ size="small"
+ />
+
+ )
+ },
+ },
+ ]
- {testsets.length > 0 && (
-
-
- Start an Automatic Evaluation
-
+ return (
+ <>
+
+
+
-
-
- Upload Test Set
-
-
- Create Test Set in UI
-
-
- Create a test set with API
-
- {!isDemo() && (
-
- Import from Endpoint
-
- )}
-
+ const filteredTestset = useMemo(() => {
+ let allTestsets = testsets.sort(
+ (a: TestSet, b: TestSet) =>
+ dayjs(b.updated_at).valueOf() - dayjs(a.updated_at).valueOf(),
+ )
+ if (searchTerm) {
+ allTestsets = testsets.filter((item: TestSet) =>
+ item.name.toLowerCase().includes(searchTerm.toLowerCase()),
+ )
+ }
+ return allTestsets
+ }, [searchTerm, testsets])
+
+ const columns: ColumnsType
+ Test sets
-
- Start a Human Evaluation
-
-
- )}
+ }
+ onClick={() => setIsCreateTestsetModalOpen(true)}
+ data-cy="create-testset-modal-button"
+ >
+ Create new test set
+
-
- {selectedRowKeys.length > 0 && (
+
+ setSearchTerm(e.target.value)}
+ />
}
+ className={classes.button}
+ disabled={selectedRowKeys.length == 0}
+ onClick={() => onDelete()}
>
-
Delete
- )}
-
+
+
{
return {
onClick: () => router.push(`/apps/${appId}/testsets/${record._id}`),
}
}}
+ locale={{emptyText: