|
@@ -53,7 +53,11 @@ namespace TEAMModelBI.Controllers.BIHome
|
|
|
|
|
|
//var ipGroup = aGInfos.GroupBy(g => g.properties.clientIp).ToDictionary(k => k.Key, k => k.Count()).ToList();
|
|
|
|
|
|
- List<RecGWInfo> recInfo = aGInfos.Select(x => new RecGWInfo { hour = DateTimeOffset.Parse(x.time).ToString("yyyyMMddHH"),hostName=x.properties.hostname }).ToList();
|
|
|
+ List<RecGWInfo> recInfo = aGInfos.Select(s => new RecGWInfo { hour = DateTimeOffset.Parse(s.time).ToString("yyyyMMddHH"), ip = s.properties.clientIp, api = s.properties.requestUri.Split("?").ToList().Count() > 1 ? s.properties.requestUri.Split("?").ToList()[0] : s.properties.requestUri, hostName = s.properties.hostname }).ToList();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
List<StatisNameCnt> ipCnt = aGInfos.GroupBy(g => g.properties.clientIp).Select(x => new StatisNameCnt { name = x.Key, cnt = x.Count() }).ToList();
|
|
@@ -62,7 +66,7 @@ namespace TEAMModelBI.Controllers.BIHome
|
|
|
DateTimeOffset dateTime = DateTimeOffset.UtcNow;
|
|
|
var apiCnt = aGInfos.Select(s => s.properties.requestUri.Split("?").ToList().Count()>1 ? s.properties.requestUri.Split("?").ToList()[0]: s.properties.requestUri).GroupBy(g => g).Select(x=>new { key = x.Key,cnt =x.Count()}).ToList();
|
|
|
|
|
|
- return Ok(new { state = 200, apiCnt, ipCnt });
|
|
|
+ return Ok(new { state = 200, cnt = recInfo.Count, recInfo, apiCnt, ipCnt });
|
|
|
}
|
|
|
public record RecGWInfo
|
|
|
{
|