mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added dashboard info page
This commit is contained in:
parent
0073dc3476
commit
1fa7dcdb2b
8 changed files with 125 additions and 63 deletions
40
dashboard-ui/scripts/dashboardinfo.js
Normal file
40
dashboard-ui/scripts/dashboardinfo.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
(function ($, document, window) {
|
||||
|
||||
function loadPage(page, systemInfo) {
|
||||
|
||||
$('#cachePath', page).html(systemInfo.CachePath);
|
||||
$('#logPath', page).html(systemInfo.LogPath);
|
||||
$('#imagesByNamePath', page).html(systemInfo.ItemsByNamePath);
|
||||
$('#transcodingTemporaryPath', page).html(systemInfo.TranscodingTempPath);
|
||||
|
||||
var url = ApiClient.serverAddress() + "/mediabrowser";
|
||||
|
||||
$('#bookmarkUrl', page).html(url).attr("href", url);
|
||||
|
||||
if (systemInfo.WanAddress) {
|
||||
|
||||
var externalUrl = systemInfo.WanAddress + "/mediabrowser";
|
||||
|
||||
$('.externalUrl', page).html('External url: <a href="' + externalUrl + '" target="_blank">' + externalUrl + '</a>').show().trigger('create');
|
||||
} else {
|
||||
$('.externalUrl', page).hide();
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#dashboardInfoPage", function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getSystemInfo().done(function (systemInfo) {
|
||||
|
||||
loadPage(page, systemInfo);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, document, window);
|
Loading…
Add table
Add a link
Reference in a new issue