-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial import of V1.0 of IXP Manager
- Loading branch information
Showing
964 changed files
with
329,023 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
1.0 2011-05-26 | ||
- initial release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
/* | ||
* Copyright (C) 2009-2011 Internet Neutral Exchange Association Limited. | ||
* All Rights Reserved. | ||
* | ||
* This file is part of IXP Manager. | ||
* | ||
* IXP Manager is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version v2.0 of the License. | ||
* | ||
* IXP Manager is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License v2.0 | ||
* along with IXP Manager. If not, see: | ||
* | ||
* http://www.gnu.org/licenses/gpl-2.0.html | ||
*/ | ||
|
||
|
||
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap | ||
{ | ||
|
||
/** | ||
* Register the INEX library autoloader | ||
* | ||
* This function ensures that classes from library/INEX are automatically | ||
* loaded from the subdirectories where subdirectories are indicated by | ||
* underscores in the same manner as Zend. | ||
* | ||
*/ | ||
protected function _initINEXAutoLoader() | ||
{ | ||
$autoloader = Zend_Loader_Autoloader::getInstance(); | ||
$autoloader->registerNamespace( 'INEX' ); | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,248 @@ | ||
; | ||
; Copyright (C) 2009-2011 Internet Neutral Exchange Association Limited. | ||
; All Rights Reserved. | ||
; | ||
; This file is part of IXP Manager. | ||
; | ||
; IXP Manager is free software: you can redistribute it and/or modify it | ||
; under the terms of the GNU General Public License as published by the Free | ||
; Software Foundation, version v2.0 of the License. | ||
; | ||
; IXP Manager is distributed in the hope that it will be useful, but WITHOUT | ||
; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
; more details. | ||
; | ||
; You should have received a copy of the GNU General Public License v2.0 | ||
; along with IXP Manager. If not, see: | ||
; | ||
; http://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
[production] | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; Bootstrap Options | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
phpSettings.display_startup_errors = 0 | ||
phpSettings.display_errors = 0 | ||
|
||
includePaths.library = APPLICATION_PATH "/../library" | ||
|
||
; SETME! | ||
includePaths.doctrine = /path/to/Doctrine/lib | ||
|
||
pluginPaths.INEX_Resource = APPLICATION_PATH "/../library/INEX/Resource" | ||
|
||
bootstrap.path = APPLICATION_PATH "/Bootstrap.php" | ||
bootstrap.class = "Bootstrap" | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;; Resources | ||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
|
||
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" | ||
resources.frontController.params.noViewRenderer = 1 | ||
|
||
resources.auth = 1 | ||
|
||
resources.doctrine.connection_string = "mysql://user:pass@host/database" | ||
resources.doctrine.data_fixtures_path = APPLICATION_PATH "/../doctrine/data/fixtures" | ||
resources.doctrine.models_path = APPLICATION_PATH "/models" | ||
resources.doctrine.migrations_path = APPLICATION_PATH "/../doctrine/migrations" | ||
resources.doctrine.sql_path = APPLICATION_PATH "/../doctrine/data/sql" | ||
resources.doctrine.yaml_schema_path = APPLICATION_PATH "/../doctrine/schema" | ||
resources.doctrine.generate_models_options.generateTableClasses = true | ||
|
||
resources.logger.enabled = 1 | ||
resources.logger.writers.email.from = [email protected] | ||
resources.logger.writers.email.to = [email protected] | ||
resources.logger.writers.email.prefix = IXP_ERROR | ||
resources.logger.writers.email.level = 3 | ||
resources.logger.writers.stream.level = 7 | ||
resources.logger.writers.stream.path = APPLICATION_PATH "/../var/log" | ||
resources.logger.writers.stream.owner = www | ||
resources.logger.writers.stream.group = www | ||
|
||
resources.namespace.checkip = 1 | ||
resources.namespace.timeout = 3600 | ||
|
||
resources.session.save_path = APPLICATION_PATH "/../var/session" | ||
resources.session.use_only_cookies = true | ||
resources.session.remember_me_seconds = 3600 | ||
resources.session.name = INEX_IXP | ||
|
||
resources.mailer.smtphost = mail.example.com | ||
; resources.mailer.username = | ||
; resources.mailer.password = | ||
; resources.mailer.auth = login | plain | cram-md5 | ||
|
||
; We use Smarty as the templating engine for IXP | ||
resources.view.templates = APPLICATION_PATH "/views" | ||
resources.view.compiled = APPLICATION_PATH "/../var/templates_c" | ||
resources.view.cache = APPLICATION_PATH "/../var/cache" | ||
resources.view.config = APPLICATION_PATH "/configs/smarty" | ||
resources.view.plugins[] = APPLICATION_PATH "/../library/inex-smarty/functions" | ||
resources.view.plugins[] = "plugins" | ||
resources.view.debugging = 0 | ||
|
||
|
||
; enable zfdebug plugin | ||
resources.zfdebug.enabled = false | ||
resources.zfdebug.plugins[] = "Variables" | ||
resources.zfdebug.plugins.File.base_path = APPLICATION_PATH "/../" | ||
resources.zfdebug.plugins[] = "Database" | ||
resources.zfdebug.plugins[] = "Memory" | ||
resources.zfdebug.plugins[] = "Time" | ||
resources.zfdebug.plugins[] = "Registry" | ||
resources.zfdebug.plugins[] = "Exception" | ||
resources.zfdebug.users[] = "user1" | ||
resources.zfdebug.users[] = "user2" | ||
|
||
|
||
identity.orgname = "An IXP" | ||
identity.name = "Another IXP Operations" | ||
identity.email = "[email protected]" | ||
identity.testemail = "[email protected]" | ||
identity.autobot.name = "IXP Ops Autobot" | ||
identity.autobot.email = "[email protected]" | ||
identity.ixp.fullname = "Another IXP's Manager" | ||
identity.ixp.url = "https://www.example.com/ixp/" | ||
identity.ixp.logo = APPLICATION_PATH "/../public/images/mylogo.jpg | ||
|
||
|
||
sms.clickatell.username = "user" | ||
sms.clickatell.password = "pass" | ||
sms.clickatell.api_id = "appid" | ||
sms.clickatell.sender_id = "IXP_NAME" | ||
|
||
|
||
; MRTG Parameters | ||
mrtg.path = http://www.example.com/mrtg/members | ||
|
||
mrtg.traffic_graphs[] = "aggregate::Aggregate Graphs" | ||
mrtg.traffic_graphs[] = "network1::IXP Infrastructure #1" | ||
mrtg.traffic_graphs[] = "network2::IXP Infrastructure #2" | ||
|
||
mrtg.trunk_graphs[] = "core-pop1-pop2-lan1::PoP 1 to PoP 2 (LAN1)" | ||
|
||
; LANs for public and 'my' peering matric. | ||
peering_matrix.public.0.name = "Public Peering LAN #1" | ||
peering_matrix.public.0.number = 10 | ||
peering_matrix.public.0.table = "/path/to/peering-matrix/public-vlan10-ipv4.html" | ||
peering_matrix.public.1.name = "Public Peering LAN #2" | ||
peering_matrix.public.1.number = 12 | ||
peering_matrix.public.1.table = "/path/to/peering-matrix/public-vlan12-ipv4.html" | ||
|
||
; details for the primary / only / main peering LAN | ||
primary_peering_lan.vlan_tag = 10 | ||
|
||
; Change Log Facility | ||
change_log.enabled = 1 | ||
|
||
|
||
;; IXP Tool / CLI Settings | ||
|
||
cli.traffic_differentials.stddev_calc_length = 60 | ||
cli.traffic_differentials.from_email = "[email protected]" | ||
cli.traffic_differentials.from_name = "Another IXP Operations" | ||
cli.traffic_differentials.subject = "Another IXP Traffic Differentials" | ||
cli.traffic_differentials.recipients[] = "[email protected]" | ||
cli.traffic_differentials.recipients[] = "[email protected]" | ||
|
||
cli.port_utilisation.threshold = 0.8 | ||
cli.port_utilisation.from_email = "[email protected]" | ||
cli.port_utilisation.from_name = "Another IXP Operations" | ||
cli.port_utilisation.subject = "IXP Port Utilisation Report" | ||
cli.port_utilisation.recipients[] = "[email protected]" | ||
cli.port_utilisation.recipients[] = "[email protected]" | ||
|
||
;; Meeting RSVP Handler | ||
meeting.rsvp_to_email = "[email protected]" | ||
meeting.rsvp_to_name = "Meeting Administrator" | ||
|
||
|
||
|
||
;; SEC (Simple Event Correlator) Handler Settings | ||
|
||
sec.pagers[] = "353861234567" | ||
sec.pagers[] = "353871234567" | ||
|
||
|
||
; alert_customers must be true for cc_opsauto to have an effect | ||
sec.bgp_auth.alert_customers = true | ||
sec.bgp_auth.cc_opsauto = false | ||
sec.bgp_auth.alert_operations = false | ||
|
||
; alert_customers must be true for cc_opsauto to have an effect | ||
sec.port_updown.alert_customers = true | ||
sec.port_updown.cc_opsauto = false | ||
sec.port_updown.alert_operations = false | ||
|
||
; alert_customers must be true for cc_opsauto to have an effect | ||
sec.security_violation.alert_customers = true | ||
sec.security_violation.cc_opsauto = false | ||
sec.security_violation.alert_operations = false | ||
|
||
|
||
|
||
menu.staff_links.cacti.name = "Cacti" | ||
menu.staff_links.cacti.link = "https://www.example.com/cacti/" | ||
|
||
menu.staff_links.ipplan.name = "IP Plan" | ||
menu.staff_links.ipplan.link = "https://www.example.com/ipplan/" | ||
|
||
|
||
[staging : production] | ||
|
||
|
||
[testing : production] | ||
|
||
phpSettings.display_startup_errors = 1 | ||
phpSettings.display_errors = 1 | ||
|
||
resources.logger.writers.firebug.enabled = 1 | ||
resources.logger.writers.firebug.level = 7 | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
[development : production] | ||
|
||
phpSettings.display_startup_errors = 1 | ||
phpSettings.display_errors = 1 | ||
|
||
includePaths.doctrine = APPLICATION_PATH "/../library/Doctrine" | ||
|
||
|
||
resources.doctrine.connection_string = "mysql://user:pass@host/database" | ||
|
||
|
||
resources.logger.writers.firebug.enabled = 1 | ||
resources.logger.writers.firebug.level = 7 | ||
resources.logger.writers.stream.owner = www-data | ||
resources.logger.writers.stream.group = www-data | ||
|
||
resources.mailer.smtphost = "mail.example.com" | ||
|
||
resources.view.debugging = 0 | ||
|
||
resources.namespace.timeout = 3000 | ||
resources.session.remember_me_seconds = 3000 | ||
|
||
identity.ixp.url = "http://127.0.0.1/ixp/" | ||
|
||
[clidev : development] | ||
|
||
resources.zfdebug.enabled = false | ||
|
||
[productioncli : production] | ||
|
||
resources.zfdebug.enabled = false | ||
|
||
phpSettings.display_startup_errors = 1 | ||
phpSettings.display_errors = 1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?php | ||
|
||
/* | ||
* Copyright (C) 2009-2011 Internet Neutral Exchange Association Limited. | ||
* All Rights Reserved. | ||
* | ||
* This file is part of IXP Manager. | ||
* | ||
* IXP Manager is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation, version v2.0 of the License. | ||
* | ||
* IXP Manager is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License v2.0 | ||
* along with IXP Manager. If not, see: | ||
* | ||
* http://www.gnu.org/licenses/gpl-2.0.html | ||
*/ | ||
|
||
|
||
/** | ||
* CustAdminController | ||
* | ||
* @author | ||
* @version | ||
*/ | ||
|
||
class AdminController extends INEX_Controller_Action | ||
{ | ||
|
||
|
||
public function preDispatch() | ||
{ | ||
// let's get the user's details sorted before everything else | ||
if( !$this->identity ) | ||
$this->_redirect( 'auth/login' ); | ||
else if( $this->user->privs != User::AUTH_SUPERUSER ) | ||
{ | ||
$this->view->message = new INEX_Message( | ||
"You must be an administrator to access this page. This attempt to access private and " | ||
. "secure sections of the site has been recorded and our administrators alerted.", | ||
INEX_Message::MESSAGE_TYPE_ERROR | ||
); | ||
|
||
$this->logger->alert( $this->user->username . " tried to access the admin controller without sufficient permissions" ); | ||
|
||
Zend_Session::destroy( true, true ); | ||
|
||
$this->_forward( 'login', 'auth' ); | ||
return false; | ||
} | ||
|
||
} | ||
|
||
|
||
/** | ||
* The default action - show the home page | ||
*/ | ||
public function indexAction() | ||
{ | ||
$this->_forward( 'index' ); | ||
} | ||
|
||
|
||
public function staticAction() | ||
{ | ||
$page = $this->_request->getParam( 'page', null ); | ||
|
||
if( $page == null ) | ||
return( $this->_redirect( 'index' ) ); | ||
|
||
// does the requested static page exist? And if so, display it | ||
if( preg_match( '/^[a-zA-Z0-9\-]+$/', $page ) > 0 | ||
&& file_exists( APPLICATION_PATH . "/views/admin/static/{$page}.tpl" ) ) | ||
{ | ||
$this->view->display( "admin/static/{$page}.tpl" ); | ||
} | ||
else | ||
{ | ||
$this->session->message = new INEX_Message( | ||
"The requested page was not found.", | ||
INEX_Message::MESSAGE_TYPE_ERROR | ||
); | ||
$this->_redirect( 'index' ); | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.