complete the code for admin tasks page loading

This commit is contained in:
Oliver Gorwits
2013-05-05 21:45:17 +01:00
parent 38f70624f3
commit 3271c01931
7 changed files with 63 additions and 17 deletions

View File

@@ -13,6 +13,7 @@ use App::Netdisco::Web::AuthN;
use App::Netdisco::Web::Search;
use App::Netdisco::Web::Device;
use App::Netdisco::Web::Report;
use App::Netdisco::Web::AdminTask;
use App::Netdisco::Web::TypeAhead;
use App::Netdisco::Web::PortControl;

View File

@@ -7,7 +7,7 @@ set(
'navbar_items' => [],
'search_tabs' => [],
'device_tabs' => [],
'admin_tasks' => [],
'admin_tasks' => {},
'reports_menu' => {},
'reports' => {},
'report_order' => [qw/Device Port Node VLAN Network Wireless/],
@@ -60,14 +60,7 @@ register 'register_admin_task' => sub {
return;
}
foreach my $item (@{ setting('admin_tasks') }) {
if ($item->{tag} eq $config->{tag}) {
$item = $config;
return;
}
}
push @{ setting('admin_tasks') }, $config;
setting('admin_tasks')->{ $config->{tag} } = $config;
};
sub _register_tab {