From 419bd6341144677943bc1f9f45257322d2b409cc Mon Sep 17 00:00:00 2001 From: Barbara Valdez Mireles Date: Wed, 6 Sep 2023 14:40:16 -0700 Subject: [PATCH] do not show individual processors in managed instance --- .../ui/serverPropertiesDialog.ts | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts b/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts index 1bb091e107b6..74ace5b5c6ce 100644 --- a/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts +++ b/extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts @@ -369,37 +369,46 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase { this.objectInfo.autoProcessorAffinityMaskForAll = newValue; - for (let table of nodeTableList) { - let newData = table.data; - for (let i = 0; i < newData.length; i++) { - if (newValue) { - // if affinity mask for all is checked, then uncheck the individual processors - newData[i][AffinityType.ProcessorAffinity] = false; + if (isEnabled) { + for (let table of nodeTableList) { + let newData = table.data; + for (let i = 0; i < newData.length; i++) { + if (newValue) { + // if affinity mask for all is checked, then uncheck the individual processors + newData[i][AffinityType.ProcessorAffinity] = false; + } } + await this.setTableData(table, newData); } - await this.setTableData(table, newData); } + }, this.objectInfo.autoProcessorAffinityMaskForAll, isEnabled); this.autoSetProcessorIOAffinityMaskForAllCheckbox = this.createCheckbox(localizedConstants.autoSetProcessorAffinityIOMaskForAllText, async (newValue) => { this.objectInfo.autoProcessorAffinityIOMaskForAll = newValue; - for (let table of nodeTableList) { - let newData = table.data; - for (let i = 0; i < newData.length; i++) { - if (newValue) { - // if IO affinity mask for all is checked, then uncheck the individual processors - newData[i][AffinityType.IOAffinity] = false; + if (isEnabled) { + for (let table of nodeTableList) { + let newData = table.data; + for (let i = 0; i < newData.length; i++) { + if (newValue) { + // if IO affinity mask for all is checked, then uncheck the individual processors + newData[i][AffinityType.IOAffinity] = false; + } } + await this.setTableData(table, newData); + this.resetNumaNodes(); } - await this.setTableData(table, newData); - this.resetNumaNodes(); } }, this.objectInfo.autoProcessorAffinityIOMaskForAll, isEnabled);