Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
@using System.Text.Encodings.Web
@{
//page title
ViewBag.Title = Loc["Admin.System.ScheduleTasks"];
}
@* the restart warning stays a note - it is a genuine message - above the grid in a flush card;
the list has no action of its own, so the screen has no primary button *@
<admin-page title="@Loc["Admin.System.ScheduleTasks"]" icon="bi-list-task">
<page-actions>
<vc:admin-widget widget-zone="schedule_task_list_buttons" additional-data="null"/>
</page-actions>
<div class="note note-info mb-0">
<strong>@Loc["Admin.System.ScheduleTasks.RestartApplication"]</strong>
</div>
<admin-card flush>
<admin-grid id="schedule-tasks-grid"
read-url="@Url.Action("List", "ScheduleTask", new { area = Constants.AreaAdmin })"
pager="Compact">
<grid-text name="runNow" value="@Loc["Admin.System.ScheduleTasks.RunNow"]"/>
<grid-column field="ScheduleTaskName" title="@Loc["Admin.System.ScheduleTasks.Name"]" width="300">
<cell-template>
<a class="text-decoration-none" href="EditScheduler/{{ Id }}">{{ ScheduleTaskName }}</a>
</cell-template>
</grid-column>
<grid-column field="Enabled" title="@Loc["Admin.System.ScheduleTasks.Enabled"]" width="100" align="Center">
<cell-template>
<i data-if="Enabled" class="bi bi-check-lg text-success" aria-hidden="true"></i>
<i data-else class="bi bi-x-lg text-danger" aria-hidden="true"></i>
</cell-template>
</grid-column>
<grid-column field="StopOnError" title="@Loc["Admin.System.ScheduleTasks.StopOnError"]" width="100" align="Center">
<cell-template>
<i data-if="StopOnError" class="bi bi-check-lg text-success" aria-hidden="true"></i>
<i data-else class="bi bi-x-lg text-danger" aria-hidden="true"></i>
</cell-template>
</grid-column>
<grid-column field="LastStartUtc" title="@Loc["Admin.System.ScheduleTasks.LastStart"]" width="200" format="{0:G}"/>
<grid-column field="LastSuccessUtc" title="@Loc["Admin.System.ScheduleTasks.LastSuccess"]" width="200" format="{0:G}"/>
<grid-column field="LastEndUtc" title="@Loc["Admin.System.ScheduleTasks.LastEnd"]" width="200" format="{0:G}"/>
<grid-column field="Id" title="@Loc["Admin.System.ScheduleTasks.RunNow"]" width="100">
<cell-template>
<a href="@Url.Action("RunNow", "ScheduleTask", new { area = Constants.AreaAdmin })/{{ Id }}" class="btn btn-outline-secondary btn-sm run-now"><i class="bi bi-fast-forward"></i> {{ $texts.runNow }}</a>
</cell-template>
</grid-column>
</admin-grid>
</admin-card>
</admin-page>
<script>
$(document).ready(function () {
$("#schedule-tasks-grid").on("click", ".run-now", function (e) {
showThrobber('@Html.Raw(JavaScriptEncoder.Default.Encode(Loc["Admin.System.ScheduleTasks.RunNow.Progress"]))');
});
});
</script>