b06f88a70ffbe55755557d5aaea0c5486fb41f67
[racktables] / plugins / README
1 Put your custom RackTables add-ons into this folder.
2
3 Old local.php file is the sample of such add-ons and should be put here
4 to continue working.
5
6 Files should be named with .php extension to be loaded automatically.
7 Files are loaded in alphabetical order.
8
9 It is recommended to override existing tabhandlers and ophandlers using
10 registerTabHandler and registerOpHandler functions, respectively.
11 This is preferred over overwriting of items in $tabhandler and $ophandler,
12 because allows overriding the same tab or operation in multiple plugins.
13
14 Consider the following sample:
15
16 <?php
17
18 registerTabHandler ('object', 'default', 'renderObject_add_FQDN_waring');
19
20 function renderObject_add_FQDN_waring ($object_id)
21 {
22 $object = spotEntity ('object', $object_id);
23 $attrs = getAttrValues ($object_id);
24 $fqdn = @$attrs[3]['value'];
25 if
26 (
27 considerGivenConstraint ($object, '{server} and not {offline}') &&
28 $fqdn == ''
29 )
30 showWarning ("Please set FQDN for this server");
31 }
32
33 ?>