NetCore: Install page db checks (#9388)

* Making more explicit checks for the db type

* Fixed confusion with both ints and strings

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Elitsa Marinovska
2020-11-13 08:50:35 +01:00
committed by GitHub
parent bb1b04be15
commit a1f9bc9b17
2 changed files with 9 additions and 9 deletions

View File

@@ -73,14 +73,14 @@ namespace Umbraco.Web.Install.InstallSteps
{
var databases = new List<object>()
{
new { name = "Microsoft SQL Server", id = 1 },
new { name = "Microsoft SQL Azure", id = 3 },
new { name = "Custom connection string", id = -1 },
new { name = "Microsoft SQL Server", id = DatabaseType.SqlServer.ToString() },
new { name = "Microsoft SQL Azure", id = DatabaseType.SqlAzure.ToString() },
new { name = "Custom connection string", id = DatabaseType.Custom.ToString() },
};
if (IsSqlCeAvailable())
{
databases.Insert(0, new { name = "Microsoft SQL Server Compact (SQL CE)", id = 0 });
databases.Insert(0, new { name = "Microsoft SQL Server Compact (SQL CE)", id = DatabaseType.SqlCe.ToString() });
}
return new

View File

@@ -17,11 +17,11 @@
</div>
</div>
<div class="controls" ng-if="installer.current.model.dbType == 0 || installer.current.model.dbType =='SqlCe' ">
<div class="controls" ng-if="installer.current.model.dbType == 'SqlCe' ">
<p>Great! No need to configure anything, you can simply click the <strong>continue</strong> button below to continue to the next step</p>
</div>
<div ng-if="installer.current.model.dbType < 0 || installer.current.model.dbType == 3 || installer.current.model.dbType == 'Custom' ">
<div ng-if="installer.current.model.dbType == 'Custom' ">
<legend>What is the exact connection string we should use?</legend>
<div class="control-group">
<label class="control-label" for="server">Connection string</label>
@@ -32,7 +32,7 @@
</div>
</div>
<div ng-if="installer.current.model.dbType > 0 || installer.current.model.dbType != 'Custom' ">
<div ng-if="installer.current.model.dbType == 'SqlAzure' || installer.current.model.dbType == 'SqlServer' ">
<div class="row">
<legend>Where do we find your database?</legend>
<div class="span6">
@@ -40,7 +40,7 @@
<label class="control-label" for="server">Server</label>
<div class="controls">
<input type="text" id="server" name="server"
placeholder="{{ (installer.current.model.dbType == 2 || installer.current.model.dbType =='SqlAzure') ? 'umbraco-database.database.windows.net' : '127.0.0.1\\SQLEXPRESS'}}"
placeholder="{{ (installer.current.model.dbType == 'SqlAzure') ? 'umbraco-database.database.windows.net' : '127.0.0.1\\SQLEXPRESS'}}"
required ng-model="installer.current.model.server" />
<small class="inline-help">Enter server domain or IP</small>
</div>
@@ -86,7 +86,7 @@
</div>
</div>
<div class="span12 control-group" ng-if="installer.current.model.dbType == 1 || installer.current.model.dbType =='SqlServer' ">
<div class="span12 control-group" ng-if="installer.current.model.dbType =='SqlServer' ">
<div class="controls">
<label class="checkbox">
<input type="checkbox" id="integratedAuth" name="integratedAuth"