|
|
@ -22,6 +22,9 @@
|
|
|
|
<th>
|
|
|
|
<th>
|
|
|
|
Error Description
|
|
|
|
Error Description
|
|
|
|
</th>
|
|
|
|
</th>
|
|
|
|
|
|
|
|
<th>
|
|
|
|
|
|
|
|
Delete
|
|
|
|
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
@ -44,6 +47,7 @@
|
|
|
|
<td>
|
|
|
|
<td>
|
|
|
|
@m.Message
|
|
|
|
@m.Message
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="delete" id="@m.Id"><i class="fa fa-times"></i></td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
@ -52,57 +56,42 @@
|
|
|
|
</fieldset>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
@*<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
var base = '@Html.GetBaseUrl()';
|
|
|
|
|
|
|
|
$('#autoUpdate')
|
|
|
|
|
|
|
|
.click(function (e) {
|
|
|
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
|
|
|
$('body').append("<i class=\"fa fa-spinner fa-spin fa-5x fa-fw\" style=\"position: absolute; top: 20%; left: 50%;\"></i>");
|
|
|
|
|
|
|
|
$('#autoUpdate').prop("disabled", "disabled");
|
|
|
|
|
|
|
|
document.getElementById("lightbox").style.display = "";
|
|
|
|
|
|
|
|
var count = 0;
|
|
|
|
|
|
|
|
setInterval(function () {
|
|
|
|
|
|
|
|
count++;
|
|
|
|
|
|
|
|
var dots = new Array(count % 10).join('.');
|
|
|
|
|
|
|
|
document.getElementById('autoUpdate').innerHTML = "Updating" + dots;
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
$(function () {
|
|
|
|
type: "Post",
|
|
|
|
|
|
|
|
url: "autoupdate",
|
|
|
|
|
|
|
|
data: { url: "@Model.Status.DownloadUri" },
|
|
|
|
|
|
|
|
dataType: "json",
|
|
|
|
|
|
|
|
error: function () {
|
|
|
|
|
|
|
|
setTimeout(
|
|
|
|
|
|
|
|
function () {
|
|
|
|
|
|
|
|
location.reload();
|
|
|
|
|
|
|
|
}, 30000);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#saveSettings').click(function (e) {
|
|
|
|
$('.refresh').click(function (e) {
|
|
|
|
e.preventDefault();
|
|
|
|
var id = e.currentTarget.id;
|
|
|
|
var $form = $("#mainForm");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var branches = $("#branches option:selected").val();
|
|
|
|
var ev = $(e.currentTarget.children[0]);
|
|
|
|
|
|
|
|
ev.addClass("fa-spin");
|
|
|
|
|
|
|
|
|
|
|
|
var data = $form.serialize();
|
|
|
|
var url = createLocalUrl("/admin/deleteFault");
|
|
|
|
data = data + "&branch=" + branches;
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
type: $form.prop("method"),
|
|
|
|
type: 'POST',
|
|
|
|
url: $form.prop("action"),
|
|
|
|
data: { key: id },
|
|
|
|
data: data,
|
|
|
|
url: url,
|
|
|
|
dataType: "json",
|
|
|
|
dataType: "json",
|
|
|
|
success: function (response) {
|
|
|
|
success: function (response) {
|
|
|
|
if (response.result === true) {
|
|
|
|
if (response.result === true) {
|
|
|
|
generateNotify(response.message, "success");
|
|
|
|
generateNotify("Success!", "success");
|
|
|
|
|
|
|
|
ev.removeClass("fa-spin");
|
|
|
|
|
|
|
|
ev.addClass("fa-check");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
generateNotify(response.message, "warning");
|
|
|
|
generateNotify(response.message, "warning");
|
|
|
|
|
|
|
|
ev.removeClass("fa-spin");
|
|
|
|
|
|
|
|
ev.addClass("fa-exclamation");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
error: function (e) {
|
|
|
|
|
|
|
|
console.log(e);
|
|
|
|
|
|
|
|
generateNotify("Something went wrong!", "danger");
|
|
|
|
|
|
|
|
ev.removeClass("fa-spin");
|
|
|
|
|
|
|
|
ev.addClass("fa-exclamation");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>*@
|
|
|
|
</script>
|