Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide individual processors table in managed instance #24302

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions extensions/mssql/src/objectManagement/ui/serverPropertiesDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,37 +369,46 @@ export class ServerPropertiesDialog extends ObjectManagementDialogBase<Server, S
let nodes: NumaNode[] = this.objectInfo.numaNodes;
let nodeTableList: azdata.TableComponent[] = [];
let tableGroups: azdata.GroupContainer[] = [];
for (let node of nodes) {
let table = this.createProcessorTable(node);
nodeTableList.push(table);
tableGroups.push(this.createGroup(localizedConstants.serverNumaNodeLabel(node.numaNodeId), [table], true));

if (isEnabled) {
for (let node of nodes) {
let table = this.createProcessorTable(node);
nodeTableList.push(table);
tableGroups.push(this.createGroup(localizedConstants.serverNumaNodeLabel(node.numaNodeId), [table], true));
}
}

this.autoSetProcessorAffinityMaskForAllCheckbox = this.createCheckbox(localizedConstants.autoSetProcessorAffinityMaskForAllText, async (newValue) => {
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);

Expand Down