Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove option to enable debug logging #272

Merged
merged 2 commits into from
Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 19 additions & 15 deletions src/controllers/logpage.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
define(["datetime", "loading", "apphost", "listViewStyle", "emby-button", "flexStyles"], function(datetime, loading, appHost) {
"use strict";
return function(view, params) {
view.querySelector("#chkDebugLog").addEventListener("change", function() {
ApiClient.getServerConfiguration().then(function(config) {
config.EnableDebugLevelLogging = view.querySelector("#chkDebugLog").checked, ApiClient.updateServerConfiguration(config)
})
}), view.addEventListener("viewbeforeshow", function() {
view.addEventListener("viewbeforeshow", function() {
loading.show();
var apiClient = ApiClient;
apiClient.getJSON(apiClient.getUrl("System/Logs")).then(function(logs) {
var html = "";
html += '<div class="paperList">', html += logs.map(function(log) {
html += '<div class="paperList">';
html += logs.map(function(log) {
var logUrl = apiClient.getUrl("System/Logs/Log", {
name: log.Name
});
logUrl += "&api_key=" + apiClient.accessToken();
var logHtml = "";
logHtml += '<a is="emby-linkbutton" href="' + logUrl + '" target="_blank" class="listItem listItem-border" style="color:inherit;">', logHtml += '<div class="listItemBody two-line">', logHtml += "<h3 class='listItemBodyText'>" + log.Name + "</h3>";
var date = datetime.parseISO8601Date(log.DateModified, !0),
text = datetime.toLocaleDateString(date);
return text += " " + datetime.getDisplayTime(date), logHtml += '<div class="listItemBodyText secondary">' + text + "</div>", logHtml += "</div>", logHtml += "</a>"
}).join(""), html += "</div>", view.querySelector(".serverLogs").innerHTML = html, loading.hide()
}), apiClient.getServerConfiguration().then(function(config) {
view.querySelector("#chkDebugLog").checked = config.EnableDebugLevelLogging
})
})
logHtml += '<a is="emby-linkbutton" href="' + logUrl + '" target="_blank" class="listItem listItem-border" style="color:inherit;">';
logHtml += '<div class="listItemBody two-line">';
logHtml += "<h3 class='listItemBodyText'>" + log.Name + "</h3>";
var date = datetime.parseISO8601Date(log.DateModified, true);
var text = datetime.toLocaleDateString(date);
text += " " + datetime.getDisplayTime(date);
logHtml += '<div class="listItemBodyText secondary">' + text + "</div>";
logHtml += "</div>";
logHtml += "</a>";
return logHtml;
}).join("");
html += "</div>";
view.querySelector(".serverLogs").innerHTML = html;
loading.hide();
});
});
}
});
13 changes: 0 additions & 13 deletions src/log.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
<div id="logPage" data-role="page" class="page type-interior">

<div>
<div class="content-primary">
<div class="readOnlyContent">
<div class="flex padded-top">
<div class="checkboxContainer checkboxContainer-withDescription">
<label style="width:auto;">
<input type="checkbox" is="emby-checkbox" id="chkDebugLog" />
<span>${LabelEnableDebugLogging}</span>
</label>
<div class="fieldDescription checkboxFieldDescription">${EnableDebugLoggingHelp}</div>
</div>
</div>
</div>
<div class="serverLogs readOnlyContent">

</div>
</div>
</div>
Expand Down