Skip to content

Commit 1517070

Browse files
committed
feat:Data Object Usage and Overview of Data Object Usage
1 parent 0f21f13 commit 1517070

File tree

5 files changed

+367
-10
lines changed

5 files changed

+367
-10
lines changed

api/dms/service/v1/statistic.go

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
package v1
2+
3+
import base "github.com/actiontech/dms/pkg/dms-common/api/base/v1"
4+
5+
// swagger:parameters GetCBInstanceStatistic
6+
type GetCBInstanceStatisticReq struct {
7+
// project id
8+
// Required: true
9+
// in:path
10+
ProjectUid string `param:"project_uid" json:"project_uid" validate:"required"`
11+
}
12+
13+
// swagger:model GetCBInstanceStatisticReply
14+
type GetCBInstanceStatisticReply struct {
15+
// Generic reply
16+
base.GenericResp
17+
Data []*cbDbServiceStatistic `json:"data"`
18+
}
19+
20+
type cbDbServiceStatistic struct {
21+
Name string `json:"name"`
22+
Count int64 `json:"count"`
23+
Content []*cbDbServiceStatisticContent `json:"content"`
24+
}
25+
26+
type cbDbServiceStatisticContent struct {
27+
Schema string `json:"schema"`
28+
Table string `json:"table"`
29+
}
30+
31+
// swagger:parameters GetCBOperationStatistic
32+
type GetCBOperationStatisticReq struct {
33+
// project id
34+
// Required: true
35+
// in:path
36+
ProjectUid string `param:"project_uid" json:"project_uid" validate:"required"`
37+
}
38+
39+
// swagger:model GetCBOperationStatisticReply
40+
type GetCBOperationStatisticReply struct {
41+
// Generic reply
42+
base.GenericResp
43+
Data []*cbOperationStatistic `json:"data"`
44+
}
45+
46+
type cbOperationStatistic struct {
47+
OperationType string `json:"operation_type"`
48+
OperationCount int64 `json:"operation_count"`
49+
}

api/swagger.json

Lines changed: 170 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3315,6 +3315,72 @@
33153315
}
33163316
}
33173317
},
3318+
"/v1/dms/projects/{project_uid}/statistic/cb_instances": {
3319+
"get": {
3320+
"tags": [
3321+
"dms"
3322+
],
3323+
"summary": "Get cb instance statistic.",
3324+
"operationId": "GetCBInstanceStatistic",
3325+
"parameters": [
3326+
{
3327+
"type": "string",
3328+
"x-go-name": "ProjectUid",
3329+
"description": "project id",
3330+
"name": "project_uid",
3331+
"in": "path",
3332+
"required": true
3333+
}
3334+
],
3335+
"responses": {
3336+
"200": {
3337+
"description": "GetCBInstanceStatisticReply",
3338+
"schema": {
3339+
"$ref": "#/definitions/GetCBInstanceStatisticReply"
3340+
}
3341+
},
3342+
"default": {
3343+
"description": "GenericResp",
3344+
"schema": {
3345+
"$ref": "#/definitions/GenericResp"
3346+
}
3347+
}
3348+
}
3349+
}
3350+
},
3351+
"/v1/dms/projects/{project_uid}/statistic/cb_operations": {
3352+
"get": {
3353+
"tags": [
3354+
"dms"
3355+
],
3356+
"summary": "Get cb operation statistic.",
3357+
"operationId": "GetCBOperationStatistic",
3358+
"parameters": [
3359+
{
3360+
"type": "string",
3361+
"x-go-name": "ProjectUid",
3362+
"description": "project id",
3363+
"name": "project_uid",
3364+
"in": "path",
3365+
"required": true
3366+
}
3367+
],
3368+
"responses": {
3369+
"200": {
3370+
"description": "GetCBOperationStatisticReply",
3371+
"schema": {
3372+
"$ref": "#/definitions/GetCBOperationStatisticReply"
3373+
}
3374+
},
3375+
"default": {
3376+
"description": "GenericResp",
3377+
"schema": {
3378+
"$ref": "#/definitions/GenericResp"
3379+
}
3380+
}
3381+
}
3382+
}
3383+
},
33183384
"/v1/dms/projects/{project_uid}/unarchive": {
33193385
"put": {
33203386
"tags": [
@@ -4738,6 +4804,19 @@
47384804
},
47394805
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
47404806
},
4807+
"CBOperationLogTips": {
4808+
"type": "object",
4809+
"properties": {
4810+
"exec_result": {
4811+
"type": "array",
4812+
"items": {
4813+
"type": "string"
4814+
},
4815+
"x-go-name": "ExecResult"
4816+
}
4817+
},
4818+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
4819+
},
47414820
"CancelDataExportWorkflowPayload": {
47424821
"type": "object",
47434822
"required": [
@@ -5328,6 +5407,30 @@
53285407
},
53295408
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
53305409
},
5410+
"GetCBInstanceStatisticReply": {
5411+
"type": "object",
5412+
"properties": {
5413+
"code": {
5414+
"description": "code",
5415+
"type": "integer",
5416+
"format": "int64",
5417+
"x-go-name": "Code"
5418+
},
5419+
"data": {
5420+
"type": "array",
5421+
"items": {
5422+
"$ref": "#/definitions/cbDbServiceStatistic"
5423+
},
5424+
"x-go-name": "Data"
5425+
},
5426+
"message": {
5427+
"description": "message",
5428+
"type": "string",
5429+
"x-go-name": "Message"
5430+
}
5431+
},
5432+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
5433+
},
53315434
"GetCBOperationLogTipsReply": {
53325435
"type": "object",
53335436
"properties": {
@@ -5338,7 +5441,31 @@
53385441
"x-go-name": "Code"
53395442
},
53405443
"data": {
5341-
"$ref": "#/definitions/cBOperationLogTips"
5444+
"$ref": "#/definitions/CBOperationLogTips"
5445+
},
5446+
"message": {
5447+
"description": "message",
5448+
"type": "string",
5449+
"x-go-name": "Message"
5450+
}
5451+
},
5452+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
5453+
},
5454+
"GetCBOperationStatisticReply": {
5455+
"type": "object",
5456+
"properties": {
5457+
"code": {
5458+
"description": "code",
5459+
"type": "integer",
5460+
"format": "int64",
5461+
"x-go-name": "Code"
5462+
},
5463+
"data": {
5464+
"type": "array",
5465+
"items": {
5466+
"$ref": "#/definitions/cbOperationStatistic"
5467+
},
5468+
"x-go-name": "Data"
53425469
},
53435470
"message": {
53445471
"description": "message",
@@ -9063,15 +9190,53 @@
90639190
},
90649191
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
90659192
},
9066-
"cBOperationLogTips": {
9193+
"cbDbServiceStatistic": {
90679194
"type": "object",
90689195
"properties": {
9069-
"exec_result": {
9196+
"content": {
90709197
"type": "array",
90719198
"items": {
9072-
"type": "string"
9199+
"$ref": "#/definitions/cbDbServiceStatisticContent"
90739200
},
9074-
"x-go-name": "ExecResult"
9201+
"x-go-name": "Content"
9202+
},
9203+
"count": {
9204+
"type": "integer",
9205+
"format": "int64",
9206+
"x-go-name": "Count"
9207+
},
9208+
"name": {
9209+
"type": "string",
9210+
"x-go-name": "Name"
9211+
}
9212+
},
9213+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
9214+
},
9215+
"cbDbServiceStatisticContent": {
9216+
"type": "object",
9217+
"properties": {
9218+
"schema": {
9219+
"type": "string",
9220+
"x-go-name": "Schema"
9221+
},
9222+
"table": {
9223+
"type": "string",
9224+
"x-go-name": "Table"
9225+
}
9226+
},
9227+
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"
9228+
},
9229+
"cbOperationStatistic": {
9230+
"type": "object",
9231+
"properties": {
9232+
"operation_count": {
9233+
"type": "integer",
9234+
"format": "int64",
9235+
"x-go-name": "OperationCount"
9236+
},
9237+
"operation_type": {
9238+
"type": "string",
9239+
"x-go-name": "OperationType"
90759240
}
90769241
},
90779242
"x-go-package": "github.com/actiontech/dms/api/dms/service/v1"

0 commit comments

Comments
 (0)