Merge ~ya-bo-ng/maas:lp-1782801 into maas:master

Proposed by Anthony Dillon
Status: Merged
Approved by: Anthony Dillon
Approved revision: 7c42726af1738bba68f67a6f8948341584ffa4c9
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~ya-bo-ng/maas:lp-1782801
Merge into: maas:master
Diff against target: 40 lines (+3/-6)
1 file modified
src/maasserver/static/partials/node-details.html (+3/-6)
Reviewer Review Type Date Requested Status
Caleb Ellis (community) Approve
MAAS Lander Approve
Blake Rouse (community) Approve
Review via email: mp+358566@code.launchpad.net

Commit message

LP: #1782801 - Removing a specific cache set prompts user to remove all cache sets

Description of the change

Done
- Update the UI to only delete the selected cache set.
- Also tidied up some off the small screen elements.
- Added more verbose messaging to the destructive action.

QA
- Go to Node Details > Storage
- (Optional) Create some cache sets if none are available from available disks and partitions
- When you have more than two cache sets
- Select the contextual menu and click delete
- This should only display the confirmation under the selected cache set
- See that the confirmation button says "Remove cache set"

Screenshot
https://screenshots.firefox.com/2sLjvWfXgRsiWaoB/10.54.72.65

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looks good.

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b lp-1782801 lp:~ya-bo-ng/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 7c42726af1738bba68f67a6f8948341584ffa4c9

review: Approve
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

Looks good to me! +1

review: Approve
Revision history for this message
MAAS Lander (maas-lander) wrote :

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 5845156..c95c24b 100755
3--- a/src/maasserver/static/partials/node-details.html
4+++ b/src/maasserver/static/partials/node-details.html
5@@ -1891,7 +1891,7 @@
6 <td class="col-4" aria-label="Used by" title="{$ cacheset.used_by $}">{$ cacheset.used_by $}</td>
7 <td class="col-2 p-table--action-cell">
8 <div class="u-align--right">
9- <div class="p-contextual-menu" toggle-ctrl data-ng-if="canDeleteCacheSet(cacheset)">
10+ <div class="p-contextual-menu" toggle-ctrl data-ng-if="canDeleteCacheSet(cacheset) && !cacheset.$selected">
11 <button class="p-button--base is-small p-contextual-menu__toggle" data-ng-click="toggleMenu()">
12 <i class="p-icon--contextual-menu u-no-margin--right">Actions</i>
13 </button>
14@@ -1904,16 +1904,13 @@
15 </div>
16 </div>
17 </td>
18- <td class="p-table-expanding__panel col-12" data-ng-if="cachesetsMode === 'delete'">
19+ <td class="p-table-expanding__panel col-12" data-ng-if="cacheset.$selected && cachesetsMode === 'delete'">
20 <div class="row" data-ng-if="windowWidth <= 768">
21 <div class="col-8">
22 <h2 data-ng-click="filesystemCancel()" class="p-heading--four">
23 <span data-ng-if="cachesetsMode === 'delete'">Removing {$ cacheset.name $}</span>
24 </h2>
25 </div>
26- <div class="col-4 u-float--right">
27- <i data-ng-click="filesystemCancel()" class="p-icon--close">Cancel</i>
28- </div>
29 </div>
30 <div class="row" data-ng-class="{ 'is-active': cachesetsMode !== null && cachesetsMode !== 'multi' }">
31 <div data-ng-show="cachesetsMode === 'single' && canDeleteCacheSet(cacheset)">
32@@ -1928,7 +1925,7 @@
33 <div class="col-4">
34 <div class="u-align--right">
35 <button class="p-button--base" type="button" data-ng-click="cacheSetCancel()">Cancel</button>
36- <button class="p-button--negative u-no-margin--top" data-ng-click="cacheSetConfirmDelete(cacheset)">Remove</button>
37+ <button class="p-button--negative u-no-margin--top" data-ng-click="cacheSetConfirmDelete(cacheset)">Remove cache set</button>
38 </div>
39 </div>
40 </div>

Subscribers

People subscribed via source and target branches