From 1accc65042ee3634d6bdbab02d4c3fc1bbbf6511 Mon Sep 17 00:00:00 2001 From: iSecloud <869820505@qq.com> Date: Fri, 6 Dec 2024 16:07:48 +0800 Subject: [PATCH] =?UTF-8?q?refactor(backend):=20helm=E6=95=B4=E5=8C=85?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=20#8468?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbm-ui/backend/iam_app/dataclass/actions.py | 4 ++-- dbm-ui/backend/ticket/builders/mysql/mysql_dump_data.py | 5 ++++- dbm-ui/backend/ticket/constants.py | 2 +- helm-charts/bk-dbm/Chart.yaml | 4 ++-- helm-charts/bk-dbm/charts/db-resource/Chart.yaml | 2 +- helm-charts/bk-dbm/charts/dbconfig/Chart.yaml | 2 +- helm-charts/bk-dbm/charts/dbm/Chart.yaml | 2 +- helm-charts/bk-dbm/charts/hadb-api/Chart.yaml | 2 +- 8 files changed, 13 insertions(+), 10 deletions(-) diff --git a/dbm-ui/backend/iam_app/dataclass/actions.py b/dbm-ui/backend/iam_app/dataclass/actions.py index e09a71bd58..a635818962 100644 --- a/dbm-ui/backend/iam_app/dataclass/actions.py +++ b/dbm-ui/backend/iam_app/dataclass/actions.py @@ -398,7 +398,7 @@ class ActionEnum: MYSQL_ADD_ACCOUNT_RULE = ActionMeta( id="mysql_add_account_rule", - name=_("MySQL账号规则变更"), + name=_("MySQL授权规则变更"), name_en="mysql_add_account_rule", type="create", related_actions=[DB_MANAGE.id], @@ -705,7 +705,7 @@ class ActionEnum: TENDBCLUSTER_ADD_ACCOUNT_RULE = ActionMeta( id="tendbcluster_add_account_rule", - name=_("TenDB Cluster 账号规则变更"), + name=_("TenDB Cluster 授权规则变更"), name_en="tendbcluster_add_account_rule", type="create", related_actions=[DB_MANAGE.id], diff --git a/dbm-ui/backend/ticket/builders/mysql/mysql_dump_data.py b/dbm-ui/backend/ticket/builders/mysql/mysql_dump_data.py index f4b437b5ec..9b6f6efdc5 100644 --- a/dbm-ui/backend/ticket/builders/mysql/mysql_dump_data.py +++ b/dbm-ui/backend/ticket/builders/mysql/mysql_dump_data.py @@ -22,7 +22,7 @@ DBTableField, MySQLBaseOperateDetailSerializer, ) -from backend.ticket.constants import TicketType +from backend.ticket.constants import TicketFlowStatus, TicketType class MySQLDumpDataDetailSerializer(MySQLBaseOperateDetailSerializer): @@ -59,6 +59,9 @@ def format_ticket_data(self): def post_callback(self): flow = self.ticket.current_flow() + # 如果流程树运行不为成功,则忽略 + if flow.status != TicketFlowStatus.SUCCEEDED: + return # 往flow的detail中写入制品库的下载链接 dump_file_name = f"{flow.details['ticket_data']['dump_file_name']}.zip" flow.details["ticket_data"].update( diff --git a/dbm-ui/backend/ticket/constants.py b/dbm-ui/backend/ticket/constants.py index 90dcadc17a..a91836ae38 100644 --- a/dbm-ui/backend/ticket/constants.py +++ b/dbm-ui/backend/ticket/constants.py @@ -261,7 +261,7 @@ def get_cluster_type_by_ticket(cls, ticket_type): TENDBSINGLE_STANDARDIZE = TicketEnumField("TENDBSINGLE_STANDARDIZE", _("TenDB Single 集群标准化"), register_iam=False) # noqa TENDBCLUSTER_DATA_MIGRATE = TicketEnumField("TENDBCLUSTER_DATA_MIGRATE", _("TenDB Cluster DB克隆"), _("数据处理")) TENDBCLUSTER_DUMP_DATA = TicketEnumField("TENDBCLUSTER_DUMP_DATA", _("TenDB Cluster 数据导出"), _("数据处理")) - TENDBCLUSTER_ACCOUNT_RULE_CHANGE = TicketEnumField("TENDBCLUSTER_ACCOUNT_RULE_CHANGE", _("TenDB Cluster 账号规则变更"), register_iam=False) # noqa + TENDBCLUSTER_ACCOUNT_RULE_CHANGE = TicketEnumField("TENDBCLUSTER_ACCOUNT_RULE_CHANGE", _("TenDB Cluster 授权规则变更"), register_iam=False) # noqa # Tbinlogdumper TBINLOGDUMPER_INSTALL = TicketEnumField("TBINLOGDUMPER_INSTALL", _("TBINLOGDUMPER 上架"), register_iam=False) diff --git a/helm-charts/bk-dbm/Chart.yaml b/helm-charts/bk-dbm/Chart.yaml index fe75869158..8afbf96470 100644 --- a/helm-charts/bk-dbm/Chart.yaml +++ b/helm-charts/bk-dbm/Chart.yaml @@ -91,5 +91,5 @@ dependencies: description: A Helm chart for bk-dbm name: bk-dbm type: application -version: 1.5.0-alpha.28 -appVersion: 1.5.0-alpha.28 +version: 1.5.0-alpha.29 +appVersion: 1.5.0-alpha.29 diff --git a/helm-charts/bk-dbm/charts/db-resource/Chart.yaml b/helm-charts/bk-dbm/charts/db-resource/Chart.yaml index 4b6f8f329a..c6ef9bc07b 100644 --- a/helm-charts/bk-dbm/charts/db-resource/Chart.yaml +++ b/helm-charts/bk-dbm/charts/db-resource/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 0.0.1-alpha.107 +appVersion: 0.0.1-alpha.108 description: A Helm chart for Kubernetes name: db-resource type: application diff --git a/helm-charts/bk-dbm/charts/dbconfig/Chart.yaml b/helm-charts/bk-dbm/charts/dbconfig/Chart.yaml index fbdc1074e3..3fa19f9eda 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.129 +appVersion: 0.0.1-alpha.130 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 8a9e561b4d..3e7b0346ea 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.5.0-alpha.1300 +appVersion: 1.5.0-alpha.1377 description: A Helm chart for dbm name: dbm type: application diff --git a/helm-charts/bk-dbm/charts/hadb-api/Chart.yaml b/helm-charts/bk-dbm/charts/hadb-api/Chart.yaml index fd53918cfc..72cceb7a06 100644 --- a/helm-charts/bk-dbm/charts/hadb-api/Chart.yaml +++ b/helm-charts/bk-dbm/charts/hadb-api/Chart.yaml @@ -3,4 +3,4 @@ name: hadb-api description: A Helm chart for Kubernetes type: application version: 0.0.11 -appVersion: 0.0.1-alpha.31 +appVersion: 0.0.1-alpha.33