report error on failure to load a plugin
This commit is contained in:
@@ -25,6 +25,7 @@ sub _load_web_plugins {
|
|||||||
|
|
||||||
debug "loading Netdisco plugin $plugin";
|
debug "loading Netdisco plugin $plugin";
|
||||||
eval "require $plugin";
|
eval "require $plugin";
|
||||||
|
error $@ if $@;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ register 'register_report' => sub {
|
|||||||
my @categories = @{ setting('report_order') };
|
my @categories = @{ setting('report_order') };
|
||||||
|
|
||||||
if (!length $config->{category}
|
if (!length $config->{category}
|
||||||
or !length $config->{path}
|
or !length $config->{tag}
|
||||||
or !length $config->{label}
|
or !length $config->{label}
|
||||||
or 0 == scalar grep {$config->{category} eq $_} @categories) {
|
or 0 == scalar grep {$config->{category} eq $_} @categories) {
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ register 'register_report' => sub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach my $item (@{setting('reports')->{ $config->{category} }}) {
|
foreach my $item (@{setting('reports')->{ $config->{category} }}) {
|
||||||
if ($item->{label} eq $config->{label}) {
|
if ($item->{tag} eq $config->{tag}) {
|
||||||
$item = $config;
|
$item = $config;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user