Merge lp:~blake-rouse/maas/small-storage-ui-fixes into lp:maas/trunk

Proposed by Blake Rouse on 2015-10-30
Status: Merged
Approved by: Blake Rouse on 2015-10-30
Approved revision: 4434
Merged at revision: 4437
Proposed branch: lp:~blake-rouse/maas/small-storage-ui-fixes
Merge into: lp:maas/trunk
Diff against target: 219 lines (+39/-35)
3 files modified
src/maasserver/static/js/angular/controllers/node_details_storage.js (+2/-2)
src/maasserver/static/js/angular/controllers/tests/test_node_details_storage.js (+3/-3)
src/maasserver/static/partials/node-details.html (+34/-30)
To merge this branch: bzr merge lp:~blake-rouse/maas/small-storage-ui-fixes
Reviewer Review Type Date Requested Status
Mike Pontillo (community) Approve on 2015-10-30
Lee Trager 2015-10-30 Approve on 2015-10-30
Review via email: mp+276203@code.launchpad.net

Commit message

Move the model/serial column under the name column. Add tickbox on the create bond row. Rename available space to size for consistency. Change Format & Mount to just Mount. Remove the empty column on the create RAID and Bcache rows. Fix all buttons to be lower case.

To post a comment you must log in.
Lee Trager (ltrager) wrote :

Looks good!

review: Approve
Mike Pontillo (mpontillo) wrote :

Looks good to me.

Lowercase "bcache"! Finally vindicated! ;-)

review: Approve

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_storage.js'
2--- src/maasserver/static/js/angular/controllers/node_details_storage.js 2015-10-29 16:39:49 +0000
3+++ src/maasserver/static/js/angular/controllers/node_details_storage.js 2015-10-30 01:45:15 +0000
4@@ -114,7 +114,7 @@
5 }
6 ];
7
8- $scope.column = 'model';
9+ $scope.column = 'name';
10 $scope.has_disks = false;
11 $scope.filesystems = [];
12 $scope.filesystemsMap = {};
13@@ -878,7 +878,7 @@
14 $scope.getAvailableFormatSubmitText = function(disk) {
15 if(angular.isString(disk.$options.mount_point) &&
16 disk.$options.mount_point !== "") {
17- return "Format & Mount";
18+ return "Mount";
19 } else {
20 return "Format";
21 }
22
23=== modified file 'src/maasserver/static/js/angular/controllers/tests/test_node_details_storage.js'
24--- src/maasserver/static/js/angular/controllers/tests/test_node_details_storage.js 2015-10-29 16:39:49 +0000
25+++ src/maasserver/static/js/angular/controllers/tests/test_node_details_storage.js 2015-10-30 01:45:15 +0000
26@@ -252,7 +252,7 @@
27
28 it("sets initial values", function() {
29 var controller = makeController();
30- expect($scope.column).toBe('model');
31+ expect($scope.column).toBe('name');
32 expect($scope.has_disks).toBe(false);
33 expect($scope.filesystems).toEqual([]);
34 expect($scope.filesystemsMap).toEqual({});
35@@ -1546,7 +1546,7 @@
36
37 describe("getAvailableFormatSubmitText", function() {
38
39- it("returns 'Format & Mount' when mount_point set", function() {
40+ it("returns 'Mount' when mount_point set", function() {
41 var controller = makeController();
42 var disk = {
43 $options: {
44@@ -1555,7 +1555,7 @@
45 };
46
47 expect($scope.getAvailableFormatSubmitText(disk)).toBe(
48- "Format & Mount");
49+ "Mount");
50 });
51
52 it("returns 'Format' when mount_point is null", function() {
53
54=== modified file 'src/maasserver/static/partials/node-details.html'
55--- src/maasserver/static/partials/node-details.html 2015-10-29 16:12:05 +0000
56+++ src/maasserver/static/partials/node-details.html 2015-10-30 01:45:15 +0000
57@@ -550,6 +550,8 @@
58 </div>
59 <div class="table__row active ng-hide" data-ng-show="isShowingCreateBond()">
60 <div class="table__data table__column--3">
61+ <input class="checkbox" type="checkbox" id="bond-create" disabled="disabled" checked />
62+ <label class="checkbox-label" for="bond-create"></label>
63 </div>
64 <div class="table__data table__column--12">
65 <input type="text" class="table__input editible"
66@@ -648,7 +650,7 @@
67 </ul>
68 </div>
69 <div class="twelve-col padding-bottom">
70- <h3>File System</h3>
71+ <h3>File system</h3>
72 <section class="table">
73 <header class="table__head">
74 <div class="table__row">
75@@ -791,16 +793,17 @@
76 data-ng-disabled="isAvailableDisabled()" />
77 <label class="checkbox-label" for="available-check-all"></label>
78 </div>
79- <div class="table__header table__column--15">Name</div>
80- <div class="table__header table__column--15">Space Available</div>
81+ <div class="table__header table__column--20">
82+ <a data-ng-click="column = 'name'" data-ng-class="{active: column === 'name'}">Name</a>
83+ <span class="divide"></span>
84+ <a data-ng-click="column = 'model'" data-ng-class="{active: column === 'model'}">Model</a>
85+ <span class="divide"></span>
86+ <a data-ng-click="column = 'serial'" data-ng-class="{active: column === 'serial'}">Serial</a>
87+ </div>
88+ <div class="table__header table__column--15">Size</div>
89 <div class="table__header table__column--15">Device Type</div>
90 <div class="table__header table__column--15">File system</div>
91- <div class="table__header table__column--15" colspan="2">
92- <a data-ng-click="column = 'model'" data-ng-class="{active: column === 'model'}">Model</a>
93- <span class="divide"></span>
94- <a data-ng-click="column = 'serial'" data-ng-class="{active: column === 'serial'}">Serial</a>
95- </div>
96- <div class="table__header table__column--15">Tags</div>
97+ <div class="table__header table__column--25">Tags</div>
98 <div class="table__header table__column--7"></div>
99 </div>
100 </header>
101@@ -820,7 +823,7 @@
102 data-ng-disabled="isAvailableDisabled()" />
103 <label class="checkbox-label" for="{$ item.name $}" ></label>
104 </div>
105- <div class="table__data table__column--15">
106+ <div class="table__data table__column--20" data-ng-show="column === 'name'">
107 <input type="text" class="table__input"
108 data-ng-model="item.name"
109 data-maas-enter-blur
110@@ -829,6 +832,8 @@
111 data-ng-disabled="item.type === 'partition'"
112 data-ng-change="nameHasChanged(item)">
113 </div>
114+ <div class="table__data table__column--20 ng-hide" data-ng-show="column === 'model'">{$ item.model $}</div>
115+ <div class="table__data table__column--20 ng-hide" data-ng-show="column === 'serial'">{$ item.serial $}</div>
116 <div class="table__data table__column--15">{$ item.size_human $} <span class="table__label ng-hide" data-ng-show="showFreeSpace(item)">Free: {$ item.available_size_human $}</span></div>
117 <div class="table__data table__column--15">{$ getDeviceType(item) $}</div>
118 <div class="table__data table__column--15">
119@@ -839,9 +844,7 @@
120 data-ng-class="{ 'margin-left--ten': item.fstype }">{$ getFormatAndMountButtonText (item) $}</a>
121 </span>
122 </div>
123- <div class="table__data table__column--15" colspan="2" data-ng-show="column === 'model'">{$ item.model $}</div>
124- <div class="table__data table__column--15 ng-hide" colspan="2" data-ng-show="column === 'serial'">{$ item.serial $}</div>
125- <div class="table__data table__tags table__column--15">
126+ <div class="table__data table__tags table__column--25">
127 <span class="table__tag" data-ng-repeat="tag in item.tags" data-ng-hide="item.$options.editingTags">
128 <a href="#/node/?query=storage_tags:({$ tag.text $})">{$ tag.text $}</a>
129 </span>
130@@ -1038,7 +1041,6 @@
131 <option value="writearound">writearound</option>
132 </select>
133 </div>
134- <div class="table__data table__column--15"></div>
135 <div class="table__data table__column--15">
136 <label for="type">File system</label>
137 <select name="filesys"
138@@ -1055,6 +1057,7 @@
139 data-ng-disabled="availableNew.fstype === null"
140 data-ng-class="{ invalid: isMountPointInvalid(availableNew.mountPoint) }">
141 </div>
142+ <div class="table__data table__column--15"></div>
143 <div class="table__data table__column--7"></div>
144 </div>
145 <div class="table__row table__dropdown-row table__dropdown-row--head">
146@@ -1107,8 +1110,6 @@
147 data-ng-options="mode as mode.title for mode in getAvailableRAIDModes()">
148 </select>
149 </div>
150- <div class="table__data table__column--15"></div>
151- <div class="table__data table__column--15"></div>
152 <div class="table__data table__column--15">
153 <label for="type">File system</label>
154 <select name="filesys"
155@@ -1125,6 +1126,8 @@
156 data-ng-disabled="availableNew.fstype === null"
157 data-ng-class="{ invalid: isMountPointInvalid(availableNew.mountPoint) }">
158 </div>
159+ <div class="table__data table__column--15"></div>
160+ <div class="table__data table__column--15"></div>
161 <div class="table__data table__column--7"></div>
162 </div>
163 <div class="table__row table__dropdown-row table__dropdown-row--head">
164@@ -1217,13 +1220,13 @@
165 data-ng-click="createRAID()">Create RAID</a>
166 <a class="link-cta-ubuntu secondary margin-right"
167 data-ng-disabled="!canCreateVolumeGroup()"
168- data-ng-click="createVolumeGroup()">Create Volume Group</a>
169+ data-ng-click="createVolumeGroup()">Create volume group</a>
170 <a class="link-cta-ubuntu secondary margin-right"
171 data-ng-disabled="!canCreateCacheSet()"
172- data-ng-click="createCacheSet()">Create Cache Set</a>
173+ data-ng-click="createCacheSet()">Create cache Set</a>
174 <a class="link-cta-ubuntu secondary"
175 data-ng-disabled="!canCreateBcache()"
176- data-ng-click="createBcache()">Create Bcache</a>
177+ data-ng-click="createBcache()">Create bcache</a>
178 </div>
179 <div class="twelve-col padding-bottom">
180 <h3>Used disks and partitions</h3>
181@@ -1231,14 +1234,15 @@
182 <header class="table__head">
183 <div class="table__row">
184 <div class="table__header table__column--3"></div>
185- <div class="table__header table__column--15">Name</div>
186+ <div class="table__header table__column--20">
187+ <a data-ng-click="column = 'name'" data-ng-class="{active: column === 'name'}">Name</a>
188+ <span class="divide"></span>
189+ <a data-ng-click="column = 'model'" data-ng-class="{active: column === 'model'}">Model</a>
190+ <span class="divide"></span>
191+ <a data-ng-click="column = 'serial'" data-ng-class="{active: column === 'serial'}">Serial</a>
192+ </div>
193 <div class="table__header table__column--15">Device type</div>
194- <div class="table__header table__column--30" colspan="2">
195- <a data-ng-click="column = 'model'" data-ng-class="{active: column === 'model'}">Model</a>
196- <span class="divide"></span>
197- <a data-ng-click="column = 'serial'" data-ng-class="{active: column === 'serial'}">Serial</a>
198- </div>
199- <div class="table__header table__column--37">Used for</div>
200+ <div class="table__header table__column--52">Used for</div>
201 </div>
202 </header>
203 <main class="table-body">
204@@ -1250,11 +1254,11 @@
205 <div data-ng-repeat="item in used">
206 <div class="table__row details__used">
207 <div class="table__data table__column--3"></div>
208- <div class="table__data table__column--15">{$ item.name $}</div>
209+ <div class="table__data table__column--20" data-ng-show="column === 'name'">{$ item.name $}</div>
210+ <div class="table__data table__column--20" data-ng-show="column === 'model'">{$ item.model $}</div>
211+ <div class="table__data table__column--20" data-ng-show="column === 'serial'">{$ item.serial $}</div>
212 <div class="table__data table__column--15">{$ getDeviceType(item) $}</div>
213- <div class="table__data table__column--30" colspan="2" data-ng-show="column === 'model'">{$ item.model $}</div>
214- <div class="table__data table__column--30" colspan="2" data-ng-show="column === 'serial'">{$ item.serial $}</div>
215- <div class="table__data table__column--37">{$ item.used_for $}</div>
216+ <div class="table__data table__column--52">{$ item.used_for $}</div>
217 </div>
218 </div>
219 </main>