main.itop-config-mgmt.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. // Note (RQ) :
  19. // After 1.0.1, the welcome page and menus have been removed from the application
  20. // and put into a separate module "itop-welcome-itil"
  21. // Until we develop a migration utility, and as would like to preserve the
  22. // capability to upgrade iTop without any manual operation, we have decided to
  23. // implement this dirty workaround that makes it...
  24. //////////////require_once(APPROOT.'modules/itop-welcome-itil/model.itop-welcome-itil.php');
  25. // Starting with iTop 1.2 you can restrict the list of organizations displayed in the drop-down list
  26. // by specifying a query as shown below. Note that this is NOT a security settings, since the
  27. // choice 'All Organizations' will always be available in the menu
  28. ApplicationMenu::SetFavoriteSiloQuery('SELECT Organization');
  29. $oAdminMenu = new MenuGroup('DataAdministration', 70 /* fRank */, 'Organization', UR_ACTION_MODIFY, UR_ALLOWED_YES|UR_ALLOWED_DEPENDS);
  30. $iAdminGroup = $oAdminMenu->GetIndex();
  31. new WebPageMenuNode('Audit', utils::GetAbsoluteUrlAppRoot().'pages/audit.php', $iAdminGroup, 33 /* fRank */);
  32. $oTypologyNode = new TemplateMenuNode('Catalogs', '', $iAdminGroup, 50 /* fRank */);
  33. $iTopology = $oTypologyNode->GetIndex();
  34. new OQLMenuNode('Organization', 'SELECT Organization', $iTopology, 10 /* fRank */, true /* bSearch */);
  35. new OQLMenuNode('Application', 'SELECT Application', $iTopology, 20 /* fRank */);
  36. new OQLMenuNode('DBServer', 'SELECT DBServer', $iTopology, 40 /* fRank */);
  37. $oConfigManagementGroup = new MenuGroup('ConfigManagement', 20 /* fRank */);
  38. // Create an entry, based on a custom template, for the Configuration management overview, under the top-level group
  39. new TemplateMenuNode('ConfigManagementOverview', dirname(__FILE__).'/overview.html', $oConfigManagementGroup->GetIndex(), 0 /* fRank */);
  40. $oContactNode = new TemplateMenuNode('Contact', dirname(__FILE__).'/contacts_menu.html', $oConfigManagementGroup->GetIndex(), 1 /* fRank */);
  41. new NewObjectMenuNode('NewContact', 'Contact', $oContactNode->GetIndex(), 1 /* fRank */);
  42. new SearchMenuNode('SearchContacts', 'Contact', $oContactNode->GetIndex(), 2 /* fRank */);
  43. new OQLMenuNode('Document', 'SELECT Document', $oConfigManagementGroup->GetIndex(), 2 /* fRank */, true /* bSearch */);
  44. new OQLMenuNode('Location', 'SELECT Location', $oConfigManagementGroup->GetIndex(), 3 /* fRank */, true /* bSearch */);
  45. new OQLMenuNode('Group', 'SELECT Group', $oConfigManagementGroup->GetIndex(), 4 /* fRank */, true /* bSearch */);
  46. $oCINode = new TemplateMenuNode('ConfigManagementCI', dirname(__FILE__).'/cis_menu.html', $oConfigManagementGroup->GetIndex(), 5 /* fRank */);
  47. new NewObjectMenuNode('NewCI', 'FunctionalCI', $oCINode->GetIndex(), 0 /* fRank */);
  48. new SearchMenuNode('SearchCIs', 'FunctionalCI', $oCINode->GetIndex(), 1 /* fRank */);
  49. $oShortcutsNode = new TemplateMenuNode('ConfigManagement:Shortcuts', '', $oConfigManagementGroup->GetIndex(), 6 /* fRank */);
  50. new OQLMenuNode('Server', 'SELECT Server', $oShortcutsNode->GetIndex(), 1 /* fRank */);
  51. new OQLMenuNode('NetworkDevice', 'SELECT NetworkDevice', $oShortcutsNode->GetIndex(), 2 /* fRank */);
  52. new OQLMenuNode('Printer', 'SELECT Printer', $oShortcutsNode->GetIndex(), 3 /* fRank */);
  53. new OQLMenuNode('PC', 'SELECT PC', $oShortcutsNode->GetIndex(), 4 /* fRank */);
  54. new OQLMenuNode('BusinessProcess', 'SELECT BusinessProcess', $oShortcutsNode->GetIndex(), 5 /* fRank */);
  55. new OQLMenuNode('ApplicationSolution', 'SELECT ApplicationSolution', $oShortcutsNode->GetIndex(), 6 /* fRank */);
  56. ?>