Merge pull request #3096 from Pectojin/system_info_add_username_and_startedby_variables

added 'UserName' and 'StartedBy' variables to the system info page
This commit is contained in:
Kenneth Skovhede
2018-03-16 08:41:55 +01:00
committed by GitHub
3 changed files with 15 additions and 0 deletions
@@ -156,6 +156,8 @@ namespace Duplicati.GUI.TrayIcon
openui = Duplicati.Server.Program.IsFirstRun || Duplicati.Server.Program.ServerPortChanged;
password = Duplicati.Server.Program.DataConnection.ApplicationSettings.WebserverPassword;
saltedpassword = true;
// Tell the hosted server it was started by the TrayIcon
Duplicati.Server.Program.Origin = "Tray icon";
var cert = Duplicati.Server.Program.DataConnection.ApplicationSettings.ServerSSLCertificate;
var scheme = "http";
+11
View File
@@ -126,6 +126,11 @@ namespace Duplicati.Server
/// </summary>
public static LogWriteHandler LogHandler = new LogWriteHandler();
/// <summary>
/// Used to check the origin of the web server (e.g. Tray icon or a stand alone Server)
/// </summary>
public static string Origin = "Server";
private static System.Threading.Timer PurgeTempFilesTimer = null;
public static int ServerPort
@@ -142,6 +147,12 @@ namespace Duplicati.Server
set { DataConnection.ApplicationSettings.IsFirstRun = value; }
}
public static string StartedBy
{
get { return Origin; }
set { Origin = value; }
}
public static bool ServerPortChanged
{
get { return DataConnection.ApplicationSettings.ServerPortChanged; }
@@ -71,6 +71,7 @@ namespace Duplicati.Server.WebServer.RESTMethods
ServerVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(),
ServerVersionName = Duplicati.License.VersionNumbers.Version,
ServerVersionType = Duplicati.Library.AutoUpdater.UpdaterManager.SelfVersion.ReleaseType,
StartedBy = Duplicati.Server.Program.Origin,
BaseVersionName = Duplicati.Library.AutoUpdater.UpdaterManager.BaseVersion.Displayname,
DefaultUpdateChannel = Duplicati.Library.AutoUpdater.AutoUpdateSettings.DefaultUpdateChannel,
DefaultUsageReportLevel = Duplicati.Library.UsageReporter.Reporter.DefaultReportLevel,
@@ -81,6 +82,7 @@ namespace Duplicati.Server.WebServer.RESTMethods
CaseSensitiveFilesystem = Duplicati.Library.Utility.Utility.IsFSCaseSensitive,
MonoVersion = Duplicati.Library.Utility.Utility.IsMono ? Duplicati.Library.Utility.Utility.MonoVersion.ToString() : null,
MachineName = System.Environment.MachineName,
UserName = System.Environment.UserName,
NewLine = System.Environment.NewLine,
CLRVersion = System.Environment.Version.ToString(),
CLROSInfo = new