mirror of https://github.com/Ombi-app/Ombi
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.
111 lines
3.1 KiB
111 lines
3.1 KiB
@using PlexRequests.UI.Helpers
|
|
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<PlexRequests.UI.Models.AboutAdminViewModel>
|
|
@Html.Partial("Shared/Partial/_Sidebar")
|
|
@Html.LoadAsset("/Content/helpers/bootbox.min.js", true)
|
|
<div id="lightbox" style="display:none"></div>
|
|
<div class="col-sm-8 col-sm-push-1">
|
|
<fieldset>
|
|
<legend>About</legend>
|
|
|
|
|
|
<div class="form-group">
|
|
<label>Application Version: </label>
|
|
<label>@Model.ApplicationVersion</label>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label">OS: </label>
|
|
<label class="control-label">@Model.Os</label>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label">System Version: </label>
|
|
<label class="control-label">@Model.SystemVersion</label>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label class="control-label">Branch: </label>
|
|
<label class="control-label">@Model.Branch</label>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label">Log Level: </label>
|
|
<label class="control-label">@Model.LogLevel</label>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div>
|
|
<button id="save" type="submit" class="btn btn-danger-outline">Report a bug</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
|
</div>
|
|
|
|
<script>
|
|
|
|
var issueTitle = "";
|
|
|
|
var baseUrl = '@Html.GetBaseUrl()';
|
|
|
|
$('#save').click(function () {
|
|
startBug();
|
|
});
|
|
|
|
|
|
function startBug() {
|
|
bootbox.prompt({
|
|
size: "small",
|
|
title: "What is the title of the issue?",
|
|
inputType: 'textarea',
|
|
callback: mainContent
|
|
});
|
|
}
|
|
|
|
|
|
function mainContent(userTitle) {
|
|
if (!userTitle) {
|
|
generateNotify("Please provide a valid title", "danger");
|
|
return startBug();
|
|
}
|
|
issueTitle = userTitle;
|
|
bootbox.prompt({
|
|
title: "Please provide details of the issue including any logs and reproduction steps",
|
|
inputType: 'textarea',
|
|
callback: reportBug
|
|
});
|
|
|
|
|
|
}
|
|
|
|
function reportBug(additionalInfo) {
|
|
|
|
if (!additionalInfo) {
|
|
generateNotify("Please provide some information", "danger");
|
|
return mainContent();
|
|
}
|
|
|
|
|
|
var url = "/admin/about";
|
|
url = createBaseUrl(baseUrl, url);
|
|
$.ajax({
|
|
type: "post",
|
|
url: url,
|
|
data: {title : issueTitle, body : additionalInfo},
|
|
dataType: "json",
|
|
success: function (response) {
|
|
if (response && response.result) {
|
|
generateNotify("Issue Reported, see here: " + response.url);
|
|
} else {
|
|
if (response.message) {
|
|
generateNotify(response.message, "danger");
|
|
}
|
|
}
|
|
},
|
|
error: function (e) {
|
|
console.log(e);
|
|
generateNotify("Something went wrong!", "danger");
|
|
}
|
|
});
|
|
}
|
|
</script> |