Merge lp:~lamont/maas/bug-1590499 into lp:~maas-committers/maas/trunk
- bug-1590499
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | LaMont Jones | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5107 | ||||
Proposed branch: | lp:~lamont/maas/bug-1590499 | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
359 lines (+148/-98) 3 files modified
src/maasserver/static/js/angular/controllers/node_details_networking.js (+22/-2) src/maasserver/static/js/angular/controllers/tests/test_node_details_networking.js (+30/-2) src/maasserver/static/partials/node-details.html (+96/-94) |
||||
To merge this branch: | bzr merge lp:~lamont/maas/bug-1590499 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mike Pontillo (community) | Approve | ||
Review via email: mp+296873@code.launchpad.net |
Commit message
In the Node details interfaces section, if editing is disabled, then disable the input boxes.
Description of the change
In the Node details interfaces section, if editing is disabled, then disable the input boxes.
Mike Pontillo (mpontillo) wrote : | # |
Also, based on the content of this branch, I assumed it was just a UI fix, but don't we need to enforce the same restriction at the API layer? (hopefully the forms, if both the API and the websockets use them.)
LaMont Jones (lamont) wrote : | # |
I have confirmed that the API already has the check, and that this is purely a "misleading UI" issue. Updated the html to also get rid of the entire dropdown row of buttons if the node is not Ready/Broken.
Mike Pontillo (mpontillo) wrote : | # |
The latest version of this branch works properly for aliases, but still has an edge case that allows me to edit bonds (if I transition to allocated while adding a bond, for example).
Mike Pontillo (mpontillo) wrote : | # |
Looks good to me. I've got a couple comments below, but I won't block you on them. I tested this branch and the behavior is much better now.
LaMont Jones (lamont) : | # |
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~lamont/maas/bug-1590499 into lp:maas failed. Below is the output from the failed tests.
Hit:1 http://
Get:2 http://
Hit:3 http://
Get:4 http://
Fetched 189 kB in 0s (444 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu3).
archdetect-deb is already the newest version (1.117ubuntu2).
authbind is already the newest version (2.1.1+nmu1).
bash is already the newest version (4.3-14ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
bzr is already the newest version (2.7.0-2ubuntu1).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubun
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
isc-dhcp-common is already the newest version (4.3.3-5ubuntu12).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
make is already the newest version (4.1-6).
postgresql is already the newest version (9.5+173).
pxelinux is already the newest version (3:6.03+
MAAS Lander (maas-lander) wrote : | # |
The attempt to merge lp:~lamont/maas/bug-1590499 into lp:maas failed. Below is the output from the failed tests.
Hit:1 http://
Hit:2 http://
Get:3 http://
Hit:4 http://
Fetched 94.5 kB in 0s (206 kB/s)
Reading package lists...
sudo DEBIAN_
--no-
Reading package lists...
Building dependency tree...
Reading state information...
apache2 is already the newest version (2.4.18-2ubuntu3).
archdetect-deb is already the newest version (1.117ubuntu2).
authbind is already the newest version (2.1.1+nmu1).
bash is already the newest version (4.3-14ubuntu1).
build-essential is already the newest version (12.1ubuntu2).
bzr is already the newest version (2.7.0-2ubuntu1).
curl is already the newest version (7.47.0-1ubuntu2).
debhelper is already the newest version (9.20160115ubun
distro-info is already the newest version (0.14build1).
freeipmi-tools is already the newest version (1.4.11-1ubuntu1).
git is already the newest version (1:2.7.4-0ubuntu1).
isc-dhcp-common is already the newest version (4.3.3-5ubuntu12).
libjs-angularjs is already the newest version (1.2.28-1ubuntu2).
libjs-jquery is already the newest version (1.11.3+dfsg-4).
libjs-yui3-full is already the newest version (3.5.1-1ubuntu3).
libjs-yui3-min is already the newest version (3.5.1-1ubuntu3).
make is already the newest version (4.1-6).
postgresql is already the newest version (9.5+173).
pxelinux is already the newest version (3:6.03+
pyth...
Preview Diff
1 | === modified file 'src/maasserver/static/js/angular/controllers/node_details_networking.js' | |||
2 | --- src/maasserver/static/js/angular/controllers/node_details_networking.js 2016-05-23 08:05:13 +0000 | |||
3 | +++ src/maasserver/static/js/angular/controllers/node_details_networking.js 2016-06-13 14:10:54 +0000 | |||
4 | @@ -37,8 +37,8 @@ | |||
5 | 37 | // list of interfaces to not include the current parent interfaces being | 37 | // list of interfaces to not include the current parent interfaces being |
6 | 38 | // bonded together. | 38 | // bonded together. |
7 | 39 | angular.module('MAAS').filter('removeInterfaceParents', function() { | 39 | angular.module('MAAS').filter('removeInterfaceParents', function() { |
10 | 40 | return function(interfaces, childInterface) { | 40 | return function(interfaces, childInterface, skip) { |
11 | 41 | if(!angular.isObject(childInterface) || | 41 | if(skip || !angular.isObject(childInterface) || |
12 | 42 | !angular.isArray(childInterface.parents)) { | 42 | !angular.isArray(childInterface.parents)) { |
13 | 43 | return interfaces; | 43 | return interfaces; |
14 | 44 | } | 44 | } |
15 | @@ -511,6 +511,26 @@ | |||
16 | 511 | updateLoaded(); | 511 | updateLoaded(); |
17 | 512 | }; | 512 | }; |
18 | 513 | 513 | ||
19 | 514 | // Return true if the Node is Ready (or Broken) | ||
20 | 515 | $scope.isNodeEditingAllowed = function() { | ||
21 | 516 | if (!$scope.isSuperUser()) { | ||
22 | 517 | // If the user is not the superuser, pretend it's not Ready. | ||
23 | 518 | return false; | ||
24 | 519 | } | ||
25 | 520 | if ($scope.$parent.isController) { | ||
26 | 521 | // Controllers are always Ready, for our purposes. | ||
27 | 522 | return true; | ||
28 | 523 | } | ||
29 | 524 | if (angular.isObject($scope.node) && | ||
30 | 525 | ["Ready", "Broken"].indexOf($scope.node.status) === -1) { | ||
31 | 526 | // If a non-controller node is not Ready or Broken, then no | ||
32 | 527 | // editing networking. | ||
33 | 528 | return false; | ||
34 | 529 | } | ||
35 | 530 | // All is well, let them edit. | ||
36 | 531 | return true; | ||
37 | 532 | }; | ||
38 | 533 | |||
39 | 514 | // Return true if the networking information cannot be edited. | 534 | // Return true if the networking information cannot be edited. |
40 | 515 | // (it can't be changed when the node is in any state other | 535 | // (it can't be changed when the node is in any state other |
41 | 516 | // than Ready or Broken and the user is not a superuser) | 536 | // than Ready or Broken and the user is not a superuser) |
42 | 517 | 537 | ||
43 | === modified file 'src/maasserver/static/js/angular/controllers/tests/test_node_details_networking.js' | |||
44 | --- src/maasserver/static/js/angular/controllers/tests/test_node_details_networking.js 2016-05-23 08:05:13 +0000 | |||
45 | +++ src/maasserver/static/js/angular/controllers/tests/test_node_details_networking.js 2016-06-13 14:10:54 +0000 | |||
46 | @@ -97,7 +97,8 @@ | |||
47 | 97 | }; | 97 | }; |
48 | 98 | interfaces.push(nic); | 98 | interfaces.push(nic); |
49 | 99 | } | 99 | } |
51 | 100 | expect(removeInterfaceParents(interfaces)).toEqual(interfaces); | 100 | expect( |
52 | 101 | removeInterfaceParents(interfaces)).toEqual(interfaces); | ||
53 | 101 | }); | 102 | }); |
54 | 102 | 103 | ||
55 | 103 | it("removes parents from interfaces", function() { | 104 | it("removes parents from interfaces", function() { |
56 | @@ -120,7 +121,34 @@ | |||
57 | 120 | var bondInterface = { | 121 | var bondInterface = { |
58 | 121 | parents: interfaces | 122 | parents: interfaces |
59 | 122 | }; | 123 | }; |
61 | 123 | expect(removeInterfaceParents(interfaces, bondInterface)).toEqual([]); | 124 | expect( |
62 | 125 | removeInterfaceParents( | ||
63 | 126 | interfaces, bondInterface, false)).toEqual([]); | ||
64 | 127 | }); | ||
65 | 128 | |||
66 | 129 | it("does not remove parents from interfaces when skipping", function() { | ||
67 | 130 | var vlan = { | ||
68 | 131 | id: makeInteger(0, 100) | ||
69 | 132 | }; | ||
70 | 133 | var nic1 = { | ||
71 | 134 | id: makeInteger(0, 100), | ||
72 | 135 | link_id: makeInteger(0, 100), | ||
73 | 136 | type: "physical", | ||
74 | 137 | vlan: vlan | ||
75 | 138 | }; | ||
76 | 139 | var nic2 = { | ||
77 | 140 | id: makeInteger(0, 100), | ||
78 | 141 | link_id: makeInteger(0, 100), | ||
79 | 142 | type: "physical", | ||
80 | 143 | vlan: vlan | ||
81 | 144 | }; | ||
82 | 145 | var interfaces = [nic1, nic2]; | ||
83 | 146 | var bondInterface = { | ||
84 | 147 | parents: interfaces | ||
85 | 148 | }; | ||
86 | 149 | expect( | ||
87 | 150 | removeInterfaceParents( | ||
88 | 151 | interfaces, bondInterface, true)).toEqual(interfaces); | ||
89 | 124 | }); | 152 | }); |
90 | 125 | }); | 153 | }); |
91 | 126 | 154 | ||
92 | 127 | 155 | ||
93 | === modified file 'src/maasserver/static/partials/node-details.html' | |||
94 | --- src/maasserver/static/partials/node-details.html 2016-06-10 09:07:16 +0000 | |||
95 | +++ src/maasserver/static/partials/node-details.html 2016-06-13 14:10:54 +0000 | |||
96 | @@ -566,15 +566,15 @@ | |||
97 | 566 | </header> | 566 | </header> |
98 | 567 | <main class="table__body" data-selected-rows> | 567 | <main class="table__body" data-selected-rows> |
99 | 568 | <div class="table__row" | 568 | <div class="table__row" |
102 | 569 | data-ng-class="{ active: isInterfaceSelected(interface), disabled: isDisabled(), noEdit: cannotEditInterface(interface) }" | 569 | data-ng-class="{ disabled: isDisabled(), active: isInterfaceSelected(interface) && isNodeEditingAllowed(), noEdit: cannotEditInterface(interface) }" |
103 | 570 | data-ng-repeat="interface in interfaces | removeInterfaceParents:newBondInterface"> | 570 | data-ng-repeat="interface in interfaces | removeInterfaceParents:newBondInterface:!isNodeEditingAllowed()"> |
104 | 571 | <div class="table__data table-col--3"> | 571 | <div class="table__data table-col--3"> |
105 | 572 | <input type="checkbox" class="checkbox" id="{$ getUniqueKey(interface) $}" | 572 | <input type="checkbox" class="checkbox" id="{$ getUniqueKey(interface) $}" |
106 | 573 | data-ng-hide="isAllNetworkingDisabled()" | 573 | data-ng-hide="isAllNetworkingDisabled()" |
107 | 574 | data-ng-checked="isInterfaceSelected(interface)" | 574 | data-ng-checked="isInterfaceSelected(interface)" |
108 | 575 | data-ng-click="toggleInterfaceSelect(interface)" | 575 | data-ng-click="toggleInterfaceSelect(interface)" |
109 | 576 | data-ng-disabled="isDisabled()" | 576 | data-ng-disabled="isDisabled()" |
111 | 577 | data-ng-if="!isController"> | 577 | data-ng-if="!isController && isNodeEditingAllowed()"> |
112 | 578 | <label for="{$ getUniqueKey(interface) $}"></label> | 578 | <label for="{$ getUniqueKey(interface) $}"></label> |
113 | 579 | </div> | 579 | </div> |
114 | 580 | <div class="table__data table-col--12" data-ng-show="column == 'name'"> | 580 | <div class="table__data table-col--12" data-ng-show="column == 'name'"> |
115 | @@ -586,7 +586,7 @@ | |||
116 | 586 | data-ng-focus="setFocusInterface(interface)" | 586 | data-ng-focus="setFocusInterface(interface)" |
117 | 587 | data-ng-blur="clearFocusInterface(interface)" | 587 | data-ng-blur="clearFocusInterface(interface)" |
118 | 588 | data-ng-class="{ invalid: isInterfaceNameInvalid(interface) }" | 588 | data-ng-class="{ invalid: isInterfaceNameInvalid(interface) }" |
120 | 589 | data-ng-disabled="isController"> | 589 | data-ng-disabled="isController || !isNodeEditingAllowed()"> |
121 | 590 | <span class="table__label active ng-hide" data-ng-show="interface.members"> | 590 | <span class="table__label active ng-hide" data-ng-show="interface.members"> |
122 | 591 | <a data-ng-click="toggleMembers(interface)"> | 591 | <a data-ng-click="toggleMembers(interface)"> |
123 | 592 | <span data-ng-hide="isShowingMembers(interface)">Show members</span> | 592 | <span data-ng-hide="isShowingMembers(interface)">Show members</span> |
124 | @@ -611,7 +611,7 @@ | |||
125 | 611 | <div class="table__data table-col--14"> | 611 | <div class="table__data table-col--14"> |
126 | 612 | <select class="table__input" name="fabric" id="fabric" | 612 | <select class="table__input" name="fabric" id="fabric" |
127 | 613 | data-ng-model="interface.fabric" | 613 | data-ng-model="interface.fabric" |
129 | 614 | data-ng-disabled="interface.type == 'alias' || interface.type == 'vlan'" | 614 | data-ng-disabled="interface.type == 'alias' || interface.type == 'vlan' || !isNodeEditingAllowed()" |
130 | 615 | data-ng-change="fabricChanged(interface)" | 615 | data-ng-change="fabricChanged(interface)" |
131 | 616 | data-ng-options="fabric as fabric.name for fabric in fabrics"> | 616 | data-ng-options="fabric as fabric.name for fabric in fabrics"> |
132 | 617 | </select> | 617 | </select> |
133 | @@ -619,7 +619,7 @@ | |||
134 | 619 | <div class="table__data table-col--14"> | 619 | <div class="table__data table-col--14"> |
135 | 620 | <select class="table__input" name="vlan" id="vlan" | 620 | <select class="table__input" name="vlan" id="vlan" |
136 | 621 | data-ng-model="interface.vlan" | 621 | data-ng-model="interface.vlan" |
138 | 622 | data-ng-disabled="isController || interface.type == 'alias' || interface.vlan.vid === 0" | 622 | data-ng-disabled="isController || interface.type == 'alias' || interface.vlan.vid === 0 || !isNodeEditingAllowed()" |
139 | 623 | data-ng-change="saveInterface(interface)" | 623 | data-ng-change="saveInterface(interface)" |
140 | 624 | data-ng-options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLANIfVLAN:interface.type | filterByFabric:interface.fabric"> | 624 | data-ng-options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLANIfVLAN:interface.type | filterByFabric:interface.fabric"> |
141 | 625 | </select> | 625 | </select> |
142 | @@ -627,7 +627,7 @@ | |||
143 | 627 | <div class="table__data table-col--18"> | 627 | <div class="table__data table-col--18"> |
144 | 628 | <select class="table__input" name="subnet" id="subnet" | 628 | <select class="table__input" name="subnet" id="subnet" |
145 | 629 | data-ng-hide="isAllNetworkingDisabled() && interface.discovered[0].subnet_id" | 629 | data-ng-hide="isAllNetworkingDisabled() && interface.discovered[0].subnet_id" |
147 | 630 | data-ng-disabled="isController" | 630 | data-ng-disabled="isController || !isNodeEditingAllowed()" |
148 | 631 | data-ng-model="interface.subnet" | 631 | data-ng-model="interface.subnet" |
149 | 632 | data-ng-change="subnetChanged(interface)" | 632 | data-ng-change="subnetChanged(interface)" |
150 | 633 | data-ng-options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:interface.vlan"> | 633 | data-ng-options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:interface.vlan"> |
151 | @@ -643,7 +643,7 @@ | |||
152 | 643 | <select class="table__input" name="link-mode" id="link-mode" | 643 | <select class="table__input" name="link-mode" id="link-mode" |
153 | 644 | data-ng-model="interface.mode" | 644 | data-ng-model="interface.mode" |
154 | 645 | data-ng-change="saveInterfaceLink(interface)" | 645 | data-ng-change="saveInterfaceLink(interface)" |
156 | 646 | data-ng-disabled="isLinkModeDisabled(interface)" | 646 | data-ng-disabled="isLinkModeDisabled(interface) || !isNodeEditingAllowed()" |
157 | 647 | data-ng-options="mode.mode as mode.text for mode in modes | filterLinkModes:interface"> | 647 | data-ng-options="mode.mode as mode.text for mode in modes | filterLinkModes:interface"> |
158 | 648 | </select> | 648 | </select> |
159 | 649 | </li> | 649 | </li> |
160 | @@ -654,7 +654,7 @@ | |||
161 | 654 | data-maas-enter-blur | 654 | data-maas-enter-blur |
162 | 655 | data-ng-focus="setFocusInterface(interface)" | 655 | data-ng-focus="setFocusInterface(interface)" |
163 | 656 | data-ng-blur="clearFocusInterface(interface)" | 656 | data-ng-blur="clearFocusInterface(interface)" |
165 | 657 | data-ng-disabled="interface.mode != 'static'"> | 657 | data-ng-disabled="interface.mode != 'static' || !isNodeEditingAllowed()"> |
166 | 658 | </li> | 658 | </li> |
167 | 659 | </ul> | 659 | </ul> |
168 | 660 | <span data-ng-if="(isController || isAllNetworkingDisabled()) && !interface.discovered[0].ip_address"> | 660 | <span data-ng-if="(isController || isAllNetworkingDisabled()) && !interface.discovered[0].ip_address"> |
169 | @@ -665,7 +665,7 @@ | |||
170 | 665 | </span> | 665 | </span> |
171 | 666 | </div> | 666 | </div> |
172 | 667 | <div class="table__data table-col--6"> | 667 | <div class="table__data table-col--6"> |
174 | 668 | <div class="table__controls align-right"> | 668 | <div class="table__controls align-right" data-ng-if="isNodeEditingAllowed()"> |
175 | 669 | <a class="icon add tooltip" | 669 | <a class="icon add tooltip" |
176 | 670 | data-tooltip="Add" | 670 | data-tooltip="Add" |
177 | 671 | data-ng-if="!isController" | 671 | data-ng-if="!isController" |
178 | @@ -691,95 +691,97 @@ | |||
179 | 691 | </div> | 691 | </div> |
180 | 692 | </div> | 692 | </div> |
181 | 693 | </div> | 693 | </div> |
265 | 694 | <div class="table__dropdown"> | 694 | <div data-ng-show="isNodeEditingAllowed()"> |
266 | 695 | <div class="table__row table__dropdown-row" data-ng-class="{ active: isShowingAdd() }"> | 695 | <div class="table__dropdown"> |
267 | 696 | <div data-ng-show="isShowingAdd()"> | 696 | <div class="table__row table__dropdown-row" data-ng-class="{ active: isShowingAdd() }"> |
268 | 697 | <div class="table__data table-col--3"> | 697 | <div data-ng-show="isShowingAdd()"> |
269 | 698 | </div> | 698 | <div class="table__data table-col--3"> |
270 | 699 | <div class="table__data table-col--12"> | 699 | </div> |
271 | 700 | {$ getAddName() $} | 700 | <div class="table__data table-col--12"> |
272 | 701 | </div> | 701 | {$ getAddName() $} |
273 | 702 | <div class="table__data table-col--3"> | 702 | </div> |
274 | 703 | </div> | 703 | <div class="table__data table-col--3"> |
275 | 704 | <div class="table__data table-col--9"> | 704 | </div> |
276 | 705 | <select class="table__input" name="type" id="type" | 705 | <div class="table__data table-col--9"> |
277 | 706 | data-ng-model="newInterface.type" | 706 | <select class="table__input" name="type" id="type" |
278 | 707 | data-ng-change="addTypeChanged()"> | 707 | data-ng-model="newInterface.type" |
279 | 708 | <option value="alias" data-ng-show="canAddAlias(newInterface.parent)">Alias</option> | 708 | data-ng-change="addTypeChanged()"> |
280 | 709 | <option value="vlan" data-ng-show="canAddVLAN(newInterface.parent)">VLAN</option> | 709 | <option value="alias" data-ng-show="canAddAlias(newInterface.parent)">Alias</option> |
281 | 710 | </select> | 710 | <option value="vlan" data-ng-show="canAddVLAN(newInterface.parent)">VLAN</option> |
282 | 711 | </div> | 711 | </select> |
283 | 712 | <div class="table__data table-col--14"> | 712 | </div> |
284 | 713 | {$ newInterface.parent.fabric.name $} | 713 | <div class="table__data table-col--14"> |
285 | 714 | </div> | 714 | {$ newInterface.parent.fabric.name $} |
286 | 715 | <div class="table__data table-col--14"> | 715 | </div> |
287 | 716 | <span data-ng-show="newInterface.type === 'alias'">{$ getVLANText(newInterface.parent.vlan) $}</span> | 716 | <div class="table__data table-col--14"> |
288 | 717 | <select class="table__input" name="vlan" id="vlan" | 717 | <span data-ng-show="newInterface.type === 'alias'">{$ getVLANText(newInterface.parent.vlan) $}</span> |
289 | 718 | data-ng-model="newInterface.vlan" | 718 | <select class="table__input" name="vlan" id="vlan" |
290 | 719 | data-ng-disabled="newInterface.type == 'alias'" | 719 | data-ng-model="newInterface.vlan" |
291 | 720 | data-ng-options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLAN | filterByFabric:newInterface.parent.fabric | filterByUnusedForInterface:newInterface.parent:originalInterfaces" | 720 | data-ng-disabled="newInterface.type == 'alias'" |
292 | 721 | data-ng-show="newInterface.type === 'vlan'" | 721 | data-ng-options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLAN | filterByFabric:newInterface.parent.fabric | filterByUnusedForInterface:newInterface.parent:originalInterfaces" |
293 | 722 | data-ng-change="addVLANChanged()"> | 722 | data-ng-show="newInterface.type === 'vlan'" |
294 | 723 | </select> | 723 | data-ng-change="addVLANChanged()"> |
295 | 724 | </div> | 724 | </select> |
296 | 725 | <div class="table__data table-col--18"> | 725 | </div> |
297 | 726 | <select class="table__input" name="subnet" id="subnet" | 726 | <div class="table__data table-col--18"> |
298 | 727 | data-ng-model="newInterface.subnet" | 727 | <select class="table__input" name="subnet" id="subnet" |
299 | 728 | data-ng-change="addSubnetChanged()" | 728 | data-ng-model="newInterface.subnet" |
300 | 729 | data-ng-options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:newInterface.vlan"> | 729 | data-ng-change="addSubnetChanged()" |
301 | 730 | <option value="" data-ng-hide="newInterface.type === 'alias'">Unconfigured</option> | 730 | data-ng-options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:newInterface.vlan"> |
302 | 731 | </select> | 731 | <option value="" data-ng-hide="newInterface.type === 'alias'">Unconfigured</option> |
303 | 732 | </div> | 732 | </select> |
304 | 733 | <div class="table__data table-col--21"> | 733 | </div> |
305 | 734 | <select class="table__input" name="link-mode" id="link-mode" | 734 | <div class="table__data table-col--21"> |
306 | 735 | data-ng-model="newInterface.mode" | 735 | <select class="table__input" name="link-mode" id="link-mode" |
307 | 736 | data-ng-disabled="isLinkModeDisabled(newInterface)" | 736 | data-ng-model="newInterface.mode" |
308 | 737 | data-ng-options="mode.mode as mode.text for mode in modes | filterLinkModes:newInterface"> | 737 | data-ng-disabled="isLinkModeDisabled(newInterface)" |
309 | 738 | </select> | 738 | data-ng-options="mode.mode as mode.text for mode in modes | filterLinkModes:newInterface"> |
310 | 739 | </div> | 739 | </select> |
311 | 740 | <div class="table__data table_column--6"></div> | 740 | </div> |
312 | 741 | </div> | 741 | <div class="table__data table_column--6"></div> |
313 | 742 | </div> | 742 | </div> |
314 | 743 | <div class="table__row table__dropdown-row" data-ng-class="{ active: isShowingInterfaceOptions() || isShowingDeleteConfirm() || isShowingAdd() }"> | 743 | </div> |
315 | 744 | <div class="ng-hide" data-ng-show="isShowingInterfaceOptions()"> | 744 | <div class="table__row table__dropdown-row" data-ng-class="{ active: isShowingInterfaceOptions() || isShowingDeleteConfirm() || isShowingAdd() }"> |
316 | 745 | <div class="table__data left margin-left--thirty"> | 745 | <div class="ng-hide" data-ng-show="isShowingInterfaceOptions()"> |
317 | 746 | <button class="cta-ubuntu secondary" | 746 | <div class="table__data left margin-left--thirty"> |
318 | 747 | data-ng-click="add('alias', interface)" | 747 | <button class="cta-ubuntu secondary" |
319 | 748 | data-ng-show="canAddAlias(interface)">Add alias</button> | 748 | data-ng-click="add('alias', interface)" |
320 | 749 | <button class="cta-ubuntu secondary" | 749 | data-ng-show="canAddAlias(interface)">Add alias</button> |
321 | 750 | data-ng-click="add('vlan', interface)" | 750 | <button class="cta-ubuntu secondary" |
322 | 751 | data-ng-show="canAddVLAN(interface)">Add VLAN</button> | 751 | data-ng-click="add('vlan', interface)" |
323 | 752 | <a class="link-cta-ubuntu text-button" | 752 | data-ng-show="canAddVLAN(interface)">Add VLAN</button> |
324 | 753 | data-ng-click="remove()">Remove {$ getRemoveTypeText(interface) $}</a> | 753 | <a class="link-cta-ubuntu text-button" |
325 | 754 | </div> | 754 | data-ng-click="remove()">Remove {$ getRemoveTypeText(interface) $}</a> |
326 | 755 | </div> | 755 | </div> |
327 | 756 | <div class="ng-hide" data-ng-show="isShowingDeleteConfirm()"> | 756 | </div> |
328 | 757 | <div class="table__data left margin-top--five"> | 757 | <div class="ng-hide" data-ng-show="isShowingDeleteConfirm()"> |
329 | 758 | <p><span class="icon warning margin-right--ten"></span> Are you sure you want to remove this {$ getRemoveTypeText(interface) $}?</p> | 758 | <div class="table__data left margin-top--five"> |
330 | 759 | </div> | 759 | <p><span class="icon warning margin-right--ten"></span> Are you sure you want to remove this {$ getRemoveTypeText(interface) $}?</p> |
331 | 760 | <div class="table__data right"> | 760 | </div> |
332 | 761 | <a class="link-cta-ubuntu text-button" data-ng-click="cancel()">Cancel</a> | 761 | <div class="table__data right"> |
333 | 762 | <button class="cta-ubuntu" data-ng-click="confirmRemove(interface)">Remove</button> | 762 | <a class="link-cta-ubuntu text-button" data-ng-click="cancel()">Cancel</a> |
334 | 763 | </div> | 763 | <button class="cta-ubuntu" data-ng-click="confirmRemove(interface)">Remove</button> |
335 | 764 | </div> | 764 | </div> |
336 | 765 | <div data-ng-show="isShowingAdd() && !newInterface.saving"> | 765 | </div> |
337 | 766 | <div class="table__data left margin-left--thirty"> | 766 | <div data-ng-show="isShowingAdd() && !newInterface.saving"> |
338 | 767 | <button class="cta-ubuntu secondary" | 767 | <div class="table__data left margin-left--thirty"> |
339 | 768 | data-ng-click="addInterface('alias')" | 768 | <button class="cta-ubuntu secondary" |
340 | 769 | data-ng-show="canAddAlias(interface)">Add <span data-ng-show="newInterface.type === 'alias'">another </span>alias</button> | 769 | data-ng-click="addInterface('alias')" |
341 | 770 | <button class="cta-ubuntu secondary" | 770 | data-ng-show="canAddAlias(interface)">Add <span data-ng-show="newInterface.type === 'alias'">another </span>alias</button> |
342 | 771 | data-ng-click="addInterface('vlan')" | 771 | <button class="cta-ubuntu secondary" |
343 | 772 | data-ng-show="canAddAnotherVLAN(interface)">Add <span data-ng-show="newInterface.type === 'vlan'">another </span>VLAN</button> | 772 | data-ng-click="addInterface('vlan')" |
344 | 773 | </div> | 773 | data-ng-show="canAddAnotherVLAN(interface)">Add <span data-ng-show="newInterface.type === 'vlan'">another </span>VLAN</button> |
345 | 774 | <div class="table__data right"> | 774 | </div> |
346 | 775 | <a class="link-cta-ubuntu text-button" data-ng-click="cancel()">Cancel</a> | 775 | <div class="table__data right"> |
347 | 776 | <button class="cta-ubuntu" data-ng-click="addInterface()">Save</button> | 776 | <a class="link-cta-ubuntu text-button" data-ng-click="cancel()">Cancel</a> |
348 | 777 | <button class="cta-ubuntu" data-ng-click="addInterface()">Save</button> | ||
349 | 778 | </div> | ||
350 | 777 | </div> | 779 | </div> |
351 | 778 | </div> | 780 | </div> |
352 | 779 | </div> | 781 | </div> |
353 | 780 | </div> | 782 | </div> |
354 | 781 | </div> | 783 | </div> |
356 | 782 | <div class="table__row active ng-hide" data-ng-show="isShowingCreateBond()"> | 784 | <div class="table__row active ng-hide" data-ng-show="isShowingCreateBond() && isNodeEditingAllowed()"> |
357 | 783 | <div class="table__data table-col--3"> | 785 | <div class="table__data table-col--3"> |
358 | 784 | <input type="checkbox" class="checkbox" id="bond-create" disabled="disabled" checked /> | 786 | <input type="checkbox" class="checkbox" id="bond-create" disabled="disabled" checked /> |
359 | 785 | <label for="bond-create"></label> | 787 | <label for="bond-create"></label> |
I tested this out locally, and it looks good in general, but it seems that a couple fields were missed.
For example, I clicked "Add Alias" and acquired the node (while still on the page), and was able to modify the drop-downs and save the alias after the node was allocated.