Merge ~ya-bo-ng/maas:fix-devices-filter into maas:master

Proposed by Anthony Dillon
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 8745b570eb8a40e72ca266599d024aebc72ce333
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~ya-bo-ng/maas:fix-devices-filter
Merge into: maas:master
Diff against target: 15 lines (+2/-2)
1 file modified
src/maasserver/static/partials/nodes-list.html (+2/-2)
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Karl Williams (community) Approve
Alberto Donato (community) Needs Information
MAAS Lander Needs Fixing
Review via email: mp+342055@code.launchpad.net

Commit message

Fix the filtering on the devices listing page

Description of the change

## Done
Fix the filtering on the devices listing page

## QA
- Go to devices
- See that you see filtering even if there are no owners

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

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

STATUS: FAILED
LOG: http://maas-ci-jenkins.internal:8080/job/maas/job/branch-tester/2068/console
COMMIT: 8745b570eb8a40e72ca266599d024aebc72ce333

review: Needs Fixing
Revision history for this message
Alberto Donato (ack) wrote :

+1

review: Approve
Revision history for this message
Alberto Donato (ack) wrote :

actually, it seems all other filters are omitted with there are no entries. Why would it be different for this case?

review: Needs Information
Revision history for this message
Karl Williams (deadlight) wrote :

All good! +1

review: Approve
Revision history for this message
Blake Rouse (blake-rouse) wrote :

I have to agree with @ack on this. Why do you only need to make this change to this 1 filter? Do all the other filters HTML markup need to be changed? If not, why?

review: Needs Information
Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :

The other items had the show logic on them. This fix is just moving the owner show logic onto the list item not the entire list.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Ah, cool.

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/nodes-list.html b/src/maasserver/static/partials/nodes-list.html
2index 113ce6f..4763702 100644
3--- a/src/maasserver/static/partials/nodes-list.html
4+++ b/src/maasserver/static/partials/nodes-list.html
5@@ -827,8 +827,8 @@ sudo maas-rack register --url {$ tabs.controllers.registerUrl $} --secret {$ tab
6 <h3 class="p-heading--five">Filter by</h3>
7 </div>
8 <!-- XXX rvba 2015-02-25 - Need to add e2e test. -->
9- <ul class="ng-hide p-list sidebar__first-level" data-ng-show="tabs.devices.metadata.owner.length">
10- <li>
11+ <ul class="p-list sidebar__first-level">
12+ <li class="ng-hide" data-ng-show="tabs.devices.metadata.owner.length">
13 <a href class="sidebar__link maas-accordion-tab">Owner <i class="p-icon--plus"></i><i class="p-icon--minus"></i></a>
14 <ul class="sidebar__second-level">
15 <li data-ng-repeat="owner in tabs.devices.metadata.owner | orderBy:['name', '-count']" data-ng-class="{ 'is-active': isFilterActive('owner', owner.name, 'devices') }">

Subscribers

People subscribed via source and target branches