Added an Id property to SystemInfo

This commit is contained in:
LukePulverenti 2013-03-15 00:23:07 -04:00
parent 064b3d58cc
commit b86a03bbdc
4 changed files with 29 additions and 16 deletions

View File

@ -1,5 +1,6 @@
using MediaBrowser.Model.Updates;
using ProtoBuf;
using System;
namespace MediaBrowser.Model.System
{
@ -62,6 +63,14 @@ namespace MediaBrowser.Model.System
/// Gets or sets plugin assemblies that failed to load.
/// </summary>
/// <value>The failed assembly loads.</value>
[ProtoMember(8)]
public string[] FailedPluginAssemblies { get; set; }
/// <summary>
/// Gets or sets the id.
/// </summary>
/// <value>The id.</value>
[ProtoMember(9)]
public Guid Id { get; set; }
}
}

View File

@ -2,6 +2,7 @@
using MediaBrowser.Common;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Constants;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Implementations;
using MediaBrowser.Common.Implementations.ScheduledTasks;
using MediaBrowser.Common.IO;
@ -334,6 +335,8 @@ namespace MediaBrowser.ServerApplication
yield return GetType().Assembly;
}
private readonly Guid _systemId = Environment.MachineName.GetMD5();
/// <summary>
/// Gets the system status.
/// </summary>
@ -349,7 +352,8 @@ namespace MediaBrowser.ServerApplication
SupportsNativeWebSocket = ServerManager.SupportsNativeWebSocket,
FailedPluginAssemblies = FailedAssemblies.ToArray(),
InProgressInstallations = InstallationManager.CurrentInstallations.Select(i => i.Item1).ToArray(),
CompletedInstallations = InstallationManager.CompletedInstallations.ToArray()
CompletedInstallations = InstallationManager.CompletedInstallations.ToArray(),
Id = _systemId
};
}

View File

@ -26,7 +26,7 @@
<br/>
<br/>
<p>
Utilizing <a href="http://www.pismotechnic.com/pfm/" />Pismo File Mount</a> through a donated license.
Utilizing <a href="http://www.pismotechnic.com/pfm/" target="_blank">Pismo File Mount</a> through a donated license.
</p>
</div>
</div>

View File

@ -6,17 +6,17 @@
pollForInfo: function () {
$.getJSON("dashboardInfo").done(AboutPage.renderInfo);
ApiClient.getSystemInfo().done(AboutPage.renderInfo);
},
renderInfo: function (dashboardInfo) {
AboutPage.renderSystemInfo(dashboardInfo);
renderInfo: function (info) {
AboutPage.renderSystemInfo(info);
},
renderSystemInfo: function (dashboardInfo) {
renderSystemInfo: function (info) {
var page = $.mobile.activePage;
$('#appVersionNumber', page).html(dashboardInfo.SystemInfo.Version);
$('#appVersionNumber', page).html(info.Version);
},
};