-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend): dumper相关协议和视图接口调整 #2180
- Loading branch information
Showing
33 changed files
with
687 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
dbm-ui/backend/db_meta/migrations/0027_delete_dumpersubscribeconfig.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Generated by Django 3.2.19 on 2023-11-28 02:54 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("db_meta", "0026_extraprocessinstance_db_meta_ext_cluster_2cbc7c_idx"), | ||
] | ||
|
||
operations = [] |
13 changes: 13 additions & 0 deletions
13
dbm-ui/backend/db_meta/migrations/0028_merge_20231207_1619.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated by Django 3.2.19 on 2023-12-07 08:19 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("db_meta", "0027_delete_dumpersubscribeconfig"), | ||
("db_meta", "0027_extraprocessinstance_phase"), | ||
] | ||
|
||
operations = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. | ||
Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. | ||
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at https://opensource.org/licenses/MIT | ||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on | ||
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations under the License. | ||
""" | ||
from django.contrib import admin | ||
|
||
from . import models | ||
|
||
|
||
@admin.register(models.DumperSubscribeConfig) | ||
class DumperSubscribeConfigAdmin(admin.ModelAdmin): | ||
list_display = ("bk_biz_id", "name", "add_type") | ||
list_filter = ("bk_biz_id", "name", "add_type") | ||
search_fields = ("bk_biz_id", "name", "add_type") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
dbm-ui/backend/db_services/mysql/dumper/migrations/0001_initial.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Generated by Django 3.2.19 on 2023-11-28 09:19 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="DumperSubscribeConfig", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
("creator", models.CharField(max_length=64, verbose_name="创建人")), | ||
("create_at", models.DateTimeField(auto_now_add=True, verbose_name="创建时间")), | ||
("updater", models.CharField(max_length=64, verbose_name="修改人")), | ||
("update_at", models.DateTimeField(auto_now=True, verbose_name="更新时间")), | ||
("bk_biz_id", models.IntegerField(help_text="关联的业务id,对应cmdb")), | ||
("name", models.CharField(help_text="订阅配置名", max_length=128)), | ||
( | ||
"add_type", | ||
models.CharField( | ||
choices=[("full_sync", "全量同步"), ("incr_sync", "增量同步")], help_text="数据同步方式", max_length=32 | ||
), | ||
), | ||
( | ||
"repl_tables", | ||
models.JSONField(help_text="订阅库表信息 eg: [{'db_name': 'xx', 'table_names': [....]}, ...]"), | ||
), | ||
("dumper_process_ids", models.JSONField(help_text="订阅配置关联的订阅实例列表")), | ||
], | ||
options={ | ||
"verbose_name": "dumper数据订阅配置", | ||
"verbose_name_plural": "dumper数据订阅配置", | ||
"unique_together": {("bk_biz_id", "name")}, | ||
}, | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
...b_services/mysql/dumper/migrations/0002_alter_dumpersubscribeconfig_dumper_process_ids.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.19 on 2023-12-01 07:01 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("dumper", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="dumpersubscribeconfig", | ||
name="dumper_process_ids", | ||
field=models.JSONField(blank=True, default=list, help_text="订阅配置关联的订阅实例列表", null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.