added dashboard info page

This commit is contained in:
Luke Pulverenti 2014-01-18 14:25:20 -05:00
parent 2170a25858
commit 5ca7d63556
6 changed files with 34 additions and 23 deletions

View File

@ -109,7 +109,13 @@ namespace MediaBrowser.Model.System
/// </summary>
/// <value>The log path.</value>
public string LogPath { get; set; }
/// <summary>
/// Gets or sets the transcoding temporary path.
/// </summary>
/// <value>The transcoding temporary path.</value>
public string TranscodingTempPath { get; set; }
/// <summary>
/// Gets or sets the HTTP server port number.
/// </summary>

View File

@ -642,7 +642,8 @@ namespace MediaBrowser.ServerApplication
CanSelfUpdate = CanSelfUpdate,
WanAddress = GetWanAddress(),
HasUpdateAvailable = _hasUpdateAvailable,
SupportsAutoRunAtStartup = SupportsAutoRunAtStartup
SupportsAutoRunAtStartup = SupportsAutoRunAtStartup,
TranscodingTempPath = ApplicationPaths.TranscodingTempPath
};
}

View File

@ -476,6 +476,7 @@ namespace MediaBrowser.WebDashboard.Api
"metadataadvanced.js",
"appsplayback.js",
"appsweather.js",
"dashboardinfo.js",
"dashboardpage.js",
"directorybrowser.js",
"edititemmetadata.js",

View File

@ -6,19 +6,14 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
/**
* Creates a new api client instance
* @param {String} serverProtocol
* @param {String} serverHostName
* @param {String} serverPortNumber
* @param {String} serverAddress
* @param {String} clientName
* @param {String} applicationVersion
*/
return function (serverProtocol, serverHostName, serverPortNumber, clientName, applicationVersion) {
return function (serverAddress, clientName, applicationVersion) {
if (!serverProtocol) {
throw new Error("Must supply a serverProtocol, e.g. http:");
}
if (!serverHostName) {
throw new Error("Must supply serverHostName, e.g. 192.168.1.1 or myServerName");
if (!serverAddress) {
throw new Error("Must supply a serverAddress");
}
var self = this;
@ -28,11 +23,11 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
var webSocket;
/**
* Gets the server host name.
* Gets the server address.
*/
self.serverHostName = function () {
self.serverAddress = function () {
return serverHostName;
return serverAddress;
};
/**
@ -133,11 +128,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
throw new Error("Url name cannot be empty");
}
var url = serverProtocol + "//" + serverHostName;
if (serverPortNumber) {
url += ":" + serverPortNumber;
}
var url = serverAddress;
url += "/mediabrowser/" + name;
@ -148,9 +139,9 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
return url;
};
self.openWebSocket = function (port) {
self.openWebSocket = function (webSocketAddress) {
var url = "ws://" + serverHostName + ":" + port + "/mediabrowser";
var url = webSocketAddress + "/mediabrowser";
webSocket = new WebSocket(url);
@ -3998,7 +3989,13 @@ MediaBrowser.ApiClient.create = function (clientName, applicationVersion) {
var loc = window.location;
return new MediaBrowser.ApiClient(loc.protocol, loc.hostname, loc.port, clientName, applicationVersion);
var address = loc.protocol + '//' + loc.hostname;
if (loc.port) {
address += ':' + loc.port;
}
return new MediaBrowser.ApiClient(address, clientName, applicationVersion);
};
/**

View File

@ -163,6 +163,9 @@
<Content Include="dashboard-ui\css\mediaplayer.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\dashboardinfopage.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\encodingsettings.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@ -409,6 +412,9 @@
<Content Include="dashboard-ui\scripts\appsplayback.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\scripts\dashboardinfo.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\scripts\encodingsettings.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.230" targetFramework="net45" />
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.237" targetFramework="net45" />
</packages>