From fb0cd863c2c3665bf26a01d07a2d4b29eb696c61 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Wed, 12 Mar 2014 01:42:37 +0100 Subject: [PATCH] Report web modules in system info --- .../Server/Serializable/ServerSettings.cs | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/Duplicati/Server/Serializable/ServerSettings.cs b/Duplicati/Server/Serializable/ServerSettings.cs index b7cada52b..afa8cd64f 100644 --- a/Duplicati/Server/Serializable/ServerSettings.cs +++ b/Duplicati/Server/Serializable/ServerSettings.cs @@ -44,7 +44,7 @@ namespace Duplicati.Server.Serializable } /// - /// Constructor for backend interface + /// Constructor for compression module interface /// public DynamicModule(Duplicati.Library.Interface.ICompression module) { @@ -56,7 +56,7 @@ namespace Duplicati.Server.Serializable } /// - /// Constructor for backend interface + /// Constructor for encryption module interface /// public DynamicModule(Duplicati.Library.Interface.IEncryption module) { @@ -68,7 +68,7 @@ namespace Duplicati.Server.Serializable } /// - /// Constructor for backend interface + /// Constructor for generic module interface /// public DynamicModule(Duplicati.Library.Interface.IGenericModule module) { @@ -79,6 +79,17 @@ namespace Duplicati.Server.Serializable this.Options = module.SupportedCommands.ToArray(); } + /// + /// Constructor for webmodule interface + /// + public DynamicModule(Duplicati.Library.Interface.IWebModule module) + { + this.Key = module.Key; + this.Description = module.Description; + this.DisplayName = module.DisplayName; + if (module.SupportedCommands != null) + this.Options = module.SupportedCommands.ToArray(); + } /// /// The module key /// @@ -164,6 +175,19 @@ namespace Duplicati.Server.Serializable } } + /// + /// The generic modules known by the server + /// + public static IDynamicModule[] WebModules + { + get + { + return + (from n in Library.DynamicLoader.WebLoader.Modules + select new DynamicModule(n)) + .ToArray(); + } + } /// /// The filters that are applied to all backups ///