Merge ~steverydz/maas:deploy-options-os into maas:master

Proposed by Steve Rydz
Status: Merged
Approved by: Steve Rydz
Approved revision: 911863882a85434783bb407e073e0656c2f33830
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~steverydz/maas:deploy-options-os
Merge into: maas:master
Diff against target: 52 lines (+24/-6)
2 files modified
src/maasserver/static/js/angular/directives/os_select.js (+1/-6)
src/maasserver/static/js/angular/directives/tests/test_os_select.js (+23/-0)
Reviewer Review Type Date Requested Status
MAAS Lander Approve
Alberto Donato (community) Approve
Lilyana Videnova (community) Approve
Review via email: mp+361187@code.launchpad.net

Commit message

LP: #1776741 - Fix toggle between deploy os

To post a comment you must log in.
Revision history for this message
Lilyana Videnova (lilyanavidenova) wrote :

UX +1

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b deploy-options-os lp:~steverydz/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 7f18296591465baa944504dbc88877fed20e538b

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b deploy-options-os lp:~steverydz/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: FAILED
LOG: http://maas-ci-jenkins.internal:8080/job/maas/job/branch-tester/4844/console
COMMIT: 0bea9c19a3de4dc7bc389eb6700f1806e624171e

review: Needs Fixing
Revision history for this message
Alberto Donato (ack) wrote :

+1 lgtm.

there's a lint issue to fix for CI to be green, though

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b deploy-options-os lp:~steverydz/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 911863882a85434783bb407e073e0656c2f33830

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/maasserver/static/js/angular/directives/os_select.js b/src/maasserver/static/js/angular/directives/os_select.js
index 551ddb1..3af32f1 100644
--- a/src/maasserver/static/js/angular/directives/os_select.js
+++ b/src/maasserver/static/js/angular/directives/os_select.js
@@ -189,12 +189,7 @@ angular.module('MAAS').directive('maasOsSelect', ['KVMDeployOSBlacklist',
189 $scope.ngModel.hwe_kernel = null;189 $scope.ngModel.hwe_kernel = null;
190 if($scope.releases.length > 0) {190 if($scope.releases.length > 0) {
191 var firstRelease = $scope.releases[0][0];191 var firstRelease = $scope.releases[0][0];
192 if (firstRelease.includes('ubuntu') &&192 $scope.ngModel.release = firstRelease;
193 KVMDeployOSBlacklist.includes(firstRelease)) {
194 setDefault();
195 } else {
196 $scope.ngModel.release = firstRelease;
197 }
198 }193 }
199194
200 $scope.hwe_kernels = getSelectableKernels();195 $scope.hwe_kernels = getSelectableKernels();
diff --git a/src/maasserver/static/js/angular/directives/tests/test_os_select.js b/src/maasserver/static/js/angular/directives/tests/test_os_select.js
index c491dc1..c111a0a 100644
--- a/src/maasserver/static/js/angular/directives/tests/test_os_select.js
+++ b/src/maasserver/static/js/angular/directives/tests/test_os_select.js
@@ -203,6 +203,29 @@ describe("maasOsSelect", function() {
203 $scope.osinfo.osystems[0][0], $scope.osinfo.releases));203 $scope.osinfo.osystems[0][0], $scope.osinfo.releases));
204 });204 });
205205
206 it("selectedOSChanged works on non-ubuntu os", function() {
207 var directive = compileDirective("osinfo", "selected");
208 $scope.osinfo = {
209 osystems: [["centos", "CentOS"], ["ubuntu", "Ubuntu"]],
210 releases: [
211 ["centos/centos66", "CentOS 6"],
212 ["centos/centos70", "CentOS 7"],
213 ["ubuntu/xenial", "16.04 LTS \"Xenial Xerus\""],
214 ["ubuntu/bionic", "18.04 LTS \"Bionic Beaver\""]
215 ],
216 default_osystem: "centos",
217 default_release: "centos66"
218 };
219 $scope.selected = {
220 osystem: "ubuntu",
221 release: ""
222 };
223 $scope.$digest();
224 directive.isolateScope().selectedOSChanged();
225 expect(directive.isolateScope().releases[0][0])
226 .toEqual('ubuntu/xenial');
227 });
228
206 it("selectedOSChanged updates releases", function() {229 it("selectedOSChanged updates releases", function() {
207 var directive = compileDirective("osinfo", "selected");230 var directive = compileDirective("osinfo", "selected");
208 $scope.selected = {231 $scope.selected = {

Subscribers

People subscribed via source and target branches