Fixes for poor entity-mib implementations.

Squashed commit of the following:

commit aec8628f15801c42374414b13597f2d66ce98748
Author: Eric A. Miller <emiller@cpan.org>
Date:   Tue Sep 3 19:31:05 2013 -0400

    another try at fixing duplicate pos

commit 7ab021a6adecdf32056ba96c3e1388b639e7cf2b
Author: Eric A. Miller <emiller@cpan.org>
Date:   Mon Sep 2 22:38:05 2013 -0400

    alternate fix for dupe pos

commit cae64c8fd882fd091446b93a6c8dc7163e9c0e91
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Sep 2 22:05:45 2013 +0100

    alternative building of modules tree using splice for dupe pos

commit 980e45211b062c8717ff57625ad4d7b80f942886
Author: Oliver Gorwits <oliver@cpan.org>
Date:   Mon Sep 2 22:05:19 2013 +0100

    fix for updating pos "column" value
This commit is contained in:
Oliver Gorwits
2013-09-04 08:15:42 +01:00
parent be806d5ab1
commit e291e0b773
2 changed files with 8 additions and 13 deletions

View File

@@ -15,7 +15,7 @@ ajax '/ajax/content/device/modules' => require_login sub {
my $device = schema('netdisco')->resultset('Device')
->search_for_device($q) or send_error('Bad device', 400);
my @set = $device->modules->search({}, {order_by => { -asc => [qw/parent pos index/] }});
my @set = $device->modules->search({}, {order_by => { -asc => [qw/parent class pos index/] }});
# sort modules (empty set would be a 'no records' msg)
my $results = &App::Netdisco::Util::Web::sort_modules( \@set );