Skip to content

Commit

Permalink
修改审计表额外信息字段长度 (#1356)
Browse files Browse the repository at this point in the history
* 修改审计表额外信息字段长度

* bootstrap-table降到1.18.3,并修复显示长度问题
  • Loading branch information
weideguo authored Jan 25, 2022
1 parent fb84fd1 commit 3418432
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions common/static/bootstrap-table/js/bootstrap-table-zh-CN.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions common/static/bootstrap-table/js/bootstrap-table.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions common/static/bootstrap-table/js/bootstrap-table.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sql/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ class AuditEntry(models.Model):
user_name = models.CharField('用户名称', max_length=30, null=True)
user_display = models.CharField('用户中文名',max_length=50, null=True)
action = models.CharField('动作', max_length=255)
extra_info = models.CharField('额外的信息', max_length=255, null=True)
extra_info = models.TextField('额外的信息', null=True)
action_time = models.DateTimeField('操作时间', auto_now_add=True)

class Meta:
Expand Down
3 changes: 2 additions & 1 deletion sql/templates/instanceaccount.html
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,8 @@ <h4 class="modal-title">删除账号
}
return priv
},
width: "60%"
width: "60",
widthUnit:"%",
}, {
title: '备注',
field: 'remark'
Expand Down
2 changes: 1 addition & 1 deletion src/init_sql/v1.8.3.sql
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ INSERT INTO auth_permission (name, content_type_id, codename) VALUES ('菜单 My
ALTER TABLE `ssh_tunnel` ADD COLUMN pkey longtext NULL AFTER password;

-- 审计功能增强
alter table audit_log change `ip` `extra_info` varchar(255) DEFAULT NULL COMMENT '额外的信息';
alter table audit_log change `ip` `extra_info` longtext DEFAULT NULL COMMENT '额外的信息';
alter table audit_log add `user_display` varchar(50) DEFAULT NULL COMMENT '用户中文名';

set @content_type_id=(select id from django_content_type where app_label='sql' and model='permission');
Expand Down

0 comments on commit 3418432

Please sign in to comment.