mirror of https://github.com/Ombi-app/Ombi
commit
50022368f4
File diff suppressed because one or more lines are too long
@ -0,0 +1,111 @@
|
|||||||
|
@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>
|
Loading…
Reference in new issue