new feature: IPv6 SLB support
new feature: Arista EOS support
new feature: locations
+ new feature: plugin installation is as simple as copying a file into plugins/ dir
0.19.13
update: IE spoils JPEG uploads, work around
update: use is_callable() (#551)
0. BACKUP YOUR DATABASE and check the release notes (below) before actually
starting the upgrade,.
-1. Remove all existing files except inc/secret.php, gateways'
- configuration (in the gateways directory) and local mod (inc/local.php).
+1. Remove all existing files except inc/secret.php and the gateways'
+ configuration (in the gateways directory).
2. Unpack the new tarball into the place.
3. Open your RackTables page in a browser. The software detects version
mismatch and displays a message telling to log in as admin to finish
was renamed to Object. SQL views were created to ease the migration of custom
reports and scripts.
+New plugins engine instead of local.php file. To make your own code stored in local.php work,
+you must move the local.php file into the plugins/ directory. The name of this file does not
+matter any more. You also can store multiple files in that dir, separate your plugins by features,
+share them and try the plugins from other people just placing them into plugins/ dir, no more merging.
+$path_to_local_php variable has no special meaning any more.
+$racktables_confdir variable is now used only to search for secret.php file.
+$racktables_plugins_dir is a new overridable special variable pointing to plugins/ directory.
+
Beginning with this version it is possible to delete IP networks and VLANs from within
theirs properties tab. So please inspect your permissions rules to assure there are no
undesired allows for deletion of these objects.
security and allows for the two use cases described below.
1. Single RackTables instance per server. By default the application
-expects its configuration files (mandatory secret.php and optional
-local.php) in /etc/RackTables directory, which is a part of the RPM. In
-a fresh installation both files are missing, no MySQL database is setup
-and there is no symlink.
+expects its configuration file (secret.php) in /etc/RackTables directory,
+which is a part of the RPM. In a fresh installation the files is missing,
+no MySQL database is setup and there is no symlink.
Setting up the symlink is simple: one needs to decide on the URL of the
RackTables system and map it to filesystem path. For example, the commands
--- /dev/null
+Put your custom RackTables add-ons into this folder.
+
+Old local.php file is the sample of such add-ons and should be put here
+to continue working.
+
+Files should be named with .php extension to be loaded automatically.
+Files are loaded in alphabetical order.
+
+It is recommended to override existing tabhandlers and ophandlers using
+registerTabHandler and registerOpHandler functions, respectively.
+This is preferred over overwriting of items in $tabhandler and $ophandler,
+because allows overriding the same tab or operation in multiple plugins.
+
+Consider the following sample:
+
+<?php
+
+registerTabHandler ('object', 'default', 'renderObject_add_FQDN_waring');
+
+function renderObject_add_FQDN_waring ($object_id)
+{
+ $object = spotEntity ('object', $object_id);
+ $attrs = getAttrValues ($object_id);
+ $fqdn = @$attrs[3]['value'];
+ if
+ (
+ considerGivenConstraint ($object, '{server} and not {offline}') &&
+ $fqdn == ''
+ )
+ showWarning ("Please set FQDN for this server");
+}
+
+?>
alterConfigWithUserPreferences();
$op = '';
-// local.php may be missing, this case requires no special treatment
-// and must not generate any warnings
+
+// load additional plugins
ob_start();
-if (fileSearchExists ($path_to_local_php))
- include_once $path_to_local_php;
+foreach (glob("$racktables_plugins_dir/*.php") as $filename)
+ require_once $filename;
+// display plugins output if it contains something but newlines
$tmp = ob_get_clean();
if ($tmp != '' and ! preg_match ("/^\n+$/D", $tmp))
echo $tmp;
$racktables_staticdir = $racktables_rootdir;
if (! isset ($racktables_gwdir)) // the directory containing the 'telnet' and 'ssh' scripts
$racktables_gwdir = realpath ($racktables_rootdir . '/../gateways');
-if (! isset ($racktables_confdir)) // the directory containing local.php and secret.php (default is wwwroot/inc)
+if (! isset ($racktables_confdir)) // the directory containing secret.php (default is wwwroot/inc)
$racktables_confdir = dirname (__FILE__);
-if (! isset ($path_to_secret_php))
+if (! isset ($path_to_secret_php)) // you can overrride the path to secret.php separately from $racktables_confdir (legacy feature)
$path_to_secret_php = $racktables_confdir . '/secret.php';
-if (! isset ($path_to_local_php))
- $path_to_local_php = $racktables_confdir . '/local.php';
-if (! isset ($local_gwdir))
- $local_gwdir = $racktables_confdir . '/gateways';
+if (! isset ($racktables_plugins_dir)) // the directory where RT will load additional *.php files (like local.php) from
+ $racktables_plugins_dir = realpath ($racktables_rootdir . '/../plugins');
+if (! isset ($local_gwdir)) // the directory where RT will search gateway scripts if not found in $racktables_gwdir
+ $local_gwdir = $racktables_plugins_dir . '/gateways';
+if (! isset ($local_staticdir)) // the directory where RT will search static files (js/*, css/*, pix/*) if not found in $racktables_staticdir
+ $local_staticdir = $racktables_plugins_dir;
// secret.php may be missing, generally it is OK
if (fileSearchExists ($path_to_secret_php))
"support contract expiration" and "SW warranty expiration") will be converted to this new type but
must be in the format "mm/dd/yyyy" otherwise the conversion will fail.
ENDOFTEXT
+,
+
+ '0.20.0' => <<<ENDOFTEXT
+Racks and Rows are now stored in the database as Objects. The RackObject table
+was renamed to Object. SQL views were created to ease the migration of custom
+reports and scripts.
+
+New plugins engine instead of local.php file. To make your own code stored in local.php work,
+you must move the local.php file into the plugins/ directory. The name of this file does not
+matter any more. You also can store multiple files in that dir, separate your plugins by features,
+share them and try the plugins from other people just placing them into plugins/ dir, no more merging.
+\$path_to_local_php variable has no special meaning any more.
+\$racktables_confdir variable is now used only to search for secret.php file.
+\$racktables_plugins_dir is a new overridable special variable pointing to plugins/ directory.
+
+Beginning with this version it is possible to delete IP networks and VLANs from within
+theirs properties tab. So please inspect your permissions rules to assure there are no
+undesired allows for deletion of these objects.
+ENDOFTEXT
);