add: ws for custom kpi
This commit is contained in:
@@ -307,15 +307,19 @@ func PostKPIReportFromNF(w http.ResponseWriter, r *http.Request) {
|
||||
report.KpiValues = append(report.KpiValues, *kpiCVal)
|
||||
}
|
||||
|
||||
// KPI自定义指标入库
|
||||
kpi_c_report.InsertKpiCReport(kpiData.NEType, report)
|
||||
|
||||
// 发送到匹配的网元
|
||||
neInfo := neService.NewNeInfoImpl.SelectNeInfoByRmuid(kpiData.RmUid)
|
||||
if neInfo.RmUID == kpiData.RmUid {
|
||||
// 推送到ws订阅组
|
||||
wsService.NewWSSendImpl.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI, neInfo.NeType, neInfo.NeId), kpiEvent)
|
||||
// 推送自定义KPI到ws订阅组
|
||||
wsService.NewWSSendImpl.ByGroupID(fmt.Sprintf("%s%s_%s", wsService.GROUP_KPI_C, neInfo.NeType, neInfo.NeId), report)
|
||||
if neInfo.NeType == "UPF" {
|
||||
// 推送标识为:12_RMUID, exp: 12_4400HXUPF001
|
||||
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_KPI_UPF+"_"+kpiReport.Task.NE.RmUID, kpiEvent)
|
||||
wsService.NewWSSendImpl.ByGroupID(wsService.GROUP_KPI_UPF+kpiReport.Task.NE.RmUID, kpiEvent)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user