Merge ~mpontillo/maas:managed-unmanaged-tooltips-and-warnings--bug-1696270 into maas:master

Proposed by Mike Pontillo
Status: Merged
Approved by: Mike Pontillo
Approved revision: 6e65c7c8e354b1631afafeef73e8368fa1d1e5bb
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~mpontillo/maas:managed-unmanaged-tooltips-and-warnings--bug-1696270
Merge into: maas:master
Diff against target: 81 lines (+27/-9)
1 file modified
src/maasserver/static/partials/subnet-details.html (+27/-9)
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+331595@code.launchpad.net

Commit message

LP: #1696270 - Adjust tooltips and warnings for managed/unmanaged selection on subnet details page

Description of the change

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

lgtm!, Just one comment inline!

review: Approve
6e65c7c... by Mike Pontillo

Wording changes based on review.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Thanks; updated the wording based on your comments.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/static/partials/subnet-details.html b/src/maasserver/static/partials/subnet-details.html
2index e6aed71..75eaae0 100755
3--- a/src/maasserver/static/partials/subnet-details.html
4+++ b/src/maasserver/static/partials/subnet-details.html
5@@ -60,26 +60,31 @@
6 <dt class="two-col">CIDR</dt>
7 <dd class="four-col last-col">{$ subnet.cidr $}</dd>
8 <dt class="two-col">Gateway IP</dt>
9- <dd class="four-col last-col">{$ subnet.gateway_ip $}</dd>
10+ <dd class="four-col last-col" data-ng-if="subnet.gateway_ip">{$ subnet.gateway_ip $}</dd>
11+ <dd class="four-col last-col" data-ng-if="!subnet.gateway_ip">&nbsp;</dd>
12 <dt class="two-col">DNS</dt>
13 <dd class="four-col last-col" data-ng-if="subnet.dns_servers">{$ subnet.dns_servers $}</dd>
14- <dd class="four-col last-col" data-ng-if="!subnet.dns_servers">(undefined)</dd>
15+ <dd class="four-col last-col" data-ng-if="!subnet.dns_servers">&nbsp;</dd>
16 <dt class="two-col">Description</dt>
17 <dd class="four-col last-col" data-ng-if="subnet.description">{$ subnet.description $}</dd>
18- <dd class="four-col last-col" data-ng-if="!subnet.description">(undefined)</dd>
19+ <dd class="four-col last-col" data-ng-if="!subnet.description">&nbsp;</dd>
20 </dl>
21 <dl class="six-col last-col">
22 <dt class="two-col">Managed allocation
23- <i class="icon icon--info tooltip u-margin--left-small" aria-label="When enabled, MAAS will assume it may take full control of DHCP and&#xa;IP address management on this subnet. When disabled, MAAS will only&#xa;allocate addresses from reserved IP ranges on this subnet, and will not&#xa;include this subnet's dynamic ranges in the DHCP configuration."></i></dt>
24+ <i data-ng-if="subnet.managed == false" class="icon icon--info tooltip u-margin--left-small"
25+ aria-label="MAAS allocates IP addresses only from&#xa;the reserved ranges on this subnet."></i>
26+ <i data-ng-if="subnet.managed == true" class="icon icon--info tooltip u-margin--left-small"
27+ aria-label="MAAS allocates IP addresses from&#xa;this subnet, excluding the reserved&#xa;and dynamic ranges."></i>
28+ </dt>
29 <dd class="four-col last-col">
30- <span data-ng-if="subnet.managed == false" class="u-text--sublet">Disabled</span>
31- <span data-ng-if="subnet.managed == true" class="u-text--success">Active</span>
32+ <span data-ng-if="subnet.managed == false" class="u-text--subtle">Disabled</span>
33+ <span data-ng-if="subnet.managed == true" class="u-text--success">Enabled</span>
34 </dd>
35 <dt class="two-col">Active discovery
36 <i class="icon icon--info tooltip u-margin--left-small" aria-label="When enabled, MAAS will scan this subnet {$ active_discovery_interval | lowercase $}&#xa;to discover hosts that have not been discovered passively."></i></dt>
37 <dd class="four-col last-col">
38 <span data-ng-if="subnet.active_discovery == false" class="u-text--subtle">Disabled</span>
39- <span data-ng-if="subnet.active_discovery == true" class="u-text--success">Active</span>
40+ <span data-ng-if="subnet.active_discovery == true" class="u-text--success">Enabled</span>
41 </dd>
42 <dt class="two-col">Fabric</dt>
43 <dd class="four-col last-col">{$ subnet.fabric_name $}</dd>
44@@ -118,6 +123,19 @@
45 label-info="When enabled, MAAS will assume it may take full control of DHCP and&#xa;IP address management on this subnet. When disabled, MAAS will only&#xa;allocate addresses from reserved IP ranges on this subnet, and will not&#xa;include this subnet's dynamic ranges in the DHCP configuration.">
46
47 </maas-obj-field>
48+ <span data-ng-if="subnet.$maasForm.getValue('managed') != subnet.managed">
49+ <div class="form__group-label two-col">&nbsp;</div>
50+ <div class="form__group-input three-col last-col">
51+ <span data-ng-if="subnet.$maasForm.getValue('managed') == false" class="u-text--subtle">
52+ <i class="icon icon--warning"></i>
53+ <b>Warning:</b> MAAS will now start allocating IP addresses from reserved ranges. If a reserved range has been defined to prevent MAAS from allocating IP addresses, this behavior will change.
54+ </span>
55+ <span data-ng-if="subnet.$maasForm.getValue('managed') == true" class="u-text--subtle">
56+ <i class="icon icon--warning"></i>
57+ <b>Warning:</b> MAAS will now allocate IP addresses from the entire subnet, excluding any reserved ranges.
58+ </span>
59+ </div>
60+ </span>
61 <maas-obj-field data-ng-if="subnet.version === 4" type="onoffswitch" key="active_discovery" label="Active mapping"
62 label-width="two" input-width="three" label-info="When enabled, MAAS will scan this subnet {$ active_discovery_interval | lowercase $}&#xa;to discover hosts that have not been discovered passively."></maas-obj-field>
63 <maas-obj-field type="options" key="fabric" label="Fabric" placeholder="Choose fabric"
64@@ -240,7 +258,7 @@
65 </maas-obj-form>
66 </div>
67 <div class="table__row" data-ng-if="subnetStaticRoutes.length === 0 && !newStaticRoute">
68- <div class="table__data table-col-100">No static routes have been added to this subnet.</div>
69+ <div class="table__data table-col-100 u-text--subtle">No static routes have been added to this subnet.</div>
70 </div>
71 <div class="table__row is-active" data-ng-if="newStaticRoute">
72 <maas-obj-form obj="newStaticRoute" manager="staticRoutesManager" manager-method="createItem"
73@@ -289,7 +307,7 @@
74 </main>
75 </div>
76 <div data-ng-if="isSuperUser() && !newStaticRoute">
77- <button class="button--secondary button--inline" data-ng-click="addStaticRoute()">Add static route</a>
78+ <button class="button--secondary button--inline" data-ng-click="addStaticRoute()">Add static route</button>
79 </div>
80 </div>
81 </div>

Subscribers

People subscribed via source and target branches