Merge ~andreserl/maas:backport_various_fixes into maas:2.2

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 03047433b827a9fe01c692c2b2a23d8dac8cd579
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~andreserl/maas:backport_various_fixes
Merge into: maas:2.2
Diff against target: 74 lines (+4/-27)
2 files modified
src/maasserver/static/partials/node-details.html (+1/-21)
src/maasserver/static/partials/nodes-list.html (+3/-6)
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+327342@code.launchpad.net

Commit message

Backport fc3bfd69e7c882a5dc60e8f19481217473d89528 from master.

LP: #1701056: Show correct information for a device details page as a normal user
LP: #1701052: Do not show the controllers tab as a normal user
Fix format when devices/controllers are selected to match those of machines

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/maasserver/static/partials/node-details.html b/src/maasserver/static/partials/node-details.html
index a75a810..af31377 100644
--- a/src/maasserver/static/partials/node-details.html
+++ b/src/maasserver/static/partials/node-details.html
@@ -252,7 +252,7 @@
252 </div>252 </div>
253 </div>253 </div>
254 <form class="form form--stack twelve-col">254 <form class="form form--stack twelve-col">
255 <fieldset class="form__fieldset six-col ng-hide" data-ng-show="isSuperUser() && !isController">255 <fieldset class="form__fieldset six-col ng-hide" data-ng-show="!isController">
256 <div class="form__group">256 <div class="form__group">
257 <label for="zone" class="form__group-label two-col">Zone</label>257 <label for="zone" class="form__group-label two-col">Zone</label>
258 <div class="form__group-input three-col">258 <div class="form__group-input three-col">
@@ -306,26 +306,6 @@
306 </div>306 </div>
307 </div>307 </div>
308 </fieldset>308 </fieldset>
309 <div data-ng-hide="isSuperUser() || isController">
310 <dl>
311 <dt class="two-col">Zone</dt>
312 <dd class="four-col last-col">
313 {$ node.zone.name $}
314 </dd>
315 <dt class="two-col" data-ng-if="!isDevice">Architecture</dt>
316 <dd class="four-col last-col">
317 {$ node.architecture || "Missing" $}
318 </dd>
319 <dt class="two-col">Owner</dt>
320 <dd class="four-col last-col">
321 {$ node.owner || "Unassigned" $}
322 </dd>
323 <dt class="two-col">Tags</dt>
324 <dd class="four-col last-col">
325 {$ node.tags.join(', ') $}
326 </dd>
327 </dl>
328 </div>
329 <div class="six-col" data-ng-if="isController">309 <div class="six-col" data-ng-if="isController">
330 <dl>310 <dl>
331 <dt class="two-col">Type</dt>311 <dt class="two-col">Type</dt>
diff --git a/src/maasserver/static/partials/nodes-list.html b/src/maasserver/static/partials/nodes-list.html
index a2a1814..5ced404 100644
--- a/src/maasserver/static/partials/nodes-list.html
+++ b/src/maasserver/static/partials/nodes-list.html
@@ -34,9 +34,7 @@
34 data-ng-show="addDeviceScope.viewable">Cancel add device</button>34 data-ng-show="addDeviceScope.viewable">Cancel add device</button>
35 </div>35 </div>
36 <div data-ng-show="tabs.devices.selectedItems.length">36 <div data-ng-show="tabs.devices.selectedItems.length">
37 <span class="page-header__controls-feedback u-margin--right" data-ng-click="showSelected('devices')">37 <a class="u-display--inline u-margin--right" data-ng-click="showSelected('devices')">{$ tabs.devices.selectedItems.length $} Selected</a>
38 {$ tabs.devices.selectedItems.length $} Selected
39 </span>
40 <div data-maas-cta="tabs.devices.takeActionOptions"38 <div data-maas-cta="tabs.devices.takeActionOptions"
41 data-ng-model="tabs.devices.actionOption"39 data-ng-model="tabs.devices.actionOption"
42 data-ng-change="actionOptionSelected('devices')">40 data-ng-change="actionOptionSelected('devices')">
@@ -55,9 +53,7 @@
55 data-ng-show="tabs.controllers.addController">Close add rack controller</button>53 data-ng-show="tabs.controllers.addController">Close add rack controller</button>
56 </div>54 </div>
57 <div data-ng-show="tabs.controllers.selectedItems.length">55 <div data-ng-show="tabs.controllers.selectedItems.length">
58 <span class="page-header__controls-feedback u-margin--right" data-ng-click="showSelected('controllers')">56 <a class="u-display--inline u-margin--right" data-ng-click="showSelected('controllers')">{$ tabs.controllers.selectedItems.length $} Selected</a>
59 {$ tabs.controllers.selectedItems.length $} Selected
60 </span>
61 <div data-maas-cta="tabs.controllers.takeActionOptions"57 <div data-maas-cta="tabs.controllers.takeActionOptions"
62 data-ng-model="tabs.controllers.actionOption"58 data-ng-model="tabs.controllers.actionOption"
63 data-ng-change="actionOptionSelected('controllers')">59 data-ng-change="actionOptionSelected('controllers')">
@@ -644,6 +640,7 @@ sudo maas-rack register --url {$ tabs.controllers.registerUrl $} --secret {$ tab
644 data-ng-class="{ 'is-active': currentpage === 'devices'}"640 data-ng-class="{ 'is-active': currentpage === 'devices'}"
645 data-ng-click="toggleTab('devices')">{$ devices.length $} <ng-pluralize count="devices.length" when="{'one': 'Device', 'other': 'Devices'}"></ng-pluralize></button>641 data-ng-click="toggleTab('devices')">{$ devices.length $} <ng-pluralize count="devices.length" when="{'one': 'Device', 'other': 'Devices'}"></ng-pluralize></button>
646 <button class="page-navigation__link tooltip"642 <button class="page-navigation__link tooltip"
643 data-ng-if="isSuperUser()"
647 aria-label="A node that provides MAAS services."644 aria-label="A node that provides MAAS services."
648 data-ng-class="{ 'is-active': currentpage === 'controllers'}"645 data-ng-class="{ 'is-active': currentpage === 'controllers'}"
649 data-ng-click="toggleTab('controllers')">{$ controllers.length $} <ng-pluralize count="controllers.length" when="{'one': 'Controller', 'other': 'Controllers'}"></ng-pluralize></button>646 data-ng-click="toggleTab('controllers')">{$ controllers.length $} <ng-pluralize count="controllers.length" when="{'one': 'Controller', 'other': 'Controllers'}"></ng-pluralize></button>

Subscribers

People subscribed via source and target branches