File tree Expand file tree Collapse file tree 6 files changed +17
-7
lines changed
Expand file tree Collapse file tree 6 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ async def get_diff_table(
122122 "metric_key" : metric_key ,
123123 "curr_python_version_str" : f"{ selected_commit .python_major } .{ selected_commit .python_minor } .{ selected_commit .python_patch } " ,
124124 "curr_result_id" : result .id ,
125+ "has_flamegraph" : result .flamegraph_html is not None ,
125126 }
126127
127128 # Try to find previous commit's data for comparison
Original file line number Diff line number Diff line change @@ -140,6 +140,7 @@ class DiffTableRow(BaseModel):
140140 prev_python_version_str : Optional [str ] = None
141141 curr_python_version_str : str
142142 curr_result_id : str
143+ has_flamegraph : bool = False
143144
144145
145146class PythonVersionFilterOption (BaseModel ):
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ services:
4242 image : node:20-alpine
4343 working_dir : /app
4444 environment :
45- NEXT_PUBLIC_API_BASE : http://localhost:8000
45+ NEXT_PUBLIC_API_BASE : http://localhost:8000/api
4646 ports :
4747 - " 9002:9002"
4848 depends_on :
Original file line number Diff line number Diff line change @@ -98,11 +98,16 @@ function EnvironmentCard({
9898 ) }
9999 </ div >
100100 </ div >
101- < div className = "flex items-center gap-2" >
102- < Badge variant = "secondary" >
103- { environment . commit_count } commits
104- </ Badge >
105- < Badge variant = "outline" > { environment . run_count } runs</ Badge >
101+ < div className = "flex flex-col items-end gap-2" >
102+ < div className = "text-xs text-muted-foreground font-mono" >
103+ Identifier: { environment . id }
104+ </ div >
105+ < div className = "flex items-center gap-2" >
106+ < Badge variant = "secondary" >
107+ { environment . commit_count } commits
108+ </ Badge >
109+ < Badge variant = "outline" > { environment . run_count } runs</ Badge >
110+ </ div >
106111 </ div >
107112 </ div >
108113 </ CardHeader >
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ interface EnhancedDiffTableRow {
7474
7575 // Result ID for flamegraph
7676 curr_result_id ?: string ;
77+ has_flamegraph ?: boolean ;
7778}
7879import CommitTooltipContent from '@/components/diff/CommitTooltipContent' ;
7980
@@ -348,6 +349,7 @@ function DiffTableContent() {
348349 curr_python_version_str : baseRow . curr_python_version_str ,
349350 prev_python_version_str : baseRow . prev_python_version_str ,
350351 curr_result_id : baseRow . curr_result_id ,
352+ has_flamegraph : baseRow . has_flamegraph ,
351353
352354 // High watermark data
353355 high_watermark_curr : hwRow ?. curr_metric_value || 0 ,
@@ -1177,7 +1179,7 @@ function DiffTableContent() {
11771179 { row . total_allocated_curr . toLocaleString ( ) }
11781180 </ TableCell >
11791181 < TableCell className = "text-center" >
1180- { row . curr_result_id ? (
1182+ { row . curr_result_id && row . has_flamegraph ? (
11811183 < Button
11821184 variant = "outline"
11831185 size = "sm"
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export type DiffTableRow = {
6767 prev_python_version_str ?: string ;
6868 curr_python_version_str : string ;
6969 curr_result_id : string ;
70+ has_flamegraph ?: boolean ;
7071} ;
7172
7273export type AuthToken = {
You can’t perform that action at this time.
0 commit comments