Skip to content

Commit

Permalink
NAS-128390 / 25.04 / Adjust min child count when creating draid pools (
Browse files Browse the repository at this point in the history
  • Loading branch information
RehanY147 authored Nov 29, 2024
1 parent fcf669d commit 1261458
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('DraidSelectionComponent', () => {
expect(await spares.getValue()).toBe('0');

const children = await form.getControl('Children') as IxSelectHarness;
expect(await children.getOptionLabels()).toEqual(['4', '5']);
expect(await children.getOptionLabels()).toEqual(['3', '4', '5']);
});

it('updates Children when Spares are selected', async () => {
Expand All @@ -118,7 +118,7 @@ describe('DraidSelectionComponent', () => {
);

const children = await form.getControl('Children') as IxSelectHarness;
expect(await children.getOptionLabels()).toEqual(['5']);
expect(await children.getOptionLabels()).toEqual(['4', '5']);
});

it('defaults Children to optimal number, but only once', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,10 @@ export class DraidSelectionComponent implements OnInit, OnChanges {

let nextOptions: Option[] = [];
if ((groupSize + hotSpares) <= maxPossibleWidth && dataDevices) {
nextOptions = range(groupSize + hotSpares, maxPossibleWidth).map((item) => {
const disks = item + 1;
nextOptions = range(groupSize + hotSpares, maxPossibleWidth + 1).map((noOfChildren) => {
return {
label: String(disks),
value: disks,
label: String(noOfChildren),
value: noOfChildren,
};
});
}
Expand Down

0 comments on commit 1261458

Please sign in to comment.