add basic integrity checks for config variables
[racktables] / wwwroot / inc / navigation.php
index e252a4e..d64c407 100644 (file)
@@ -6,7 +6,7 @@
 
 /*
 
-This file contains a series of arrays, which define RackTables as a tree
+This file contains a series of arrays that define RackTables as a tree
 of discrete views ("pages"). Each such page may be in turn split info a set of
 "tabs". In the latter case it is also possible to define a set of "operations"
 for a particular combination of page and tab (location). These operations
@@ -15,7 +15,7 @@ provided to be executed correctly (constraints on the additional data are
 defined and validated in ophandlers.php).
 
 Every page split into tabs must define a tab internally named "default". It is
-assumed, that this default tab never defines any operations and thus remains
+assumed that this default tab never defines any operations and thus remains
 read-only.
 
 */
@@ -86,7 +86,7 @@ $ophandler['depot']['addmore']['addLotOfObjects'] = 'addLotOfObjects';
 $ophandler['depot']['addmore']['deleteObject'] = 'deleteObject';
 
 $page['location']['bypass'] = 'location_id';
-$page['location']['bypass_type'] = 'uint';
+$page['location']['bypass_type'] = 'natural';
 $page['location']['parent'] = 'rackspace';
 $tab['location']['default'] = 'View';
 $tab['location']['edit'] = 'Properties';
@@ -110,7 +110,7 @@ $ophandler['location']['files']['linkFile'] = 'linkFileToEntity';
 $ophandler['location']['files']['unlinkFile'] = 'unlinkFile';
 
 $page['row']['bypass'] = 'row_id';
-$page['row']['bypass_type'] = 'uint';
+$page['row']['bypass_type'] = 'natural';
 $page['row']['parent'] = 'rackspace';
 $tab['row']['default'] = 'View';
 $tab['row']['edit'] = 'Properties';
@@ -138,7 +138,7 @@ $ophandler['row']['files']['linkFile'] = 'linkFileToEntity';
 $ophandler['row']['files']['unlinkFile'] = 'unlinkFile';
 
 $page['rack']['bypass'] = 'rack_id';
-$page['rack']['bypass_type'] = 'uint';
+$page['rack']['bypass_type'] = 'natural';
 $page['rack']['parent'] = 'row';
 $tab['rack']['default'] = 'View';
 $tab['rack']['edit'] = 'Properties';
@@ -169,7 +169,7 @@ $ophandler['rack']['files']['linkFile'] = 'linkFileToEntity';
 $ophandler['rack']['files']['unlinkFile'] = 'unlinkFile';
 
 $page['object']['bypass'] = 'object_id';
-$page['object']['bypass_type'] = 'uint';
+$page['object']['bypass_type'] = 'natural';
 $page['object']['bypass_tabs'] = array ('hl_port_id', 'hl_ip');
 $page['object']['parent'] = 'depot';
 $tab['object']['default'] = 'View';
@@ -193,8 +193,6 @@ $tab['object']['ucs'] = 'UCS';
 $tab['object']['8021qorder'] = '802.1Q order';
 $tab['object']['8021qports'] = '802.1Q ports';
 $tab['object']['8021qsync'] = '802.1Q sync';
-$tab['object']['cacti'] = 'Cacti Graphs';
-$tab['object']['munin'] = 'Munin Graphs';
 $tabhandler['object']['default'] = 'renderObject';
 $tabhandler['object']['edit'] = 'renderEditObjectForm';
 $tabhandler['object']['log'] = 'renderObjectLogEditor';
@@ -215,8 +213,6 @@ $tabhandler['object']['editvslinks'] = 'renderTripletForm';
 $tabhandler['object']['8021qorder'] = 'render8021QOrderForm';
 $tabhandler['object']['8021qports'] = 'renderObject8021QPorts';
 $tabhandler['object']['8021qsync'] = 'renderObject8021QSync';
-$tabhandler['object']['cacti'] = 'renderObjectCactiGraphs';
-$tabhandler['object']['munin'] = 'renderObjectMuninGraphs';
 $tabhandler['object']['ucs'] = 'renderEditUCSForm';
 $trigger['object']['rackspace'] = 'trigger_rackspace';
 $trigger['object']['ports'] = 'trigger_ports';
@@ -234,8 +230,6 @@ $trigger['object']['tags'] = 'trigger_tags';
 $trigger['object']['8021qorder'] = 'trigger_object_8021qorder';
 $trigger['object']['8021qports'] = 'trigger_object_8021qports';
 $trigger['object']['8021qsync'] = 'trigger_object_8021qsync';
-$trigger['object']['cacti'] = 'triggerCactiGraphs';
-$trigger['object']['munin'] = 'triggerMuninGraphs';
 $trigger['object']['ucs'] = 'trigger_ucs';
 $ophandler['object']['edit']['linkObjects'] = 'linkObjects';
 $ophandler['object']['edit']['unlinkObjects'] = 'tableHandler';
@@ -284,10 +278,6 @@ $ophandler['object']['8021qsync']['exec8021QPull'] = 'process8021QSyncRequest';
 $ophandler['object']['8021qsync']['exec8021QPush'] = 'process8021QSyncRequest';
 $ophandler['object']['8021qsync']['resolve8021QConflicts'] = 'resolve8021QConflicts';
 $ophandler['object']['8021qsync']['updPortList'] = 'update8021QPortList';
-$ophandler['object']['cacti']['add'] = 'tableHandler';
-$ophandler['object']['cacti']['del'] = 'tableHandler';
-$ophandler['object']['munin']['add'] = 'tableHandler';
-$ophandler['object']['munin']['del'] = 'tableHandler';
 $ophandler['object']['ucs']['autoPopulateUCS'] = 'autoPopulateUCS';
 $ophandler['object']['ucs']['cleanupUCS'] = 'cleanupUCS';
 $delayauth['object-8021qports-save8021QConfig'] = TRUE;
@@ -319,7 +309,7 @@ $ophandler['ipv6space']['manage']['del'] = 'delIPv6Prefix';
 
 $page['ipv4net']['parent'] = 'ipv4space';
 $page['ipv4net']['bypass'] = 'id';
-$page['ipv4net']['bypass_type'] = 'uint';
+$page['ipv4net']['bypass_type'] = 'natural';
 $page['ipv4net']['bypass_tabs'] = array ('pg');
 $tab['ipv4net']['default'] = 'Browse';
 $tab['ipv4net']['properties'] = 'Properties';
@@ -348,7 +338,7 @@ $interface_requires['ipv4net-8021q'] = 'interface-8021q.php';
 
 $page['ipv6net']['parent'] = 'ipv6space';
 $page['ipv6net']['bypass'] = 'id';
-$page['ipv6net']['bypass_type'] = 'uint';
+$page['ipv6net']['bypass_type'] = 'natural';
 $tab['ipv6net']['default'] = 'Browse';
 $tab['ipv6net']['properties'] = 'Properties';
 $tab['ipv6net']['tags'] = 'Tags';
@@ -415,7 +405,7 @@ $ophandler['ipv4slb']['defconfig']['save'] = 'updateSLBDefConfig';
 
 $page['ipv4vs']['parent'] = 'ipv4slb:default';
 $page['ipv4vs']['bypass'] = 'vs_id';
-$page['ipv4vs']['bypass_type'] = 'uint';
+$page['ipv4vs']['bypass_type'] = 'natural';
 $tab['ipv4vs']['default'] = 'View';
 $tab['ipv4vs']['edit'] = 'Edit';
 $tab['ipv4vs']['editlblist'] = 'VS links';
@@ -439,7 +429,7 @@ $ophandler['ipv4vs']['files']['unlinkFile'] = 'unlinkFile';
 
 $page['ipvs']['parent'] = 'ipv4slb:vs';
 $page['ipvs']['bypass'] = 'vs_id';
-$page['ipvs']['bypass_type'] = 'uint';
+$page['ipvs']['bypass_type'] = 'natural';
 $tab['ipvs']['default'] = 'View';
 $tab['ipvs']['edit'] = 'Edit';
 $tab['ipvs']['editvslinks'] = 'VSG links';
@@ -474,7 +464,7 @@ $trigger['ipvs']['convert'] = 'trigger_ipvs_convert';
 
 $page['ipv4rspool']['parent'] = 'ipv4slb:rspools';
 $page['ipv4rspool']['bypass'] = 'pool_id';
-$page['ipv4rspool']['bypass_type'] = 'uint';
+$page['ipv4rspool']['bypass_type'] = 'natural';
 $tab['ipv4rspool']['default'] = 'View';
 $tab['ipv4rspool']['edit'] = 'Edit';
 $tab['ipv4rspool']['editlblist'] = 'VS links';
@@ -526,11 +516,12 @@ $tabhandler['userlist']['default'] = 'renderUserList';
 $tabhandler['userlist']['edit'] = 'renderUserListEditor';
 $ophandler['userlist']['edit']['updateUser'] = 'updateUser';
 $ophandler['userlist']['edit']['createUser'] = 'createUser';
+$ophandler['userlist']['edit']['deleteUser'] = 'deleteUser';
 $interface_requires['userlist-*'] = 'interface-config.php';
 
 $page['user']['parent'] = 'userlist';
 $page['user']['bypass'] = 'user_id';
-$page['user']['bypass_type'] = 'uint';
+$page['user']['bypass_type'] = 'natural';
 $tab['user']['default'] = 'View';
 $tab['user']['properties'] = 'Properties';
 $tab['user']['tags'] = 'Tags';
@@ -628,7 +619,7 @@ $interface_requires['dict-*'] = 'interface-config.php';
 
 $page['chapter']['parent'] = 'dict';
 $page['chapter']['bypass'] = 'chapter_no';
-$page['chapter']['bypass_type'] = 'uint';
+$page['chapter']['bypass_type'] = 'natural';
 $tab['chapter']['default'] = 'View';
 $tab['chapter']['edit'] = 'Edit';
 $tabhandler['chapter']['default'] = 'renderChapter';
@@ -647,20 +638,23 @@ $tabhandler['ui']['default'] = 'renderUIConfig';
 $tabhandler['ui']['edit'] = 'renderConfigEditor';
 $tabhandler['ui']['reset'] = 'renderUIResetForm';
 $ophandler['ui']['edit']['upd'] = 'updateUI';
-$ophandler['ui']['reset']['go'] = 'resetUIConfig';
+$ophandler['ui']['reset']['resetUIConfig'] = 'resetUIConfig';
 $interface_requires['ui-*'] = 'interface-config.php';
 
 $page['tagtree']['title'] = 'Tag tree';
 $page['tagtree']['parent'] = 'config';
 $tab['tagtree']['default'] = 'View';
-$tab['tagtree']['edit'] = 'Edit';
+$tab['tagtree']['edit'] = 'Edit tree';
+$tab['tagtree']['descriptions'] = 'Edit descriptions';
 $tab['tagtree']['resolve'] = 'Circular references';
 $tabhandler['tagtree']['default'] = 'renderTagTree';
 $tabhandler['tagtree']['edit'] = 'renderTagTreeEditor';
+$tabhandler['tagtree']['descriptions'] = 'renderTagDescriptionsEditor';
 $tabhandler['tagtree']['resolve'] = 'renderGraphCycleResolver';
 $ophandler['tagtree']['edit']['createTag'] = 'tableHandler';
 $ophandler['tagtree']['edit']['destroyTag'] = 'tableHandler';
 $ophandler['tagtree']['edit']['updateTag'] = 'updateTag';
+$ophandler['tagtree']['descriptions']['updTagDescr'] = 'tableHandler';
 $ophandler['tagtree']['resolve']['updateTag'] = 'updateTag';
 $trigger['tagtree']['resolve'] = 'triggerGraphCycleResolver';
 $interface_requires['tagtree-*'] = 'interface-config.php';
@@ -682,28 +676,6 @@ $ophandler['myaccount']['interface']['reset'] = 'resetMyPreference';
 $ophandler['myaccount']['qlinks']['save'] = 'saveQuickLinks';
 $interface_requires['myaccount-*'] = 'interface-config.php';
 
-$page['cacti']['title'] = 'Cacti';
-$page['cacti']['parent'] = 'config';
-$tab['cacti']['default'] = 'View';
-$tab['cacti']['servers'] = 'Manage servers';
-$tabhandler['cacti']['default'] = 'renderCactiConfig';
-$tabhandler['cacti']['servers'] = 'renderCactiServersEditor';
-$ophandler['cacti']['servers']['add'] = 'tableHandler';
-$ophandler['cacti']['servers']['del'] = 'tableHandler';
-$ophandler['cacti']['servers']['upd'] = 'tableHandler';
-$interface_requires['cacti-*'] = 'interface-config.php';
-
-$page['munin']['title'] = 'Munin';
-$page['munin']['parent'] = 'config';
-$tab['munin']['default'] = 'View';
-$tab['munin']['servers'] = 'Manage servers';
-$tabhandler['munin']['default'] = 'renderMuninConfig';
-$tabhandler['munin']['servers'] = 'renderMuninServersEditor';
-$ophandler['munin']['servers']['add'] = 'tableHandler';
-$ophandler['munin']['servers']['del'] = 'tableHandler';
-$ophandler['munin']['servers']['upd'] = 'tableHandler';
-$interface_requires['munin-*'] = 'interface-config.php';
-
 $page['cableconf']['title'] = 'Patch cables';
 $page['cableconf']['parent'] = 'config';
 $tab['cableconf']['default'] = 'View';
@@ -730,26 +702,19 @@ $interface_requires['cableconf-*'] = 'interface-cables.php';
 
 $page['reports']['title'] = 'Reports';
 $page['reports']['parent'] = 'index';
-$tab['reports']['default'] = 'System';
-$tab['reports']['rackcode'] = 'RackCode';
-$tab['reports']['ipv4'] = 'IPv4';
-$tab['reports']['ipv6'] = 'IPv6';
-$tab['reports']['ports'] = 'Ports';
+$tab['reports']['default'] = 'Totals';
 $tab['reports']['8021q'] = '802.1Q';
 $tab['reports']['warranty'] = 'Expirations';
 $tab['reports']['integrity'] = 'Data Integrity';
-$tab['reports']['local'] = 'local'; // this one is set later in init.php
-$trigger['reports']['local'] = 'trigger_localreports';
+$tab['reports']['serverconf'] = 'Server configuration';
 $tabhandler['reports']['default'] = 'renderSystemReports';
-$tabhandler['reports']['rackcode'] = 'renderRackCodeReports';
-$tabhandler['reports']['ipv4'] = 'renderIPv4Reports';
-$tabhandler['reports']['ipv6'] = 'renderIPv6Reports';
-$tabhandler['reports']['ports'] = 'renderPortsReport';
 $tabhandler['reports']['8021q'] = 'render8021QReport';
 $tabhandler['reports']['warranty'] = 'renderExpirations';
 $tabhandler['reports']['integrity'] = 'renderDataIntegrityReport';
-$tabhandler['reports']['local'] = 'renderLocalReports';
-$interface_requires['reports-rackcode'] = 'code.php';
+$tabhandler['reports']['serverconf'] = 'renderServerConfigurationReport';
+$interface_requires['reports-default'] = 'code.php';
+$interface_requires['reports-serverconf'] = 'dictionary.php';
+$interface_requires['reports-integrity'] = 'dictionary.php';
 $interface_requires['reports-*'] = 'interface-reports.php';
 
 $page['files']['title'] = 'Files';
@@ -763,7 +728,7 @@ $ophandler['files']['manage']['unlinkFile'] = 'unlinkFile';
 $ophandler['files']['manage']['deleteFile'] = 'deleteFile';
 
 $page['file']['bypass'] = 'file_id';
-$page['file']['bypass_type'] = 'uint';
+$page['file']['bypass_type'] = 'natural';
 $page['file']['parent'] = 'files';
 $tab['file']['default'] = 'View';
 $tab['file']['edit'] = 'Properties';
@@ -802,7 +767,7 @@ $interface_requires['8021q-*'] = 'interface-8021q.php';
 
 $page['vlandomain']['parent'] = '8021q';
 $page['vlandomain']['bypass'] = 'vdom_id';
-$page['vlandomain']['bypass_type'] = 'uint';
+$page['vlandomain']['bypass_type'] = 'natural';
 $tab['vlandomain']['default'] = 'View';
 $tab['vlandomain']['vlanlist'] = 'VLAN list';
 $tab['vlandomain']['8021qorder'] = '802.1Q orders';
@@ -843,7 +808,7 @@ $interface_requires['vlan-*'] = 'interface-8021q.php';
 
 $page['vst']['parent'] = '8021q';
 $page['vst']['bypass'] = 'vst_id';
-$page['vst']['bypass_type'] = 'uint';
+$page['vst']['bypass_type'] = 'natural';
 $tab['vst']['default'] = 'View';
 $tab['vst']['editrules'] = 'Edit';
 $tab['vst']['8021qorder'] = '802.1Q orders';
@@ -898,6 +863,19 @@ $ophandler['cables']['amount']['inc'] = 'replenishPatchCable';
 $ophandler['cables']['amount']['set'] = 'setPatchCableAmount';
 $interface_requires['cables-*'] = 'interface-cables.php';
 
+$page['plugins']['title'] = 'Plugins';
+$page['plugins']['parent'] = 'config';
+$tab['plugins']['default'] = 'View';
+$tab['plugins']['edit'] = 'Edit';
+$tabhandler['plugins']['default'] = 'renderPluginConfig';
+$tabhandler['plugins']['edit'] = 'renderPluginEditor';
+$ophandler['plugins']['edit']['install'] = 'installPlugin';
+$ophandler['plugins']['edit']['uninstall'] = 'uninstallPlugin';
+$ophandler['plugins']['edit']['enable'] = 'tableHandler';
+$ophandler['plugins']['edit']['disable'] = 'tableHandler';
+$ophandler['plugins']['edit']['upgrade'] = 'upgradePlugin';
+$interface_requires['plugins-*'] = 'interface-config.php';
+
 $ajaxhandler['get-parent-node-options'] = 'getParentNodeOptionsAJAX';
 $ajaxhandler['get-location-select'] = 'getLocationSelectAJAX';
 $ajaxhandler['verifyCode'] = 'verifyCodeAJAX';
@@ -918,5 +896,3 @@ $ajaxhandler['autocomplete'] = 'getAutocompleteListAJAX';
 $popuphandler['objlist'] = 'renderPopupObjectSelector';
 $popuphandler['portlist'] = 'renderPopupPortSelector';
 $popuphandler['inet4list'] = 'renderPopupIPv4Selector';
-
-?>