From 77ea6d7e32a6c04354d23c42c8d38b94493a2168 Mon Sep 17 00:00:00 2001 From: Barbara Valdez <34872381+barbaravaldez@users.noreply.github.com> Date: Wed, 6 Sep 2023 16:08:21 -0700 Subject: [PATCH] do not show individual processors in managed instance (#24302) --- .../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 1bb091e107..74ace5b5c6 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);