Skip to content

Commit

Permalink
优化了输出结果,使用layer对日志信息进行汇总,应对title长度不够的问题 (#93)
Browse files Browse the repository at this point in the history
* fix: 优化日志效果

* fix: 增加弹窗说明,而不是title说明,方便直接查看整个输出内容 - 增加layer依赖项 & 优化输出格式
  • Loading branch information
langren1353 committed Dec 7, 2023
1 parent 4baef0b commit f8ba433
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func backup(backupConf entity.BackupConfig, encryptKey string, s3Conf entity.S3C
if util.IsGBK(outputBytes) {
outputBytes, _ = util.GbkToUtf8(outputBytes)
}
log.Printf("<span style='color: #7983f5;font-weight: bold;'>%s</span> 执行shell的输出: <span title=\"%s\" style='cursor: pointer; color: #4a3a3a; font-weight: bold'>鼠标[停留]此处查看</span>\n", backupConf.ProjectName, util.EscapeShell(string(outputBytes)))
log.Printf("<span style='color: #7983f5;font-weight: bold;'>%s</span> 执行shell的输出: <span class='click-layer' onclick='showLayer(this)' tip=\"%s\" style='cursor: pointer; color: #4a3a3a; font-weight: bold; border: 2px dashed;'>点击此处查看</span>\n", backupConf.ProjectName, util.EscapeShell(string(outputBytes)))
} else {
log.Printf("执行shell的输出为空\n")
}
Expand Down
2 changes: 2 additions & 0 deletions static/layer/layer.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions static/layer/mobile/layer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions static/layer/mobile/need/layer.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added static/layer/theme/default/icon-ext.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/layer/theme/default/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f8ba433

Please sign in to comment.