r2896 Added trigger for rackspace tab (ticket #234)
authorDenis Yeldandi <dyeldandi@gmail.com>
Wed, 24 Jun 2009 13:36:24 +0000 (13:36 +0000)
committerDenis Yeldandi <dyeldandi@gmail.com>
Wed, 24 Jun 2009 13:36:24 +0000 (13:36 +0000)
inc/navigation.php
inc/triggers.php

index 2310a34..6614ca1 100644 (file)
@@ -103,6 +103,7 @@ $tabhandler['object']['autoports'] = 'renderAutoPortsForm';
 $tabhandler['object']['tags'] = 'renderEntityTags';
 $tabhandler['object']['files'] = 'renderFilesForEntity';
 $tabhandler['object']['editrspvs'] = 'renderObjectSLB';
+$trigger['object']['rackspace'] = 'trigger_rackspace';
 $trigger['object']['ipv4'] = 'trigger_ipv4';
 $trigger['object']['nat4'] = 'trigger_natv4';
 $trigger['object']['livevlans'] = 'trigger_livevlans';
index 5cde3df..7ae5918 100644 (file)
@@ -113,4 +113,11 @@ function trigger_file_editText ()
        return ($fileInfo['type'] == 'text/plain') ? 'std' : '';
 }
 
+function trigger_rackspace ()
+{
+       $rackspace = getRackspaceStats();
+       if ($rackspace['Racks'] > 0) return 'std';
+       return '';
+}
+
 ?>