diff --git a/dbm-ui/backend/flow/consts.py b/dbm-ui/backend/flow/consts.py index 77ad081f45..74c635a725 100644 --- a/dbm-ui/backend/flow/consts.py +++ b/dbm-ui/backend/flow/consts.py @@ -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")) diff --git a/dbm-ui/backend/ticket/builders/mongodb/mongo_restore.py b/dbm-ui/backend/ticket/builders/mongodb/mongo_restore.py index 19c504e8fe..4b9a3f1975 100644 --- a/dbm-ui/backend/ticket/builders/mongodb/mongo_restore.py +++ b/dbm-ui/backend/ticket/builders/mongodb/mongo_restore.py @@ -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): @@ -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