local plugins site_plugins dir

This commit is contained in:
Oliver Gorwits
2013-06-03 20:07:31 +01:00
parent b0e804e558
commit 09829a25b8
2 changed files with 3 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
* User icon color indicates port_control/admin ability
* Buttons for discover/macsuck/arpnip on device details page
* Support 'path' config option as alternative to --path /mountpoint
* Local plugins can be placed in ${NETDISCO_HOME}/site_plugins/...
[BUG FIXES]

View File

@@ -8,6 +8,7 @@ use Dancer::Plugin::DBIC;
use Socket6 (); # to ensure dependency is met
use HTML::Entities (); # to ensure dependency is met
use URI::QueryParam (); # part of URI, to add helper methods
use Path::Class 'dir';
use App::Netdisco::Web::AuthN;
use App::Netdisco::Web::Static;
@@ -38,6 +39,7 @@ if (setting('web_plugins') and ref [] eq ref setting('web_plugins')) {
}
if (setting('extra_web_plugins') and ref [] eq ref setting('extra_web_plugins')) {
unshift @INC, dir(($ENV{NETDISCO_HOME} || $ENV{HOME}), 'site_plugins')->stringify;
_load_web_plugins( setting('extra_web_plugins') );
}