|
@@ -55,12 +55,10 @@ namespace TEAMModelOS.FunctionV4.TimeTrigger
|
|
private readonly SnowflakeId _snowflakeId;
|
|
private readonly SnowflakeId _snowflakeId;
|
|
private readonly IHttpClientFactory _httpClient;
|
|
private readonly IHttpClientFactory _httpClient;
|
|
private readonly CoreAPIHttpService _coreAPIHttpService;
|
|
private readonly CoreAPIHttpService _coreAPIHttpService;
|
|
- private IPSearcher _ipSearcher;
|
|
|
|
- private readonly Region2LongitudeLatitudeTranslator _longitudeLatitudeTranslator;
|
|
|
|
- private readonly MailFactory _mailFactory;
|
|
|
|
|
|
+ //private IPSearcher _ipSearcher;
|
|
private readonly IConfiguration _configuration;
|
|
private readonly IConfiguration _configuration;
|
|
|
|
|
|
- public IESTimerTrigger(IConfiguration configuration,MailFactory mailFactory, CoreAPIHttpService coreAPIHttpService, Region2LongitudeLatitudeTranslator longitudeLatitudeTranslator, IPSearcher ipSearcher, IHttpClientFactory httpClient, SnowflakeId snowflakeId, IConverter converter, AzureCosmosFactory azureCosmos, DingDing dingDing, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis)
|
|
|
|
|
|
+ public IESTimerTrigger(IConfiguration configuration, CoreAPIHttpService coreAPIHttpService, IHttpClientFactory httpClient, SnowflakeId snowflakeId, IConverter converter, AzureCosmosFactory azureCosmos, DingDing dingDing, AzureStorageFactory azureStorage, AzureRedisFactory azureRedis)
|
|
{
|
|
{
|
|
_azureCosmos = azureCosmos;
|
|
_azureCosmos = azureCosmos;
|
|
_dingDing = dingDing;
|
|
_dingDing = dingDing;
|
|
@@ -69,10 +67,8 @@ namespace TEAMModelOS.FunctionV4.TimeTrigger
|
|
_converter = converter;
|
|
_converter = converter;
|
|
_snowflakeId=snowflakeId;
|
|
_snowflakeId=snowflakeId;
|
|
_httpClient = httpClient;
|
|
_httpClient = httpClient;
|
|
- _ipSearcher = ipSearcher;
|
|
|
|
|
|
+ // _ipSearcher = ipSearcher;
|
|
_coreAPIHttpService = coreAPIHttpService;
|
|
_coreAPIHttpService = coreAPIHttpService;
|
|
- _longitudeLatitudeTranslator = longitudeLatitudeTranslator;
|
|
|
|
- _mailFactory = mailFactory;
|
|
|
|
_configuration= configuration;
|
|
_configuration= configuration;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -120,7 +116,7 @@ namespace TEAMModelOS.FunctionV4.TimeTrigger
|
|
{
|
|
{
|
|
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {token.AccessToken}");
|
|
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {token.AccessToken}");
|
|
}
|
|
}
|
|
- var data = await TEAMModelOS.SDK.Models.Service.SystemService.AccumulateDaily(_configuration,_azureRedis, _azureCosmos, _coreAPIHttpService, _dingDing, client, _snowflakeId, url, _mailFactory, am, pm);
|
|
|
|
|
|
+ var data = await TEAMModelOS.SDK.Models.Service.SystemService.AccumulateDaily(_configuration,_azureRedis, _azureCosmos, _coreAPIHttpService, _dingDing, client, _snowflakeId, url, am, pm);
|
|
//await _dingDing.SendBotMsg($"返回数据{data.ToJsonString()}", GroupNames.成都开发測試群組);
|
|
//await _dingDing.SendBotMsg($"返回数据{data.ToJsonString()}", GroupNames.成都开发測試群組);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -159,7 +155,7 @@ namespace TEAMModelOS.FunctionV4.TimeTrigger
|
|
{
|
|
{
|
|
//string path = $"resourceId=/SUBSCRIPTIONS/73B7F9EF-D8B7-4444-9E8D-D80B43BF3CD4/RESOURCEGROUPS/TEAMMODELCHENGDU/PROVIDERS/MICROSOFT.NETWORK/APPLICATIONGATEWAYS/OSFIREWARE/y={y}/m={m}/d={d}/h={h}/m=00/PT1H.json";
|
|
//string path = $"resourceId=/SUBSCRIPTIONS/73B7F9EF-D8B7-4444-9E8D-D80B43BF3CD4/RESOURCEGROUPS/TEAMMODELCHENGDU/PROVIDERS/MICROSOFT.NETWORK/APPLICATIONGATEWAYS/OSFIREWARE/y={y}/m={m}/d={d}/h={h}/m=00/PT1H.json";
|
|
string path = $"resourceId=/SUBSCRIPTIONS/73B7F9EF-D8B7-4444-9E8D-D80B43BF3CD4/RESOURCEGROUPS/TEAMMODELCHENGDU/PROVIDERS/MICROSOFT.WEB/SITES/TEAMMODELOS/y={y}/m={m}/d={d}/h={h}/m=00/PT1H.json";
|
|
string path = $"resourceId=/SUBSCRIPTIONS/73B7F9EF-D8B7-4444-9E8D-D80B43BF3CD4/RESOURCEGROUPS/TEAMMODELCHENGDU/PROVIDERS/MICROSOFT.WEB/SITES/TEAMMODELOS/y={y}/m={m}/d={d}/h={h}/m=00/PT1H.json";
|
|
- var retn = await BILogAnalyseService.GetPathAnalyse(_azureStorage, _ipSearcher, _dingDing, path, "LogStorage");
|
|
|
|
|
|
+ var retn = await BILogAnalyseService.GetPathAnalyse(_azureStorage, _dingDing, path, "LogStorage");
|
|
if (retn.recCnts.IsNotEmpty())
|
|
if (retn.recCnts.IsNotEmpty())
|
|
{
|
|
{
|
|
//https://teammodelos.blob.core.chinacloudapi.cn/0-public/pie-borderRadius.html
|
|
//https://teammodelos.blob.core.chinacloudapi.cn/0-public/pie-borderRadius.html
|
|
@@ -208,7 +204,7 @@ namespace TEAMModelOS.FunctionV4.TimeTrigger
|
|
var ptD = pastTime.Day >= 10 ? $"{pastTime.Day}" : $"0{pastTime.Day}";
|
|
var ptD = pastTime.Day >= 10 ? $"{pastTime.Day}" : $"0{pastTime.Day}";
|
|
|
|
|
|
string dayPath = $"resourceId=/SUBSCRIPTIONS/73B7F9EF-D8B7-4444-9E8D-D80B43BF3CD4/RESOURCEGROUPS/TEAMMODELCHENGDU/PROVIDERS/MICROSOFT.WEB/SITES/TEAMMODELOS/y={ptY}/m={ptM}/d={ptD}";
|
|
string dayPath = $"resourceId=/SUBSCRIPTIONS/73B7F9EF-D8B7-4444-9E8D-D80B43BF3CD4/RESOURCEGROUPS/TEAMMODELCHENGDU/PROVIDERS/MICROSOFT.WEB/SITES/TEAMMODELOS/y={ptY}/m={ptM}/d={ptD}";
|
|
- var retnDay = await BILogAnalyseService.GetPathAnalyse(_azureStorage, _ipSearcher, _dingDing, dayPath, "LogStorage", timeType: "Day");
|
|
|
|
|
|
+ var retnDay = await BILogAnalyseService.GetPathAnalyse(_azureStorage, _dingDing, dayPath, "LogStorage", timeType: "Day");
|
|
|
|
|
|
if (retn.recCnts.IsNotEmpty())
|
|
if (retn.recCnts.IsNotEmpty())
|
|
{
|
|
{
|