refactor: 重构危险命令告警类型: Warning (#10970)

* refactor: 重构危险命令告警类型: Warning

* Update _msg_command_warning.html

* Update _msg_command_warning.html

* Update command.py

* Update django.po

* perf: 优化 command acl warning 的代码逻辑

* perf: 优化 command acl warning 的代码逻辑

* perf: 优化 CommandWarningMessage 逻辑

---------

Co-authored-by: fangfang.dong <fangfang.dong@fit2cloud.com>
Co-authored-by: Bai <baijiangjie@gmail.com>
This commit is contained in:
fit2bot
2023-07-17 20:52:54 +08:00
committed by GitHub
parent a2c6e5f3fb
commit 0771b804d1
8 changed files with 390 additions and 228 deletions

View File

@@ -44,7 +44,7 @@ class AbstractSessionCommand(OrgModelMixin):
@classmethod
def get_risk_level_str(cls, risk_level):
risk_mapper = dict(cls.RiskLevelChoices.choices)
risk_mapper = dict(RiskLevelChoices.choices)
return risk_mapper.get(risk_level)
def to_dict(self):