63
Oqtane.Client/Installer/Controls/LocalDBConfig.razor
Normal file
63
Oqtane.Client/Installer/Controls/LocalDBConfig.razor
Normal file
@ -0,0 +1,63 @@
|
||||
@namespace Oqtane.Installer.Controls
|
||||
|
||||
@using System.ComponentModel.Design.Serialization
|
||||
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
||||
|
||||
@inject IStringLocalizer<Installer> Localizer
|
||||
|
||||
@{
|
||||
foreach (var field in _connectionStringFields)
|
||||
{
|
||||
var fieldId = field.Name.ToLowerInvariant();
|
||||
field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm"));
|
||||
|
||||
if (IsInstaller)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="@fieldId" type="text" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public bool IsInstaller { get; set; }
|
||||
|
||||
private readonly List<ConnectionStringField> _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;
|
||||
}
|
||||
}
|
73
Oqtane.Client/Installer/Controls/MySQLConfig.razor
Normal file
73
Oqtane.Client/Installer/Controls/MySQLConfig.razor
Normal file
@ -0,0 +1,73 @@
|
||||
@namespace Oqtane.Installer.Controls
|
||||
|
||||
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
||||
|
||||
@inject IStringLocalizer<Installer> 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)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="@fieldType" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="@fieldId" type="@fieldType" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public bool IsInstaller { get; set; }
|
||||
|
||||
private readonly List<ConnectionStringField> _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;
|
||||
}
|
||||
}
|
131
Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor
Normal file
131
Oqtane.Client/Installer/Controls/PostgreSQLConfig.razor
Normal file
@ -0,0 +1,131 @@
|
||||
@namespace Oqtane.Installer.Controls
|
||||
|
||||
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
||||
|
||||
@inject IStringLocalizer<Installer> 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)
|
||||
{
|
||||
<tr style="@isVisible">
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="@fieldType" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr style="@isVisible">
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="@fieldId" type="@fieldType" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsInstaller)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="custom-select" @bind="@field.Value">
|
||||
<option value="true" selected>@Localizer["True"]</option>
|
||||
<option value="false">@Localizer["False"]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="@fieldId" class="custom-select" @bind="@field.Value">
|
||||
<option value="true" selected>@Localizer["True"]</option>
|
||||
<option value="false">@Localizer["False"]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public bool IsInstaller { get; set; }
|
||||
|
||||
private readonly List<ConnectionStringField> _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;
|
||||
}
|
||||
}
|
131
Oqtane.Client/Installer/Controls/SqlServerConfig.razor
Normal file
131
Oqtane.Client/Installer/Controls/SqlServerConfig.razor
Normal file
@ -0,0 +1,131 @@
|
||||
@namespace Oqtane.Installer.Controls
|
||||
|
||||
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
||||
|
||||
@inject IStringLocalizer<Installer> 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)
|
||||
{
|
||||
<tr style="@isVisible">
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="@fieldType" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr style="@isVisible">
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="@fieldId" type="@fieldType" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsInstaller)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="custom-select" @bind="@field.Value">
|
||||
<option value="true" selected>@Localizer["True"]</option>
|
||||
<option value="false">@Localizer["False"]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="@fieldId" class="custom-select" @bind="@field.Value">
|
||||
<option value="true" selected>@Localizer["True"]</option>
|
||||
<option value="false">@Localizer["False"]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public bool IsInstaller { get; set; }
|
||||
|
||||
private readonly List<ConnectionStringField> _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;
|
||||
}
|
||||
|
||||
}
|
60
Oqtane.Client/Installer/Controls/SqliteConfig.razor
Normal file
60
Oqtane.Client/Installer/Controls/SqliteConfig.razor
Normal file
@ -0,0 +1,60 @@
|
||||
@namespace Oqtane.Installer.Controls
|
||||
|
||||
@implements Oqtane.Interfaces.IDatabaseConfigControl
|
||||
|
||||
@inject IStringLocalizer<Installer> Localizer
|
||||
|
||||
@{
|
||||
foreach (var field in _connectionStringFields)
|
||||
{
|
||||
var fieldId = field.Name.ToLowerInvariant();
|
||||
field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm"));
|
||||
|
||||
if (IsInstaller)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="@fieldId" type="text" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public bool IsInstaller { get; set; }
|
||||
|
||||
private readonly List<ConnectionStringField> _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;
|
||||
}
|
||||
}
|
@ -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<Installer> Localizer
|
||||
@inject IEnumerable<IOqtaneDatabase> Databases
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@ -22,63 +22,23 @@
|
||||
<h2>@Localizer["Database Configuration"]</h2><br />
|
||||
<table class="form-group" cellpadding="4" cellspacing="4" style="margin: auto;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer["Database Type:"] </label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="custom-select" @bind="@_databaseType">
|
||||
@{
|
||||
foreach (var database in Databases)
|
||||
{
|
||||
<option value="@database.Name">@Localizer[@database.FriendlyName]</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@{
|
||||
_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" )
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer["Database Type:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="custom-select" value="@_databaseName" @onchange="(e => DatabaseChanged(e))">
|
||||
@foreach (var database in _databases)
|
||||
{
|
||||
var intSecurityField = _selectedDatabase.ConnectionStringFields.Single(f => f.Name == "IntegratedSecurity");
|
||||
if (intSecurityField != null)
|
||||
{
|
||||
isVisible = (Convert.ToBoolean(intSecurityField.Value)) ? "display: none;" : "";
|
||||
}
|
||||
<option value="@database.Name">@Localizer[@database.FriendlyName]</option>
|
||||
}
|
||||
|
||||
field.Value = field.Value.Replace("{{Date}}", DateTime.UtcNow.ToString("yyyyMMddHHmm"));
|
||||
|
||||
<tr style="@isVisible">
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="@fieldType" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<label class="control-label" style="font-weight: bold">@Localizer[$"{field.FriendlyName}:"]</label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="custom-select" @bind="@field.Value">
|
||||
<option value="true" selected>@Localizer["True"]</option>
|
||||
<option value="false">@Localizer["False"]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@{
|
||||
if (_databaseConfigType != null)
|
||||
{
|
||||
@DatabaseConfigComponent;
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
@ -135,8 +95,12 @@
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private IOqtaneDatabase _selectedDatabase;
|
||||
private string _databaseType = "LocalDB";
|
||||
private IList<Database> _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<Database>
|
||||
{
|
||||
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,
|
47
Oqtane.Client/Localization/SharedResources.cs
Normal file
47
Oqtane.Client/Localization/SharedResources.cs
Normal file
@ -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";
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@
|
||||
@inherits ModuleBase
|
||||
@inject IPageService PageService
|
||||
@inject IUserService UserService
|
||||
@inject IStringLocalizer<SharedResources> Localizer
|
||||
|
||||
<div class="row">
|
||||
@foreach (var p in _pages)
|
||||
@ -11,7 +12,7 @@
|
||||
string url = NavigateUrl(p.Path);
|
||||
<div class="col-md-2 mx-auto text-center">
|
||||
<NavLink class="nav-link" href="@url" Match="NavLinkMatch.All">
|
||||
<h2><span class="@p.Icon" aria-hidden="true"></span></h2>@p.Name
|
||||
<h2><span class="@p.Icon" aria-hidden="true"></span></h2>@Localizer[p.Name]
|
||||
</NavLink>
|
||||
</div>
|
||||
}
|
||||
@ -20,7 +21,7 @@
|
||||
|
||||
@code {
|
||||
private List<Page> _pages;
|
||||
|
||||
|
||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Admin;
|
||||
|
||||
protected override void OnInitialized()
|
||||
|
@ -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;
|
||||
|
@ -127,60 +127,17 @@ else
|
||||
<Label For="databaseType" HelpText="Select the database type for the tenant" ResourceKey="DatabaseType">Database Type: </Label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="databaseType" class="custom-select" @bind="@_databaseType">
|
||||
@{
|
||||
foreach (var database in Databases)
|
||||
{
|
||||
<option value="@database.Name">@Localizer[@database.FriendlyName]</option>
|
||||
}
|
||||
<select id="databaseType" class="custom-select" value="@_databaseName" @onchange="(e => DatabaseChanged(e))">
|
||||
@foreach (var database in _databases)
|
||||
{
|
||||
<option value="@database.Name">@Localizer[@database.FriendlyName]</option>
|
||||
}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
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"));
|
||||
|
||||
<tr style="@isVisible">
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<input id="@fieldId" type="@fieldType" class="form-control" @bind="@field.Value" />
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<Label For="@fieldId" HelpText="@field.HelpText" ResourceKey="@field.Name">@Localizer[$"{field.FriendlyName}:"]</Label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="@fieldId" class="custom-select" @bind="@field.Value">
|
||||
<option value="true" selected>@Localizer["True"]</option>
|
||||
<option value="false">@Localizer["False"]</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
@DatabaseConfigComponent;
|
||||
}
|
||||
<tr>
|
||||
<td>
|
||||
@ -205,6 +162,13 @@ else
|
||||
}
|
||||
|
||||
@code {
|
||||
private IList<Database> _databases;
|
||||
private string _databaseName = "LocalDB";
|
||||
private Type _databaseConfigType;
|
||||
private object _databaseConfig;
|
||||
private RenderFragment DatabaseConfigComponent { get; set; }
|
||||
|
||||
|
||||
private List<Theme> _themeList;
|
||||
private List<ThemeControl> _themes = new List<ThemeControl>();
|
||||
private List<ThemeControl> _containers = new List<ThemeControl>();
|
||||
@ -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<Database>
|
||||
{
|
||||
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;
|
||||
|
@ -86,17 +86,6 @@ namespace Oqtane.Client
|
||||
}
|
||||
}
|
||||
|
||||
// dynamically register database providers
|
||||
var databaseTypes = assembly.GetInterfaces<IOqtaneDatabase>();
|
||||
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<IClientStartup>();
|
||||
foreach (var startup in startUps)
|
||||
|
@ -369,7 +369,10 @@
|
||||
module.PageId = PageState.Page.PageId;
|
||||
module.ModuleDefinitionName = ModuleDefinitionName;
|
||||
module.AllPages = false;
|
||||
module.Permissions = PageState.Page.Permissions;
|
||||
List<PermissionString> permissions = UserSecurity.GetPermissionStrings(PageState.Page.Permissions);
|
||||
permissions.Remove(permissions.Find(p => p.PermissionName == PermissionNames.View));
|
||||
List<string> 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();
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<ModuleActions />
|
||||
}
|
||||
<div class="row px-4">
|
||||
<div class="container">
|
||||
<div class="container-fluid">
|
||||
<ModuleInstance />
|
||||
</div>
|
||||
</div>
|
||||
@ -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()
|
||||
{
|
||||
|
@ -93,6 +93,7 @@
|
||||
<Pane Name="Bottom Full Width" />
|
||||
@if (_footer)
|
||||
{
|
||||
<div style="clear: both; height: 30px;"></div>
|
||||
<div class="bg-primary fixed-bottom footer">
|
||||
<Pane Name="Footer" />
|
||||
</div>
|
||||
|
@ -21,3 +21,4 @@
|
||||
@using Oqtane.Themes.Controls
|
||||
@using Oqtane.UI
|
||||
@using Oqtane.Enums
|
||||
@using Oqtane.Installer
|
||||
|
@ -15,16 +15,7 @@ namespace Oqtane.Database.MySQL
|
||||
|
||||
private static string _name => "MySQL";
|
||||
|
||||
private static readonly List<ConnectionStringField> _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<int>(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(";
|
||||
|
@ -20,17 +20,7 @@ namespace Oqtane.Database.PostgreSQL
|
||||
|
||||
private readonly INameRewriter _rewriter;
|
||||
|
||||
private static readonly List<ConnectionStringField> _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<int>(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;
|
||||
|
@ -14,12 +14,7 @@ namespace Oqtane.Repository.Databases
|
||||
|
||||
private static string _name => "Sqlite";
|
||||
|
||||
private static readonly List<ConnectionStringField> _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<int>(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;
|
||||
|
@ -10,27 +10,6 @@ namespace Oqtane.Databases
|
||||
private static string _friendlyName => "Local Database";
|
||||
private static string _name => "LocalDB";
|
||||
|
||||
private static readonly List<ConnectionStringField> _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) { }
|
||||
}
|
||||
}
|
||||
|
@ -13,50 +13,6 @@ namespace Oqtane.Databases
|
||||
|
||||
private static string _name => "SqlServer";
|
||||
|
||||
private static readonly List<ConnectionStringField> _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) { }
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ namespace Oqtane.Repository.Databases
|
||||
{
|
||||
public abstract class SqlServerDatabaseBase : OqtaneDatabaseBase
|
||||
{
|
||||
protected SqlServerDatabaseBase(string name, string friendlyName, List<ConnectionStringField> connectionStringFields) : base(name, friendlyName, connectionStringFields)
|
||||
protected SqlServerDatabaseBase(string name, string friendlyName) : base(name, friendlyName)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Oqtane.Shared;
|
||||
@ -9,7 +11,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 +21,19 @@ namespace Oqtane.Infrastructure
|
||||
}
|
||||
|
||||
public string GetDefaultCulture()
|
||||
=> string.IsNullOrEmpty(_localizationOptions.DefaultCulture)
|
||||
=> String.IsNullOrEmpty(_localizationOptions.DefaultCulture)
|
||||
? DefaultCulture
|
||||
: _localizationOptions.DefaultCulture;
|
||||
|
||||
public string[] GetSupportedCultures()
|
||||
{
|
||||
List<string> cultures = new List<string>();
|
||||
var cultures = new List<string>(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.OrderBy(c => c).ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,9 +25,7 @@ namespace Oqtane.Repository
|
||||
private readonly IModuleRepository _moduleRepository;
|
||||
private readonly IPageModuleRepository _pageModuleRepository;
|
||||
private readonly IModuleDefinitionRepository _moduleDefinitionRepository;
|
||||
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
|
||||
private readonly IConfigurationRoot _config;
|
||||
|
||||
public SiteRepository(TenantDBContext context, IRoleRepository roleRepository, IProfileRepository profileRepository, IFolderRepository folderRepository, IPageRepository pageRepository,
|
||||
@ -68,7 +67,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 = SharedResources.UserLogin, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -97,7 +96,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 = SharedResources.UserRegistration, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -127,7 +126,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 = SharedResources.PasswordReset, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -156,7 +155,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 = SharedResources.UserProfile, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -181,7 +180,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 = SharedResources.AdminDashboard, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -208,7 +207,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 = SharedResources.SiteSettings, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -235,7 +234,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 = SharedResources.PageManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -262,7 +261,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 = SharedResources.UserManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -289,7 +288,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 = SharedResources.ProfileManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -316,7 +315,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 = SharedResources.RoleManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -343,7 +342,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 = SharedResources.FileManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -370,7 +369,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 = SharedResources.RecycleBin, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Admin, true),
|
||||
@ -399,7 +398,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 = SharedResources.EventLog, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
@ -421,7 +420,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 = SharedResources.SiteManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
@ -443,7 +442,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 = SharedResources.ModuleManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
@ -465,7 +464,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 = SharedResources.ThemeManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
@ -494,7 +493,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 = SharedResources.LanguageManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
@ -518,7 +517,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 = SharedResources.ScheduledJobs, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
@ -540,7 +539,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 = SharedResources.SqlManagement, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
@ -562,7 +561,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 = SharedResources.SystemInfo, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
@ -584,7 +583,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 = SharedResources.SystemUpdate, Pane = PaneNames.Admin,
|
||||
ModulePermissions = new List<Permission>
|
||||
{
|
||||
new Permission(PermissionNames.View, RoleNames.Host, true),
|
||||
|
9
Oqtane.Shared/Interfaces/IDatabaseConfigControl.cs
Normal file
9
Oqtane.Shared/Interfaces/IDatabaseConfigControl.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Oqtane.Interfaces
|
||||
{
|
||||
public interface IDatabaseConfigControl
|
||||
{
|
||||
string GetConnectionString();
|
||||
|
||||
bool IsInstaller { get; set; }
|
||||
}
|
||||
}
|
@ -14,12 +14,8 @@ namespace Oqtane.Interfaces
|
||||
|
||||
public string Provider { get; }
|
||||
|
||||
public List<ConnectionStringField> ConnectionStringFields { get; }
|
||||
|
||||
public OperationBuilder<AddColumnOperation> AddAutoIncrementColumn(ColumnsBuilder table, string name);
|
||||
|
||||
public string BuildConnectionString();
|
||||
|
||||
public string ConcatenateSql(params string[] values);
|
||||
|
||||
public string RewriteName(string name);
|
||||
|
@ -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; }
|
||||
|
@ -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";
|
||||
|
@ -10,11 +10,10 @@ namespace Oqtane.Shared
|
||||
{
|
||||
public abstract class OqtaneDatabaseBase : IOqtaneDatabase
|
||||
{
|
||||
protected OqtaneDatabaseBase(string name, string friendlyName, List<ConnectionStringField> 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<ConnectionStringField> ConnectionStringFields { get; }
|
||||
|
||||
public abstract OperationBuilder<AddColumnOperation> AddAutoIncrementColumn(ColumnsBuilder table, string name);
|
||||
|
||||
public abstract string BuildConnectionString();
|
||||
|
||||
public virtual string ConcatenateSql(params string[] values)
|
||||
{
|
||||
var returnValue = String.Empty;
|
||||
|
Reference in New Issue
Block a user