From a5e8332c7c1bb41a1bf037b3240548b592cbd511 Mon Sep 17 00:00:00 2001 From: gqp <446105468@qq.com> Date: Fri, 23 Aug 2024 10:08:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B8=85=E9=99=A4=E9=80=9A=E8=BF=87Glob?= =?UTF-8?q?alSettings=E9=85=8D=E7=BD=AE=E9=92=A9=E5=AD=90=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=86=85=E5=AE=B9=20(closed=20#2412)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/backend/agent/solution_maker.py | 11 ----------- apps/node_man/models.py | 2 -- 2 files changed, 13 deletions(-) diff --git a/apps/backend/agent/solution_maker.py b/apps/backend/agent/solution_maker.py index ecaf2725a..ef7d6d3eb 100644 --- a/apps/backend/agent/solution_maker.py +++ b/apps/backend/agent/solution_maker.py @@ -29,7 +29,6 @@ from apps.core.script_manage.base import ScriptHook from apps.core.script_manage.data import JUMP_SERVER_POLICY_SCRIPT_INFO from apps.node_man import constants, models -from apps.node_man.models import GlobalSettings from apps.utils import basic from apps.utils.files import PathHandler @@ -478,17 +477,7 @@ def build_oneline_script_hook_steps(self) -> typing.List[ExecutionSolutionStep]: 构造可直接执行的脚本钩子步骤 :return: """ - script_hook_obj_name__script_content_map: typing.Dict[str, str] = GlobalSettings.get_config( - models.GlobalSettings.KeyEnum.AGENT_INSTALL_SCRIPT_HOOK_CONTENT.value, {} - ) script_hook_steps: typing.List[ExecutionSolutionStep] = [] - - # 如果全局配置中配置了钩子脚本内容,优先使用 - for script_hook_obj in self.script_hook_objs: - script_hook_obj.script_info_obj.oneline = script_hook_obj_name__script_content_map.get( - script_hook_obj.script_info_obj.name, script_hook_obj.script_info_obj.oneline - ) - oneline_script_hook_objs: typing.List[ScriptHook] = [ script_hook_obj for script_hook_obj in self.script_hook_objs if script_hook_obj.script_info_obj.oneline ] diff --git a/apps/node_man/models.py b/apps/node_man/models.py index b9bb6f565..91bf53f0e 100644 --- a/apps/node_man/models.py +++ b/apps/node_man/models.py @@ -164,8 +164,6 @@ class KeyEnum(Enum): IP_CHOOSER_ENABLE_SHOW_REALTIME_AGENT_STATE = "IP_CHOOSER_ENABLE_SHOW_REALTIME_AGENT_STATE" # IP选择器详情接口实时展示agent状态业务白名单 IP_CHOOSER_BIZ_WHITELIST = "IP_CHOOSER_BIZ_WHITELIST" - # 安装agent脚本钩子执行内容 - AGENT_INSTALL_SCRIPT_HOOK_CONTENT = "AGENT_INSTALL_SCRIPT_HOOK_CONTENT" key = models.CharField(_("键"), max_length=255, db_index=True, primary_key=True) v_json = JSONField(_("值"))