Skip to content

Commit

Permalink
fix(mongodb): mongo单据联调 TencentBlueKing#4233
Browse files Browse the repository at this point in the history
  • Loading branch information
WytheLi authored and zhangzhw8 committed Oct 28, 2024
1 parent 403b492 commit a491185
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dbm-ui/backend/flow/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ class MediumEnum(str, StructuredEnum):
TBinlogDumper = EnumField("tbinlogdumper", _("tbinlogdumper实例"))
Sqlserver = EnumField("sqlserver", _("sqlserver实例"))
MongoDB = EnumField("mongodb", _("mongodb"))
MongoToolKit = EnumField("mongo-toolkit", _("Mongo 工具集"))
MongoMonitor = EnumField("mongo-monitor", _("Mongo 监控"))
Doris = EnumField("doris", _("doris"))
Vm = EnumField("vm", _("vm"))

Expand Down
6 changes: 4 additions & 2 deletions dbm-ui/backend/ticket/builders/mongodb/mongo_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def build_controller_info(self) -> dict:
return super().build_controller_info()

def format_ticket_data(self):
pass
bk_biz_id = self.ticket_data["bk_biz_id"]
self.ticket_data["bk_app_abbr"] = AppCache.objects.get(bk_biz_id=bk_biz_id).db_app_abbr
self.ticket_data.update(self.ticket_data.pop("apply_details"))


class MongoDBRestoreFlowParamBuilder(builders.FlowParamBuilder):
Expand Down Expand Up @@ -193,7 +195,7 @@ def get_replicaset_apply_details(cls, ticket_id, ticket_data):
replica_count=len(ticket_data["cluster_ids"]),
# 每个副本集只有一个节点
node_count=1,
spec_id=ticket_data["resource_spec"]["mongodb"],
spec_id=ticket_data["resource_spec"]["mongodb"]["spec_id"],
)
return apply_details

Expand Down

0 comments on commit a491185

Please sign in to comment.