Merge pull request #938 from sbwalker/dev

missing IStringLocalizer<Index> causing compilation error
This commit is contained in:
Shaun Walker 2020-11-20 10:30:32 -05:00 committed by GitHub
commit 6185750aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
@namespace Oqtane.Modules.Admin.Jobs
@inherits ModuleBase
@inject IJobService JobService
@inject IStringLocalizer<Index> Localizer
@if (_jobs == null)
{
@ -11,7 +12,8 @@ else
<ActionLink Action="Add" Text="Add Job" ResourceKey="AddJob" />
<ActionLink Action="Log" Class="btn btn-secondary" Text="View Logs" ResourceKey="ViewJobs" />
<button type="button" class="btn btn-secondary" @onclick="(async () => await Refresh())">Refresh</button>
<br /><br />
<br />
<br />
<Pager Items="@_jobs">
<Header>
@ -34,13 +36,13 @@ else
<td>@context.NextExecution</td>
<td>
@if (context.IsStarted)
{
{
<button type="button" class="btn btn-danger" @onclick="(async () => await StopJob(context.JobId))">@Localizer["Stop"]</button>
}
else
{
}
else
{
<button type="button" class="btn btn-success" @onclick="(async () => await StartJob(context.JobId))">@Localizer["Start"]</button>
}
}
</td>
</Row>
</Pager>
@ -48,7 +50,7 @@ else
@code {
private List<Job> _jobs;
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
protected override async Task OnParametersSetAsync()
@ -81,7 +83,7 @@ else
private string DisplayFrequency(int interval, string frequency)
{
var result = "Every " + interval.ToString() + " ";
var result = "Every " + interval.ToString() + " ";
switch (frequency)
{
case "m":
@ -97,12 +99,12 @@ else
result += "Month";
break;
}
if (interval > 1)
{
result += "s";
}
return result;
}