fix: 操作日志内容修改 (#1266)

This commit is contained in:
ssongliu 2023-06-06 11:33:21 +08:00 committed by GitHub
parent 4fdb81642a
commit 9fc4cad80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -159,7 +159,7 @@ func (b *BaseApi) SyncInstalled(c *gin.Context) {
// @Success 200
// @Security ApiKeyAuth
// @Router /apps/installed/op [post]
// @x-panel-log {"bodyKeys":["installId","operate"],"paramKeys":[],"BeforeFuntions":[{"input_column":"id","input_value":"installId","isList":false,"db":"app_installs","output_column":"app_id","output_value":"appId"},{"input_column":"id","input_value":"installId","isList":false,"db":"app_installs","output_column":"name","output_value":"appName"},{"input_column":"id","input_value":"appId","isList":false,"db":"apps","output_column":"key","output_value":"appKey"}],"formatZH":"[appKey] 应用 [appName] [operate]","formatEN":"[appKey] App [appName] [operate]"}
// @x-panel-log {"bodyKeys":["installId","operate"],"paramKeys":[],"BeforeFuntions":[{"input_column":"id","input_value":"installId","isList":false,"db":"app_installs","output_column":"app_id","output_value":"appId"},{"input_column":"id","input_value":"installId","isList":false,"db":"app_installs","output_column":"name","output_value":"appName"},{"input_column":"id","input_value":"appId","isList":false,"db":"apps","output_column":"key","output_value":"appKey"}],"formatZH":"[operate] 应用 [appKey][appName]","formatEN":"[operate] App [appKey][appName]"}
func (b *BaseApi) OperateInstalled(c *gin.Context) {
var req request.AppInstalledOperate
if err := c.ShouldBindJSON(&req); err != nil {

View File

@ -41,6 +41,7 @@ const message = {
import: 'Import',
search: 'Search',
refresh: 'Refresh',
get: 'Get',
},
search: {
timeStart: 'Time start',

View File

@ -41,6 +41,7 @@ const message = {
import: '导入',
search: '搜索',
refresh: '刷新',
get: '获取',
},
search: {
timeStart: '开始时间',
@ -753,7 +754,7 @@ const message = {
logs: {
panelLog: '面板日志',
operation: '操作日志',
login: '登录日志',
login: '访问日志',
loginIP: '登录 IP',
loginAddress: '登录地址',
loginAgent: '用户代理',

View File

@ -181,6 +181,12 @@ const loadDetail = (log: string) => {
if (log.indexOf('[dark]') !== -1) {
log = log.replace('[dark]', '[' + i18n.global.t('setting.dark') + ']');
}
if (log.indexOf('[delete]') !== -1) {
log = log.replace('[delete]', '[' + i18n.global.t('commons.button.delete') + ']');
}
if (log.indexOf('[get]') !== -1) {
log = log.replace('[get]', '[' + i18n.global.t('commons.button.get') + ']');
}
if (log.indexOf('[UserName]') !== -1) {
return log.replace('[UserName]', '[' + i18n.global.t('setting.user') + ']');
}