2021-04-26 09:56:06 +00:00
|
|
|
from django.utils.translation import ugettext as _
|
|
|
|
from .base import BaseHandler
|
|
|
|
|
|
|
|
|
|
|
|
class Handler(BaseHandler):
|
|
|
|
|
|
|
|
# body
|
|
|
|
def _construct_meta_body_of_open(self):
|
|
|
|
apply_run_user = self.ticket.meta.get('apply_run_user')
|
|
|
|
apply_run_asset = self.ticket.meta.get('apply_run_asset')
|
|
|
|
apply_run_system_user = self.ticket.meta.get('apply_run_system_user')
|
|
|
|
apply_run_command = self.ticket.meta.get('apply_run_command')
|
2021-04-26 10:52:25 +00:00
|
|
|
apply_from_session_id = self.ticket.meta.get('apply_from_session_id')
|
|
|
|
apply_from_cmd_filter_rule_id = self.ticket.meta.get('apply_from_cmd_filter_rule_id')
|
2021-04-27 09:48:07 +00:00
|
|
|
apply_from_cmd_filter_id = self.ticket.meta.get('apply_from_cmd_filter_id')
|
2021-04-26 09:56:06 +00:00
|
|
|
|
2021-10-21 12:03:05 +00:00
|
|
|
applied_body = '''
|
|
|
|
{}: {}
|
|
|
|
{}: {}
|
|
|
|
{}: {}
|
|
|
|
{}: {}
|
|
|
|
{}: {}
|
|
|
|
{}: {}
|
2021-04-26 09:56:06 +00:00
|
|
|
'''.format(
|
|
|
|
_("Applied run user"), apply_run_user,
|
|
|
|
_("Applied run asset"), apply_run_asset,
|
|
|
|
_("Applied run system user"), apply_run_system_user,
|
|
|
|
_("Applied run command"), apply_run_command,
|
2021-04-26 10:52:25 +00:00
|
|
|
_("Applied from session"), apply_from_session_id,
|
|
|
|
_("Applied from command filter rules"), apply_from_cmd_filter_rule_id,
|
2021-04-27 09:48:07 +00:00
|
|
|
_("Applied from command filter"), apply_from_cmd_filter_id,
|
2021-04-26 09:56:06 +00:00
|
|
|
)
|
|
|
|
return applied_body
|