Skip to content

Commit

Permalink
fix(backend): spider问题修复 #1742
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Nov 13, 2023
1 parent f345370 commit ad8acbf
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
4 changes: 3 additions & 1 deletion dbm-ui/backend/db_services/mysql/open_area/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def openarea_result_preview(
"target_db": config_rule["target_db_pattern"].format(**data["vars"]),
"schema_tblist": config_rule["schema_tblist"],
"data_tblist": config_rule["data_tblist"],
"priv_data": config_rule["priv_data"],
"authorize_ips": data["authorize_ips"],
}
for config_rule in config.config_rules
]
Expand All @@ -57,7 +59,7 @@ def openarea_result_preview(
openarea_results.append(
{
"cluster_id": data["cluster_id"],
"target_cluster_name": cluster_id__cluster[data["cluster_id"]].name,
"target_cluster_domain": cluster_id__cluster[data["cluster_id"]].immute_domain,
"execute_objects": execute_objects,
}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.19 on 2023-11-13 01:54

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("open_area", "0001_initial"),
]

operations = [
migrations.AlterField(
model_name="tendbopenareaconfig",
name="bk_biz_id",
field=models.IntegerField(help_text="业务ID"),
),
]
2 changes: 1 addition & 1 deletion dbm-ui/backend/db_services/mysql/open_area/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class TendbOpenAreaConfig(AuditedModel):
"""开区模板表"""

bk_biz_id = models.IntegerField(default=0, help_text=_("业务ID"))
bk_biz_id = models.IntegerField(help_text=_("业务ID"))
config_name = models.CharField(max_length=256, help_text=_("开区模板名"))
source_cluster_id = models.BigIntegerField(help_text=_("源集群ID"))
config_rules = models.JSONField(help_text=_("模板克隆规则列表"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ListRetrieveResource(DBHAListRetrieveResource):

@classmethod
def _list_clusters(cls, bk_biz_id: int, query_params: Dict, limit: int, offset: int) -> query.ResourceList:
return super().list_clusters(bk_biz_id, query_params, limit, offset)
return super()._list_clusters(bk_biz_id, query_params, limit, offset)

@classmethod
def _list(
Expand Down
1 change: 0 additions & 1 deletion dbm-ui/backend/ticket/builders/mysql/mysql_openarea.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class AccountRulesSerializer(serializers.Serializer):
cluster_type = serializers.ChoiceField(help_text=_("集群类型"), choices=ClusterType.get_choices())

cluster_id = serializers.IntegerField(help_text=_("源集群ID"))
path = serializers.CharField(help_text=_("SQL文件路径"), required=False, default=BKREPO_SQLFILE_PATH)
force = serializers.BooleanField(help_text=_("是否强制执行"), required=False, default=False)
config_data = serializers.ListSerializer(help_text=_("分区信息"), child=ConfigDataSerializer())
rules_set = serializers.ListSerializer(help_text=_("授权信息"), child=PrivDataSerializer())
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/bk-dbm/charts/hadb-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: hadb-api
description: A Helm chart for Kubernetes
type: application
version: 0.0.11
appVersion: 0.0.1-alpha.16
appVersion: 0.0.1-alpha.11

0 comments on commit ad8acbf

Please sign in to comment.