Skip to content

Commit

Permalink
Merge pull request #183 from yohamta/fix/web-ui-issue
Browse files Browse the repository at this point in the history
fix: admin api issue
  • Loading branch information
yottahmd authored Jun 23, 2022
2 parents d818829 + 919803d commit 12c1474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/admin/handlers/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ func HandleGetDAG(hc *DAGHandlerConfig) http.HandlerFunc {
}

params := getDAGParameter(r)
dag, err := controller.FromConfig(filepath.Join(hc.DAGsDir,
fmt.Sprintf("%s.yaml", cfg)))
file := filepath.Join(hc.DAGsDir, fmt.Sprintf("%s.yaml", cfg))
dag, err := controller.FromConfig(file)
if dag == nil {
encodeError(w, err)
return
Expand All @@ -112,7 +112,7 @@ func HandleGetDAG(hc *DAGHandlerConfig) http.HandlerFunc {
switch params.Tab {
case DAG_TabType_Status:
case DAG_TabType_Config:
data.Definition, _ = config.ReadConfig(path.Join(hc.DAGsDir, cfg))
data.Definition, _ = config.ReadConfig(file)

case DAG_TabType_History:
logs := controller.New(dag.Config).GetStatusHist(30)
Expand Down

0 comments on commit 12c1474

Please sign in to comment.