r1430 + trac#85 --- got rid of the following functions:
authorDenis Ovsienko <infrastation@yandex.ru>
Wed, 26 Dec 2007 11:12:40 +0000 (11:12 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Wed, 26 Dec 2007 11:12:40 +0000 (11:12 +0000)
handler_row
handler_rack
handler_objects
handler_rackspace
handler_ipv4space
handler_iprange
handler_accounts
handler_perms
handler_ui
handler_dict
handler_attrs
handler_reports
handler_help
handler_ipaddress

inc/navigation.php
inc/pagehandlers.php

index 63c945afe52725a61c03d609a6d1fe3ef186a460..0be5bfa460e862e768ad886450279e68a2681c99 100644 (file)
@@ -16,35 +16,45 @@ $page['index']['title'] = 'static_title';
 $page['index']['handler'] = 'renderIndex';
 
 $page['rackspace']['title'] = 'static_title';
-$page['rackspace']['handler'] = 'handler_rackspace';
 $page['rackspace']['parent'] = 'index';
 $tab['rackspace']['default'] = 'Browse';
 $tab['rackspace']['history'] = 'History';
 $tab['rackspace']['firstrow'] = 'Click me!';
 $trigger['rackspace']['firstrow'] = 'trigger_emptyRackspace';
+$tabhandler['rackspace']['default'] = 'renderRackspace';
+$tabhandler['rackspace']['history'] = 'renderRackspaceHistory';
+$tabhandler['rackspace']['firstrow'] = 'renderFirstRowForm';
 
 $page['objects']['title'] = 'static_title';
-$page['objects']['handler'] = 'handler_objects';
 $page['objects']['parent'] = 'index';
 $tab['objects']['default'] = 'View';
 $tab['objects']['newobj'] = 'Add an object';
 $tab['objects']['newmulti'] = 'Add multiple objects';
+$tabhandler['objects']['default'] = 'renderObjectGroupSummary';
+$tabhandler['objects']['newobj'] = 'renderNewObjectForm';
+$tabhandler['objects']['newmulti'] = 'renderAddMultipleObjectsForm';
 
 $page['row']['title'] = 'dynamic_title_row';
-$page['row']['handler'] = 'handler_row';
 $page['row']['bypass'] = 'row_id';
+$page['row']['bypass_type'] = 'uint';
 $page['row']['parent'] = 'rackspace';
 $tab['row']['default'] = 'View';
 $tab['row']['newrack'] = 'Add new rack';
+$tabhandler['row']['default'] = 'renderRow';
+$tabhandler['row']['newrack'] = 'renderNewRackForm';
 
 $page['rack']['title'] = 'dynamic_title_rack';
-$page['rack']['handler'] = 'handler_rack';
 $page['rack']['bypass'] = 'rack_id';
+$page['rack']['bypass_type'] = 'uint';
 $page['rack']['parent'] = 'row';
 $tab['rack']['default'] = 'View';
 $tab['rack']['edit'] = 'Properties';
 $tab['rack']['design'] = 'Design';
 $tab['rack']['problems'] = 'Problems';
+$tabhandler['rack']['default'] = 'renderRackPage';
+$tabhandler['rack']['edit'] = 'renderEditRackForm';
+$tabhandler['rack']['design'] = 'renderRackDesign';
+$tabhandler['rack']['problems'] = 'renderRackProblems';
 $helptab['rack']['design'] = 'rackspace';
 $helptab['rack']['problems'] = 'rackspace';
 
@@ -100,27 +110,28 @@ $ophandler['object']['portfwrd']['updPortForwarding'] = 'updPortForwarding';
 $ophandler['object']['switchvlans']['submit'] = 'updateVLANMembership';
 
 $page['ipv4space']['title'] = 'static_title';
-$page['ipv4space']['handler'] = 'handler_ipv4space';
 $page['ipv4space']['parent'] = 'index';
 $tab['ipv4space']['default'] = 'Browse';
 $tab['ipv4space']['newrange'] = 'Manage ranges';
 $helptab['ipv4space']['default'] = 'nets';
 $helptab['ipv4space']['newrange'] = 'nets';
+$tabhandler['ipv4space']['default'] = 'renderAddressspace';
+$tabhandler['ipv4space']['newrange'] = 'renderAddNewRange';
 $ophandler['ipv4space']['newrange']['addRange'] = 'addNewrange';
 $ophandler['ipv4space']['newrange']['delRange'] = 'delRange';
 
 $page['iprange']['title'] = 'dynamic_title_iprange';
-$page['iprange']['handler'] = 'handler_iprange';
 $page['iprange']['parent'] = 'ipv4space';
 $page['iprange']['bypass'] = 'id';
 $tab['iprange']['default'] = 'Browse';
 $tab['iprange']['properties'] = 'Properties';
 $helptab['iprange']['default'] = 'nets';
 $helptab['iprange']['properties'] = 'nets';
+$tabhandler['iprange']['default'] = 'renderIPRange';
+$tabhandler['iprange']['properties'] = 'renderIPRangeProperties';
 $ophandler['iprange']['properties']['editRange'] = 'editRange';
 
 $page['ipaddress']['title'] = 'dynamic_title_ipaddress';
-$page['ipaddress']['handler'] = 'handler_ipaddress';
 $page['ipaddress']['parent'] = 'iprange';
 $page['ipaddress']['bypass'] = 'ip';
 $tab['ipaddress']['default'] = 'Browse';
@@ -129,6 +140,9 @@ $tab['ipaddress']['assignment'] = 'Allocation';
 $helptab['ipaddress']['default'] = 'nets';
 $helptab['ipaddress']['properties'] = 'nets';
 $helptab['ipaddress']['assignment'] = 'nets';
+$tabhandler['ipaddress']['default'] = 'renderIPAddress';
+$tabhandler['ipaddress']['properties'] = 'renderIPAddressProperties';
+$tabhandler['ipaddress']['assignment'] = 'renderIPAddressAssignment';
 $ophandler['ipaddress']['properties']['editAddress'] = 'editAddress';
 $ophandler['ipaddress']['assignment']['delIpAssignment'] = 'delIpAssignment';
 $ophandler['ipaddress']['assignment']['editBondForAddress'] = 'editIpAssignment';
@@ -144,20 +158,22 @@ $page['config']['handler'] = 'handler_config';
 $page['config']['parent'] = 'index';
 
 $page['accounts']['title'] = 'static_title';
-$page['accounts']['handler'] = 'handler_accounts';
 $page['accounts']['parent'] = 'config';
 $tab['accounts']['default'] = 'View';
 $tab['accounts']['edit'] = 'Change';
+$tabhandler['accounts']['default'] = 'renderAccounts';
+$tabhandler['accounts']['edit'] = 'renderAccountsEditForm';
 $ophandler['accounts']['edit']['updateAccount'] = 'updateUserAccount';
 $ophandler['accounts']['edit']['createAccount'] = 'createUserAccount';
 $ophandler['accounts']['edit']['disableAccount'] = 'disableUserAccount';
 $ophandler['accounts']['edit']['enableAccount'] = 'enableUserAccount';
 
 $page['perms']['title'] = 'static_title';
-$page['perms']['handler'] = 'handler_perms';
 $page['perms']['parent'] = 'config';
 $tab['perms']['default'] = 'View';
 $tab['perms']['edit'] = 'Change';
+$tabhandler['perms']['default'] = 'renderPermissions';
+$tabhandler['perms']['edit'] = 'renderPermissionsEditForm';
 $ophandler['perms']['edit']['revoke'] = 'revokePermission';
 $ophandler['perms']['edit']['grant'] = 'grantPermission';
 
@@ -169,11 +185,13 @@ $tab['portmap']['edit'] = 'Change';
 $ophandler['portmap']['edit']['save'] = 'savePortMap';
 
 $page['attrs']['title'] = 'static_title';
-$page['attrs']['handler'] = 'handler_attrs';
 $page['attrs']['parent'] = 'config';
 $tab['attrs']['default'] = 'View';
 $tab['attrs']['editattrs'] = 'Edit attributes';
 $tab['attrs']['editmap'] = 'Edit map';
+$tabhandler['attrs']['default'] = 'renderAttributes';
+$tabhandler['attrs']['editattrs'] = 'renderEditAttributesForm';
+$tabhandler['attrs']['editmap'] = 'renderEditAttrMapForm';
 $ophandler['attrs']['editattrs']['add'] = 'createAttribute';
 $ophandler['attrs']['editattrs']['upd'] = 'changeAttribute';
 $ophandler['attrs']['editattrs']['del'] = 'deleteAttribute';
@@ -181,11 +199,13 @@ $ophandler['attrs']['editmap']['add'] = 'supplementAttrMap';
 $ophandler['attrs']['editmap']['del'] = 'reduceAttrMap';
 
 $page['dict']['title'] = 'static_title';
-$page['dict']['handler'] = 'handler_dict';
 $page['dict']['parent'] = 'config';
 $tab['dict']['default'] = 'View';
 $tab['dict']['edit'] = 'Edit words';
 $tab['dict']['chapters'] = 'Manage chapters';
+$tabhandler['dict']['default'] = 'renderDictionary';
+$tabhandler['dict']['edit'] = 'renderDictionaryEditor';
+$tabhandler['dict']['chapters'] = 'renderChaptersEditor';
 $ophandler['dict']['edit']['del'] = 'reduceDictionary';
 $ophandler['dict']['edit']['upd'] = 'updateDictionary';
 $ophandler['dict']['edit']['add'] = 'supplementDictionary';
@@ -194,21 +214,23 @@ $ophandler['dict']['chapters']['upd'] = 'updateChapter';
 $ophandler['dict']['chapters']['add'] = 'addChapter';
 
 $page['ui']['title'] = 'static_title';
-$page['ui']['handler'] = 'handler_ui';
 $page['ui']['parent'] = 'config';
 $tab['ui']['default'] = 'View';
 $tab['ui']['edit'] = 'Change';
 $tab['ui']['reset'] = 'Reset';
+$tabhandler['ui']['default'] = 'renderUIConfig';
+$tabhandler['ui']['edit'] = 'renderUIConfigEditForm';
+$tabhandler['ui']['reset'] = 'renderUIResetForm';
 $ophandler['ui']['edit']['upd'] = 'updateUI';
 $ophandler['ui']['reset']['go'] = 'resetUIConfig';
 
 $page['reports']['title'] = 'static_title';
-$page['reports']['handler'] = 'handler_reports';
 $page['reports']['parent'] = 'index';
 $tab['reports']['default'] = 'View';
+$tabhandler['reports']['default'] = 'renderReportSummary';
 
 $page['help']['title'] = 'static_title';
-$page['help']['handler'] = 'handler_help';
+$page['help']['handler'] = 'renderHelpTab';
 $page['help']['parent'] = 'index';
 $tab['help']['default'] = 'Welcome';
 $tab['help']['quickstart'] = 'Quick start';
index d2a7783632b2dc8d54890cc43a417f2752cccb57..f346a9ad97d12d2014e9de4d3fb6460d7952d1eb 100644 (file)
@@ -71,135 +71,12 @@ function assertBoolArg ($argname, $ok_if_empty = FALSE)
        }
 }
 
-function handler_row ($tabno)
-{
-       assertUIntArg ('row_id');
-       switch ($tabno)
-       {
-               case 'default':
-                       renderRow ($_REQUEST['row_id']);
-                       break;
-               case 'newrack':
-                       renderNewRackForm ($_REQUEST['row_id']);
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_row().");
-       }
-}
-
-function handler_rack ($tabno)
-{
-       assertUIntArg ('rack_id');
-       switch ($tabno)
-       {
-               case 'default':
-                       // FIXME: add tab renderer instead of table generator
-                       renderRackPage ($_REQUEST['rack_id']);
-                       break;
-               case 'problems':
-                       renderRackProblems ($_REQUEST['rack_id']);
-                       break;
-               case 'design':
-                       renderRackDesign ($_REQUEST['rack_id']);
-                       break;
-               case 'edit':
-                       renderEditRackForm ($_REQUEST['rack_id']);
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_rack().");
-       }
-}
-
-function handler_objects ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderObjectGroupSummary();
-                       break;
-               case 'newobj':
-                       renderNewObjectForm();
-                       break;
-               case 'newmulti':
-                       renderAddMultipleObjectsForm();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_objects().");
-       }
-}
-
 function handler_objgroup ()
 {
        assertUIntArg ('group_id');
        renderObjectGroup ($_REQUEST['group_id']);
 }
 
-function handler_rackspace ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderRackspace();
-                       break;
-               case 'history':
-                       renderRackspaceHistory ();
-                       break;
-               case 'firstrow':
-                       renderFirstRowForm ();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_rackspace().");
-       }
-}
-
-function handler_ipv4space ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderAddressspace();
-                       break;
-               case 'newrange':
-                       renderAddNewRange();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_ipv4space().");
-       }
-}
-
-function handler_iprange ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderIPRange();
-                       break;
-               case 'properties':
-                       renderIPRangeProperties();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_iprange().");
-       }
-}
-
-function handler_ipaddress ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderIPAddress();
-                       break;
-               case 'properties':
-                       renderIPAddressProperties();
-                       break;
-               case 'assignment':
-                       renderIPAddressAssignment();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_ipaddress().");
-       }
-}
-
 function handler_search ($tabno)
 {
        renderSearchResults();
@@ -217,54 +94,6 @@ function handler_config ($tabno)
        }
 }
 
-function handler_accounts ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderAccounts();
-                       break;
-               case 'edit':
-                       renderAccountsEditForm();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_accounts().");
-       }
-}
-
-function handler_perms ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderPermissions();
-                       break;
-               case 'edit':
-                       renderPermissionsEditForm();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_perms().");
-       }
-}
-
-function handler_ui ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderUIConfig();
-                       break;
-               case 'edit':
-                       renderUIConfigEditForm();
-                       break;
-               case 'reset':
-                       renderUIResetForm();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_ui().");
-       }
-}
-
 function handler_portmap ($tabno)
 {
        switch ($tabno)
@@ -280,57 +109,4 @@ function handler_portmap ($tabno)
        }
 }
 
-function handler_dict ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderDictionary();
-                       break;
-               case 'edit':
-                       renderDictionaryEditor();
-                       break;
-               case 'chapters':
-                       renderChaptersEditor();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_dict().");
-       }
-}
-
-function handler_attrs ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderAttributes();
-                       break;
-               case 'editattrs':
-                       renderEditAttributesForm ();
-                       break;
-               case 'editmap':
-                       renderEditAttrMapForm ();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_attrs().");
-       }
-}
-
-function handler_reports ($tabno)
-{
-       switch ($tabno)
-       {
-               case 'default':
-                       renderReportSummary();
-                       break;
-               default:
-                       showError ("Invalid tab '${tabno}' requested in handler_reports().");
-       }
-}
-
-function handler_help ($tabno)
-{
-       renderHelpTab ($tabno);
-}
-
 ?>