mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add configuration for slow response logging
This commit is contained in:
parent
98814a5b66
commit
bd8fc27bd3
3 changed files with 52 additions and 1 deletions
|
@ -1,6 +1,31 @@
|
||||||
<div id="logPage" data-role="page" class="page type-interior">
|
<div id="logPage" data-role="page" class="page type-interior">
|
||||||
<div>
|
<div>
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
<form class="logsForm">
|
||||||
|
<div class="verticalSection">
|
||||||
|
<div class="sectionTitleContainer flex align-items-center">
|
||||||
|
<h2 class="sectionTitle">${TabLogs}</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="verticalSection">
|
||||||
|
<div class="checkboxContainer checkboxContainer-withDescription">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" is="emby-checkbox" id="chkSlowResponseWarning" />
|
||||||
|
<span>${LabelSlowResponseEnabled}</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="inputContainer">
|
||||||
|
<input is="emby-input" type="number" id="txtSlowResponseWarning" label="${LabelSlowResponseTime}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
<div>
|
||||||
|
<button is="emby-button" type="submit" class="raised button-submit block">
|
||||||
|
<span>${Save}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
<div class="serverLogs readOnlyContent">
|
<div class="serverLogs readOnlyContent">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,12 +1,30 @@
|
||||||
import datetime from '../../scripts/datetime';
|
import datetime from '../../scripts/datetime';
|
||||||
import loading from '../../components/loading/loading';
|
import loading from '../../components/loading/loading';
|
||||||
|
import globalize from '../../scripts/globalize';
|
||||||
import '../../elements/emby-button/emby-button';
|
import '../../elements/emby-button/emby-button';
|
||||||
import '../../components/listview/listview.scss';
|
import '../../components/listview/listview.scss';
|
||||||
import '../../assets/css/flexstyles.scss';
|
import '../../assets/css/flexstyles.scss';
|
||||||
|
|
||||||
/* eslint-disable indent */
|
/* eslint-disable indent */
|
||||||
|
|
||||||
|
function onSubmit() {
|
||||||
|
loading.show();
|
||||||
|
const form = this;
|
||||||
|
ApiClient.getServerConfiguration().then(function (config) {
|
||||||
|
config.EnableSlowResponseWarning = form.querySelector('#chkSlowResponseWarning').checked;
|
||||||
|
config.SlowResponseThresholdMs = form.querySelector('#txtSlowResponseWarning').value;
|
||||||
|
ApiClient.updateServerConfiguration(config).then(function() {
|
||||||
|
Dashboard.processServerConfigurationUpdateResult();
|
||||||
|
}, function () {
|
||||||
|
alert(globalize.translate('ErrorDefault'));
|
||||||
|
Dashboard.processServerConfigurationUpdateResult();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
export default function(view) {
|
export default function(view) {
|
||||||
|
view.querySelector('.logsForm').addEventListener('submit', onSubmit);
|
||||||
view.addEventListener('viewbeforeshow', function() {
|
view.addEventListener('viewbeforeshow', function() {
|
||||||
loading.show();
|
loading.show();
|
||||||
const apiClient = ApiClient;
|
const apiClient = ApiClient;
|
||||||
|
@ -32,8 +50,14 @@ import '../../assets/css/flexstyles.scss';
|
||||||
}).join('');
|
}).join('');
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
view.querySelector('.serverLogs').innerHTML = html;
|
view.querySelector('.serverLogs').innerHTML = html;
|
||||||
loading.hide();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
apiClient.getServerConfiguration().then(function (config) {
|
||||||
|
view.querySelector('#chkSlowResponseWarning').checked = config.EnableSlowResponseWarning;
|
||||||
|
view.querySelector('#txtSlowResponseWarning').value = config.SlowResponseThresholdMs;
|
||||||
|
});
|
||||||
|
|
||||||
|
loading.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -822,6 +822,8 @@
|
||||||
"LabelSkipIfAudioTrackPresentHelp": "Uncheck this to ensure all videos have subtitles, regardless of audio language.",
|
"LabelSkipIfAudioTrackPresentHelp": "Uncheck this to ensure all videos have subtitles, regardless of audio language.",
|
||||||
"LabelSkipIfGraphicalSubsPresent": "Skip if the video already contains embedded subtitles",
|
"LabelSkipIfGraphicalSubsPresent": "Skip if the video already contains embedded subtitles",
|
||||||
"LabelSkipIfGraphicalSubsPresentHelp": "Keeping text versions of subtitles will result in more efficient delivery and decrease the likelihood of video transcoding.",
|
"LabelSkipIfGraphicalSubsPresentHelp": "Keeping text versions of subtitles will result in more efficient delivery and decrease the likelihood of video transcoding.",
|
||||||
|
"LabelSlowResponseEnabled": "Log warning if server response was slow",
|
||||||
|
"LabelSlowResponseTime": "Time in ms after which a response is considered slow",
|
||||||
"LabelSonyAggregationFlags": "Sony aggregation flags:",
|
"LabelSonyAggregationFlags": "Sony aggregation flags:",
|
||||||
"LabelSonyAggregationFlagsHelp": "Determines the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace.",
|
"LabelSonyAggregationFlagsHelp": "Determines the content of the aggregationFlags element in the urn:schemas-sonycom:av namespace.",
|
||||||
"LabelSortBy": "Sort by:",
|
"LabelSortBy": "Sort by:",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue