main.itop-config-mgmt.php 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. // Copyright (C) 2010 Combodo SARL
  3. //
  4. // This program is free software; you can redistribute it and/or modify
  5. // it under the terms of the GNU General Public License as published by
  6. // the Free Software Foundation; version 3 of the License.
  7. //
  8. // This program is distributed in the hope that it will be useful,
  9. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. // GNU General Public License for more details.
  12. //
  13. // You should have received a copy of the GNU General Public License
  14. // along with this program; if not, write to the Free Software
  15. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. MetaModel::RegisterRelation("impacts", array("description"=>"Objects impacted by", "verb_down"=>"impacts", "verb_up"=>"depends on"));
  17. MetaModel::RegisterRelation("depends on", array("description"=>"That impacts ", "verb_down"=>"depends on", "verb_up"=>"impacts"));
  18. // Starting with iTop 1.2 you can restrict the list of organizations displayed in the drop-down list
  19. // by specifying a query as shown below. Note that this is NOT a security settings, since the
  20. // choice 'All Organizations' will always be available in the menu
  21. ApplicationMenu::SetFavoriteSiloQuery('SELECT Organization');
  22. $oAdminMenu = new MenuGroup('DataAdministration', 70 /* fRank */, 'Organization', UR_ACTION_MODIFY, UR_ALLOWED_YES|UR_ALLOWED_DEPENDS);
  23. $iAdminGroup = $oAdminMenu->GetIndex();
  24. new WebPageMenuNode('Audit', utils::GetAbsoluteUrlAppRoot().'pages/audit.php', $iAdminGroup, 33 /* fRank */);
  25. $oTypologyNode = new TemplateMenuNode('Catalogs', '', $iAdminGroup, 50 /* fRank */);
  26. $iTopology = $oTypologyNode->GetIndex();
  27. new OQLMenuNode('Organization', 'SELECT Organization', $iTopology, 10 /* fRank */, true /* bSearch */);
  28. new OQLMenuNode('Application', 'SELECT Application', $iTopology, 20 /* fRank */);
  29. new OQLMenuNode('DBServer', 'SELECT DBServer', $iTopology, 40 /* fRank */);
  30. $oConfigManagementGroup = new MenuGroup('ConfigManagement', 20 /* fRank */);
  31. // Create an entry, based on a custom template, for the Configuration management overview, under the top-level group
  32. new TemplateMenuNode('ConfigManagementOverview', dirname(__FILE__).'/overview.html', $oConfigManagementGroup->GetIndex(), 0 /* fRank */);
  33. $oContactNode = new TemplateMenuNode('Contact', dirname(__FILE__).'/contacts_menu.html', $oConfigManagementGroup->GetIndex(), 1 /* fRank */);
  34. new NewObjectMenuNode('NewContact', 'Contact', $oContactNode->GetIndex(), 1 /* fRank */);
  35. new SearchMenuNode('SearchContacts', 'Contact', $oContactNode->GetIndex(), 2 /* fRank */);
  36. new OQLMenuNode('Document', 'SELECT Document', $oConfigManagementGroup->GetIndex(), 2 /* fRank */, true /* bSearch */);
  37. new OQLMenuNode('Location', 'SELECT Location', $oConfigManagementGroup->GetIndex(), 3 /* fRank */, true /* bSearch */);
  38. new OQLMenuNode('Group', 'SELECT Group', $oConfigManagementGroup->GetIndex(), 4 /* fRank */, true /* bSearch */);
  39. $oCINode = new TemplateMenuNode('ConfigManagementCI', dirname(__FILE__).'/cis_menu.html', $oConfigManagementGroup->GetIndex(), 5 /* fRank */);
  40. new NewObjectMenuNode('NewCI', 'FunctionalCI', $oCINode->GetIndex(), 0 /* fRank */);
  41. new SearchMenuNode('SearchCIs', 'FunctionalCI', $oCINode->GetIndex(), 1 /* fRank */);
  42. $oShortcutsNode = new TemplateMenuNode('ConfigManagement:Shortcuts', '', $oConfigManagementGroup->GetIndex(), 6 /* fRank */);
  43. new OQLMenuNode('Server', 'SELECT Server', $oShortcutsNode->GetIndex(), 1 /* fRank */);
  44. new OQLMenuNode('NetworkDevice', 'SELECT NetworkDevice', $oShortcutsNode->GetIndex(), 2 /* fRank */);
  45. new OQLMenuNode('Printer', 'SELECT Printer', $oShortcutsNode->GetIndex(), 3 /* fRank */);
  46. new OQLMenuNode('PC', 'SELECT PC', $oShortcutsNode->GetIndex(), 4 /* fRank */);
  47. new OQLMenuNode('BusinessProcess', 'SELECT BusinessProcess', $oShortcutsNode->GetIndex(), 5 /* fRank */);
  48. new OQLMenuNode('ApplicationSolution', 'SELECT ApplicationSolution', $oShortcutsNode->GetIndex(), 6 /* fRank */);
  49. ?>