Skip to content

Commit

Permalink
Patch - tab refresh, flow order (#921)
Browse files Browse the repository at this point in the history
Co-authored-by: Aakaash Meduri <aakaash.meduri@gmail.com>
supraja-968 and acashmoney authored Mar 18, 2024

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
1 parent 8bae34e commit 9e04b24
Showing 2 changed files with 8 additions and 5 deletions.
12 changes: 7 additions & 5 deletions frontend/app/experiments/JobDetail.tsx
Original file line number Diff line number Diff line change
@@ -100,12 +100,14 @@ export default function JobDetail({ jobID }: JobDetailProps) {
}, [jobID, job.State]);

useEffect(() => {
if (tool?.ToolJson?.checkpointCompatible) {
setActiveTab("metrics");
} else {
setActiveTab("logs");
if (activeTab === "" && tool?.ToolJson){
if (tool?.ToolJson?.checkpointCompatible) {
setActiveTab("metrics");
} else {
setActiveTab("logs");
}
}
}, [tool]);
}, [tool, activeTab]);

return (
<Tabs value={activeTab} onValueChange={setActiveTab} className="w-full @container">
1 change: 1 addition & 0 deletions gateway/handlers/flows.go
Original file line number Diff line number Diff line change
@@ -315,6 +315,7 @@ func ListFlowsHandler(db *gorm.DB) http.HandlerFunc {
if walletAddress := r.URL.Query().Get("walletAddress"); walletAddress != "" {
query = query.Where("wallet_address = ?", walletAddress)
}
query = query.Order("start_time DESC")

var flows []models.Flow
if result := query.Preload("Jobs").Find(&flows); result.Error != nil {

0 comments on commit 9e04b24

Please sign in to comment.