r1492 + learn to list RS pools
[racktables] / inc / pagetitles.php
index af4d86d518241cea6d1714af727d39a300582866..b572db22c650ae90334a66506ddf553669c79c66 100644 (file)
@@ -108,6 +108,24 @@ function dynamic_title_vservice ()
        return $ret;
 }
 
+function dynamic_title_rspool ()
+{
+       global $pageno;
+       $ret = array();
+       switch ($pageno)
+       {
+               case 'rspool':
+                       assertUIntArg ('id');
+                       $poolInfo = getRSPoolInfo ($_REQUEST['id']);
+                       $ret['name'] = empty ($poolInfo['name']) ? '' : 'ANONYMOUS' . $poolInfo['name'];
+                       $ret['params']['id'] = $_REQUEST['id'];
+                       break;
+               default:
+                       return NULL;
+       }
+       return $ret;
+}
+
 function dynamic_title_search ()
 {
        if (isset ($_REQUEST['q']))
@@ -157,55 +175,4 @@ function dynamic_title_objgroup ()
        return $ret;
 }
 
-function static_title ($pageno)
-{
-       $ret['params'] = array();
-       switch ($pageno)
-       {
-               case 'index':
-                       $ret['name'] = 'Main page';
-                       break;
-               case 'ipv4space':
-                       $ret['name'] = 'IPv4 space';
-                       break;
-               case 'rackspace':
-                       $ret['name'] = 'Rackspace';
-                       break;
-               case 'objects':
-                       $ret['name'] = 'Objects';
-                       break;
-               case 'perms':
-                       $ret['name'] = 'Permissions';
-                       break;
-               case 'config':
-                       $ret['name'] = 'Configuration';
-                       break;
-               case 'accounts':
-                       $ret['name'] = 'Accounts';
-                       break;
-               case 'portmap':
-                       $ret['name'] = 'Port compatibility map';
-                       break;
-               case 'attrs':
-                       $ret['name'] = 'Attributes';
-                       break;
-               case 'dict':
-                       $ret['name'] = 'Dictionary';
-                       break;
-               case 'ui':
-                       $ret['name'] = 'User interface';
-                       break;
-               case 'reports':
-                       $ret['name'] = 'Reports';
-                       break;
-               case 'help':
-                       $ret['name'] = 'Help';
-                       break;
-               default:
-                       $ret['name'] = 'UNKNOWN';
-                       break;
-       }
-       return $ret;
-}
-
 ?>