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
1diff --git a/src/maasserver/static/partials/node-details.html b/src/maasserver/static/partials/node-details.html
2index a75a810..af31377 100644
3--- a/src/maasserver/static/partials/node-details.html
4+++ b/src/maasserver/static/partials/node-details.html
5@@ -252,7 +252,7 @@
6 </div>
7 </div>
8 <form class="form form--stack twelve-col">
9- <fieldset class="form__fieldset six-col ng-hide" data-ng-show="isSuperUser() && !isController">
10+ <fieldset class="form__fieldset six-col ng-hide" data-ng-show="!isController">
11 <div class="form__group">
12 <label for="zone" class="form__group-label two-col">Zone</label>
13 <div class="form__group-input three-col">
14@@ -306,26 +306,6 @@
15 </div>
16 </div>
17 </fieldset>
18- <div data-ng-hide="isSuperUser() || isController">
19- <dl>
20- <dt class="two-col">Zone</dt>
21- <dd class="four-col last-col">
22- {$ node.zone.name $}
23- </dd>
24- <dt class="two-col" data-ng-if="!isDevice">Architecture</dt>
25- <dd class="four-col last-col">
26- {$ node.architecture || "Missing" $}
27- </dd>
28- <dt class="two-col">Owner</dt>
29- <dd class="four-col last-col">
30- {$ node.owner || "Unassigned" $}
31- </dd>
32- <dt class="two-col">Tags</dt>
33- <dd class="four-col last-col">
34- {$ node.tags.join(', ') $}
35- </dd>
36- </dl>
37- </div>
38 <div class="six-col" data-ng-if="isController">
39 <dl>
40 <dt class="two-col">Type</dt>
41diff --git a/src/maasserver/static/partials/nodes-list.html b/src/maasserver/static/partials/nodes-list.html
42index a2a1814..5ced404 100644
43--- a/src/maasserver/static/partials/nodes-list.html
44+++ b/src/maasserver/static/partials/nodes-list.html
45@@ -34,9 +34,7 @@
46 data-ng-show="addDeviceScope.viewable">Cancel add device</button>
47 </div>
48 <div data-ng-show="tabs.devices.selectedItems.length">
49- <span class="page-header__controls-feedback u-margin--right" data-ng-click="showSelected('devices')">
50- {$ tabs.devices.selectedItems.length $} Selected
51- </span>
52+ <a class="u-display--inline u-margin--right" data-ng-click="showSelected('devices')">{$ tabs.devices.selectedItems.length $} Selected</a>
53 <div data-maas-cta="tabs.devices.takeActionOptions"
54 data-ng-model="tabs.devices.actionOption"
55 data-ng-change="actionOptionSelected('devices')">
56@@ -55,9 +53,7 @@
57 data-ng-show="tabs.controllers.addController">Close add rack controller</button>
58 </div>
59 <div data-ng-show="tabs.controllers.selectedItems.length">
60- <span class="page-header__controls-feedback u-margin--right" data-ng-click="showSelected('controllers')">
61- {$ tabs.controllers.selectedItems.length $} Selected
62- </span>
63+ <a class="u-display--inline u-margin--right" data-ng-click="showSelected('controllers')">{$ tabs.controllers.selectedItems.length $} Selected</a>
64 <div data-maas-cta="tabs.controllers.takeActionOptions"
65 data-ng-model="tabs.controllers.actionOption"
66 data-ng-change="actionOptionSelected('controllers')">
67@@ -644,6 +640,7 @@ sudo maas-rack register --url {$ tabs.controllers.registerUrl $} --secret {$ tab
68 data-ng-class="{ 'is-active': currentpage === 'devices'}"
69 data-ng-click="toggleTab('devices')">{$ devices.length $} <ng-pluralize count="devices.length" when="{'one': 'Device', 'other': 'Devices'}"></ng-pluralize></button>
70 <button class="page-navigation__link tooltip"
71+ data-ng-if="isSuperUser()"
72 aria-label="A node that provides MAAS services."
73 data-ng-class="{ 'is-active': currentpage === 'controllers'}"
74 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