Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(backend): 同步v1.3.0代码 #4351 #4352

Merged
merged 30 commits into from
May 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2860e3f
fix(frontend): 克隆策略交互优化 #4257
jinquantianxia May 6, 2024
9d60626
feat(frontend): redis工具箱新增版本升级 #4188
jinquantianxia Apr 25, 2024
257bb11
feat(frontend): redis版本升级新增单据详情 #4201
jinquantianxia Apr 26, 2024
464f463
feat(backend): redis支持版本升级 #4203
iSecloud Apr 24, 2024
77d18cd
fix(frontend): mysql添加从库单据协议修正及详情页修复 #4269
jinquantianxia May 7, 2024
eb8f9cc
fix(frontend): 默认城市开放容灾选择 #4272
jinquantianxia May 7, 2024
f3a4ed4
fix(backend): 集群ORM查询错误的问题 #4300
zhangzhw8 May 8, 2024
f200e1e
fix(mysql): 修复 mysql 备份巡检 #4305
seanlook May 8, 2024
84ff2b1
fix(dbm-services): query resource operation orderby #4267
ymakedaq May 7, 2024
836e15b
fix(backend): 限制myslq的query clusters接口查询集群的类型 #4313
iSecloud May 9, 2024
3a93234
fix(backend): 限制myslq的query clusters的业务过滤 #4313
iSecloud May 9, 2024
26aeb1b
fix(backend): 支持单节点的清档和重命名 #4317
iSecloud May 9, 2024
fd8a47c
fix(frontend): mysql批量编辑交互调整 #4319
jinquantianxia May 9, 2024
7d11efd
fix(frontend): mysql 新建账号缺少 account_type 字段 #4277
hLinx May 7, 2024
56ef554
fix(frontend): mysql工具箱安全模式提单取值修复 #4282
jinquantianxia May 8, 2024
2563887
feat(backend): 权限规则创建新增前置校验 #4288
iSecloud May 7, 2024
89560f6
feat(backend): 提供制品库临时凭证 #4293
iSecloud May 7, 2024
9a2093e
feat(frontend): mysql清档和重命名支持单节点 #4325
jinquantianxia May 10, 2024
766c122
fix(frontend): 修复全局搜索输入框粘贴重复、redis集群跳转、高亮问题 #4309
3octaves May 10, 2024
e7ab7de
fix(backend): 调整单据文案 #4334
iSecloud May 10, 2024
5c1f580
fix: 删除临时账号之前,临时关闭binlog记录 #4330
yksitu May 10, 2024
6c066ba
feat(frontend): 新建分区支持前置校验 #4336
jinquantianxia May 10, 2024
7349ca1
fix: 修复slave重建主从重建旧机器未下发dbactor问题 #4302
zfrendo May 8, 2024
9ff7013
fix(redis): RedisCluster踢掉旧节点 #4245
xiepaup May 6, 2024
9792d32
feat(backend): 独立 backend api 的 service 和 ingress #4291
zhangzhw8 May 8, 2024
0f90a71
feat: 新增mysql数据迁移,同时fix分区部分功能 #4243
xfan0805 May 9, 2024
d765c0b
feat(backend): 修改 DNS 同时修改存储实例绑定入口 #4252
zhangzhw8 May 6, 2024
eaf2cac
feat(backend): 慢查询解析 #4297
zhangzhw8 May 8, 2024
332d369
refactor(backend): 更新helm版本 #4340
iSecloud May 10, 2024
460a72e
refactor(backend): 同步v1.3.0代码 #4351
iSecloud May 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ package manage
import (
"encoding/json"
"fmt"
"strings"
"time"

"dbm-services/common/db-resource/internal/model"
Expand All @@ -22,6 +21,7 @@ import (
"dbm-services/common/go-pubpkg/logger"

"github.com/gin-gonic/gin"
"github.com/samber/lo"
"gorm.io/gorm"
)

Expand Down Expand Up @@ -95,11 +95,10 @@ func (p GetOperationInfoParam) query(db *gorm.DB) {
if cmutil.IsNotEmpty(p.BeginTime) {
db.Where("create_time >= ? ", p.BeginTime)
}
switch strings.ToLower(strings.TrimSpace(p.Orderby)) {
case "asc":
db.Order("create_time asc")
default:
if lo.IsEmpty(p.Orderby) {
db.Order("create_time desc")
} else {
db.Order(p.Orderby)
}
}

Expand Down
93 changes: 81 additions & 12 deletions dbm-services/mysql/db-tools/dbactuator/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,12 @@
"description": "repl user, 环境变量 GENERAL_ACCOUNT_repl_user",
"type": "string"
},
"tbinlogdumper_admin_pwd": {
"type": "string"
},
"tbinlogdumper_admin_user": {
"type": "string"
},
"tdbctl_pwd": {
"type": "string"
},
Expand Down Expand Up @@ -1607,6 +1613,9 @@
"json",
"dump"
]
},
"time_layout": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -1966,6 +1975,9 @@
"general": {
"$ref": "#/definitions/dbm-services_mysql_db-tools_dbactuator_pkg_components.GeneralParam"
},
"mySQLConfigParams": {
"$ref": "#/definitions/dbm-services_mysql_db-tools_dbactuator_pkg_components_mysql.MySQLConfigParams"
},
"timeZone": {
"type": "string"
}
Expand All @@ -1976,7 +1988,6 @@
"required": [
"charset",
"host",
"mycnf_configs",
"mysql_version",
"pkg",
"pkg_md5",
Expand All @@ -2003,7 +2014,7 @@
"description": "安装实例的内存大小,可以不指定,会自动计算",
"type": "integer"
},
"mycnf_configs": {
"myCnfConfigs": {
"description": "map[port]my.cnf",
"type": "array",
"items": {
Expand Down Expand Up @@ -2180,6 +2191,9 @@
"dbm-services_mysql_db-tools_dbactuator_pkg_components_mysql.LocalBackupObj": {
"type": "object",
"properties": {
"backup_consistent_time": {
"type": "string"
},
"backup_dir": {
"description": "备份所在目录",
"type": "string"
Expand Down Expand Up @@ -2229,6 +2243,20 @@
}
}
},
"dbm-services_mysql_db-tools_dbactuator_pkg_components_mysql.MySQLConfigParams": {
"type": "object",
"required": [
"mycnf_configs"
],
"properties": {
"mycnf_configs": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"dbm-services_mysql_db-tools_dbactuator_pkg_components_mysql.MycnfChangeComp": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2701,7 +2729,7 @@
"type": "boolean"
},
"idempotent_mode": {
"description": "是否开启幂等模式, mysql --slave-exec-mode=idempotent or mysqlbinlog --idempotent",
"description": "是否开启幂等模式, mysqlbinlog --idempotent(\u003e=5.7)",
"type": "boolean"
},
"mysql_client_opt": {
Expand Down Expand Up @@ -2730,15 +2758,15 @@
"type": "integer"
},
"start_time": {
"description": "--start-datetime",
"description": "--start-datetime 时间格式\n格式 \"2006-01-02 15:04:05\" 原样传递给 mysqlbinlog\n格式\"2006-01-02T15:04:05Z07:00\"(示例\"2023-12-11T05:03:05+08:00\")按照机器本地时间,解析成 \"2006-01-02 15:04:05\" 再传递给 mysqlbinlog\n在 Init 时会统一把时间字符串转换成 time.RFC3399",
"type": "string"
},
"stop_pos": {
"description": "--stop-position",
"type": "integer"
},
"stop_time": {
"description": "--stop-datetime",
"description": "--stop-datetime 时间格式同 StartTime,可带时区,会转换成机器本地时间",
"type": "string"
},
"tables": {
Expand Down Expand Up @@ -2792,7 +2820,7 @@
}
},
"binlog_start_file": {
"description": "指定要开始应用的第 1 个 binlog。如果指定,一般要设置 start_pos,如果不指定则使用 start_time",
"description": "指定要开始应用的第 1 个 binlog。如果指定,一般要设置 start_pos,如果不指定则使用 start_time\nBinlogStartFile 只能由外部传入,不要内部修改",
"type": "string"
},
"parse_concurrency": {
Expand Down Expand Up @@ -3028,7 +3056,7 @@
"type": "string"
},
"target_time": {
"description": "闪回的目标时间点,对应 recover-binlog 的 start_time, 精确到秒。目标实例的时区",
"description": "闪回的目标时间点,对应 recover-binlog 的 start_time, 精确到秒。目标实例的时区\n可接受格式 ''",
"type": "string"
},
"tgt_instance": {
Expand Down Expand Up @@ -3100,10 +3128,6 @@
},
"dbm-services_mysql_db-tools_dbactuator_pkg_components_spiderctl.CheckObject": {
"type": "object",
"required": [
"dbname",
"tables"
],
"properties": {
"dbname": {
"type": "string"
Expand Down Expand Up @@ -3154,6 +3178,12 @@
"$ref": "#/definitions/dbm-services_mysql_db-tools_dbactuator_pkg_components_spiderctl.InstanceTuple"
}
},
"not_flush_all": {
"type": "boolean"
},
"only_init_ctl": {
"type": "boolean"
},
"port": {
"type": "integer",
"minimum": 3306
Expand All @@ -3164,6 +3194,12 @@
"$ref": "#/definitions/dbm-services_mysql_db-tools_dbactuator_pkg_components_spiderctl.Instance"
}
},
"spider_slave_instances": {
"type": "array",
"items": {
"$ref": "#/definitions/dbm-services_mysql_db-tools_dbactuator_pkg_components_spiderctl.Instance"
}
},
"tdbctl_pass": {
"type": "string"
},
Expand Down Expand Up @@ -3228,11 +3264,14 @@
"dbm-services_mysql_db-tools_dbactuator_pkg_components_spiderctl.TableSchemaCheckParam": {
"type": "object",
"required": [
"check_objects",
"host",
"port"
],
"properties": {
"check_all": {
"description": "检查所有非系统库表",
"type": "boolean"
},
"check_objects": {
"type": "array",
"items": {
Expand All @@ -3242,6 +3281,9 @@
"host": {
"type": "string"
},
"inconsistency_throws_err": {
"type": "boolean"
},
"port": {
"type": "integer",
"minimum": 3306
Expand Down Expand Up @@ -3353,6 +3395,30 @@
},
"dumper_id": {
"type": "string"
},
"kafka_pwd": {
"type": "string"
},
"kafka_user": {
"type": "string"
},
"l5_cmdid": {
"type": "integer"
},
"l5_modid": {
"type": "integer"
},
"protocol_type": {
"type": "string"
},
"server_id": {
"type": "integer"
},
"target_address": {
"type": "string"
},
"target_port": {
"type": "integer"
}
}
},
Expand All @@ -3371,6 +3437,9 @@
"general": {
"$ref": "#/definitions/dbm-services_mysql_db-tools_dbactuator_pkg_components.GeneralParam"
},
"mySQLConfigParams": {
"$ref": "#/definitions/dbm-services_mysql_db-tools_dbactuator_pkg_components_mysql.MySQLConfigParams"
},
"renderConfigs": {
"type": "object",
"additionalProperties": {
Expand Down
Loading
Loading