新增PDF生成并发设置
This commit is contained in:
@@ -23,6 +23,7 @@ ACTION_LABELS = {
|
||||
"export_certificates": "\u5bfc\u51fa\u8bc1\u4e66",
|
||||
"create_database_backup": "\u521b\u5efa\u6570\u636e\u5e93\u5907\u4efd",
|
||||
"restore_database_backup": "\u56de\u6eda\u6570\u636e\u5e93\u5907\u4efd",
|
||||
"update_pdf_settings": "\u4fee\u6539PDF\u751f\u6210\u8bbe\u7f6e",
|
||||
"public_search_certificate": "\u516c\u5f00\u67e5\u8be2\u8bc1\u4e66",
|
||||
"public_download_certificate": "\u516c\u5f00\u4e0b\u8f7d\u8bc1\u4e66",
|
||||
}
|
||||
@@ -33,6 +34,7 @@ OBJECT_LABELS = {
|
||||
"certificate": "\u8bc1\u4e66",
|
||||
"import_batch": "\u5bfc\u5165\u6279\u6b21",
|
||||
"database_backup": "\u6570\u636e\u5e93\u5907\u4efd",
|
||||
"system_setting": "\u7cfb\u7edf\u8bbe\u7f6e",
|
||||
"public_access": "\u516c\u5f00\u8bbf\u95ee",
|
||||
}
|
||||
HIGH_RISK_ACTIONS = {
|
||||
@@ -48,6 +50,7 @@ MEDIUM_RISK_ACTIONS = {
|
||||
"confirm_import_batch",
|
||||
"create_certificate",
|
||||
"create_database_backup",
|
||||
"update_pdf_settings",
|
||||
}
|
||||
|
||||
|
||||
@@ -116,6 +119,8 @@ def log_summary(action: str, object_type: str, object_id: object, detail: dict[s
|
||||
filename = detail.get("filename") or object_id
|
||||
size_label = detail.get("size_label")
|
||||
return f"{label}\uff1a{filename}" + (f"\uff08{size_label}\uff09" if size_label else "")
|
||||
if action == "update_pdf_settings":
|
||||
return f"{label}\uff1a\u5e76\u53d1\u6570 {detail.get('before')} -> {detail.get('after')}"
|
||||
if action == "public_search_certificate":
|
||||
mode = "\u8bc1\u4e66\u7f16\u53f7" if detail.get("mode") == "certificate_no" else "\u624b\u673a\u53f7"
|
||||
return f"{label}\uff1a{detail.get('name') or '-'} \u7528{mode}\u67e5\u8be2\uff0c\u5339\u914d {detail.get('matched_count', 0)} \u6761"
|
||||
|
||||
Reference in New Issue
Block a user