Skip to content

Commit

Permalink
fix(obtenant): added primaryZone field for obtenant
Browse files Browse the repository at this point in the history
  • Loading branch information
powerfooI committed Mar 14, 2024
1 parent 65adde0 commit ac89577
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/dashboard/business/oceanbase/obtenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ func buildBriefFromApiType(t *v1alpha1.OBTenant) *response.OBTenantBrief {
rt.Status = t.Status.Status
rt.Charset = t.Spec.Charset
rt.Locality = t.Status.TenantRecordInfo.Locality
rt.PrimaryZone = t.Status.TenantRecordInfo.PrimaryZone

for i := range t.Spec.Pools {
pool := t.Spec.Pools[i]
Expand Down
8 changes: 8 additions & 0 deletions internal/dashboard/generated/swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4345,6 +4345,10 @@ const docTemplate = `{
"description": "Namespace of the resource",
"type": "string"
},
"primaryZone": {
"description": "Primary zone of the tenant",
"type": "string"
},
"status": {
"description": "Status of the tenant",
"type": "string"
Expand Down Expand Up @@ -4400,6 +4404,10 @@ const docTemplate = `{
"primaryTenant": {
"type": "string"
},
"primaryZone": {
"description": "Primary zone of the tenant",
"type": "string"
},
"restoreSource": {
"$ref": "#/definitions/response.RestoreSource"
},
Expand Down
8 changes: 8 additions & 0 deletions internal/dashboard/generated/swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -4338,6 +4338,10 @@
"description": "Namespace of the resource",
"type": "string"
},
"primaryZone": {
"description": "Primary zone of the tenant",
"type": "string"
},
"status": {
"description": "Status of the tenant",
"type": "string"
Expand Down Expand Up @@ -4393,6 +4397,10 @@
"primaryTenant": {
"type": "string"
},
"primaryZone": {
"description": "Primary zone of the tenant",
"type": "string"
},
"restoreSource": {
"$ref": "#/definitions/response.RestoreSource"
},
Expand Down
6 changes: 6 additions & 0 deletions internal/dashboard/generated/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,9 @@ definitions:
namespace:
description: Namespace of the resource
type: string
primaryZone:
description: Primary zone of the tenant
type: string
status:
description: Status of the tenant
type: string
Expand Down Expand Up @@ -1135,6 +1138,9 @@ definitions:
type: string
primaryTenant:
type: string
primaryZone:
description: Primary zone of the tenant
type: string
restoreSource:
$ref: '#/definitions/response.RestoreSource'
rootCredential:
Expand Down
1 change: 1 addition & 0 deletions internal/dashboard/model/response/obtenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type OBTenantBrief struct {
CreateTime string `json:"createTime"` // Creation time of the tenant
Locality string `json:"locality"` // Locality of the tenant units
Charset string `json:"charset"` // Charset of the tenant
PrimaryZone string `json:"primaryZone"` // Primary zone of the tenant
}

type OBTenantDetail struct {
Expand Down

0 comments on commit ac89577

Please sign in to comment.