mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-30 17:13:08 +08:00
fix(apigateway): use info response service type of console endpoints
This commit is contained in:
@@ -1006,6 +1006,7 @@ func getUserInfo2(s *mcclient.ClientSession, uid string, pid string, loginIp str
|
||||
item := jsonutils.NewDict()
|
||||
item.Add(jsonutils.NewString(ep.Url), "url")
|
||||
item.Add(jsonutils.NewString(ep.Name), "name")
|
||||
item.Add(jsonutils.NewString(ep.Service), "service")
|
||||
menus.Add(item)
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ import (
|
||||
type ExternalService struct {
|
||||
Name string
|
||||
Url string
|
||||
|
||||
Service string
|
||||
}
|
||||
|
||||
type Endpoint struct {
|
||||
|
||||
@@ -316,8 +316,11 @@ func (catalog KeystoneServiceCatalogV3) GetServicesByInterface(region string, in
|
||||
if catalog[i].Endpoints[j].RegionId == region &&
|
||||
catalog[i].Endpoints[j].Interface == infType &&
|
||||
len(catalog[i].Endpoints[j].Name) > 0 {
|
||||
srv := ExternalService{Name: catalog[i].Endpoints[j].Name,
|
||||
Url: catalog[i].Endpoints[j].Url}
|
||||
srv := ExternalService{
|
||||
Name: catalog[i].Endpoints[j].Name,
|
||||
Url: catalog[i].Endpoints[j].Url,
|
||||
Service: catalog[i].Type,
|
||||
}
|
||||
services = append(services, srv)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user