Skip to content

Commit 6f70007

Browse files
author
Abhinandan Prateek
committed
md-ova: ui chanegs if there is no attached datadisk
1 parent bb23562 commit 6f70007

File tree

2 files changed

+27
-12
lines changed

2 files changed

+27
-12
lines changed

ui/scripts/instanceWizard.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,12 @@
404404
label: name
405405
});
406406
}
407+
else {
408+
multiDisks.push({
409+
id: "none",
410+
label: "Multidisk Template: No attached datadisk found"
411+
});
412+
}
407413
});
408414
}
409415
}

ui/scripts/ui-custom/instanceWizard.js

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -556,13 +556,19 @@
556556
$step.find('.multi-disk-select-container').remove();
557557
$step.removeClass('custom-disk-size');
558558

559-
if (args.required) {
560-
$step.find('.section.no-thanks').hide();
561-
$step.addClass('required');
562-
} else {
563-
$step.find('.section.no-thanks').show();
564-
$step.removeClass('required');
565-
}
559+
if (!multiDisk){
560+
if (args.required) {
561+
$step.find('.section.no-thanks').hide();
562+
$step.addClass('required');
563+
} else {
564+
$step.find('.section.no-thanks').show();
565+
$step.removeClass('required');
566+
}
567+
}
568+
else {
569+
$step.find('.section.no-thanks').hide();
570+
$step.addClass('required');
571+
}
566572

567573
var $selectContainer = $step.find('.content .select-container:not(.multi-disk)');
568574

@@ -592,17 +598,20 @@
592598

593599
$group.appendTo($multiDiskSelect);
594600
$group.data('json-obj', disk);
601+
if (disk.id == "none"){
602+
return;
603+
}
595604

596605
// Show-hide disk group selects
597606
$checkbox.click(function() {
598607
$group.toggleClass('selected');
599608
$group.find('.select:first input[type=radio]').click();
600609

601-
if (!$multiDiskSelect.find('input[type=checkbox]:checked').size()) {
602-
$step.find('.no-thanks input[type=radio]').click();
603-
} else {
604-
$step.find('.no-thanks input[type=radio]').attr('checked', false);
605-
}
610+
if (!$multiDiskSelect.find('input[type=checkbox]:checked').size()) {
611+
$step.find('.no-thanks input[type=radio]').click();
612+
} else {
613+
$step.find('.no-thanks input[type=radio]').attr('checked', false);
614+
}
606615
});
607616

608617
// Add custom disk size box

0 commit comments

Comments
 (0)