2011-12-15 08:25:16 +00:00
|
|
|
@using NzbDrone.Web.Helpers
|
2012-02-10 06:17:53 +00:00
|
|
|
@model string
|
2011-12-10 05:05:17 +00:00
|
|
|
@{ViewBag.Title = "Jobs";}
|
2011-12-01 05:25:01 +00:00
|
|
|
|
2012-02-10 06:17:53 +00:00
|
|
|
<div class="grid-container">
|
|
|
|
<table id="jobGrid" class="dataTablesGrid hidden-grid no-details">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
|
|
<th>Enable</th>
|
|
|
|
<th>Type Name</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Interval</th>
|
|
|
|
<th>Last Execution</th>
|
|
|
|
<th>Success</th>
|
|
|
|
|
|
|
|
@*Commands Column*@
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h1>Items currently in queue</h1>
|
|
|
|
|
|
|
|
<div class="grid-container">
|
|
|
|
<table id="queueGrid" class="dataTablesGrid hidden-grid no-details">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Type</th>
|
2012-09-11 06:46:56 +00:00
|
|
|
<th>Options</th>
|
2012-02-10 06:17:53 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@section Scripts{
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#jobGrid').removeClass('hidden-grid');
|
|
|
|
|
|
|
|
oTable = $('#jobGrid').dataTable({
|
|
|
|
"bShowAll": false,
|
|
|
|
"aaData": @Html.Raw(Model),
|
|
|
|
"bPaginate": false,
|
|
|
|
"bLengthChange": false,
|
|
|
|
"bFilter": false,
|
|
|
|
"bSort": false,
|
|
|
|
"bInfo": false,
|
|
|
|
"bAutoWidth": false,
|
|
|
|
"iDisplayLength": 20,
|
|
|
|
"sPaginationType": "four_button",
|
|
|
|
"aoColumns": [
|
|
|
|
{ sWidth: '30px', "mDataProp": "Id"}, //Id
|
|
|
|
{ sWidth: '70px', "mDataProp": "Enable" }, //Enable
|
|
|
|
{ sWidth: '80px', "mDataProp": "TypeName" }, //TypeName
|
|
|
|
{ sWidth: 'auto', "mDataProp": "Name" }, //Name
|
|
|
|
{ sWidth: '70px', "mDataProp": "Interval" }, //Interval
|
|
|
|
{ sWidth: '150px', "mDataProp": "LastExecution" }, //LastExecution
|
|
|
|
{ sWidth: '80px', "mDataProp": "Success" }, //Success
|
|
|
|
{ sWidth: '40px', "mDataProp": "Actions", "bSortable": false, "fnRender": function (row) {
|
2012-02-26 09:32:39 +00:00
|
|
|
if (!row.aData["Enable"])
|
|
|
|
return "";
|
2012-02-10 06:17:53 +00:00
|
|
|
|
2012-10-11 07:46:38 +00:00
|
|
|
var link = '@Ajax.IconActionLink("icon-cog gridAction", "", "RunJob", "System", new { typeName = "REPLACE" }, null, new { title = "Run Job" })';
|
2012-02-26 09:32:39 +00:00
|
|
|
link = link.replace("REPLACE", row.aData["TypeName"]);
|
|
|
|
return link;
|
|
|
|
}
|
2012-02-10 06:17:53 +00:00
|
|
|
} //Actions
|
|
|
|
],
|
|
|
|
"aaSorting": [[4, 'asc']]
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#queueGrid').removeClass('hidden-grid');
|
|
|
|
|
|
|
|
oTable = $('#queueGrid').dataTable({
|
|
|
|
"bShowAll": false,
|
|
|
|
"aaData": @ViewData["Queue"],
|
|
|
|
"bPaginate": false,
|
|
|
|
"bLengthChange": false,
|
|
|
|
"bFilter": false,
|
|
|
|
"bSort": false,
|
|
|
|
"bInfo": false,
|
|
|
|
"bAutoWidth": false,
|
|
|
|
"iDisplayLength": 20,
|
|
|
|
"sPaginationType": "four_button",
|
|
|
|
"aoColumns": [
|
|
|
|
{ sWidth: 'auto', "mDataProp": "Type"}, //Type
|
2012-09-11 06:46:56 +00:00
|
|
|
{ sWidth: '100px', "mDataProp": "Options" } //Options
|
2012-02-10 06:17:53 +00:00
|
|
|
]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2012-02-10 06:26:48 +00:00
|
|
|
}
|