Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修改审计表额外信息字段长度 #1356

Merged
merged 4 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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