Hotfix for ads dashboard for sqlondemand (#885)

* Hotfix for ads dashboard for sqlondemand

* Generalizing engine edition functions and adapting tests

* Minor comment and cosmetic fixes

* Adding SqlOnDemand server edition string
This commit is contained in:
aleklj
2019-10-31 17:35:11 +01:00
committed by BranislavGrbicMDCS
parent d75edd0dbe
commit 84c505f647
13 changed files with 194 additions and 164 deletions

View File

@@ -2278,10 +2278,13 @@ WHERE do.database_id = @DbID
{
try
{
foreach (LogFile logfile in database.LogFiles)
if (this.context.Server.DatabaseEngineEdition != DatabaseEngineEdition.SqlOnDemand)
{
DatabaseFilePrototype logfilePrototype = new DatabaseFilePrototype(this, logfile);
this.Add(logfilePrototype);
foreach (LogFile logfile in database.LogFiles)
{
DatabaseFilePrototype logfilePrototype = new DatabaseFilePrototype(this, logfile);
this.Add(logfilePrototype);
}
}
}
catch (ExecutionFailureException)

View File

@@ -473,6 +473,9 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
case (int)DatabaseEngineEdition.SqlStretchDatabase:
serverEdition = SR.AzureSqlStretchEdition;
break;
case (int)DatabaseEngineEdition.SqlOnDemand:
serverEdition = SR.AzureSqlAnalyticsOnDemandEdition;
break;
default:
serverEdition = SR.AzureSqlDbEdition;
break;

View File

@@ -99,6 +99,14 @@ namespace Microsoft.SqlTools.ServiceLayer
{
return Keys.GetString(Keys.AzureSqlStretchEdition);
}
}
public static string AzureSqlAnalyticsOnDemandEdition
{
get
{
return Keys.GetString(Keys.AzureSqlAnalyticsOnDemandEdition);
}
}
public static string QueryServiceCancelAlreadyCompleted
@@ -3161,7 +3169,10 @@ namespace Microsoft.SqlTools.ServiceLayer
public const string AzureSqlDwEdition = "AzureSqlDwEdition";
public const string AzureSqlStretchEdition = "AzureSqlStretchEdition";
public const string AzureSqlStretchEdition = "AzureSqlStretchEdition";
public const string AzureSqlAnalyticsOnDemandEdition = "AzureSqlAnalyticsOnDemandEdition";
public const string QueryServiceCancelAlreadyCompleted = "QueryServiceCancelAlreadyCompleted";

View File

@@ -51,6 +51,7 @@ ConnectionParamsValidateNullSqlAuth(string component) = {0} cannot be null or em
AzureSqlDbEdition = Azure SQL DB
AzureSqlDwEdition = Azure SQL Data Warehouse
AzureSqlStretchEdition = Azure SQL Stretch Database
AzureSqlAnalyticsOnDemandEdition = Azure SQL Analytics on-demand
############################################################################
# Query Execution Service

View File

@@ -1590,6 +1590,11 @@
<source>Azure SQL Stretch Database</source>
<target state="new">Azure SQL Stretch Database</target>
<note></note>
</trans-unit>
<trans-unit id="AzureSqlAnalyticsOnDemandEdition">
<source>Azure SQL Analytics on-demand</source>
<target state="new">Azure SQL Analytics on-demand</target>
<note></note>
</trans-unit>
<trans-unit id="EditDataValueTooLarge">
<source>Value {0} is too large to fit in column of type {1}</source>