From b0925cf11610d19e32159a6282920cee74c28053 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 8 Jun 2013 21:20:13 +0100 Subject: [PATCH] update plugin docs --- .../lib/App/Netdisco/Manual/Configuration.pod | 8 +-- Netdisco/lib/App/Netdisco/Web/Plugin.pm | 72 +++++++++++-------- 2 files changed, 46 insertions(+), 34 deletions(-) diff --git a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod index cc93de26..4bbbb773 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Configuration.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Configuration.pod @@ -140,10 +140,10 @@ You can override this to set your own list. If you only want to add to the default list then use C, which allows the Netdisco developers to update default C in a future release. -Entries in the list will by default omit the leading C from -the name. To override this for one entry, prefix it with a C<+> sign. You can -also prefix with C to signify the alternate C -namepsace. +Entries in the list will by default omit the leading +C from the name. To override this for one entry, +prefix it with a C<+> sign. You can also prefix with C to signify the +alternate C namepsace. =head3 C diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin.pm b/Netdisco/lib/App/Netdisco/Web/Plugin.pm index 29dc5ba2..4685a5fc 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin.pm @@ -164,16 +164,16 @@ true; =head1 NAME -App::Netdisco::Web::Plugin - Plugin subsystem for App::Netdisco Web UI components +App::Netdisco::Web::Plugin - Netdisco Web UI components =head1 Introduction -L's plugin subsystem allows the user more control of Netdisco -UI components displayed in the web browser. Plugins can be distributed +L's plugin system allows you more control of what Netdisco +components are displayed in the web interface. Plugins can be distributed independently from Netdisco and are a better alternative to source code patches. -The following UI components are implemented as plugins: +The following web interface components are implemented as plugins: =over 4 @@ -189,6 +189,14 @@ Tabs for Search and Device pages Reports (pre-canned searches) +=item * + +Additional Device Port Columns + +=item * + +Admin Menu function (job control, manual topology, pseudo devices) + =back This document explains how to configure which plugins are loaded. See @@ -196,10 +204,13 @@ L if you want to develop new plugins. =head1 Application Configuration -In the main C file for App::Netdisco (located in C) -you'll find the C 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: +Netdisco configuration supports a C directive along with the +similar C. These list, in YAML format, the set of Perl +module names which are the plugins to be loaded. Each item injects one part of +the Netdisco web user interface. + +You can override these settings to add, change, or remove entries from the +default lists. Here is an example of the C list: web_plugins: - Inventory @@ -210,19 +221,28 @@ be loaded. For example: - Device::Details - Device::Ports -When the name is specified as above, App::Netdisco automatically prepends -"C" to the name. This makes, for example, -L. This is the module which is loaded -to add a user interface component. +Any change should go into your local C configuration file. If +you want to view the default settings, see the C file in the +C distribution. + +=head1 How to Configure + +The C setting is empty, and used only if you want to add +new plugins but not change the set enabled by default. If you do want to add +to or remove from the default set, then create a version of C +instead. + +Netdisco prepends "C" to any entry in the list. +For example, "C" will load the +C module. Such plugin modules can either ship with the App::Netdisco distribution itself, or be installed separately. Perl uses the standard C<@INC> path searching mechanism to load the plugin modules. -If an entry in the C list starts with a "C<+>" (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: +If an entry in the list starts with a "C<+>" (plus) sign then 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 @@ -230,21 +250,13 @@ namespaces: - Device::Details - +My::Other::Netdisco::Web::Component -The order of the entries in C 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 order of the entries 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, and so on. -The consequence of this is that if you want to change the order (or add or -remove entries) then simply edit the C setting. In fact, we -recommend adding this setting to your C<< .yml >> file and -leaving the C file alone. Your Environment's version will take -prescedence. - -Finally, if you want to add components without completely overriding the -C setting, use the C setting instead in your -Environment configuration. Any Navigation Bar items or Page Tabs are added -after those in C. +Finally, you can also prepend module names with "C", to support the +"Netdisco extension" namespace. For example, "C" will load the +L module. =cut