1
0
Fork 0
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:
Luke Pulverenti 2014-01-18 14:25:20 -05:00
parent 0073dc3476
commit 1fa7dcdb2b
8 changed files with 125 additions and 63 deletions

View file

@ -8,6 +8,11 @@
<div data-role="content">
<div class="content-primary">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="#" data-role="button" class="ui-btn-active">Home</a>
<a href="dashboardinfopage.html" data-role="button">Info</a>
</div>
<div class="readOnlyContent">
<div data-role="collapsible" data-collapsed="false" style="margin-top: 2em;">
@ -67,25 +72,6 @@
<p><a href="scheduledtasks.html">Manage Scheduled Tasks</a></p>
</div>
<div data-role="collapsible" data-collapsed="true" style="margin-top: 1em;">
<h3>Links</h3>
<div>
<p>Bookmark url: <a id="bookmarkUrl" href="#" data-ajax="false"></a></p>
<p class="externalUrl"></p>
<p><a href="http://mediabrowser3.com/community" target="_blank">Community</a> - Join us!</p>
<p><a href="https://github.com/MediaBrowser/MediaBrowser" target="_blank">Github</a></p>
<p><a href="../swagger-ui/index.html" target="_blank">Api Documentation</a></p>
</div>
</div>
<div data-role="collapsible" data-collapsed="true" style="margin-top: 1em;">
<h3>System Paths</h3>
<div>
<p><b>Logs:</b> <span id="logPath"></span></p>
<p><b>Images by name:</b> <span id="imagesByNamePath"></span></p>
</div>
</div>
<div style="display: none; margin-top: 4em;" id="contribute">
<h2>Help improve Media Browser</h2>
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr"

View file

@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title>Dashboard</title>
</head>
<body>
<div id="dashboardInfoPage" data-role="page" class="page type-interior adminPage">
<div data-role="content">
<div class="content-primary">
<div class="readOnlyContent">
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
<a href="dashboard.html" data-role="button">Home</a>
<a href="#" data-role="button" class="ui-btn-active">Info</a>
</div>
<div data-role="collapsible" data-collapsed="false" style="margin-top: 1em;">
<h3>Links</h3>
<div>
<p>Bookmark url: <a id="bookmarkUrl" href="#" data-ajax="false"></a></p>
<p class="externalUrl"></p>
<p><a href="http://mediabrowser3.com/community" target="_blank">Community</a> - Join us!</p>
<p><a href="https://github.com/MediaBrowser/MediaBrowser" target="_blank">Github</a></p>
<p><a href="../swagger-ui/index.html" target="_blank">Api Documentation</a></p>
</div>
</div>
<div data-role="collapsible" data-collapsed="false" style="margin-top: 1em;">
<h3>System Paths</h3>
<div>
<p><b>Cache:</b> <span id="cachePath"></span></p>
<p><b>Images by name:</b> <span id="imagesByNamePath"></span></p>
<p><b>Logs:</b> <span id="logPath"></span></p>
<p><b>Transcoding temporary files:</b> <span id="transcodingTemporaryPath"></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View 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);

View file

@ -347,15 +347,6 @@
$('#ports', page).html('Running on ports <b>' + port + '</b> and <b>' + dashboardInfo.SystemInfo.WebSocketPortNumber + '</b>');
}
$('#logPath', page).html(dashboardInfo.SystemInfo.LogPath);
$('#imagesByNamePath', page).html(dashboardInfo.SystemInfo.ItemsByNamePath);
var host = ApiClient.serverHostName();
var url = "http://" + host + ":" + port + "/mediabrowser";
$('#bookmarkUrl', page).html(url).attr("href", url);
if (dashboardInfo.RunningTasks.filter(function (task) {
return task.Id == dashboardInfo.ApplicationUpdateTaskId;
@ -373,15 +364,6 @@
$('.btnRestartContainer', page).addClass('hide');
}
if (dashboardInfo.SystemInfo.WanAddress) {
var externalUrl = dashboardInfo.SystemInfo.WanAddress + "/mediabrowser";
$('.externalUrl', page).html('External url: <a href="' + externalUrl + '" target="_blank">' + externalUrl + '</a>').show().trigger('create');
} else {
$('.externalUrl', page).hide();
}
DashboardPage.renderApplicationUpdateInfo(dashboardInfo);
DashboardPage.renderPluginUpdateInfo(dashboardInfo);
DashboardPage.renderPendingInstallations(dashboardInfo.SystemInfo);

View file

@ -888,16 +888,16 @@
var attributes = [];
if (stream.Language) {
if (stream.Language && stream.Type != "Video") {
attributes.push('<span class="mediaInfoAttribute">' + stream.Language + '</span>');
}
if (stream.Codec && stream.Codec != "dca") {
attributes.push('<span class="mediaInfoAttribute">' + stream.Codec + '</span>');
attributes.push('<span class="mediaInfoAttribute">' + stream.Codec.toUpperCase() + '</span>');
}
if (stream.Profile && stream.Codec == "dca") {
attributes.push('<span class="mediaInfoAttribute">' + stream.Profile + '</span>');
attributes.push('<span class="mediaInfoAttribute">' + stream.Profile.toUpperCase() + '</span>');
}
if (stream.Width || stream.Height) {
@ -919,7 +919,7 @@
attributes.push('<span class="mediaInfoAttribute">' + (parseInt(stream.BitRate / 1000)) + ' kbps</span>');
}
if (stream.IsDefault) {
if (stream.IsDefault && stream.Type != "Video") {
attributes.push('<span class="mediaInfoAttribute">Default</span>');
}
if (stream.IsForced) {

View file

@ -797,7 +797,21 @@ var Dashboard = {
systemInfo = systemInfo || Dashboard.lastSystemInfo;
ApiClient.openWebSocket(systemInfo.WebSocketPortNumber);
var location = window.location;
var webSocketUrl = "ws://" + location.hostname;
if (systemInfo.HttpServerPortNumber != systemInfo.WebSocketPortNumber) {
if (location.port) {
webSocketUrl += ':' + location.port;
}
} else {
webSocketUrl += ':' + systemInfo.WebSocketPortNumber;
}
ApiClient.openWebSocket(webSocketUrl);
},
onWebSocketMessageReceived: function (e, data) {