diff --git a/dbm-ui/backend/configuration/models/function_controller.py b/dbm-ui/backend/configuration/models/function_controller.py index e8a33d5590..08aec64628 100644 --- a/dbm-ui/backend/configuration/models/function_controller.py +++ b/dbm-ui/backend/configuration/models/function_controller.py @@ -34,8 +34,8 @@ class CustomFuncNameEnum(str, StructuredEnum): CustomFuncNameEnum.ToolBox.value: {"is_enabled": True}, ClusterType.TenDBSingle.value: {"is_enabled": True}, ClusterType.TenDBHA.value: {"is_enabled": True}, - ClusterType.TenDBCluster.value: {"is_enabled": False}, - CustomFuncNameEnum.TenDBClusterToolBox.value: {"is_enabled": False}, + ClusterType.TenDBCluster.value: {"is_enabled": True}, + CustomFuncNameEnum.TenDBClusterToolBox.value: {"is_enabled": True}, }, }, DBType.Redis.value: { @@ -44,7 +44,7 @@ class CustomFuncNameEnum(str, StructuredEnum): ClusterType.TendisPredixyTendisplusCluster.value: {"is_enabled": True}, ClusterType.TendisTwemproxyRedisInstance.value: {"is_enabled": True}, ClusterType.TwemproxyTendisSSDInstance.value: {"is_enabled": True}, - CustomFuncNameEnum.ToolBox.value: {"is_enabled": False}, + CustomFuncNameEnum.ToolBox.value: {"is_enabled": True}, }, }, CustomFuncNameEnum.BigData.value: { @@ -64,11 +64,11 @@ class CustomFuncNameEnum(str, StructuredEnum): }, }, CustomFuncNameEnum.Monitor.value: { - "is_enabled": False, + "is_enabled": True, "children": { - "monitor_policy": {"is_enabled": False}, + "monitor_policy": {"is_enabled": True}, "duty_rule": {"is_enabled": False}, - "notice_group": {"is_enabled": False}, + "notice_group": {"is_enabled": True}, }, }, } diff --git a/dbm-ui/backend/ticket/builders/riak/riak_shrink.py b/dbm-ui/backend/ticket/builders/riak/riak_shrink.py index 6cd1b95f95..0492dddcfe 100644 --- a/dbm-ui/backend/ticket/builders/riak/riak_shrink.py +++ b/dbm-ui/backend/ticket/builders/riak/riak_shrink.py @@ -38,7 +38,7 @@ def format_ticket_data(self): self.ticket_data["bk_cloud_id"] = cluster.bk_cloud_id -@builders.BuilderFactory.register(TicketType.RIAK_CLUSTER_DISABLE, phase=ClusterPhase.OFFLINE) +@builders.BuilderFactory.register(TicketType.RIAK_CLUSTER_SCALE_IN, phase=ClusterPhase.OFFLINE) class RiakShrinkFlowBuilder(BaseRiakTicketFlowBuilder): serializer = RiakShrinkDetailSerializer inner_flow_builder = RiakShrinkFlowParamBuilder diff --git a/dbm-ui/blueking/component/client.py b/dbm-ui/blueking/component/client.py index 449320b368..21aec49a31 100644 --- a/dbm-ui/blueking/component/client.py +++ b/dbm-ui/blueking/component/client.py @@ -28,7 +28,6 @@ except Exception: # pylint: disable=broad-except pass - logger = logging.getLogger("component") @@ -89,9 +88,7 @@ def get_bk_api_ver(self): def merge_params_data_with_common_args(self, method, params, data, enable_app_secret=False): """get common args when request""" - common_args = dict(bk_app_code=self.app_code, **self.common_args) - if enable_app_secret: - common_args["bk_app_secret"] = self.app_secret + common_args = dict(**self.common_args) if method == "GET": _params = common_args.copy() _params.update(params or {}) @@ -110,8 +107,19 @@ def request(self, method, url, params=None, data=None, **kwargs): headers["x-use-test-env"] = "1" if self.language: headers["blueking-language"] = self.language - - params, data = self.merge_params_data_with_common_args(method, params, data, enable_app_secret=True) + headers.update({ + "X-Bkapi-Authorization": json.dumps( + { + "bk_app_code": self.app_code, + "bk_app_secret": self.app_secret, + "bk_username": params.get("bk_username", ""), + "bk_token": params.get("bk_token", ""), + "bk_ticket": params.get("bk_ticket", ""), + } + ) + }) + + params, data = self.merge_params_data_with_common_args(method, params, data) logger.debug("Calling %s %s with params=%s, data=%s, headers=%s", method, url, params, data, headers) return requests.request(method, url, params=params, data=data, verify=False, headers=headers, **kwargs) @@ -137,7 +145,7 @@ def request(self, method, url, params=None, data=None, **kwargs): if self.language: headers["blueking-language"] = self.language - params, data = self.merge_params_data_with_common_args(method, params, data, enable_app_secret=False) + params, data = self.merge_params_data_with_common_args(method, params, data) if method == "POST": params = {} diff --git a/dbm-ui/config/default.py b/dbm-ui/config/default.py index c364fe19fb..7582a2facd 100644 --- a/dbm-ui/config/default.py +++ b/dbm-ui/config/default.py @@ -230,7 +230,10 @@ "formatter": "bk_audit.contrib.django.formatters.DjangoFormatter", } -# APIGW配置 +# BAMBOO PIPELINE 配置 +AUTO_UPDATE_COMPONENT_MODELS = False + +# APIGW 蓝鲸网关配置 BK_APIGW_STATIC_VERSION = env.BK_APIGW_STATIC_VERSION BK_APIGW_MANAGER_MAINTAINERS = env.BK_APIGW_MANAGER_MAINTAINERS BK_APIGW_STAGE_NAME = env.BK_APIGW_STAGE_NAME diff --git a/helm-charts/bk-dbm/Chart.yaml b/helm-charts/bk-dbm/Chart.yaml index 12aaf2de83..1625792511 100644 --- a/helm-charts/bk-dbm/Chart.yaml +++ b/helm-charts/bk-dbm/Chart.yaml @@ -79,5 +79,5 @@ dependencies: description: A Helm chart for bkdbm name: bk-dbm type: application -version: 1.2.0-alpha.79 -appVersion: 1.2.0-alpha.79 +version: 1.2.0-alpha.80 +appVersion: 1.2.0-alpha.80 diff --git a/helm-charts/bk-dbm/charts/dbconfig/Chart.yaml b/helm-charts/bk-dbm/charts/dbconfig/Chart.yaml index 49930418de..194d0a5746 100644 --- a/helm-charts/bk-dbm/charts/dbconfig/Chart.yaml +++ b/helm-charts/bk-dbm/charts/dbconfig/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 0.0.1-alpha.51 +appVersion: 0.0.1-alpha.52 description: A Helm chart for dbconfig name: dbconfig type: application diff --git a/helm-charts/bk-dbm/charts/dbm/Chart.yaml b/helm-charts/bk-dbm/charts/dbm/Chart.yaml index d84f52cc41..33033f7661 100644 --- a/helm-charts/bk-dbm/charts/dbm/Chart.yaml +++ b/helm-charts/bk-dbm/charts/dbm/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.2.0-alpha.450 +appVersion: 1.2.0-alpha.451 description: A Helm chart for dbm name: dbm type: application