fix: ue info add total number
This commit is contained in:
@@ -243,11 +243,13 @@ type TenantUEInfo struct {
|
||||
}
|
||||
|
||||
type SmfUEInfoResponse struct {
|
||||
Data []SmfUEInfo `json:"data"`
|
||||
Total int `json:"total"`
|
||||
Data []SmfUEInfo `json:"data"`
|
||||
}
|
||||
|
||||
type UEInfoResponse struct {
|
||||
Data []TenantUEInfo `json:"data"`
|
||||
Total int `json:"total"`
|
||||
Data []TenantUEInfo `json:"data"`
|
||||
}
|
||||
|
||||
// Get UEInfo from NF/NFs, SMF Online users
|
||||
@@ -318,6 +320,7 @@ func GetSMFUEInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
ueInfos.Data[i].NeID = neInfo.NeId
|
||||
ueInfos.Data[i].TenantName = tenantName
|
||||
response.Data = append(response.Data, ueInfos.Data[i])
|
||||
response.Total = i
|
||||
}
|
||||
// services.ResponseWithJson(w, resp.StatusCode(), &response)
|
||||
// return
|
||||
@@ -337,6 +340,7 @@ func GetSMFUEInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
n.NeID = neInfo.NeId
|
||||
n.TenantName = tenantName
|
||||
response.Data = append(response.Data, n)
|
||||
response.Total++
|
||||
}
|
||||
}
|
||||
// var response UEInfoResponse
|
||||
@@ -373,11 +377,13 @@ type TenantImsUEInfo struct {
|
||||
}
|
||||
|
||||
type ImsUEInfoResponse struct {
|
||||
Data []ImsUEInfo `json:"data"`
|
||||
Total int `json:"total"`
|
||||
Data []ImsUEInfo `json:"data"`
|
||||
}
|
||||
|
||||
type TenantImsUEInfoResponse struct {
|
||||
Data []TenantImsUEInfo `json:"data"`
|
||||
Total int `json:"total"`
|
||||
Data []TenantImsUEInfo `json:"data"`
|
||||
}
|
||||
|
||||
// Get UEInfo from NF/NFs, IMS Online users
|
||||
@@ -447,6 +453,7 @@ func GetIMSUEInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
ueInfos.Data[i].NeID = neInfo.NeId
|
||||
ueInfos.Data[i].TenantName = tenantName
|
||||
response.Data = append(response.Data, ueInfos.Data[i])
|
||||
response.Total = i
|
||||
}
|
||||
// services.ResponseWithJson(w, resp.StatusCode(), &response)
|
||||
// return
|
||||
@@ -466,6 +473,7 @@ func GetIMSUEInfoFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
n.NeID = neInfo.NeId
|
||||
n.TenantName = tenantName
|
||||
response.Data = append(response.Data, n)
|
||||
response.Total++
|
||||
}
|
||||
}
|
||||
// var response TenantImsUEInfoResponse
|
||||
|
||||
Reference in New Issue
Block a user