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

NAS-128390 / 24.10.2 / Adjust children selection options for draid pools #11119

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,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 @@ -122,7 +122,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 @@ -193,11 +193,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
Loading