Skip to content

Commit

Permalink
Merge pull request #519 from 0RAJA/feat_rule_audit_strategy
Browse files Browse the repository at this point in the history
feat: 规则审计 - 事件实时生成风险 --story=120928201
  • Loading branch information
0RAJA authored Jan 9, 2025
2 parents 098858e + c396d00 commit e6a0dd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/backend/apps/permission/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
)
except (RuntimeError, ImportError):
StrategyResourceProvider = None
LinkTableProvider = None

try:
from services.web.risk.provider import RiskResourceProvider
Expand Down
5 changes: 1 addition & 4 deletions src/backend/services/web/analyze/controls/rule_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ def _build_sql_node_config(self, bk_biz_id: int) -> dict:
data_source = self.strategy.configs["data_source"]
schedule_config = self.strategy.configs.get("schedule_config", {})

# check source type
source_type = self.check_source_type(result_table_id=data_source["result_table_id"])

# init sql node
sql_node_type = FlowSQLNodeType.get_sql_node_type(data_source["source_type"])
sql_node_params = {
Expand Down Expand Up @@ -271,7 +268,7 @@ def _build_sql_node_config(self, bk_biz_id: int) -> dict:
"accumulate_start_time": datetime.datetime.now().strftime(api_settings.DATETIME_FORMAT),
"result_table_id": rt_id,
"window_type": WindowType.WHOLE
if source_type == FlowDataSourceNodeType.BATCH
if self.check_source_type(rt_id) == FlowDataSourceNodeType.BATCH
else WindowType.SCROLL,
"color": BKBASE_DEFAULT_WINDOW_COLOR,
}
Expand Down

0 comments on commit e6a0dd5

Please sign in to comment.