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.
Ombi/Old/Ombi.UI/Views/FaultQueue/RequestFaultQueue.cshtml

97 lines
2.9 KiB

8 years ago
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<IEnumerable<Ombi.UI.Models.FaultedRequestsViewModel>>
@Html.Partial("Shared/Partial/_Sidebar")
8 years ago
<div class="col-sm-8 col-sm-push-1">
<fieldset>
8 years ago
<legend>Request Fault Queue</legend>
8 years ago
<table class="table table-striped table-hover table-responsive table-condensed">
<thead>
<tr>
<th>
Request Title
</th>
<th>
Type
</th>
<th>
Fault Type
</th>
<th>
LastRetry
</th>
8 years ago
<th>
Error Description
</th>
8 years ago
<th>
Delete
</th>
8 years ago
</tr>
</thead>
<tbody>
@foreach (var m in Model)
{
<tr>
<td>
@m.Title
</td>
<td>
@m.Type
</td>
<td>
@m.FaultType
</td>
<td>
@m.LastRetry
</td>
8 years ago
<td>
@m.Message
</td>
8 years ago
<td class="delete" id="@m.Id"><i class="fa fa-times"></i></td>
8 years ago
</tr>
}
</tbody>
</table>
</fieldset>
</div>
8 years ago
<script>
8 years ago
8 years ago
$(function () {
8 years ago
8 years ago
$('.refresh').click(function (e) {
var id = e.currentTarget.id;
8 years ago
8 years ago
var ev = $(e.currentTarget.children[0]);
ev.addClass("fa-spin");
8 years ago
8 years ago
var url = createLocalUrl("/admin/deleteFault");
8 years ago
$.ajax({
8 years ago
type: 'POST',
data: { key: id },
url: url,
8 years ago
dataType: "json",
success: function (response) {
if (response.result === true) {
8 years ago
generateNotify("Success!", "success");
ev.removeClass("fa-spin");
ev.addClass("fa-check");
8 years ago
} else {
generateNotify(response.message, "warning");
8 years ago
ev.removeClass("fa-spin");
ev.addClass("fa-exclamation");
8 years ago
}
8 years ago
},
error: function (e) {
console.log(e);
generateNotify("Something went wrong!", "danger");
ev.removeClass("fa-spin");
ev.addClass("fa-exclamation");
8 years ago
}
});
8 years ago
8 years ago
});
8 years ago
});
</script>