Oliver Gorwits > App-Netdisco-2.007000_001 > App::Netdisco::Web::Plugin

Download:
App-Netdisco-2.007000_001.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: App-Netdisco-2.029006

NAME ^

App::Netdisco::Web::Plugin - Plugin subsystem for App::Netdisco Web UI components

Introduction ^

App::Netdisco's plugin subsystem allows the user more control of Netdisco UI components displayed in the web browser. Plugins can be distributed independently from Netdisco and are a better alternative to source code patches.

The following UI components are implemented as plugins:

This document explains how to configure which plugins are loaded. See App::Netdisco::Manual::WritingPlugins if you want to develop new plugins.

Application Configuration ^

In the main config.yml file for App::Netdisco (located in share/...) you'll find the web_plugins configuration directive. This lists, in YAML format, a set of Perl module names (or partial names) which are the plugins to be loaded. For example:

 web_plugins:
   - Inventory
   - Report::DuplexMismatch
   - Search::Device
   - Search::Node
   - Search::Port
   - Device::Details
   - Device::Ports

When the name is specified as above, App::Netdisco automatically prepends "App::Netdisco::Web::Plugin::" to the name. This makes, for example, App::Netdisco::Web::Plugin::Inventory. This is the module which is loaded to add a user interface component.

Such plugin modules can either ship with the App::Netdisco distribution itself, or be installed separately. Perl uses the standard @INC path searching mechanism to load the plugin modules.

If an entry in the web_plugins list starts with a "+" (plus) sign then App::Netdisco attemps to load the module as-is, without prepending anything to the name. This allows you to have App::Netdiso web UI plugins in other namespaces:

 web_plugins:
   - Inventory
   - Search::Device
   - Device::Details
   - +My::Other::Netdisco::Web::Component

The order of the entries in web_plugins is significant. Unsurprisingly, the modules are loaded in order. Therefore Navigation Bar items appear in the order listed, and Tabs appear on the Search and Device pages in the order listed.

The consequence of this is that if you want to change the order (or add or remove entries) then simply edit the web_plugins setting. In fact, we recommend adding this setting to your <environment>.yml file and leaving the config.yml file alone. Your Environment's version will take prescedence.

Finally, if you want to add components without completely overriding the web_plugins setting, use the extra_web_plugins setting instead in your Environment configuration. Any Navigation Bar items or Page Tabs are added after those in web_plugins.

syntax highlighting: