You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.2 KiB
80 lines
2.2 KiB
@model List<Hangfire.Storage.RecurringJobDto>
|
|
@{
|
|
Layout = null;
|
|
}
|
|
<html>
|
|
<head>
|
|
<link rel="stylesheet" href="~/lib/jqcron/jqCron.css" />
|
|
<style>
|
|
table {
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
td {
|
|
border: 1px solid #333;
|
|
padding: 1em;
|
|
}
|
|
</style>
|
|
<title></title>
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<table>
|
|
<tr>
|
|
<td>Id</td>
|
|
<td>Cron</td>
|
|
<td>创建</td>
|
|
<td>最后执行</td>
|
|
</tr>
|
|
@foreach (var item in Model)
|
|
{
|
|
<tr>
|
|
<td>@item.Id</td>
|
|
<td>@item.Cron</td>
|
|
<td>
|
|
@if (item.CreatedAt.HasValue)
|
|
{
|
|
<span>@item.CreatedAt.Value.ToLocalTime()</span>
|
|
}
|
|
</td>
|
|
<td>
|
|
@if (item.LastExecution.HasValue)
|
|
{
|
|
<span>@item.LastExecution.Value.ToLocalTime()</span>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
</div>
|
|
|
|
<script src="~/lib/jquery/jquery.min.js"></script>
|
|
<script src="~/lib/jqcron/jqCron.js"></script>
|
|
<script src="~/lib/jqcron/jqCron.cn.js"></script>
|
|
<script>
|
|
$('input.cron').each(function () {
|
|
var cron = $(this).jqCron({
|
|
lang: 'cn',
|
|
enabled_year: true,
|
|
enabled_minute: true,
|
|
multiple_dom: true,
|
|
multiple_month: true,
|
|
multiple_mins: true,
|
|
multiple_dow: true,
|
|
multiple_time_hours: true,
|
|
multiple_time_minutes: true,
|
|
default_value: $(this).val().substr(2),
|
|
bind_method: {
|
|
set: function ($element, value) {
|
|
$element.val('0 ' + value);
|
|
}
|
|
},
|
|
no_reset_button: false
|
|
}).jqCronGetInstance();
|
|
if ($(this).hasClass('disable')) {
|
|
cron.disable();
|
|
}
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |