This commit is contained in:
@@ -352,10 +352,10 @@ namespace AyaNova.Biz
|
|||||||
reportRequest.AType = AyaType.WorkOrder;
|
reportRequest.AType = AyaType.WorkOrder;
|
||||||
reportRequest.ReportId = 9;
|
reportRequest.ReportId = 9;
|
||||||
reportRequest.SelectedRowIds = new long[] { 1 };
|
reportRequest.SelectedRowIds = new long[] { 1 };
|
||||||
var jwt= Api.Controllers.AuthController.GenRpt();
|
var jwt = Api.Controllers.AuthController.GenRpt();
|
||||||
reportRequest.ClientMeta = JToken.Parse($"{{'UserName':'AyaNova SuperUser','Authorization':'Bearer {jwt}','TimeZoneName':'America/Los_Angeles','LanguageName':'en-US','Hour12':true,'CurrencyName':'USD','DefaultLocale':'en','PDFDate':'3/3/22','PDFTime':'3:38 PM'}}");
|
reportRequest.ClientMeta = JToken.Parse($"{{'UserName':'AyaNova SuperUser','Authorization':'Bearer {jwt}','TimeZoneName':'America/Los_Angeles','LanguageName':'en-US','Hour12':true,'CurrencyName':'USD','DefaultLocale':'en','PDFDate':'3/3/22','PDFTime':'3:38 PM'}}");
|
||||||
//get port number
|
//get port number
|
||||||
var match = System.Text.RegularExpressions.Regex.Match(ServerBootConfig.AYANOVA_USE_URLS,"[0-9]+");
|
var match = System.Text.RegularExpressions.Regex.Match(ServerBootConfig.AYANOVA_USE_URLS, "[0-9]+");
|
||||||
var API_URL = $"http://127.0.0.1:{match.Value}/api/{AyaNovaVersion.CurrentApiVersion}/";
|
var API_URL = $"http://127.0.0.1:{match.Value}/api/{AyaNovaVersion.CurrentApiVersion}/";
|
||||||
var jobid = await biz.RequestRenderReport(reportRequest, DateTime.UtcNow.AddMinutes(ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT), API_URL, "AUTOMATED NO USER");
|
var jobid = await biz.RequestRenderReport(reportRequest, DateTime.UtcNow.AddMinutes(ServerBootConfig.AYANOVA_REPORT_RENDERING_TIMEOUT), API_URL, "AUTOMATED NO USER");
|
||||||
if (jobid == null)
|
if (jobid == null)
|
||||||
@@ -377,10 +377,11 @@ namespace AyaNova.Biz
|
|||||||
//get job logs and parse file name from it
|
//get job logs and parse file name from it
|
||||||
JobOperationsBiz jobopsbiz = new JobOperationsBiz(ct, 1, AuthorizationRoles.BizAdmin);
|
JobOperationsBiz jobopsbiz = new JobOperationsBiz(ct, 1, AuthorizationRoles.BizAdmin);
|
||||||
List<JobOperationsLogInfoItem> log = await jobopsbiz.GetJobLogListAsync((Guid)jobid);
|
List<JobOperationsLogInfoItem> log = await jobopsbiz.GetJobLogListAsync((Guid)jobid);
|
||||||
var lastLog=log[log.Count-1];
|
var lastLog = log[log.Count - 1];
|
||||||
var lastLogJ=JObject.Parse(lastLog.StatusText);
|
var lastLogJ = JObject.Parse(lastLog.StatusText);
|
||||||
|
var path = (string)lastLogJ["reportfilename"];
|
||||||
await m.SendEmailAsync(toAddress, "DEBUG Test from Notification system", "This is a DEBUG test to confirm notification system is working", ServerGlobalOpsSettingsCache.Notify);
|
var FilePath = FileUtil.GetFullPathForTemporaryFile(path);
|
||||||
|
await m.SendEmailAsync(toAddress, "DEBUG Test from Notification system", "This is a DEBUG test to confirm notification system is working", ServerGlobalOpsSettingsCache.Notify, FilePath);
|
||||||
return "ok";
|
return "ok";
|
||||||
}
|
}
|
||||||
case JobStatus.Failed:
|
case JobStatus.Failed:
|
||||||
|
|||||||
Reference in New Issue
Block a user