Merge ~newell-jensen/maas:lp1721108-1721111 into maas:master

Proposed by Newell Jensen
Status: Merged
Approved by: Newell Jensen
Approved revision: dd962774828c2cead1d087f5543377479f543950
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~newell-jensen/maas:lp1721108-1721111
Merge into: maas:master
Diff against target: 41 lines (+7/-4)
3 files modified
src/maasserver/static/partials/cards/cpu.html (+1/-1)
src/maasserver/static/partials/cards/memory.html (+1/-1)
src/maasserver/static/partials/cards/storage.html (+5/-2)
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Review via email: mp+331821@code.launchpad.net

Commit message

LP: #1721108, #1721111

Update the CPU, and Memory cards so they do not show links for 'See results' unless tests have actually been run.

Update the Storage card so that it always shows 'See storage' and also shows the tooltip that the CPU and Memory cards shows.

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

lgtm!

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/cards/cpu.html b/src/maasserver/static/partials/cards/cpu.html
2index 9c48466..738e6a3 100644
3--- a/src/maasserver/static/partials/cards/cpu.html
4+++ b/src/maasserver/static/partials/cards/cpu.html
5@@ -21,6 +21,6 @@
6 <span data-maas-script-status="script-status" data-script-status="node.cpu_test_status"></span>
7 {$ node.cpu_test_status_tooltip $}
8 </p>
9- <p><a href="" data-ng-if="!isDevice && !(isController && node.status === 'New') && node.cpu_count > 0" data-ng-click="section.area = 'testing'">See results &rsaquo;</a></p>
10+ <p><a href="" data-ng-if="!isDevice && !(isController && node.status === 'New') && node.cpu_count > 0 && node.cpu_test_status !== -1" data-ng-click="section.area = 'testing'">See results &rsaquo;</a></p>
11 <p data-ng-if="!isDevice && !(isController && node.status === 'New') && node.cpu_count == 0"><i class="icon icon--info"></i> No data recieved</p>
12 </div>
13diff --git a/src/maasserver/static/partials/cards/memory.html b/src/maasserver/static/partials/cards/memory.html
14index b645199..8bc85e5 100644
15--- a/src/maasserver/static/partials/cards/memory.html
16+++ b/src/maasserver/static/partials/cards/memory.html
17@@ -21,6 +21,6 @@
18 <span data-maas-script-status="script-status" data-script-status="node.memory_test_status"></span>
19 {$ node.memory_test_status_tooltip $}
20 </p>
21- <p><a href="" data-ng-if="!isDevice && !(isController && node.status === 'New') && node.memory > 0" data-ng-click="section.area = 'testing'">See results &rsaquo;</a></p>
22+ <p><a href="" data-ng-if="!isDevice && !(isController && node.status === 'New') && node.memory > 0 && node.memory_test_status !== -1" data-ng-click="section.area = 'testing'">See results &rsaquo;</a></p>
23 <p data-ng-if="!isDevice && !(isController && node.status === 'New') && node.memory == 0"><i class="icon icon--info"></i> No data recieved</p>
24 </div>
25diff --git a/src/maasserver/static/partials/cards/storage.html b/src/maasserver/static/partials/cards/storage.html
26index 8ff4eec..e8d53be 100644
27--- a/src/maasserver/static/partials/cards/storage.html
28+++ b/src/maasserver/static/partials/cards/storage.html
29@@ -9,7 +9,10 @@
30 </div>
31 </div>
32 <div class="action-card__position-bottom">
33- <p data-ng-if="!isDevice && !(isController && node.status === 'New') && node.storage > 0"><i class="icon icon--info"></i> To view disk metrics visit the Storage section</p>
34- <p><a href="" data-ng-if="!isDevice && !(isController && node.status === 'New') && node.storage > 0" data-ng-click="section.area = 'storage'">See results &rsaquo;</a></p>
35+ <p data-ng-if="!isDevice && !(isController && node.status === 'New') && node.memory > 0">
36+ <span data-maas-script-status="script-status" data-script-status="node.memory_test_status"></span>
37+ {$ node.storage_test_status_tooltip $}
38+ </p>
39+ <p><a href="" data-ng-if="!isDevice && !(isController && node.status === 'New') && node.storage > 0" data-ng-click="section.area = 'storage'">See storage &rsaquo;</a></p>
40 <p data-ng-if="!isDevice && !(isController && node.status === 'New') && node.storage == 0"><i class="icon icon--info"></i> No data recieved</p>
41 </div>

Subscribers

People subscribed via source and target branches