Skip to content

Commit

Permalink
+ 新增允许 set bit enum 数据类型审核选项 check.go 566
Browse files Browse the repository at this point in the history
+ 新增允许创建视图审核选项
+ 优化autotask展示页,编辑后不再跳转第一页
+ 新增允许创建分区表审核选项
+ juno相关优化
+ 修复无开启查询审核时消息推送异常发送的问题
+ 新增查询超时设置按钮
  • Loading branch information
cookieY committed Jan 2, 2020
1 parent 1700043 commit ad4e3a1
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 7 deletions.
Binary file modified juno
Binary file not shown.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var (
)

func usage() {
_, err := fmt.Fprintf(os.Stderr, `version: Yearning/2.1.7 author: HenryYee
_, err := fmt.Fprintf(os.Stderr, `version: Yearning/2.1.8 author: HenryYee
Usage: Yearning [-m migrate] [-p port] [-s start] [-b web-bind] [-h help] [-c config file]
Options:
Expand Down
2 changes: 1 addition & 1 deletion src/handle/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func ReferQueryOrder(c echo.Context) (err error) {
ExDate: time.Now().Format("2006-01-02 15:04"),
})

lib.MessagePush(c, work, 6, "")
lib.MessagePush(c, work, 7, "")

return c.JSON(http.StatusOK, "查询工单已提交!")
}
Expand Down
2 changes: 1 addition & 1 deletion src/handle/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func SuperSaveRoles(c echo.Context) (err error) {
}

ser.FetchAuditRole = u.Juno
audit, err := json.Marshal(u.Juno)
audit, _ := json.Marshal(u.Juno)
model.DB().Model(model.CoreGlobalConfiguration{}).Where("authorization =?", "global").Updates(&model.CoreGlobalConfiguration{AuditRole: audit})

return c.JSON(http.StatusOK, "配置信息已保存!")
Expand Down
2 changes: 1 addition & 1 deletion src/lib/toolbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func QueryMethod(source *model.CoreDataSource, req *model.Queryresults, wordList

ps := Decrypt(source.Password)

db, err := sqlx.Connect("mysql", fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8", source.Username, ps, source.IP, source.Port, req.Basename))
db, err := sqlx.Connect("mysql", fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?charset=utf8&readTimeout=%ds", source.Username, ps, source.IP, source.Port, req.Basename,model.GloOther.QueryTimeout))
if err != nil {
return qd, err
}
Expand Down
1 change: 1 addition & 0 deletions src/model/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type Other struct {
Export bool `json:"export"`
PerOrder int `json:"per_order"`
ExQueryTime int `json:"ex_query_time"`
QueryTimeout int `json:"query_timeout"`
}

type Message struct {
Expand Down
3 changes: 3 additions & 0 deletions src/parser/modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ type AuditRole struct {
OscPrintSql bool
OscChunkTime float32
OscSize uint
AllowCreatePartition bool
AllowCreateView bool
AllowSpecialType bool
}

type IndexInfo struct {
Expand Down
3 changes: 3 additions & 0 deletions src/service/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ func Migrate() {
OscCriticalThreadRunning: 20,
OscRecursionMethod: "processlist",
OscCheckInterval: 1,
AllowCreatePartition: false,
AllowCreateView: false,
AllowSpecialType: false,
}

other := model.Other{
Expand Down
6 changes: 3 additions & 3 deletions src/service/yearning.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ func StartYearning(port string, host string) {
json.Unmarshal(model.GloPer.AuditRole, &parser.FetchAuditRole)
e := echo.New()
e.Static("/", "dist")
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
AllowOrigins: []string{"*"},
}))
//e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
// AllowOrigins: []string{"*"},
//}))
e.Use(middleware.Secure())
e.Use(middleware.Recover())
e.Use(middleware.GzipWithConfig(middleware.GzipConfig{
Expand Down

0 comments on commit ad4e3a1

Please sign in to comment.