mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 19:57:42 +08:00
[FIX] fix bug
This commit is contained in:
parent
0a62cf3a6e
commit
7c81ca321b
@ -1769,8 +1769,8 @@ func (s *ServiceAction) CreateTenandIDAndName(eid string) (string, string, error
|
||||
type K8sPodInfo struct {
|
||||
ServiceID string `json:"service_id"`
|
||||
//部署资源的ID ,例如rc ,deploment, statefulset
|
||||
ReplicationID string `json:"replication_id"`
|
||||
ReplicationType string `json:"replication_type"`
|
||||
ReplicationID string `json:"rc_id"`
|
||||
ReplicationType string `json:"rc_type"`
|
||||
PodName string `json:"pod_name"`
|
||||
PodIP string `json:"pod_ip"`
|
||||
Container map[string]map[string]string `json:"container"`
|
||||
|
@ -70,6 +70,13 @@ type APIConf struct {
|
||||
CertKey string `yaml:"tls-private-key-file"`
|
||||
}
|
||||
|
||||
type serviceInfo struct {
|
||||
ServicesAlias string `json:"serviceAlias"`
|
||||
TenantName string `json:"tenantName"`
|
||||
ServiceId string `json:"serviceId"`
|
||||
TenantId string `json:"tenantId"`
|
||||
}
|
||||
|
||||
//NewRegion NewRegion
|
||||
func NewRegion(c APIConf) (Region, error) {
|
||||
if region == nil {
|
||||
@ -188,7 +195,7 @@ func (t *tenant) Services(serviceAlias string) ServiceInterface {
|
||||
|
||||
//ServiceInterface ServiceInterface
|
||||
type ServiceInterface interface {
|
||||
Get() (*dbmodel.TenantServices, *util.APIHandleError)
|
||||
Get() (*serviceInfo, *util.APIHandleError)
|
||||
Pods() ([]*dbmodel.K8sPod, *util.APIHandleError)
|
||||
List() ([]*dbmodel.TenantServices, *util.APIHandleError)
|
||||
Stop(eventID string) (string, *util.APIHandleError)
|
||||
@ -209,8 +216,8 @@ func (s *services) Pods() ([]*dbmodel.K8sPod, *util.APIHandleError) {
|
||||
}
|
||||
return gc, nil
|
||||
}
|
||||
func (s *services) Get() (*dbmodel.TenantServices, *util.APIHandleError) {
|
||||
var service dbmodel.TenantServices
|
||||
func (s *services) Get() (*serviceInfo, *util.APIHandleError) {
|
||||
var service serviceInfo
|
||||
var decode utilhttp.ResponseBody
|
||||
decode.Bean = &service
|
||||
code, err := s.DoRequest(s.prefix, "GET", nil, &decode)
|
||||
|
@ -336,8 +336,8 @@ func getAppInfoV2(c *cli.Context) error {
|
||||
|
||||
table := uitable.New()
|
||||
table.Wrap = true // wrap columns
|
||||
tenantID := service.TenantID
|
||||
serviceID := service.ServiceID
|
||||
tenantID := service.TenantId
|
||||
serviceID := service.ServiceId
|
||||
//volumes:=service[""]
|
||||
|
||||
table.AddRow("Namespace:", tenantID)
|
||||
|
Loading…
Reference in New Issue
Block a user