Skip to content

Commit

Permalink
Fix the issue that dm grafana doen't has home.json (#1056)
Browse files Browse the repository at this point in the history
Introduced by #982

Close #1055

Co-authored-by: Ti Prow Robot <[email protected]>
  • Loading branch information
lucklove and ti-chi-bot authored Jan 12, 2021
1 parent b9c6bae commit a246cfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/spec/grafana.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (i *GrafanaInstance) initDashboards(e executor.Executor, spec GrafanaSpec,

cmds := []string{
"mkdir -p %[1]s",
`find %[1]s -type f -name "*.json" -delete`,
`find %[1]s -maxdepth 1 -type f -name "*.json" -delete`,
"cp %[2]s/bin/*.json %[1]s",
}
_, stderr, err := e.Execute(fmt.Sprintf(strings.Join(cmds, " && "), dashboardsDir, paths.Deploy), false)
Expand Down Expand Up @@ -266,7 +266,7 @@ func (i *GrafanaInstance) installDashboards(e executor.Executor, deployDir, clus
targetDir := filepath.Join(deployDir, "bin")
cmds := []string{
"mkdir -p %[1]s",
`find %[1]s -type f -name "*.json" -delete`,
`find %[1]s -maxdepth 1 -type f -name "*.json" -delete`,
"cp %[2]s/dm-master/scripts/*.json %[1]s",
"rm -rf %[2]s",
}
Expand Down

0 comments on commit a246cfa

Please sign in to comment.