Skip to content

Commit

Permalink
savE (#719)
Browse files Browse the repository at this point in the history
Co-authored-by: Piotr Mardziel <[email protected]>
  • Loading branch information
walnutdust and piotrm0 authored Dec 22, 2023
1 parent 426fa70 commit 37772e2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion trulens_eval/trulens_eval/pages/Evaluations.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def highlight(s):
match_query = None

# Assumes record_json['perf']['start_time'] is always present
if val != record_json["perf"]["start_time"] and val != "":
if val != "":
match = None
for call in record.calls:
if call.perf.start_time.isoformat() == val:
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Record viewer</title>
<script type="module" crossorigin src="./assets/index-9a8f0f59.js"></script>
<script type="module" crossorigin src="./assets/index-d2f862fd.js"></script>
<link rel="stylesheet" href="./assets/index-00b8e16d.css">
</head>
<body style="margin: 0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,18 @@ export default function RecordTableRowRecursive({
const { startTime, timeTaken, endTime } = getStartAndEndTimesForNode(node);

let selector = 'Select.App';

if (node.path) selector += `.${node.path}`;

const isNodeSelected = selectedNode === node.raw?.perf.start_time;
const isRoot = !node.path;
const nodeStartTime = isRoot ? '' : node.raw?.perf.start_time;

const isNodeSelected = selectedNode === nodeStartTime;

return (
<>
<TableRow
onClick={() => setSelectedNode(node.raw?.perf.start_time ?? undefined)}
onClick={() => setSelectedNode(nodeStartTime ?? undefined)}
sx={{
...recordRowSx,
background: isNodeSelected ? ({ palette }) => palette.primary.lighter : undefined,
Expand Down

0 comments on commit 37772e2

Please sign in to comment.