3 changed files with 91 additions and 0 deletions
@ -0,0 +1,33 @@ |
|||
using LINGYUN.Abp.BackgroundTasks.Localization; |
|||
using Volo.Abp.Localization; |
|||
using Volo.Abp.TextTemplating; |
|||
|
|||
namespace LINGYUN.Abp.BackgroundTasks.ExceptionHandling.Templates |
|||
{ |
|||
public class JobExceptionHandlingTemplateDefinitionProvider : TemplateDefinitionProvider |
|||
{ |
|||
public override void Define(ITemplateDefinitionContext context) |
|||
{ |
|||
context.Add(GetTemplateDefinitions()); |
|||
} |
|||
|
|||
private static TemplateDefinition[] GetTemplateDefinitions() |
|||
{ |
|||
return new[] |
|||
{ |
|||
new TemplateDefinition( |
|||
JobExceptionHandlingTemplates.JobExceptionNotifier, |
|||
displayName: L("TextTemplate:JobExceptionNotifier"), |
|||
localizationResource: typeof(BackgroundTasksResource) |
|||
).WithVirtualFilePath( |
|||
"/LINGYUN/Abp/BackgroundTasks/ExceptionHandling/Templates/JobExceptionNotifier.tpl", |
|||
isInlineLocalized: true) |
|||
}; |
|||
} |
|||
|
|||
private static ILocalizableString L(string name) |
|||
{ |
|||
return LocalizableString.Create<BackgroundTasksResource>(name); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
namespace LINGYUN.Abp.BackgroundTasks.ExceptionHandling.Templates |
|||
{ |
|||
public class JobExceptionHandlingTemplates |
|||
{ |
|||
public const string JobExceptionNotifier = "Abp.BackgroundTasks.JobExceptionNotifier"; |
|||
} |
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<title>{{ model.title }}</title> |
|||
</head> |
|||
<body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4" offset="0"> |
|||
<table width="95%" cellpadding="0" cellspacing="0" style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif"> |
|||
<tr> |
|||
<td> |
|||
<br /> |
|||
<b><font color="#0B610B">{{ L "JobExecuteError" }}</font></b> |
|||
<hr size="2" width="100%" align="center" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<ul> |
|||
{{ if model.tenantname }} |
|||
<li>{{ L "TenantName" }} : {{ model.tenantname }}</li> |
|||
{{ end }} |
|||
<li>{{ L "JobGroup" }} : {{ model.group }}</li> |
|||
<li>{{ L "JobName" }} : {{ model.name }}</li> |
|||
<li>{{ L "JobId" }} : {{ model.id }}</li> |
|||
<li>{{ L "JobType" }} : {{ model.type }}</li> |
|||
<li>{{ L "TriggerTime" }} : {{ model.triggertime }}</li> |
|||
</ul> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<b><font color="#0B610B">{{ L "ErrorMessage" }}</font></b> |
|||
<hr size="2" width="100%" align="center" /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<pre style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif">{{ model.message }}</pre> |
|||
<br /> |
|||
</td> |
|||
</tr> |
|||
<tr> |
|||
<td> |
|||
<br /> |
|||
<b style="float: right"><font color="#0B610B">{{ model.footer }}</font></b> |
|||
<hr size="2" width="100%" align="center" /> |
|||
</td> |
|||
</tr> |
|||
</table> |
|||
</body> |
|||
</html> |
|||
Loading…
Reference in new issue