Merge lp:~lamont/maas/bug-1590499 into lp:~maas-committers/maas/trunk

Proposed by LaMont Jones
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
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.

To post a comment you must log in.
Revision history for this message
Mike Pontillo (mpontillo) wrote :

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.

review: Needs Fixing
Revision history for this message
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.)

Revision history for this message
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.

Revision history for this message
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).

Revision history for this message
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.

review: Approve
Revision history for this message
LaMont Jones (lamont) :
Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (31.3 KiB)

The attempt to merge lp:~lamont/maas/bug-1590499 into lp:maas failed. Below is the output from the failed tests.

Hit:1 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]
Hit:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Fetched 189 kB in 0s (444 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind bash bind9 bind9utils build-essential bzr bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools git gjs ipython isc-dhcp-common libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm postgresql pxelinux python3-all python3-apt python3-bson python3-convoy python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-dnspython python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-netaddr python3-netifaces python3-novaclient python3-oauth python3-oauthlib python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-requests python3-seamicroclient python3-setuptools python3-simplestreams python3-sphinx python3-tempita python3-twisted python3-txtftp python3-tz python3-yaml python3-zope.interface python-bson python-crochet python-django python-django-piston python-djorm-ext-pgarray python-formencode python-lxml python-netaddr python-netifaces python-pocket-lint python-psycopg2 python-simplejson python-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
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.20160115ubuntu3).
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+dfsg-11ubunt...

Revision history for this message
MAAS Lander (maas-lander) wrote :
Download full text (31.3 KiB)

The attempt to merge lp:~lamont/maas/bug-1590499 into lp:maas failed. Below is the output from the failed tests.

Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]
Hit:4 http://prodstack-zone-2.clouds.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 94.5 kB in 0s (206 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
    --no-install-recommends install apache2 archdetect-deb authbind bash bind9 bind9utils build-essential bzr bzr-builddeb chromium-browser chromium-chromedriver curl daemontools debhelper dh-apport dh-systemd distro-info dnsutils firefox freeipmi-tools git gjs ipython isc-dhcp-common libjs-angularjs libjs-jquery libjs-jquery-hotkeys libjs-yui3-full libjs-yui3-min libpq-dev make nodejs-legacy npm postgresql pxelinux python3-all python3-apt python3-bson python3-convoy python3-crochet python3-cssselect python3-curtin python3-dev python3-distro-info python3-django python3-django-nose python3-django-piston3 python3-dnspython python3-docutils python3-formencode python3-hivex python3-httplib2 python3-jinja2 python3-jsonschema python3-lxml python3-netaddr python3-netifaces python3-novaclient python3-oauth python3-oauthlib python3-openssl python3-paramiko python3-petname python3-pexpect python3-psycopg2 python3-pyinotify python3-pyparsing python3-pyvmomi python3-requests python3-seamicroclient python3-setuptools python3-simplestreams python3-sphinx python3-tempita python3-twisted python3-txtftp python3-tz python3-yaml python3-zope.interface python-bson python-crochet python-django python-django-piston python-djorm-ext-pgarray python-formencode python-lxml python-netaddr python-netifaces python-pocket-lint python-psycopg2 python-simplejson python-tempita python-twisted python-yaml socat syslinux-common tgt ubuntu-cloudimage-keyring wget xvfb
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.20160115ubuntu3).
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+dfsg-11ubuntu1).
pyth...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 // list of interfaces to not include the current parent interfaces being
6 // bonded together.
7 angular.module('MAAS').filter('removeInterfaceParents', function() {
8- return function(interfaces, childInterface) {
9- if(!angular.isObject(childInterface) ||
10+ return function(interfaces, childInterface, skip) {
11+ if(skip || !angular.isObject(childInterface) ||
12 !angular.isArray(childInterface.parents)) {
13 return interfaces;
14 }
15@@ -511,6 +511,26 @@
16 updateLoaded();
17 };
18
19+ // Return true if the Node is Ready (or Broken)
20+ $scope.isNodeEditingAllowed = function() {
21+ if (!$scope.isSuperUser()) {
22+ // If the user is not the superuser, pretend it's not Ready.
23+ return false;
24+ }
25+ if ($scope.$parent.isController) {
26+ // Controllers are always Ready, for our purposes.
27+ return true;
28+ }
29+ if (angular.isObject($scope.node) &&
30+ ["Ready", "Broken"].indexOf($scope.node.status) === -1) {
31+ // If a non-controller node is not Ready or Broken, then no
32+ // editing networking.
33+ return false;
34+ }
35+ // All is well, let them edit.
36+ return true;
37+ };
38+
39 // Return true if the networking information cannot be edited.
40 // (it can't be changed when the node is in any state other
41 // than Ready or Broken and the user is not a superuser)
42
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 };
48 interfaces.push(nic);
49 }
50- expect(removeInterfaceParents(interfaces)).toEqual(interfaces);
51+ expect(
52+ removeInterfaceParents(interfaces)).toEqual(interfaces);
53 });
54
55 it("removes parents from interfaces", function() {
56@@ -120,7 +121,34 @@
57 var bondInterface = {
58 parents: interfaces
59 };
60- expect(removeInterfaceParents(interfaces, bondInterface)).toEqual([]);
61+ expect(
62+ removeInterfaceParents(
63+ interfaces, bondInterface, false)).toEqual([]);
64+ });
65+
66+ it("does not remove parents from interfaces when skipping", function() {
67+ var vlan = {
68+ id: makeInteger(0, 100)
69+ };
70+ var nic1 = {
71+ id: makeInteger(0, 100),
72+ link_id: makeInteger(0, 100),
73+ type: "physical",
74+ vlan: vlan
75+ };
76+ var nic2 = {
77+ id: makeInteger(0, 100),
78+ link_id: makeInteger(0, 100),
79+ type: "physical",
80+ vlan: vlan
81+ };
82+ var interfaces = [nic1, nic2];
83+ var bondInterface = {
84+ parents: interfaces
85+ };
86+ expect(
87+ removeInterfaceParents(
88+ interfaces, bondInterface, true)).toEqual(interfaces);
89 });
90 });
91
92
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 </header>
98 <main class="table__body" data-selected-rows>
99 <div class="table__row"
100- data-ng-class="{ active: isInterfaceSelected(interface), disabled: isDisabled(), noEdit: cannotEditInterface(interface) }"
101- data-ng-repeat="interface in interfaces | removeInterfaceParents:newBondInterface">
102+ data-ng-class="{ disabled: isDisabled(), active: isInterfaceSelected(interface) && isNodeEditingAllowed(), noEdit: cannotEditInterface(interface) }"
103+ data-ng-repeat="interface in interfaces | removeInterfaceParents:newBondInterface:!isNodeEditingAllowed()">
104 <div class="table__data table-col--3">
105 <input type="checkbox" class="checkbox" id="{$ getUniqueKey(interface) $}"
106 data-ng-hide="isAllNetworkingDisabled()"
107 data-ng-checked="isInterfaceSelected(interface)"
108 data-ng-click="toggleInterfaceSelect(interface)"
109 data-ng-disabled="isDisabled()"
110- data-ng-if="!isController">
111+ data-ng-if="!isController && isNodeEditingAllowed()">
112 <label for="{$ getUniqueKey(interface) $}"></label>
113 </div>
114 <div class="table__data table-col--12" data-ng-show="column == 'name'">
115@@ -586,7 +586,7 @@
116 data-ng-focus="setFocusInterface(interface)"
117 data-ng-blur="clearFocusInterface(interface)"
118 data-ng-class="{ invalid: isInterfaceNameInvalid(interface) }"
119- data-ng-disabled="isController">
120+ data-ng-disabled="isController || !isNodeEditingAllowed()">
121 <span class="table__label active ng-hide" data-ng-show="interface.members">
122 <a data-ng-click="toggleMembers(interface)">
123 <span data-ng-hide="isShowingMembers(interface)">Show members</span>
124@@ -611,7 +611,7 @@
125 <div class="table__data table-col--14">
126 <select class="table__input" name="fabric" id="fabric"
127 data-ng-model="interface.fabric"
128- data-ng-disabled="interface.type == 'alias' || interface.type == 'vlan'"
129+ data-ng-disabled="interface.type == 'alias' || interface.type == 'vlan' || !isNodeEditingAllowed()"
130 data-ng-change="fabricChanged(interface)"
131 data-ng-options="fabric as fabric.name for fabric in fabrics">
132 </select>
133@@ -619,7 +619,7 @@
134 <div class="table__data table-col--14">
135 <select class="table__input" name="vlan" id="vlan"
136 data-ng-model="interface.vlan"
137- data-ng-disabled="isController || interface.type == 'alias' || interface.vlan.vid === 0"
138+ data-ng-disabled="isController || interface.type == 'alias' || interface.vlan.vid === 0 || !isNodeEditingAllowed()"
139 data-ng-change="saveInterface(interface)"
140 data-ng-options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLANIfVLAN:interface.type | filterByFabric:interface.fabric">
141 </select>
142@@ -627,7 +627,7 @@
143 <div class="table__data table-col--18">
144 <select class="table__input" name="subnet" id="subnet"
145 data-ng-hide="isAllNetworkingDisabled() && interface.discovered[0].subnet_id"
146- data-ng-disabled="isController"
147+ data-ng-disabled="isController || !isNodeEditingAllowed()"
148 data-ng-model="interface.subnet"
149 data-ng-change="subnetChanged(interface)"
150 data-ng-options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:interface.vlan">
151@@ -643,7 +643,7 @@
152 <select class="table__input" name="link-mode" id="link-mode"
153 data-ng-model="interface.mode"
154 data-ng-change="saveInterfaceLink(interface)"
155- data-ng-disabled="isLinkModeDisabled(interface)"
156+ data-ng-disabled="isLinkModeDisabled(interface) || !isNodeEditingAllowed()"
157 data-ng-options="mode.mode as mode.text for mode in modes | filterLinkModes:interface">
158 </select>
159 </li>
160@@ -654,7 +654,7 @@
161 data-maas-enter-blur
162 data-ng-focus="setFocusInterface(interface)"
163 data-ng-blur="clearFocusInterface(interface)"
164- data-ng-disabled="interface.mode != 'static'">
165+ data-ng-disabled="interface.mode != 'static' || !isNodeEditingAllowed()">
166 </li>
167 </ul>
168 <span data-ng-if="(isController || isAllNetworkingDisabled()) && !interface.discovered[0].ip_address">
169@@ -665,7 +665,7 @@
170 </span>
171 </div>
172 <div class="table__data table-col--6">
173- <div class="table__controls align-right">
174+ <div class="table__controls align-right" data-ng-if="isNodeEditingAllowed()">
175 <a class="icon add tooltip"
176 data-tooltip="Add"
177 data-ng-if="!isController"
178@@ -691,95 +691,97 @@
179 </div>
180 </div>
181 </div>
182- <div class="table__dropdown">
183- <div class="table__row table__dropdown-row" data-ng-class="{ active: isShowingAdd() }">
184- <div data-ng-show="isShowingAdd()">
185- <div class="table__data table-col--3">
186- </div>
187- <div class="table__data table-col--12">
188- {$ getAddName() $}
189- </div>
190- <div class="table__data table-col--3">
191- </div>
192- <div class="table__data table-col--9">
193- <select class="table__input" name="type" id="type"
194- data-ng-model="newInterface.type"
195- data-ng-change="addTypeChanged()">
196- <option value="alias" data-ng-show="canAddAlias(newInterface.parent)">Alias</option>
197- <option value="vlan" data-ng-show="canAddVLAN(newInterface.parent)">VLAN</option>
198- </select>
199- </div>
200- <div class="table__data table-col--14">
201- {$ newInterface.parent.fabric.name $}
202- </div>
203- <div class="table__data table-col--14">
204- <span data-ng-show="newInterface.type === 'alias'">{$ getVLANText(newInterface.parent.vlan) $}</span>
205- <select class="table__input" name="vlan" id="vlan"
206- data-ng-model="newInterface.vlan"
207- data-ng-disabled="newInterface.type == 'alias'"
208- data-ng-options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLAN | filterByFabric:newInterface.parent.fabric | filterByUnusedForInterface:newInterface.parent:originalInterfaces"
209- data-ng-show="newInterface.type === 'vlan'"
210- data-ng-change="addVLANChanged()">
211- </select>
212- </div>
213- <div class="table__data table-col--18">
214- <select class="table__input" name="subnet" id="subnet"
215- data-ng-model="newInterface.subnet"
216- data-ng-change="addSubnetChanged()"
217- data-ng-options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:newInterface.vlan">
218- <option value="" data-ng-hide="newInterface.type === 'alias'">Unconfigured</option>
219- </select>
220- </div>
221- <div class="table__data table-col--21">
222- <select class="table__input" name="link-mode" id="link-mode"
223- data-ng-model="newInterface.mode"
224- data-ng-disabled="isLinkModeDisabled(newInterface)"
225- data-ng-options="mode.mode as mode.text for mode in modes | filterLinkModes:newInterface">
226- </select>
227- </div>
228- <div class="table__data table_column--6"></div>
229- </div>
230- </div>
231- <div class="table__row table__dropdown-row" data-ng-class="{ active: isShowingInterfaceOptions() || isShowingDeleteConfirm() || isShowingAdd() }">
232- <div class="ng-hide" data-ng-show="isShowingInterfaceOptions()">
233- <div class="table__data left margin-left--thirty">
234- <button class="cta-ubuntu secondary"
235- data-ng-click="add('alias', interface)"
236- data-ng-show="canAddAlias(interface)">Add alias</button>
237- <button class="cta-ubuntu secondary"
238- data-ng-click="add('vlan', interface)"
239- data-ng-show="canAddVLAN(interface)">Add VLAN</button>
240- <a class="link-cta-ubuntu text-button"
241- data-ng-click="remove()">Remove {$ getRemoveTypeText(interface) $}</a>
242- </div>
243- </div>
244- <div class="ng-hide" data-ng-show="isShowingDeleteConfirm()">
245- <div class="table__data left margin-top--five">
246- <p><span class="icon warning margin-right--ten"></span> Are you sure you want to remove this {$ getRemoveTypeText(interface) $}?</p>
247- </div>
248- <div class="table__data right">
249- <a class="link-cta-ubuntu text-button" data-ng-click="cancel()">Cancel</a>
250- <button class="cta-ubuntu" data-ng-click="confirmRemove(interface)">Remove</button>
251- </div>
252- </div>
253- <div data-ng-show="isShowingAdd() && !newInterface.saving">
254- <div class="table__data left margin-left--thirty">
255- <button class="cta-ubuntu secondary"
256- data-ng-click="addInterface('alias')"
257- data-ng-show="canAddAlias(interface)">Add <span data-ng-show="newInterface.type === 'alias'">another </span>alias</button>
258- <button class="cta-ubuntu secondary"
259- data-ng-click="addInterface('vlan')"
260- data-ng-show="canAddAnotherVLAN(interface)">Add <span data-ng-show="newInterface.type === 'vlan'">another </span>VLAN</button>
261- </div>
262- <div class="table__data right">
263- <a class="link-cta-ubuntu text-button" data-ng-click="cancel()">Cancel</a>
264- <button class="cta-ubuntu" data-ng-click="addInterface()">Save</button>
265+ <div data-ng-show="isNodeEditingAllowed()">
266+ <div class="table__dropdown">
267+ <div class="table__row table__dropdown-row" data-ng-class="{ active: isShowingAdd() }">
268+ <div data-ng-show="isShowingAdd()">
269+ <div class="table__data table-col--3">
270+ </div>
271+ <div class="table__data table-col--12">
272+ {$ getAddName() $}
273+ </div>
274+ <div class="table__data table-col--3">
275+ </div>
276+ <div class="table__data table-col--9">
277+ <select class="table__input" name="type" id="type"
278+ data-ng-model="newInterface.type"
279+ data-ng-change="addTypeChanged()">
280+ <option value="alias" data-ng-show="canAddAlias(newInterface.parent)">Alias</option>
281+ <option value="vlan" data-ng-show="canAddVLAN(newInterface.parent)">VLAN</option>
282+ </select>
283+ </div>
284+ <div class="table__data table-col--14">
285+ {$ newInterface.parent.fabric.name $}
286+ </div>
287+ <div class="table__data table-col--14">
288+ <span data-ng-show="newInterface.type === 'alias'">{$ getVLANText(newInterface.parent.vlan) $}</span>
289+ <select class="table__input" name="vlan" id="vlan"
290+ data-ng-model="newInterface.vlan"
291+ data-ng-disabled="newInterface.type == 'alias'"
292+ data-ng-options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLAN | filterByFabric:newInterface.parent.fabric | filterByUnusedForInterface:newInterface.parent:originalInterfaces"
293+ data-ng-show="newInterface.type === 'vlan'"
294+ data-ng-change="addVLANChanged()">
295+ </select>
296+ </div>
297+ <div class="table__data table-col--18">
298+ <select class="table__input" name="subnet" id="subnet"
299+ data-ng-model="newInterface.subnet"
300+ data-ng-change="addSubnetChanged()"
301+ data-ng-options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:newInterface.vlan">
302+ <option value="" data-ng-hide="newInterface.type === 'alias'">Unconfigured</option>
303+ </select>
304+ </div>
305+ <div class="table__data table-col--21">
306+ <select class="table__input" name="link-mode" id="link-mode"
307+ data-ng-model="newInterface.mode"
308+ data-ng-disabled="isLinkModeDisabled(newInterface)"
309+ data-ng-options="mode.mode as mode.text for mode in modes | filterLinkModes:newInterface">
310+ </select>
311+ </div>
312+ <div class="table__data table_column--6"></div>
313+ </div>
314+ </div>
315+ <div class="table__row table__dropdown-row" data-ng-class="{ active: isShowingInterfaceOptions() || isShowingDeleteConfirm() || isShowingAdd() }">
316+ <div class="ng-hide" data-ng-show="isShowingInterfaceOptions()">
317+ <div class="table__data left margin-left--thirty">
318+ <button class="cta-ubuntu secondary"
319+ data-ng-click="add('alias', interface)"
320+ data-ng-show="canAddAlias(interface)">Add alias</button>
321+ <button class="cta-ubuntu secondary"
322+ data-ng-click="add('vlan', interface)"
323+ data-ng-show="canAddVLAN(interface)">Add VLAN</button>
324+ <a class="link-cta-ubuntu text-button"
325+ data-ng-click="remove()">Remove {$ getRemoveTypeText(interface) $}</a>
326+ </div>
327+ </div>
328+ <div class="ng-hide" data-ng-show="isShowingDeleteConfirm()">
329+ <div class="table__data left margin-top--five">
330+ <p><span class="icon warning margin-right--ten"></span> Are you sure you want to remove this {$ getRemoveTypeText(interface) $}?</p>
331+ </div>
332+ <div class="table__data right">
333+ <a class="link-cta-ubuntu text-button" data-ng-click="cancel()">Cancel</a>
334+ <button class="cta-ubuntu" data-ng-click="confirmRemove(interface)">Remove</button>
335+ </div>
336+ </div>
337+ <div data-ng-show="isShowingAdd() && !newInterface.saving">
338+ <div class="table__data left margin-left--thirty">
339+ <button class="cta-ubuntu secondary"
340+ data-ng-click="addInterface('alias')"
341+ data-ng-show="canAddAlias(interface)">Add <span data-ng-show="newInterface.type === 'alias'">another </span>alias</button>
342+ <button class="cta-ubuntu secondary"
343+ data-ng-click="addInterface('vlan')"
344+ data-ng-show="canAddAnotherVLAN(interface)">Add <span data-ng-show="newInterface.type === 'vlan'">another </span>VLAN</button>
345+ </div>
346+ <div class="table__data right">
347+ <a class="link-cta-ubuntu text-button" data-ng-click="cancel()">Cancel</a>
348+ <button class="cta-ubuntu" data-ng-click="addInterface()">Save</button>
349+ </div>
350 </div>
351 </div>
352 </div>
353 </div>
354 </div>
355- <div class="table__row active ng-hide" data-ng-show="isShowingCreateBond()">
356+ <div class="table__row active ng-hide" data-ng-show="isShowingCreateBond() && isNodeEditingAllowed()">
357 <div class="table__data table-col--3">
358 <input type="checkbox" class="checkbox" id="bond-create" disabled="disabled" checked />
359 <label for="bond-create"></label>