Skip to content

Commit

Permalink
DB Scoped Config shows secondary values for non-secondary options #24192
Browse files Browse the repository at this point in the history
  • Loading branch information
ssreerama committed Sep 11, 2023
1 parent 510ec11 commit 2a21e63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ export const QueryStoreUsedText = localize('objectManagement.databaseProperties.
export const QueryStoreAvailableText = localize('objectManagement.databaseProperties.queryStoreAvailableText', "Query Store Available");
export const PurgeQueryDataButtonText = localize('objectManagement.databaseProperties.purgeQueryDataButtonText', "Purge Query Store Data");
export const YesText = localize('objectManagement.databaseProperties.yesText', "Yes");
export const NotAvailableText = localize('objectManagement.databaseProperties.notAvailableText', "N/A");
export const PurgeQueryStoreDataMessage = (databaseName: string) => localize('objectManagement.databaseProperties.purgeQueryStoreDataMessage', "Are you sure you want to purge the Query Store data from '{0}'?", databaseName);

// Util functions
Expand Down
4 changes: 3 additions & 1 deletion extensions/mssql/src/objectManagement/ui/databaseDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,8 @@ export class DatabaseDialog extends ObjectManagementDialogBase<Database, Databas

//#region Database Properties - Data Scoped configurations Tab
private async initializeDatabaseScopedConfigurationSection(): Promise<void> {
// Configurations that doesn't support secondary replica
let secondaryUnsupportedConfigsSet = new Set<number>([11, 12, 25, 6, 21]);
const dscNameColumn: azdata.TableColumn = {
type: azdata.ColumnType.text,
value: localizedConstants.DatabaseScopedOptionsColumnHeader,
Expand All @@ -1316,7 +1318,7 @@ export class DatabaseDialog extends ObjectManagementDialogBase<Database, Databas
data: this.objectInfo.databaseScopedConfigurations.map(metaData => {
return [metaData.name.toLocaleUpperCase(),
metaData.valueForPrimary,
metaData.valueForSecondary]
secondaryUnsupportedConfigsSet.has(metaData.id) ? localizedConstants.NotAvailableText : metaData.valueForSecondary]
}),
height: getTableHeight(this.objectInfo.databaseScopedConfigurations.length, 1, DscTableRowLength),
width: DefaultTableWidth
Expand Down

0 comments on commit 2a21e63

Please sign in to comment.