[racktables-users] Re: URLs for objects?

  • From: Denis Ovsienko <pilot@xxxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Tue, 21 Jul 2009 14:09:47 +0400

> That sounds great.. I've actually made an addition (okay, I busted into the
> code! guilty!) where I take the specific management URLs and create  a
> seperate tab for each of the URLs (in the object view), and suck them into
> an iframe. This enables users to see and use, from the racktables, the
> host(s) different management functions. I realise its a specific addition
> I'm making here, but it its REALLY useful to have, and its all object
> centric, which makes sense from our point of view, as we are encouraging our
> engineers to use RackTables as a central point for hosts. The code didn't
> take very long to create (slight modifications to navigation.php and
> interface.php), but it would be better if it was applied from the dictionary
> level in a similar manner to the way Ryan mentioned.
> 
> Also, this brings me to another thing in regards to the recent mention of an
> API - it would be very handy to have some sort of custom "overlay" feature
> so we could customise the look and feel of racktables without disturbing the
> underlying code for instances such as this.

Local addons are best kept in inc/local.php file. For example, you
could do the above with the following template:

<?php

$tab['object']['mytab'] = 'special management';
$tabhandler['object']['mytab'] = 'localfunc_ManagementTab';

function localfunc_ManagementTab()
{
// do something
}

?>

You can even make the custom tab show and hide depending on special
conditions (see triggers). After you make sure, that all added work ends
up in one file, upgrades will become much more trivial.

-- 
    Denis Ovsienko

Other related posts: