Skip to content

Commit

Permalink
component tree
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanhuanO committed Oct 3, 2024
1 parent b815c27 commit 7e30bbe
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions daisen/componentinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,14 +544,26 @@ func httpComponentReqTree(w http.ResponseWriter, r *http.Request) {
sendJSONResponse(w, treeData)
}

func parseRequestParameters(r *http.Request) (compName, compID, compWhat string, startTime, endTime float64, err error) {
func parseRequestParameters(
r *http.Request,
) (compName, compID, compWhat string, startTime, endTime float64, err error) {
compName = r.FormValue("where")
compID = r.FormValue("id")
compWhat = r.FormValue("what")

startTime = strconv.ParseFloat(r.FormValue("start_time"))
startTimeStr := r.FormValue("start_time")
startTime, err = strconv.ParseFloat(startTimeStr, 64)
if err != nil {
err = errors.New("Invalid start_time: " + err.Error())

Check failure on line 557 in daisen/componentinfo.go

View workflow job for this annotation

GitHub Actions / Akita Compilation

undefined: errors
return
}

endTime = strconv.ParseFloat(r.FormValue("end_time"))
endTimeStr := r.FormValue("end_time")
endTime, err = strconv.ParseFloat(endTimeStr, 64)
if err != nil {
err = errors.New("Invalid end_time: " + err.Error())

Check failure on line 564 in daisen/componentinfo.go

View workflow job for this annotation

GitHub Actions / Akita Compilation

undefined: errors
return
}

return
}
Expand Down

0 comments on commit 7e30bbe

Please sign in to comment.