初步实现安装界面

This commit is contained in:
GoEdgeLab
2020-10-13 20:05:29 +08:00
parent fe432e9a8f
commit 2c9fffa4db
37 changed files with 1207 additions and 56 deletions

View File

@@ -50,11 +50,12 @@ func (this *UpdateAction) RunGet(params struct{}) {
return
}
dbConfig, ok := config.DBs[config.Default.DB]
if !ok {
this.Show()
return
var dbConfig *dbs.DBConfig
for _, db := range config.DBs {
dbConfig = db
break
}
dsn := dbConfig.Dsn
dsn = regexp.MustCompile(`tcp\((.+)\)`).ReplaceAllString(dsn, "$1")
dsnURL, err := url.Parse("mysql://" + dsn)