From 9d9a5a027553450a16f492f170475ef94d90bb8b Mon Sep 17 00:00:00 2001 From: hishamco Date: Tue, 20 Apr 2021 16:20:24 +0300 Subject: [PATCH 01/14] Localize modules title --- Oqtane.Server/Repository/SiteRepository.cs | 49 +++++++++++----------- 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index b376b470..3e0dfa5a 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -5,6 +5,7 @@ using System.Linq; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Localization; using Oqtane.Extensions; using Oqtane.Infrastructure; using Oqtane.Models; @@ -24,14 +25,13 @@ namespace Oqtane.Repository private readonly IModuleRepository _moduleRepository; private readonly IPageModuleRepository _pageModuleRepository; private readonly IModuleDefinitionRepository _moduleDefinitionRepository; - private readonly IServiceProvider _serviceProvider; - private readonly IConfigurationRoot _config; + private readonly IStringLocalizer _localizer; public SiteRepository(TenantDBContext context, IRoleRepository roleRepository, IProfileRepository profileRepository, IFolderRepository folderRepository, IPageRepository pageRepository, IModuleRepository moduleRepository, IPageModuleRepository pageModuleRepository, IModuleDefinitionRepository moduleDefinitionRepository, IServiceProvider serviceProvider, - IConfigurationRoot config) + IConfigurationRoot config, IStringLocalizer localizer) { _db = context; _roleRepository = roleRepository; @@ -43,6 +43,7 @@ namespace Oqtane.Repository _moduleDefinitionRepository = moduleDefinitionRepository; _serviceProvider = serviceProvider; _config = config; + _localizer = localizer; } private List CreateAdminPages(List pageTemplates = null) @@ -68,7 +69,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Login.Index).ToModuleDefinitionName(), Title = "User Login", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Login.Index).ToModuleDefinitionName(), Title = _localizer["User Login"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -97,7 +98,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Register.Index).ToModuleDefinitionName(), Title = "User Registration", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Register.Index).ToModuleDefinitionName(), Title = _localizer["User Registration"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -127,7 +128,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Reset.Index).ToModuleDefinitionName(), Title = "Password Reset", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Reset.Index).ToModuleDefinitionName(), Title = _localizer["Password Reset"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -156,7 +157,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.UserProfile.Index).ToModuleDefinitionName(), Title = "User Profile", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.UserProfile.Index).ToModuleDefinitionName(), Title = _localizer["User Profile"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -181,7 +182,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Dashboard.Index).ToModuleDefinitionName(), Title = "Admin Dashboard", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Dashboard.Index).ToModuleDefinitionName(), Title = _localizer["Admin Dashboard"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -208,7 +209,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Site.Index).ToModuleDefinitionName(), Title = "Site Settings", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Site.Index).ToModuleDefinitionName(), Title = _localizer["Site Settings"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -235,7 +236,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Pages.Index).ToModuleDefinitionName(), Title = "Page Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Pages.Index).ToModuleDefinitionName(), Title = _localizer["Page Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -262,7 +263,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Users.Index).ToModuleDefinitionName(), Title = "User Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Users.Index).ToModuleDefinitionName(), Title = _localizer["User Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -289,7 +290,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Profiles.Index).ToModuleDefinitionName(), Title = "Profile Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Profiles.Index).ToModuleDefinitionName(), Title = _localizer["Profile Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -316,7 +317,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Roles.Index).ToModuleDefinitionName(), Title = "Role Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Roles.Index).ToModuleDefinitionName(), Title = _localizer["Role Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -343,7 +344,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Files.Index).ToModuleDefinitionName(), Title = "File Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Files.Index).ToModuleDefinitionName(), Title = _localizer["File Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -370,7 +371,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.RecycleBin.Index).ToModuleDefinitionName(), Title = "Recycle Bin", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.RecycleBin.Index).ToModuleDefinitionName(), Title = _localizer["Recycle Bin"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -399,7 +400,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Logs.Index).ToModuleDefinitionName(), Title = "Event Log", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Logs.Index).ToModuleDefinitionName(), Title = _localizer["Event Log"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -421,7 +422,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Sites.Index).ToModuleDefinitionName(), Title = "Site Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Sites.Index).ToModuleDefinitionName(), Title = _localizer["Site Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -443,7 +444,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.ModuleDefinitions.Index).ToModuleDefinitionName(), Title = "Module Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.ModuleDefinitions.Index).ToModuleDefinitionName(), Title = _localizer["Module Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -465,7 +466,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Themes.Index).ToModuleDefinitionName(), Title = "Theme Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Themes.Index).ToModuleDefinitionName(), Title = _localizer["Theme Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -494,7 +495,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Languages.Index).ToModuleDefinitionName(), Title = "Language Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Languages.Index).ToModuleDefinitionName(), Title = _localizer["Language Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -518,7 +519,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Jobs.Index).ToModuleDefinitionName(), Title = "Scheduled Jobs", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Jobs.Index).ToModuleDefinitionName(), Title = _localizer["Scheduled Jobs"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -540,7 +541,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Sql.Index).ToModuleDefinitionName(), Title = "Sql Management", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Sql.Index).ToModuleDefinitionName(), Title = _localizer["Sql Management"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -562,7 +563,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.SystemInfo.Index).ToModuleDefinitionName(), Title = "System Info", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.SystemInfo.Index).ToModuleDefinitionName(), Title = _localizer["System Info"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -584,7 +585,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Upgrade.Index).ToModuleDefinitionName(), Title = "System Update", Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Upgrade.Index).ToModuleDefinitionName(), Title = _localizer["System Update"], Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), From 3cafb68f6b6e909e6c07e20ed3821c3e6cae9864 Mon Sep 17 00:00:00 2001 From: hishamco Date: Wed, 21 Apr 2021 17:31:22 +0300 Subject: [PATCH 02/14] Localize module titles in UI --- Oqtane.Client/Modules/Admin/Dashboard/Index.razor | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Dashboard/Index.razor b/Oqtane.Client/Modules/Admin/Dashboard/Index.razor index 650eaee6..620bf65a 100644 --- a/Oqtane.Client/Modules/Admin/Dashboard/Index.razor +++ b/Oqtane.Client/Modules/Admin/Dashboard/Index.razor @@ -2,6 +2,7 @@ @inherits ModuleBase @inject IPageService PageService @inject IUserService UserService +@inject IStringLocalizer Localizer
@foreach (var p in _pages) @@ -11,7 +12,7 @@ string url = NavigateUrl(p.Path);
-

@p.Name +

@Localizer[p.Name]
} @@ -20,7 +21,7 @@ @code { private List _pages; - + public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin; protected override void OnInitialized() From 76c2a2f2f9ca994432201b154fc4d7f1ee9d79cc Mon Sep 17 00:00:00 2001 From: hishamco Date: Mon, 26 Apr 2021 01:55:27 +0300 Subject: [PATCH 03/14] Add English to supported cultures by default --- .../Infrastructure/LocalizationManager.cs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Oqtane.Server/Infrastructure/LocalizationManager.cs b/Oqtane.Server/Infrastructure/LocalizationManager.cs index 1ec6e740..998f3403 100644 --- a/Oqtane.Server/Infrastructure/LocalizationManager.cs +++ b/Oqtane.Server/Infrastructure/LocalizationManager.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.IO; using System.Reflection; @@ -9,7 +10,7 @@ namespace Oqtane.Infrastructure public class LocalizationManager : ILocalizationManager { private static readonly string DefaultCulture = Constants.DefaultCulture; - private static readonly string[] SupportedCultures = new[] { DefaultCulture }; + private static readonly string[] DefaultSupportedCultures = new[] { DefaultCulture }; private readonly LocalizationOptions _localizationOptions; @@ -19,25 +20,19 @@ namespace Oqtane.Infrastructure } public string GetDefaultCulture() - => string.IsNullOrEmpty(_localizationOptions.DefaultCulture) + => String.IsNullOrEmpty(_localizationOptions.DefaultCulture) ? DefaultCulture : _localizationOptions.DefaultCulture; public string[] GetSupportedCultures() { - List cultures = new List(); + var cultures = new List(DefaultSupportedCultures); foreach(var file in Directory.EnumerateFiles(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "Oqtane.Client.resources.dll", SearchOption.AllDirectories)) { cultures.Add(Path.GetFileName(Path.GetDirectoryName(file))); } - if (cultures.Count == 0) - { - return SupportedCultures; - } - else - { - return cultures.ToArray(); - } + + return cultures.ToArray(); } } } From 55b69f0afc8e51d98720f309222982b29983353c Mon Sep 17 00:00:00 2001 From: hishamco Date: Mon, 26 Apr 2021 01:55:55 +0300 Subject: [PATCH 04/14] Order the cultures alphabatically --- Oqtane.Server/Infrastructure/LocalizationManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Oqtane.Server/Infrastructure/LocalizationManager.cs b/Oqtane.Server/Infrastructure/LocalizationManager.cs index 998f3403..83a9cf25 100644 --- a/Oqtane.Server/Infrastructure/LocalizationManager.cs +++ b/Oqtane.Server/Infrastructure/LocalizationManager.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Linq; using System.Reflection; using Microsoft.Extensions.Options; using Oqtane.Shared; @@ -32,7 +33,7 @@ namespace Oqtane.Infrastructure cultures.Add(Path.GetFileName(Path.GetDirectoryName(file))); } - return cultures.ToArray(); + return cultures.OrderBy(c => c).ToArray(); } } } From a531a235a0bdb6f10280b365400f90a24a696e28 Mon Sep 17 00:00:00 2001 From: ijungleboy Date: Mon, 26 Apr 2021 13:51:37 +0200 Subject: [PATCH 05/14] Make version static-readonly https://github.com/oqtane/oqtane.framework/issues/1283 --- Oqtane.Shared/Shared/Constants.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Shared/Shared/Constants.cs b/Oqtane.Shared/Shared/Constants.cs index 28f065e6..8d8f64ec 100644 --- a/Oqtane.Shared/Shared/Constants.cs +++ b/Oqtane.Shared/Shared/Constants.cs @@ -5,7 +5,7 @@ namespace Oqtane.Shared { public class Constants { public const string PackageId = "Oqtane.Framework"; - public const string Version = "2.1.0"; + public static readonly string Version = "2.1.0"; public const string ReleaseVersions = "1.0.0,1.0.1,1.0.2,1.0.3,1.0.4,2.0.0,2.0.1,2.0.2,2.1.0"; public const string PageComponent = "Oqtane.UI.ThemeBuilder, Oqtane.Client"; From 189dcf5b903e8fb9221d9c88a929e14befeb1208 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Mon, 26 Apr 2021 15:38:33 +0200 Subject: [PATCH 06/14] Fix for Error with Footer on Oqtane Theme #1282 --- Oqtane.Client/Themes/OqtaneTheme/Themes/Default.razor | 1 + 1 file changed, 1 insertion(+) diff --git a/Oqtane.Client/Themes/OqtaneTheme/Themes/Default.razor b/Oqtane.Client/Themes/OqtaneTheme/Themes/Default.razor index 3de4b465..039ecc07 100644 --- a/Oqtane.Client/Themes/OqtaneTheme/Themes/Default.razor +++ b/Oqtane.Client/Themes/OqtaneTheme/Themes/Default.razor @@ -93,6 +93,7 @@ @if (_footer) { +
From 1efd623a99542857de9db1e19d98f8fcd25b7217 Mon Sep 17 00:00:00 2001 From: Charles Nurse Date: Tue, 27 Apr 2021 15:35:10 -0700 Subject: [PATCH 07/14] Adding new DatabaseConfig components in the Client project for supported Databases to avoid deploying server dlls to client --- .../Installer/Controls/LocalDBConfig.razor | 63 +++++++ .../Installer/Controls/MySQLConfig.razor | 73 ++++++++ .../Installer/Controls/PostgreSQLConfig.razor | 131 ++++++++++++++ .../Installer/Controls/SqlServerConfig.razor | 131 ++++++++++++++ .../Installer/Controls/SqliteConfig.razor | 60 +++++++ .../{UI => Installer}/Installer.razor | 163 +++++++++++------- Oqtane.Client/Modules/Admin/Sites/Add.razor | 140 +++++++++------ Oqtane.Client/Program.cs | 11 -- Oqtane.Client/_Imports.razor | 1 + Oqtane.Database.MySQL/MySQLDatabase.cs | 33 +--- .../PostgreSQLDatabase.cs | 47 +---- Oqtane.Database.Sqlite/SqliteDatabase.cs | 21 +-- Oqtane.Server/Databases/LocalDbDatabase.cs | 23 +-- Oqtane.Server/Databases/SqlServerDatabase.cs | 46 +---- .../Databases/SqlServerDatabaseBase.cs | 2 +- .../Interfaces/IDatabaseConfigControl.cs | 9 + Oqtane.Shared/Interfaces/IOqtaneDatabase.cs | 4 - Oqtane.Shared/Models/Database.cs | 2 + Oqtane.Shared/Shared/OqtaneDatabaseBase.cs | 7 +- 19 files changed, 664 insertions(+), 303 deletions(-) create mode 100644 Oqtane.Client/Installer/Controls/LocalDBConfig.razor create mode 100644 Oqtane.Client/Installer/Controls/MySQLConfig.razor create mode 100644 Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor create mode 100644 Oqtane.Client/Installer/Controls/SqlServerConfig.razor create mode 100644 Oqtane.Client/Installer/Controls/SqliteConfig.razor rename Oqtane.Client/{UI => Installer}/Installer.razor (60%) create mode 100644 Oqtane.Shared/Interfaces/IDatabaseConfigControl.cs diff --git a/Oqtane.Client/Installer/Controls/LocalDBConfig.razor b/Oqtane.Client/Installer/Controls/LocalDBConfig.razor new file mode 100644 index 00000000..9080675b --- /dev/null +++ b/Oqtane.Client/Installer/Controls/LocalDBConfig.razor @@ -0,0 +1,63 @@ +@namespace Oqtane.Installer.Controls + +@using System.ComponentModel.Design.Serialization +@implements Oqtane.Interfaces.IDatabaseConfigControl + +@inject IStringLocalizer Localizer + +@{ + foreach (var field in _connectionStringFields) + { + var fieldId = field.Name.ToLowerInvariant(); + field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm")); + + if (IsInstaller) + { + + + + + + + + + } + else + { + + + + + + + + + } + } +} + +@code { + [Parameter] + public bool IsInstaller { get; set; } + + private readonly List _connectionStringFields = new() + { + new() {Name = "Server", FriendlyName = "Server", Value = "(LocalDb)\\MSSQLLocalDB", HelpText="Enter the database server"}, + new() {Name = "Database", FriendlyName = "Database", Value = "Oqtane-{{Date}}", HelpText="Enter the name of the database"} + }; + + public string GetConnectionString() + { + var connectionString = String.Empty; + + var server = _connectionStringFields[0].Value; + var database = _connectionStringFields[1].Value; + + if (!String.IsNullOrEmpty(server) && !String.IsNullOrEmpty(database)) + { + connectionString = $"Data Source={server};AttachDbFilename=|DataDirectory|\\{database}.mdf;Initial Catalog={database};Integrated Security=SSPI;"; + } + + return connectionString; + } +} \ No newline at end of file diff --git a/Oqtane.Client/Installer/Controls/MySQLConfig.razor b/Oqtane.Client/Installer/Controls/MySQLConfig.razor new file mode 100644 index 00000000..8655e0fd --- /dev/null +++ b/Oqtane.Client/Installer/Controls/MySQLConfig.razor @@ -0,0 +1,73 @@ +@namespace Oqtane.Installer.Controls + +@implements Oqtane.Interfaces.IDatabaseConfigControl + +@inject IStringLocalizer Localizer + +@{ + foreach (var field in _connectionStringFields) + { + var fieldId = field.Name.ToLowerInvariant(); + var fieldType = (field.Name == "Pwd") ? "password" : "text"; + field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm")); + + if (IsInstaller) + { + + + + + + + + + } + else + { + + + + + + + + + } + } +} + +@code { + [Parameter] + public bool IsInstaller { get; set; } + + private readonly List _connectionStringFields = new() + { + new() {Name = "Server", FriendlyName = "Server", Value = "127.0.0.1", HelpText="Enter the database server"}, + new() {Name = "Port", FriendlyName = "Port", Value = "3306", HelpText="Enter the port used to connect to the server"}, + new() {Name = "Database", FriendlyName = "Database", Value = "Oqtane-{{Date}}", HelpText="Enter the name of the database"}, + new() {Name = "Uid", FriendlyName = "User Id", Value = "", HelpText="Enter the username to use for the database"}, + new() {Name = "Pwd", FriendlyName = "Password", Value = "", HelpText="Enter the password to use for the database"} + }; + + public string GetConnectionString() + { + var connectionString = String.Empty; + + var server = _connectionStringFields[0].Value; + var port = _connectionStringFields[1].Value; + var database = _connectionStringFields[2].Value; + var userId = _connectionStringFields[3].Value; + var password = _connectionStringFields[4].Value; + + if (!String.IsNullOrEmpty(server) && !String.IsNullOrEmpty(database) && !String.IsNullOrEmpty(userId) && !String.IsNullOrEmpty(password)) + { + connectionString = $"Server={server};Database={database};Uid={userId};Pwd={password};"; + } + + if (!String.IsNullOrEmpty(port)) + { + connectionString += $"Port={port};"; + } + return connectionString; + } +} \ No newline at end of file diff --git a/Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor b/Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor new file mode 100644 index 00000000..93f72576 --- /dev/null +++ b/Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor @@ -0,0 +1,131 @@ +@namespace Oqtane.Installer.Controls + +@implements Oqtane.Interfaces.IDatabaseConfigControl + +@inject IStringLocalizer Localizer + +@{ + foreach (var field in _connectionStringFields) + { + var fieldId = field.Name.ToLowerInvariant(); + if (field.Name != "IntegratedSecurity") + { + var isVisible = ""; + var fieldType = (field.Name == "Pwd") ? "password" : "text"; + if ((field.Name == "Uid" || field.Name == "Pwd") ) + { + var intSecurityField = _connectionStringFields.Single(f => f.Name == "IntegratedSecurity"); + if (intSecurityField != null) + { + isVisible = (Convert.ToBoolean(intSecurityField.Value)) ? "display: none;" : ""; + } + } + + field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm")); + + if (IsInstaller) + { + + + + + + + + + } + else + { + + + + + + + + + } + } + else + { + if (IsInstaller) + { + + + + + + + + + } + else + { + + + + + + + + + } + } + } +} + +@code { + [Parameter] + public bool IsInstaller { get; set; } + + private readonly List _connectionStringFields = new() + { + new() {Name = "Server", FriendlyName = "Server", Value = "127.0.0.1", HelpText="Enter the database server"}, + new() {Name = "Port", FriendlyName = "Port", Value = "5432", HelpText="Enter the port used to connect to the server"}, + new() {Name = "Database", FriendlyName = "Database", Value = "Oqtane-{{Date}}", HelpText="Enter the name of the database"}, + new() {Name = "IntegratedSecurity", FriendlyName = "Integrated Security", Value = "true", HelpText="Select if you want integrated security or not"}, + new() {Name = "Uid", FriendlyName = "User Id", Value = "", HelpText="Enter the username to use for the database"}, + new() {Name = "Pwd", FriendlyName = "Password", Value = "", HelpText="Enter the password to use for the database"} + }; + + public string GetConnectionString() + { + var connectionString = String.Empty; + + var server = _connectionStringFields[0].Value; + var port = _connectionStringFields[1].Value; + var database = _connectionStringFields[2].Value; + var integratedSecurity = Boolean.Parse(_connectionStringFields[3].Value); + var userId = _connectionStringFields[4].Value; + var password = _connectionStringFields[5].Value; + + if (!String.IsNullOrEmpty(server) && !String.IsNullOrEmpty(database) && !String.IsNullOrEmpty(port)) + { + connectionString = $"Server={server};Port={port};Database={database};"; + } + + if (integratedSecurity) + { + connectionString += "Integrated Security=true;"; + } + else + { + if (!String.IsNullOrEmpty(userId) && !String.IsNullOrEmpty(password)) + { + connectionString += $"User ID={userId};Password={password};"; + } + else + { + connectionString = String.Empty; + } + } + + return connectionString; + } +} \ No newline at end of file diff --git a/Oqtane.Client/Installer/Controls/SqlServerConfig.razor b/Oqtane.Client/Installer/Controls/SqlServerConfig.razor new file mode 100644 index 00000000..3fdbd0c7 --- /dev/null +++ b/Oqtane.Client/Installer/Controls/SqlServerConfig.razor @@ -0,0 +1,131 @@ +@namespace Oqtane.Installer.Controls + +@implements Oqtane.Interfaces.IDatabaseConfigControl + +@inject IStringLocalizer Localizer + +@{ + foreach (var field in _connectionStringFields) + { + var fieldId = field.Name.ToLowerInvariant(); + if (field.Name != "IntegratedSecurity") + { + var isVisible = ""; + var fieldType = (field.Name == "Pwd") ? "password" : "text"; + if ((field.Name == "Uid" || field.Name == "Pwd") ) + { + var intSecurityField = _connectionStringFields.Single(f => f.Name == "IntegratedSecurity"); + if (intSecurityField != null) + { + isVisible = (Convert.ToBoolean(intSecurityField.Value)) ? "display: none;" : ""; + } + } + + field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm")); + + if (IsInstaller) + { + + + + + + + + + } + else + { + + + + + + + + + } + } + else + { + if (IsInstaller) + { + + + + + + + + + } + else + { + + + + + + + + + } + } + } +} + +@code { + + [Parameter] + public bool IsInstaller { get; set; } + + private readonly List _connectionStringFields = new() + { + new() {Name = "Server", FriendlyName = "Server", Value = ".", HelpText="Enter the database server"}, + new() {Name = "Database", FriendlyName = "Database", Value = "Oqtane-{{Date}}", HelpText="Enter the name of the database"}, + new() {Name = "IntegratedSecurity", FriendlyName = "Integrated Security", Value = "true", HelpText="Select if you want integrated security or not"}, + new() {Name = "Uid", FriendlyName = "User Id", Value = "", HelpText="Enter the username to use for the database"}, + new() {Name = "Pwd", FriendlyName = "Password", Value = "", HelpText="Enter the password to use for the database"} + }; + + public string GetConnectionString() + { + var connectionString = String.Empty; + + var server = _connectionStringFields[0].Value; + var database = _connectionStringFields[1].Value; + var integratedSecurity = Boolean.Parse(_connectionStringFields[2].Value); + var userId = _connectionStringFields[3].Value; + var password = _connectionStringFields[4].Value; + + if (!String.IsNullOrEmpty(server) && !String.IsNullOrEmpty(database)) + { + connectionString = $"Data Source={server};Initial Catalog={database};"; + } + + if (integratedSecurity) + { + connectionString += "Integrated Security=SSPI;"; + } + else + { + if (!String.IsNullOrEmpty(userId) && !String.IsNullOrEmpty(password)) + { + connectionString += $"User ID={userId};Password={password};"; + } + else + { + connectionString = String.Empty; + } + } + + return connectionString; + } + +} \ No newline at end of file diff --git a/Oqtane.Client/Installer/Controls/SqliteConfig.razor b/Oqtane.Client/Installer/Controls/SqliteConfig.razor new file mode 100644 index 00000000..23682365 --- /dev/null +++ b/Oqtane.Client/Installer/Controls/SqliteConfig.razor @@ -0,0 +1,60 @@ +@namespace Oqtane.Installer.Controls + +@implements Oqtane.Interfaces.IDatabaseConfigControl + +@inject IStringLocalizer Localizer + +@{ + foreach (var field in _connectionStringFields) + { + var fieldId = field.Name.ToLowerInvariant(); + field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm")); + + if (IsInstaller) + { + + + + + + + + + } + else + { + + + + + + + + + } + } +} + +@code { + [Parameter] + public bool IsInstaller { get; set; } + + private readonly List _connectionStringFields = new() + { + new() {Name = "Server", FriendlyName = "File Name", Value = "Oqtane-{{Date}}.db", HelpText="Enter the file name to use for the database"} + }; + + public string GetConnectionString() + { + var connectionstring = String.Empty; + + var server = _connectionStringFields[0].Value; + + if (!String.IsNullOrEmpty(server)) + { + connectionstring = $"Data Source={server};"; + } + + return connectionstring; + } +} \ No newline at end of file diff --git a/Oqtane.Client/UI/Installer.razor b/Oqtane.Client/Installer/Installer.razor similarity index 60% rename from Oqtane.Client/UI/Installer.razor rename to Oqtane.Client/Installer/Installer.razor index 3c013711..4ee19850 100644 --- a/Oqtane.Client/UI/Installer.razor +++ b/Oqtane.Client/Installer/Installer.razor @@ -1,13 +1,13 @@ +@namespace Oqtane.Installer @using Oqtane.Interfaces -@using System.Reflection -@namespace Oqtane.UI +@using Oqtane.Installer.Controls + @inject NavigationManager NavigationManager @inject IInstallationService InstallationService @inject ISiteService SiteService @inject IUserService UserService @inject IJSRuntime JSRuntime @inject IStringLocalizer Localizer -@inject IEnumerable Databases
@@ -22,63 +22,23 @@

@Localizer["Database Configuration"]


- - - - - @{ - _selectedDatabase = Databases.Single(d => d.Name == _databaseType); - foreach (var field in _selectedDatabase.ConnectionStringFields) - { - if (field.Name != "IntegratedSecurity") - { - var isVisible = ""; - var fieldType = (field.Name == "Pwd") ? "password" : "text"; - if ((field.Name == "Uid" || field.Name == "Pwd") && _selectedDatabase.Name != "MySQL" ) + + + - - - - } - else - { - - - - - } + + + + @{ + if (_databaseConfigType != null) + { + @DatabaseConfigComponent; } } @@ -135,8 +95,12 @@ @code { - private IOqtaneDatabase _selectedDatabase; - private string _databaseType = "LocalDB"; + private IList _databases; + private string _databaseName = "LocalDB"; + private Type _databaseConfigType; + private object _databaseConfig; + private RenderFragment DatabaseConfigComponent { get; set; } + private string _hostUsername = UserNames.Host; private string _hostPassword = string.Empty; private string _confirmPassword = string.Empty; @@ -144,6 +108,77 @@ private string _message = string.Empty; private string _loadingDisplay = "display: none;"; + protected override void OnInitialized() + { + base.OnInitialized(); + + _databases = new List + { + new() + { + Name = "LocalDB", + FriendlyName = "Local Database", + Type = "Oqtane.Installer.Controls.LocalDBConfig, Oqtane.Client" + }, + new() + { + Name = "SqlServer", + FriendlyName = "SQL Server", + Type = "Oqtane.Installer.Controls.SqlServerConfig, Oqtane.Client" + }, + new() + { + Name = "Sqlite", + FriendlyName = "Sqlite", + Type = "Oqtane.Installer.Controls.SqliteConfig, Oqtane.Client" + }, + new() + { + Name = "MySQL", + FriendlyName = "MySQL", + Type = "Oqtane.Installer.Controls.MySQLConfig, Oqtane.Client" + }, + new() + { + Name = "PostgreSQL", + FriendlyName = "PostgreSQL", + Type = "Oqtane.Installer.Controls.PostgreSQLConfig, Oqtane.Client" + } + }; + + LoadDatabaseConfigComponent(); + } + + private void DatabaseChanged(ChangeEventArgs eventArgs) + { + try + { + _databaseName = (string)eventArgs.Value; + + LoadDatabaseConfigComponent(); + } + catch (Exception exception) + { + _message = Localizer["Error loading Database Configuration Control"]; + } + } + + private void LoadDatabaseConfigComponent() + { + var database = _databases.SingleOrDefault(d => d.Name == _databaseName); + if (database != null) + { + _databaseConfigType = Type.GetType(database.Type); + DatabaseConfigComponent = builder => + { + builder.OpenComponent(0, _databaseConfigType); + builder.AddAttribute(1, "IsInstaller", true); + builder.AddComponentReferenceCapture(2, inst => { _databaseConfig = Convert.ChangeType(inst, _databaseConfigType); }); + builder.CloseComponent(); + }; + } + } + protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) @@ -155,7 +190,11 @@ private async Task Install() { - var connectionString = _selectedDatabase.BuildConnectionString(); + var connectionString = String.Empty; + if (_databaseConfig is IDatabaseConfigControl databaseConfigControl) + { + connectionString = databaseConfigControl.GetConnectionString(); + } if (connectionString != "" && _hostUsername != "" && _hostPassword.Length >= 6 && _hostPassword == _confirmPassword && _hostEmail != "") { @@ -166,7 +205,7 @@ var config = new InstallConfig { - DatabaseType = _databaseType, + DatabaseType = _databaseName, ConnectionString = connectionString, Aliases = uri.Authority, HostEmail = _hostEmail, diff --git a/Oqtane.Client/Modules/Admin/Sites/Add.razor b/Oqtane.Client/Modules/Admin/Sites/Add.razor index c77bdca9..4d49474f 100644 --- a/Oqtane.Client/Modules/Admin/Sites/Add.razor +++ b/Oqtane.Client/Modules/Admin/Sites/Add.razor @@ -127,60 +127,17 @@ else + if (_databaseConfigType != null) { - _selectedDatabase = Databases.Single(d => d.Name == _databaseType); - foreach (var field in _selectedDatabase.ConnectionStringFields) - { - var fieldId = field.Name.ToLowerInvariant(); - if (field.Name != "IntegratedSecurity") - { - var isVisible = ""; - var fieldType = (field.Name == "Pwd") ? "password" : "text"; - if ((field.Name == "Uid" || field.Name == "Pwd") && _selectedDatabase.Name != "MySQL" ) - { - var intSecurityField = _selectedDatabase.ConnectionStringFields.Single(f => f.Name == "IntegratedSecurity"); - if (intSecurityField != null) - { - isVisible = (Convert.ToBoolean(intSecurityField.Value)) ? "display: none;" : ""; - } - } - - field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm")); - - - - - - } - else - { - - - - - } - } + @DatabaseConfigComponent; }
- - - -
+ + +
- - - -
- - - -
- + @foreach (var database in _databases) + { + }
- - - -
- - - -
@@ -205,6 +162,13 @@ else } @code { + private IList _databases; + private string _databaseName = "LocalDB"; + private Type _databaseConfigType; + private object _databaseConfig; + private RenderFragment DatabaseConfigComponent { get; set; } + + private List _themeList; private List _themes = new List(); private List _containers = new List(); @@ -213,9 +177,7 @@ else private string _tenantid = "-"; private string _tenantName = string.Empty; - private IOqtaneDatabase _selectedDatabase; - private string _databaseType = "LocalDB"; - + private string _hostUserName = UserNames.Host; private string _hostpassword = string.Empty; @@ -235,6 +197,72 @@ else _themeList = await ThemeService.GetThemesAsync(); _themes = ThemeService.GetThemeControls(_themeList); _siteTemplates = await SiteTemplateService.GetSiteTemplatesAsync(); + + _databases = new List + { + new() + { + Name = "LocalDB", + FriendlyName = "Local Database", + Type = "Oqtane.Installer.Controls.LocalDBConfig, Oqtane.Client" + }, + new() + { + Name = "SqlServer", + FriendlyName = "SQL Server", + Type = "Oqtane.Installer.Controls.SqlServerConfig, Oqtane.Client" + }, + new() + { + Name = "Sqlite", + FriendlyName = "Sqlite", + Type = "Oqtane.Installer.Controls.SqliteConfig, Oqtane.Client" + }, + new() + { + Name = "MySQL", + FriendlyName = "MySQL", + Type = "Oqtane.Installer.Controls.MySQLConfig, Oqtane.Client" + }, + new() + { + Name = "PostgreSQL", + FriendlyName = "PostgreSQL", + Type = "Oqtane.Installer.Controls.PostGreSQLConfig, Oqtane.Client" + } + }; + + LoadDatabaseConfigComponent(); + } + + private void DatabaseChanged(ChangeEventArgs eventArgs) + { + try + { + _databaseName = (string)eventArgs.Value; + + LoadDatabaseConfigComponent(); + } + catch (Exception exception) + { + AddModuleMessage(Localizer["Error loading Database Configuration Control"], MessageType.Error); + } + } + + private void LoadDatabaseConfigComponent() + { + var database = _databases.SingleOrDefault(d => d.Name == _databaseName); + if (database != null) + { + _databaseConfigType = Type.GetType(database.Type); + DatabaseConfigComponent = builder => + { + builder.OpenComponent(0, _databaseConfigType); + builder.AddAttribute(1, "IsInstaller", false); + builder.AddComponentReferenceCapture(2, inst => { _databaseConfig = Convert.ChangeType(inst, _databaseConfigType); }); + builder.CloseComponent(); + }; + } } private void TenantChanged(ChangeEventArgs e) @@ -301,10 +329,14 @@ else user = await UserService.LoginUserAsync(user, false, false); if (user.IsAuthenticated) { - var connectionString = _selectedDatabase.BuildConnectionString(); + var connectionString = String.Empty; + if (_databaseConfig is IDatabaseConfigControl databaseConfigControl) + { + connectionString = databaseConfigControl.GetConnectionString(); + } if (connectionString != "") { - config.DatabaseType = _databaseType; + config.DatabaseType = _databaseName; config.ConnectionString = connectionString; config.HostPassword = _hostpassword; config.HostEmail = user.Email; diff --git a/Oqtane.Client/Program.cs b/Oqtane.Client/Program.cs index fdc5145f..3ce0058f 100644 --- a/Oqtane.Client/Program.cs +++ b/Oqtane.Client/Program.cs @@ -86,17 +86,6 @@ namespace Oqtane.Client } } - // dynamically register database providers - var databaseTypes = assembly.GetInterfaces(); - foreach (var databaseType in databaseTypes) - { - if (databaseType.AssemblyQualifiedName != null) - { - var serviceType = Type.GetType("Oqtane.Interfaces.IDatabase, Oqtane.Shared"); - builder.Services.AddScoped(serviceType ?? databaseType, databaseType); - } - } - // register client startup services var startUps = assembly.GetInstances(); foreach (var startup in startUps) diff --git a/Oqtane.Client/_Imports.razor b/Oqtane.Client/_Imports.razor index 7afebdf1..cbf43e76 100644 --- a/Oqtane.Client/_Imports.razor +++ b/Oqtane.Client/_Imports.razor @@ -21,3 +21,4 @@ @using Oqtane.Themes.Controls @using Oqtane.UI @using Oqtane.Enums +@using Oqtane.Installer diff --git a/Oqtane.Database.MySQL/MySQLDatabase.cs b/Oqtane.Database.MySQL/MySQLDatabase.cs index 3e988aab..1998d7b8 100644 --- a/Oqtane.Database.MySQL/MySQLDatabase.cs +++ b/Oqtane.Database.MySQL/MySQLDatabase.cs @@ -15,16 +15,7 @@ namespace Oqtane.Database.MySQL private static string _name => "MySQL"; - private static readonly List _connectionStringFields = new() - { - new() {Name = "Server", FriendlyName = "Server", Value = "127.0.0.1", HelpText="Enter the database server"}, - new() {Name = "Port", FriendlyName = "Port", Value = "3306", HelpText="Enter the port used to connect to the server"}, - new() {Name = "Database", FriendlyName = "Database", Value = "Oqtane-{{Date}}", HelpText="Enter the name of the database"}, - new() {Name = "Uid", FriendlyName = "User Id", Value = "", HelpText="Enter the username to use for the database"}, - new() {Name = "Pwd", FriendlyName = "Password", Value = "", HelpText="Enter the password to use for the database"} - }; - - public MySQLDatabase() :base(_name, _friendlyName, _connectionStringFields) { } + public MySQLDatabase() :base(_name, _friendlyName) { } public override string Provider => "MySql.EntityFrameworkCore"; @@ -33,28 +24,6 @@ namespace Oqtane.Database.MySQL return table.Column(name: name, nullable: false).Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn); } - public override string BuildConnectionString() - { - var connectionString = String.Empty; - - var server = ConnectionStringFields[0].Value; - var port = ConnectionStringFields[1].Value; - var database = ConnectionStringFields[2].Value; - var userId = ConnectionStringFields[3].Value; - var password = ConnectionStringFields[4].Value; - - if (!String.IsNullOrEmpty(server) && !String.IsNullOrEmpty(database) && !String.IsNullOrEmpty(userId) && !String.IsNullOrEmpty(password)) - { - connectionString = $"Server={server};Database={database};Uid={userId};Pwd={password};"; - } - - if (!String.IsNullOrEmpty(port)) - { - connectionString += $"Port={port};"; - } - return connectionString; - } - public override string ConcatenateSql(params string[] values) { var returnValue = "CONCAT("; diff --git a/Oqtane.Database.PostgreSQL/PostgreSQLDatabase.cs b/Oqtane.Database.PostgreSQL/PostgreSQLDatabase.cs index 8d50debd..d3284232 100644 --- a/Oqtane.Database.PostgreSQL/PostgreSQLDatabase.cs +++ b/Oqtane.Database.PostgreSQL/PostgreSQLDatabase.cs @@ -20,17 +20,7 @@ namespace Oqtane.Database.PostgreSQL private readonly INameRewriter _rewriter; - private static readonly List _connectionStringFields = new() - { - new() {Name = "Server", FriendlyName = "Server", Value = "127.0.0.1", HelpText="Enter the database server"}, - new() {Name = "Port", FriendlyName = "Port", Value = "5432", HelpText="Enter the port used to connect to the server"}, - new() {Name = "Database", FriendlyName = "Database", Value = "Oqtane-{{Date}}", HelpText="Enter the name of the database"}, - new() {Name = "IntegratedSecurity", FriendlyName = "Integrated Security", Value = "true", HelpText="Select if you want integrated security or not"}, - new() {Name = "Uid", FriendlyName = "User Id", Value = "", HelpText="Enter the username to use for the database"}, - new() {Name = "Pwd", FriendlyName = "Password", Value = "", HelpText="Enter the password to use for the database"} - }; - - public PostgreSQLDatabase() : base(_name, _friendlyName, _connectionStringFields) + public PostgreSQLDatabase() : base(_name, _friendlyName) { _rewriter = new SnakeCaseNameRewriter(CultureInfo.InvariantCulture); } @@ -42,41 +32,6 @@ namespace Oqtane.Database.PostgreSQL return table.Column(name: name, nullable: false).Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityAlwaysColumn); } - public override string BuildConnectionString() - { - var connectionString = String.Empty; - - var server = ConnectionStringFields[0].Value; - var port = ConnectionStringFields[1].Value; - var database = ConnectionStringFields[2].Value; - var integratedSecurity = Boolean.Parse(ConnectionStringFields[3].Value); - var userId = ConnectionStringFields[4].Value; - var password = ConnectionStringFields[5].Value; - - if (!String.IsNullOrEmpty(server) && !String.IsNullOrEmpty(database) && !String.IsNullOrEmpty(port)) - { - connectionString = $"Server={server};Port={port};Database={database};"; - } - - if (integratedSecurity) - { - connectionString += "Integrated Security=true;"; - } - else - { - if (!String.IsNullOrEmpty(userId) && !String.IsNullOrEmpty(password)) - { - connectionString += $"User ID={userId};Password={password};"; - } - else - { - connectionString = String.Empty; - } - } - - return connectionString; - } - public override string ConcatenateSql(params string[] values) { var returnValue = String.Empty; diff --git a/Oqtane.Database.Sqlite/SqliteDatabase.cs b/Oqtane.Database.Sqlite/SqliteDatabase.cs index 50b901d0..655e6cdb 100644 --- a/Oqtane.Database.Sqlite/SqliteDatabase.cs +++ b/Oqtane.Database.Sqlite/SqliteDatabase.cs @@ -14,12 +14,7 @@ namespace Oqtane.Repository.Databases private static string _name => "Sqlite"; - private static readonly List _connectionStringFields = new() - { - new() {Name = "Server", FriendlyName = "File Name", Value = "Oqtane-{{Date}}.db", HelpText="Enter the file name to use for the database"} - }; - - public SqliteDatabase() :base(_name, _friendlyName, _connectionStringFields) { } + public SqliteDatabase() :base(_name, _friendlyName) { } public override string Provider => "Microsoft.EntityFrameworkCore.Sqlite"; @@ -28,20 +23,6 @@ namespace Oqtane.Repository.Databases return table.Column(name: name, nullable: false).Annotation("Sqlite:Autoincrement", true); } - public override string BuildConnectionString() - { - var connectionstring = String.Empty; - - var server = ConnectionStringFields[0].Value; - - if (!String.IsNullOrEmpty(server)) - { - connectionstring = $"Data Source={server};"; - } - - return connectionstring; - } - public override string ConcatenateSql(params string[] values) { var returnValue = String.Empty; diff --git a/Oqtane.Server/Databases/LocalDbDatabase.cs b/Oqtane.Server/Databases/LocalDbDatabase.cs index 77be3035..e70010ae 100644 --- a/Oqtane.Server/Databases/LocalDbDatabase.cs +++ b/Oqtane.Server/Databases/LocalDbDatabase.cs @@ -10,27 +10,6 @@ namespace Oqtane.Databases private static string _friendlyName => "Local Database"; private static string _name => "LocalDB"; - private static readonly List _connectionStringFields = new() - { - new() {Name = "Server", FriendlyName = "Server", Value = "(LocalDb)\\MSSQLLocalDB", HelpText="Enter the database server"}, - new() {Name = "Database", FriendlyName = "Database", Value = "Oqtane-{{Date}}", HelpText="Enter the name of the database"} - }; - - public LocalDbDatabase() :base(_name, _friendlyName, _connectionStringFields) { } - - public override string BuildConnectionString() - { - var connectionString = String.Empty; - - var server = ConnectionStringFields[0].Value; - var database = ConnectionStringFields[1].Value; - - if (!String.IsNullOrEmpty(server) && !String.IsNullOrEmpty(database)) - { - connectionString = $"Data Source={server};AttachDbFilename=|DataDirectory|\\{database}.mdf;Initial Catalog={database};Integrated Security=SSPI;"; - } - - return connectionString; - } + public LocalDbDatabase() :base(_name, _friendlyName) { } } } diff --git a/Oqtane.Server/Databases/SqlServerDatabase.cs b/Oqtane.Server/Databases/SqlServerDatabase.cs index cfb852c3..669cc50a 100644 --- a/Oqtane.Server/Databases/SqlServerDatabase.cs +++ b/Oqtane.Server/Databases/SqlServerDatabase.cs @@ -13,50 +13,6 @@ namespace Oqtane.Databases private static string _name => "SqlServer"; - private static readonly List _connectionStringFields = new() - { - new() {Name = "Server", FriendlyName = "Server", Value = ".", HelpText="Enter the database server"}, - new() {Name = "Database", FriendlyName = "Database", Value = "Oqtane-{{Date}}", HelpText="Enter the name of the database"}, - new() {Name = "IntegratedSecurity", FriendlyName = "Integrated Security", Value = "true", HelpText="Select if you want integrated security or not"}, - new() {Name = "Uid", FriendlyName = "User Id", Value = "", HelpText="Enter the username to use for the database"}, - new() {Name = "Pwd", FriendlyName = "Password", Value = "", HelpText="Enter the password to use for the database"} - }; - - public SqlServerDatabase() :base(_name, _friendlyName, _connectionStringFields) { } - - public override string BuildConnectionString() - { - var connectionString = String.Empty; - - var server = ConnectionStringFields[0].Value; - var database = ConnectionStringFields[1].Value; - var integratedSecurity = Boolean.Parse(ConnectionStringFields[2].Value); - var userId = ConnectionStringFields[3].Value; - var password = ConnectionStringFields[4].Value; - - if (!String.IsNullOrEmpty(server) && !String.IsNullOrEmpty(database)) - { - connectionString = $"Data Source={server};Initial Catalog={database};"; - } - - if (integratedSecurity) - { - connectionString += "Integrated Security=SSPI;"; - } - else - { - if (!String.IsNullOrEmpty(userId) && !String.IsNullOrEmpty(password)) - { - connectionString += $"User ID={userId};Password={password};"; - } - else - { - connectionString = String.Empty; - } - } - - return connectionString; - - } + public SqlServerDatabase() :base(_name, _friendlyName) { } } } diff --git a/Oqtane.Server/Databases/SqlServerDatabaseBase.cs b/Oqtane.Server/Databases/SqlServerDatabaseBase.cs index 70d3de3a..afe1a762 100644 --- a/Oqtane.Server/Databases/SqlServerDatabaseBase.cs +++ b/Oqtane.Server/Databases/SqlServerDatabaseBase.cs @@ -11,7 +11,7 @@ namespace Oqtane.Repository.Databases { public abstract class SqlServerDatabaseBase : OqtaneDatabaseBase { - protected SqlServerDatabaseBase(string name, string friendlyName, List connectionStringFields) : base(name, friendlyName, connectionStringFields) + protected SqlServerDatabaseBase(string name, string friendlyName) : base(name, friendlyName) { } diff --git a/Oqtane.Shared/Interfaces/IDatabaseConfigControl.cs b/Oqtane.Shared/Interfaces/IDatabaseConfigControl.cs new file mode 100644 index 00000000..b9ab5159 --- /dev/null +++ b/Oqtane.Shared/Interfaces/IDatabaseConfigControl.cs @@ -0,0 +1,9 @@ +namespace Oqtane.Interfaces +{ + public interface IDatabaseConfigControl + { + string GetConnectionString(); + + bool IsInstaller { get; set; } + } +} diff --git a/Oqtane.Shared/Interfaces/IOqtaneDatabase.cs b/Oqtane.Shared/Interfaces/IOqtaneDatabase.cs index 225ccffd..ac31a5f8 100644 --- a/Oqtane.Shared/Interfaces/IOqtaneDatabase.cs +++ b/Oqtane.Shared/Interfaces/IOqtaneDatabase.cs @@ -14,12 +14,8 @@ namespace Oqtane.Interfaces public string Provider { get; } - public List ConnectionStringFields { get; } - public OperationBuilder AddAutoIncrementColumn(ColumnsBuilder table, string name); - public string BuildConnectionString(); - public string ConcatenateSql(params string[] values); public string RewriteName(string name); diff --git a/Oqtane.Shared/Models/Database.cs b/Oqtane.Shared/Models/Database.cs index e1855242..8cb27464 100644 --- a/Oqtane.Shared/Models/Database.cs +++ b/Oqtane.Shared/Models/Database.cs @@ -2,6 +2,8 @@ namespace Oqtane.Models { public class Database { + public string FriendlyName { get; set; } + public string Name { get; set; } public string Type { get; set; } diff --git a/Oqtane.Shared/Shared/OqtaneDatabaseBase.cs b/Oqtane.Shared/Shared/OqtaneDatabaseBase.cs index ff107ff5..5cbcc4bc 100644 --- a/Oqtane.Shared/Shared/OqtaneDatabaseBase.cs +++ b/Oqtane.Shared/Shared/OqtaneDatabaseBase.cs @@ -10,11 +10,10 @@ namespace Oqtane.Shared { public abstract class OqtaneDatabaseBase : IOqtaneDatabase { - protected OqtaneDatabaseBase(string name, string friendlyName, List connectionStringFields) + protected OqtaneDatabaseBase(string name, string friendlyName) { Name = name; FriendlyName = friendlyName; - ConnectionStringFields = connectionStringFields; } public string FriendlyName { get; } @@ -23,12 +22,8 @@ namespace Oqtane.Shared public abstract string Provider { get; } - public List ConnectionStringFields { get; } - public abstract OperationBuilder AddAutoIncrementColumn(ColumnsBuilder table, string name); - public abstract string BuildConnectionString(); - public virtual string ConcatenateSql(params string[] values) { var returnValue = String.Empty; From a79ba591fe39fcf9fee25ab5bd347de03f2eb765 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Wed, 28 Apr 2021 07:01:39 +0200 Subject: [PATCH 08/14] Make container fluid to fill the pane --- Oqtane.Client/Themes/OqtaneTheme/Containers/Container.razor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Themes/OqtaneTheme/Containers/Container.razor b/Oqtane.Client/Themes/OqtaneTheme/Containers/Container.razor index 0f1dcafe..b90d8c32 100644 --- a/Oqtane.Client/Themes/OqtaneTheme/Containers/Container.razor +++ b/Oqtane.Client/Themes/OqtaneTheme/Containers/Container.razor @@ -17,7 +17,7 @@ }
-
+
@@ -27,7 +27,7 @@ public override string Name => "Customizable Container"; private bool _title = true; - private string _classes = "container"; + private string _classes = "container-fluid"; protected override void OnParametersSet() { From cad5ce51fc387a21dca041db230592101032560f Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Wed, 28 Apr 2021 09:17:01 +0200 Subject: [PATCH 09/14] Fix NuGet Warning NU5048 Icon URL is deprecated in favor of embedding the icon inside the NuGet package. --- Oqtane.Server/Oqtane.Server.csproj | 3 +++ .../Package/[Owner].[Module].Package.csproj | 9 ++++++++- .../External/Package/[Owner].[Module].nuspec | 7 ++++--- .../Modules/Templates/External/Package/icon.png | Bin 0 -> 5235 bytes .../Package/[Owner].[Theme].Package.csproj | 11 +++++++++-- .../External/Package/[Owner].[Theme].nuspec | 7 ++++--- .../Themes/Templates/External/Package/icon.png | Bin 0 -> 5235 bytes 7 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 Oqtane.Server/wwwroot/Modules/Templates/External/Package/icon.png create mode 100644 Oqtane.Server/wwwroot/Themes/Templates/External/Package/icon.png diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index 37f69666..df9fba63 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -59,6 +59,9 @@ + + + diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj index cef85f51..41dd5da4 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj @@ -1,10 +1,17 @@ - + net5.0 false + + + True + + + + diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec index df6e4997..a202b302 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec @@ -1,4 +1,4 @@ - + [Owner].[Module] @@ -11,7 +11,7 @@ false MIT https://github.com/oqtane/oqtane.framework - https://www.oqtane.org/Portals/0/icon.jpg + icon.png oqtane module @@ -26,6 +26,7 @@ - + + \ No newline at end of file diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/icon.png b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/icon.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9z(|Xl;U4MEB(%s_TI%@TVU7R!VOtcAsN4?1ZFg@HPMs=kz&kQhSXdIJp!W zh#KR97-S>IdE1c-KH0}=08KNo8#DMdxP7JrO!%+R+?Gc#JWhMSq$VsrtoSc9cL+;l zhp2gr;6+h3{TnH<-9RUa@ps2M7)7*d7TWaRO!l>}jsSF~kWt3L1hyRbiA!t4#KZ#? z+_w;65;+$>>+q@+rMJRk?O1+X7ydQGdxxYL507P5F`y*-f+XISwrlm_hmDln!#$O& zt$Lm&Ji)ogZj5#+HY#Ctc<_YXn6`ZC_sGoE^lkrTYuDusfb_`G4}IL-%YQ!1>sXOB zK)Sd!dbqc_!Pdnqv;fqfl_9Hp||ajej{*>9=o zasA*%N9@y&bO8*|0EH}>M0B#(Y3>_!>h<%H}9))*4#+%hW tx=)ZkGC>C_vYOSp(l>D9kK_>q{|A(3{Dh$Ey&nJo002ovPDHLkV1gv!i_8E3 literal 0 HcmV?d00001 diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj index 30043010..35a85019 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj @@ -1,10 +1,17 @@ - + net5.0 false - + + + + True + + + + diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec index e73d4618..ab3f76ea 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec @@ -1,4 +1,4 @@ - + [Owner].[Theme] @@ -11,7 +11,7 @@ false MIT https://github.com/oqtane/oqtane.framework - https://www.oqtane.org/Portals/0/icon.jpg + icon.png oqtane module @@ -22,6 +22,7 @@ - + + \ No newline at end of file diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/icon.png b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..026f566b72e337a824210fbc2f33109545ba47eb GIT binary patch literal 5235 zcmV-(6pZVMP)4Tx04UF6U|>>7EGWofVPIg$%_}Jia(7aQh>TKTf5^ZNguD!53<`?8>L2v|)>kTZ~d1ISiL&PW8B!T1Bn z)=5GVPe)=y?F9jDm(1dVoWx3n0AmKKgOb#W5)kd2UrRd;zE@x;V|)2rSRY_{rvp=qobpJ zeSMsqoLN~}1_lNL0|NyG1xiXv78Vu(0RaF201XWdsi~=lhlc_J0%&MxLqkJ1H#ZOv z5DW|qkB^T81O$J7e?dV(GBPq37Z(x|5`lq%aBy%tJ3BTuHVFv{2nYzYw6tn!YGq|* zD=RA?ARwZmqLY)8TwGjFPfryU6?u7iDk>@`Cnu$)r3wlPo}QjpS65L{Q4S6cZf(baZrcb8{LR8YCnnZEbC4W@cDeSQHc#p`oErP*9kdm|9v|EiEmAf`VsfXC59N zk&%%-Jv}fmFp`pzAt50P3ky6vJQEWWdwY9EMn)JI7*0-3M@L6FIXNjQDPCS)85tR> zs;WgrMN3Odg@uKVj*gI!kau@?goK1!TU(u-or#HwuCA^uEG(Own>95xWMpIy4-c%Y ztT8b$NJvO^b#+owQYI!Qva+&FOiV5=E^KUUnVFfWsHl~dm3Vk~X=!OqO-;46wIU)S zI5;>nGc&ffwmv>SnwpwjU0tuQuP-kzjg5^zKR>3Xri_e?dU|?OQ&VL}01%f+L_t(|Ufo>@gA~OT z?ivtwhOJ&L6c}YWT!LKU;sOgec&!M?<;5kqVL3z)LBwDX2^s@R#Dhd7MvX+H#v^y~ z|MI?9uXm2^s$ph(X1e)ycBZH6Rn`0Iy;oOv?*^@hQgV=e+%QaT7$Q0P$v#vtL5{Ky zbtA;Px?v(j1ru+YB*)ptS3hZKEnT6`sVc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yXYyuXxl& zj_?k*gPL_4LJ#tt&@F;(oxfu=c5`7xkZd)I0Bg{Tv)V9n0%`h5%-C9G5exO4PYc$A z1lv>xPutb6VCoJi9kB09{U z`yRe4m9z(|Xl;U4MEB(%s_TI%@TVU7R!VOtcAsN4?1ZFg@HPMs=kz&kQhSXdIJp!W zh#KR97-S>IdE1c-KH0}=08KNo8#DMdxP7JrO!%+R+?Gc#JWhMSq$VsrtoSc9cL+;l zhp2gr;6+h3{TnH<-9RUa@ps2M7)7*d7TWaRO!l>}jsSF~kWt3L1hyRbiA!t4#KZ#? z+_w;65;+$>>+q@+rMJRk?O1+X7ydQGdxxYL507P5F`y*-f+XISwrlm_hmDln!#$O& zt$Lm&Ji)ogZj5#+HY#Ctc<_YXn6`ZC_sGoE^lkrTYuDusfb_`G4}IL-%YQ!1>sXOB zK)Sd!dbqc_!Pdnqv;fqfl_9Hp||ajej{*>9=o zasA*%N9@y&bO8*|0EH}>M0B#(Y3>_!>h<%H}9))*4#+%hW tx=)ZkGC>C_vYOSp(l>D9kK_>q{|A(3{Dh$Ey&nJo002ovPDHLkV1gv!i_8E3 literal 0 HcmV?d00001 From 6ae5777e1cc10a141f73487281aa0b3fca7d7855 Mon Sep 17 00:00:00 2001 From: Leigh Pointer Date: Wed, 28 Apr 2021 20:31:52 +0200 Subject: [PATCH 10/14] Revert "Fix NuGet Warning NU5048" This reverts commit cad5ce51fc387a21dca041db230592101032560f. --- Oqtane.Server/Oqtane.Server.csproj | 3 --- .../Package/[Owner].[Module].Package.csproj | 9 +-------- .../External/Package/[Owner].[Module].nuspec | 7 +++---- .../Modules/Templates/External/Package/icon.png | Bin 5235 -> 0 bytes .../Package/[Owner].[Theme].Package.csproj | 11 ++--------- .../External/Package/[Owner].[Theme].nuspec | 7 +++---- .../Themes/Templates/External/Package/icon.png | Bin 5235 -> 0 bytes 7 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 Oqtane.Server/wwwroot/Modules/Templates/External/Package/icon.png delete mode 100644 Oqtane.Server/wwwroot/Themes/Templates/External/Package/icon.png diff --git a/Oqtane.Server/Oqtane.Server.csproj b/Oqtane.Server/Oqtane.Server.csproj index df9fba63..37f69666 100644 --- a/Oqtane.Server/Oqtane.Server.csproj +++ b/Oqtane.Server/Oqtane.Server.csproj @@ -59,9 +59,6 @@ - - - diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj index 41dd5da4..cef85f51 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].Package.csproj @@ -1,17 +1,10 @@ - + net5.0 false - - - True - - - - diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec index a202b302..df6e4997 100644 --- a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec +++ b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/[Owner].[Module].nuspec @@ -1,4 +1,4 @@ - + [Owner].[Module] @@ -11,7 +11,7 @@ false MIT https://github.com/oqtane/oqtane.framework - icon.png + https://www.oqtane.org/Portals/0/icon.jpg oqtane module @@ -26,7 +26,6 @@ - - + \ No newline at end of file diff --git a/Oqtane.Server/wwwroot/Modules/Templates/External/Package/icon.png b/Oqtane.Server/wwwroot/Modules/Templates/External/Package/icon.png deleted file mode 100644 index 026f566b72e337a824210fbc2f33109545ba47eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5235 zcmV-(6pZVMP)4Tx04UF6U|>>7EGWofVPIg$%_}Jia(7aQh>TKTf5^ZNguD!53<`?8>L2v|)>kTZ~d1ISiL&PW8B!T1Bn z)=5GVPe)=y?F9jDm(1dVoWx3n0AmKKgOb#W5)kd2UrRd;zE@x;V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+rMJRk?O1+X7ydQGdxxYL507P5F`y*-f+XISwrlm_hmDln!#$O& zt$Lm&Ji)ogZj5#+HY#Ctc<_YXn6`ZC_sGoE^lkrTYuDusfb_`G4}IL-%YQ!1>sXOB zK)Sd!dbqc_!Pdnqv;fqfl_9Hp||ajej{*>9=o zasA*%N9@y&bO8*|0EH}>M0B#(Y3>_!>h<%H}9))*4#+%hW tx=)ZkGC>C_vYOSp(l>D9kK_>q{|A(3{Dh$Ey&nJo002ovPDHLkV1gv!i_8E3 diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj index 35a85019..30043010 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].Package.csproj @@ -1,17 +1,10 @@ - + net5.0 false - - - - True - - - - + diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec index ab3f76ea..e73d4618 100644 --- a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec +++ b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/[Owner].[Theme].nuspec @@ -1,4 +1,4 @@ - + [Owner].[Theme] @@ -11,7 +11,7 @@ false MIT https://github.com/oqtane/oqtane.framework - icon.png + https://www.oqtane.org/Portals/0/icon.jpg oqtane module @@ -22,7 +22,6 @@ - - + \ No newline at end of file diff --git a/Oqtane.Server/wwwroot/Themes/Templates/External/Package/icon.png b/Oqtane.Server/wwwroot/Themes/Templates/External/Package/icon.png deleted file mode 100644 index 026f566b72e337a824210fbc2f33109545ba47eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5235 zcmV-(6pZVMP)4Tx04UF6U|>>7EGWofVPIg$%_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R+?Gc#JWhMSq$VsrtoSc9cL+;l zhp2gr;6+h3{TnH<-9RUa@ps2M7)7*d7TWaRO!l>}jsSF~kWt3L1hyRbiA!t4#KZ#? z+_w;65;+$>>+q@+rMJRk?O1+X7ydQGdxxYL507P5F`y*-f+XISwrlm_hmDln!#$O& zt$Lm&Ji)ogZj5#+HY#Ctc<_YXn6`ZC_sGoE^lkrTYuDusfb_`G4}IL-%YQ!1>sXOB zK)Sd!dbqc_!Pdnqv;fqfl_9Hp||ajej{*>9=o zasA*%N9@y&bO8*|0EH}>M0B#(Y3>_!>h<%H}9))*4#+%hW tx=)ZkGC>C_vYOSp(l>D9kK_>q{|A(3{Dh$Ey&nJo002ovPDHLkV1gv!i_8E3 From d7966f2acf276520cc74b2d796eb0c918804840f Mon Sep 17 00:00:00 2001 From: hishamco Date: Thu, 29 Apr 2021 02:42:01 +0300 Subject: [PATCH 11/14] Revert changes in SiteRepository --- Oqtane.Server/Repository/SiteRepository.cs | 46 +++++++++++----------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/Oqtane.Server/Repository/SiteRepository.cs b/Oqtane.Server/Repository/SiteRepository.cs index 3e0dfa5a..8c12db8b 100644 --- a/Oqtane.Server/Repository/SiteRepository.cs +++ b/Oqtane.Server/Repository/SiteRepository.cs @@ -27,11 +27,10 @@ namespace Oqtane.Repository private readonly IModuleDefinitionRepository _moduleDefinitionRepository; private readonly IServiceProvider _serviceProvider; private readonly IConfigurationRoot _config; - private readonly IStringLocalizer _localizer; public SiteRepository(TenantDBContext context, IRoleRepository roleRepository, IProfileRepository profileRepository, IFolderRepository folderRepository, IPageRepository pageRepository, IModuleRepository moduleRepository, IPageModuleRepository pageModuleRepository, IModuleDefinitionRepository moduleDefinitionRepository, IServiceProvider serviceProvider, - IConfigurationRoot config, IStringLocalizer localizer) + IConfigurationRoot config) { _db = context; _roleRepository = roleRepository; @@ -43,7 +42,6 @@ namespace Oqtane.Repository _moduleDefinitionRepository = moduleDefinitionRepository; _serviceProvider = serviceProvider; _config = config; - _localizer = localizer; } private List CreateAdminPages(List pageTemplates = null) @@ -69,7 +67,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Login.Index).ToModuleDefinitionName(), Title = _localizer["User Login"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Login.Index).ToModuleDefinitionName(), Title = SharedResources.UserLogin, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -98,7 +96,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Register.Index).ToModuleDefinitionName(), Title = _localizer["User Registration"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Register.Index).ToModuleDefinitionName(), Title = SharedResources.UserRegistration, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -128,7 +126,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Reset.Index).ToModuleDefinitionName(), Title = _localizer["Password Reset"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Reset.Index).ToModuleDefinitionName(), Title = SharedResources.PasswordReset, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -157,7 +155,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.UserProfile.Index).ToModuleDefinitionName(), Title = _localizer["User Profile"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.UserProfile.Index).ToModuleDefinitionName(), Title = SharedResources.UserProfile, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -182,7 +180,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Dashboard.Index).ToModuleDefinitionName(), Title = _localizer["Admin Dashboard"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Dashboard.Index).ToModuleDefinitionName(), Title = SharedResources.AdminDashboard, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -209,7 +207,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Site.Index).ToModuleDefinitionName(), Title = _localizer["Site Settings"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Site.Index).ToModuleDefinitionName(), Title = SharedResources.SiteSettings, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -236,7 +234,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Pages.Index).ToModuleDefinitionName(), Title = _localizer["Page Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Pages.Index).ToModuleDefinitionName(), Title = SharedResources.PageManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -263,7 +261,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Users.Index).ToModuleDefinitionName(), Title = _localizer["User Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Users.Index).ToModuleDefinitionName(), Title = SharedResources.UserManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -290,7 +288,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Profiles.Index).ToModuleDefinitionName(), Title = _localizer["Profile Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Profiles.Index).ToModuleDefinitionName(), Title = SharedResources.ProfileManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -317,7 +315,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Roles.Index).ToModuleDefinitionName(), Title = _localizer["Role Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Roles.Index).ToModuleDefinitionName(), Title = SharedResources.RoleManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -344,7 +342,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Files.Index).ToModuleDefinitionName(), Title = _localizer["File Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Files.Index).ToModuleDefinitionName(), Title = SharedResources.FileManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -371,7 +369,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.RecycleBin.Index).ToModuleDefinitionName(), Title = _localizer["Recycle Bin"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.RecycleBin.Index).ToModuleDefinitionName(), Title = SharedResources.RecycleBin, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Admin, true), @@ -400,7 +398,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Logs.Index).ToModuleDefinitionName(), Title = _localizer["Event Log"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Logs.Index).ToModuleDefinitionName(), Title = SharedResources.EventLog, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -422,7 +420,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Sites.Index).ToModuleDefinitionName(), Title = _localizer["Site Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Sites.Index).ToModuleDefinitionName(), Title = SharedResources.SiteManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -444,7 +442,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.ModuleDefinitions.Index).ToModuleDefinitionName(), Title = _localizer["Module Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.ModuleDefinitions.Index).ToModuleDefinitionName(), Title = SharedResources.ModuleManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -466,7 +464,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Themes.Index).ToModuleDefinitionName(), Title = _localizer["Theme Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Themes.Index).ToModuleDefinitionName(), Title = SharedResources.ThemeManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -495,7 +493,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Languages.Index).ToModuleDefinitionName(), Title = _localizer["Language Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Languages.Index).ToModuleDefinitionName(), Title = SharedResources.LanguageManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -519,7 +517,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Jobs.Index).ToModuleDefinitionName(), Title = _localizer["Scheduled Jobs"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Jobs.Index).ToModuleDefinitionName(), Title = SharedResources.ScheduledJobs, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -541,7 +539,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Sql.Index).ToModuleDefinitionName(), Title = _localizer["Sql Management"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Sql.Index).ToModuleDefinitionName(), Title = SharedResources.SqlManagement, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -563,7 +561,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.SystemInfo.Index).ToModuleDefinitionName(), Title = _localizer["System Info"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.SystemInfo.Index).ToModuleDefinitionName(), Title = SharedResources.SystemInfo, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), @@ -585,7 +583,7 @@ namespace Oqtane.Repository { new PageTemplateModule { - ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Upgrade.Index).ToModuleDefinitionName(), Title = _localizer["System Update"], Pane = PaneNames.Admin, + ModuleDefinitionName = typeof(Oqtane.Modules.Admin.Upgrade.Index).ToModuleDefinitionName(), Title = SharedResources.SystemUpdate, Pane = PaneNames.Admin, ModulePermissions = new List { new Permission(PermissionNames.View, RoleNames.Host, true), From 18aa8d48fea5611cc57a63916aa721a02c51ec0a Mon Sep 17 00:00:00 2001 From: hishamco Date: Thu, 29 Apr 2021 02:44:41 +0300 Subject: [PATCH 12/14] Use SharedResources --- Oqtane.Client/Localization/SharedResources.cs | 47 +++++++++++++++++++ .../Modules/Admin/Dashboard/Index.razor | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 Oqtane.Client/Localization/SharedResources.cs diff --git a/Oqtane.Client/Localization/SharedResources.cs b/Oqtane.Client/Localization/SharedResources.cs new file mode 100644 index 00000000..77cb9d36 --- /dev/null +++ b/Oqtane.Client/Localization/SharedResources.cs @@ -0,0 +1,47 @@ +namespace Oqtane +{ + public class SharedResources + { + public static readonly string UserLogin = "User Login"; + + public static readonly string UserRegistration = "User Registration"; + + public static readonly string PasswordReset = "Password Reset"; + + public static readonly string UserProfile = "User Profile"; + + public static readonly string AdminDashboard = "Admin Dashboard"; + + public static readonly string SiteSettings = "Site Settings"; + + public static readonly string PageManagement = "Page Management"; + + public static readonly string UserManagement = "User Management"; + + public static readonly string ProfileManagement = "Profile Management"; + + public static readonly string RoleManagement = "Role Management"; + + public static readonly string FileManagement = "File Management"; + + public static readonly string RecycleBin = "Recycle Bin"; + + public static readonly string EventLog = "Event Log"; + + public static readonly string SiteManagement = "Site Management"; + + public static readonly string ModuleManagement = "Module Management"; + + public static readonly string ThemeManagement = "Theme Management"; + + public static readonly string LanguageManagement = "Language Management"; + + public static readonly string ScheduledJobs = "Scheduled Jobs"; + + public static readonly string SqlManagement = "Sql Management"; + + public static readonly string SystemInfo = "System Info"; + + public static readonly string SystemUpdate = "System Update"; + } +} diff --git a/Oqtane.Client/Modules/Admin/Dashboard/Index.razor b/Oqtane.Client/Modules/Admin/Dashboard/Index.razor index 620bf65a..0c7cd842 100644 --- a/Oqtane.Client/Modules/Admin/Dashboard/Index.razor +++ b/Oqtane.Client/Modules/Admin/Dashboard/Index.razor @@ -2,7 +2,7 @@ @inherits ModuleBase @inject IPageService PageService @inject IUserService UserService -@inject IStringLocalizer Localizer +@inject IStringLocalizer Localizer
@foreach (var p in _pages) From 9e814fad64941e1377b77a42260d626ab2aaa698 Mon Sep 17 00:00:00 2001 From: Leigh Date: Fri, 30 Apr 2021 09:36:50 +0200 Subject: [PATCH 13/14] Permissions for edit are applied from the page permissions. --- Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor b/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor index 5c93bc9c..b2656741 100644 --- a/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor +++ b/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor @@ -369,7 +369,10 @@ module.PageId = PageState.Page.PageId; module.ModuleDefinitionName = ModuleDefinitionName; module.AllPages = false; - module.Permissions = PageState.Page.Permissions; + List permissions = UserSecurity.GetPermissionStrings(PageState.Page.Permissions); + permissions.Remove(permissions.Find(p => p.PermissionName == PermissionNames.View)); + List editpermissions = permissions.Find(p => p.PermissionName == PermissionNames.Edit).Permissions.Split(";").ToList(); + permissions.Add(new PermissionString { PermissionName = PermissionNames.View, Permissions = string.Join(";", editpermissions.ToArray()) }); module = await ModuleService.AddModuleAsync(module); ModuleId = module.ModuleId.ToString(); } From c36cd77ab42fb2b8d879d902cdfd641916ee91b1 Mon Sep 17 00:00:00 2001 From: Leigh Date: Fri, 30 Apr 2021 09:49:51 +0200 Subject: [PATCH 14/14] Check now displays warning instead of an Error --- Oqtane.Client/Modules/Admin/Pages/Add.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Oqtane.Client/Modules/Admin/Pages/Add.razor b/Oqtane.Client/Modules/Admin/Pages/Add.razor index c2f44bee..5c026fae 100644 --- a/Oqtane.Client/Modules/Admin/Pages/Add.razor +++ b/Oqtane.Client/Modules/Admin/Pages/Add.razor @@ -288,7 +288,7 @@ Page page = null; try { - if (_name != string.Empty && !string.IsNullOrEmpty(_themetype) && _containertype != "-") + if (!string.IsNullOrEmpty(_name) && !string.IsNullOrEmpty(_themetype) && _containertype != "-") { page = new Page(); page.SiteId = PageState.Page.SiteId;