Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
barryo committed Aug 15, 2012
2 parents b625ff9 + 18f46a3 commit ecb6149a254650090ec9e202dd4f3c1e57211a94
@@ -3,21 +3,21 @@
/*
* 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
*/
@@ -119,7 +119,8 @@ public function addUserAction()
}
$form = new INEX_Form_User( null, $isEdit,
- Zend_Controller_Front::getInstance()->getBaseUrl() . "/cust-admin"
+ Zend_Controller_Front::getInstance()->getBaseUrl() . "/cust-admin",
+ true
);
if( $this->_request->getParam( 'commit', null ) != 1 )
@@ -131,8 +132,6 @@ public function addUserAction()
$form->getElement( 'disabled' )->setChecked( true );
}
- $form->getElement( 'username' )->setAttrib( 'readonly', '1' );
-
$form->setAction( Zend_Controller_Front::getInstance()->getBaseUrl() . "/cust-admin/edit-user/id/" . $u->id );
$form->getElement( 'submit' )->setLabel( 'Save Changes' );
}
@@ -141,23 +140,10 @@ public function addUserAction()
$isEdit = false;
$form = new INEX_Form_User( null, $isEdit,
- Zend_Controller_Front::getInstance()->getBaseUrl() . "/cust-admin"
+ Zend_Controller_Front::getInstance()->getBaseUrl() . "/cust-admin",
+ true
);
$form->setAction( Zend_Controller_Front::getInstance()->getBaseUrl() . "/cust-admin/add-user" );
-
- // let's capture the user's name and add them to the contact table also
- $name = $form->createElement( 'text', 'name' );
- $name->addValidator( 'stringLength', false, array( 2, 64 ) )
- ->setRequired( true )
- ->setAttrib( 'size', 50 )
- ->setLabel( 'Name' )
- ->addFilter( 'StringTrim' )
- ->addFilter( new INEX_Filter_StripSlashes() );
-
- $elements = $form->getElements();
- $form->clearElements();
- $form->addElement( $name );
- $form->addElements( $elements );
}
$form->removeElement( 'privs' );
@@ -452,7 +452,10 @@ public function p2pAction()
->where( 's.infrastructure = ?', $infra )
->andWhere( 'vint.ipv' . $proto . 'enabled = 1' )
->andWhere( 'c.shortname != ?', $shortname )
- ->andWhere( 'c.type != ?', Cust::TYPE_INTERNAL )
+ ->andWhereIn( 'c.type', array( Cust::TYPE_FULL, Cust::TYPE_PROBONO ) )
+ ->andWhere( 'c.status = ?', array( Cust::STATUS_NORMAL ) )
+ ->andWhere( 'c.dateleave = 0 or c.dateleave IS NULL' )
+ ->andWhere( 'pi.status = ?', Physicalinterface::STATUS_CONNECTED )
->orderBy( 'c.name ASC' );
if( $dvid )
@@ -566,7 +569,7 @@ public function switchGraphsAction()
{
// get the available graphs
$_switches = Doctrine_Query::create()
- ->select( 'sw.name' )
+ ->select( 'sw.id, c.id, l.id, sw.name' )
->addSelect( 'sw.model' )
->addSelect( 'l.name AS location' )
->from( 'Switchtable sw' )
@@ -185,7 +185,7 @@ function retrieveImageAction()
function retrieveP2pImageAction()
{
- //header( 'Content-Type: image/png' );
+ header( 'Content-Type: image/png' );
header( 'Expires: Thu, 01 Jan 1970 00:00:00 GMT' );
$period = $this->getRequest()->getParam( 'period', INEX_Mrtg::$PERIODS['Day'] );
@@ -24,13 +24,15 @@
</p>
<p>
- Your new user's password will be sent by SMS to the mobile
- number provided and they will receive a welcome email to the email address provided.
+ Your new user's account will be locked until they set their password via the forgotten password
+ procedure (available on the login page and instructions included in the welcome email which
+ will be sent on completion of the below form).
</p>
{/if}
-
+<br />
+<br />
{$form}
@@ -10,12 +10,12 @@
<div id="ajaxMessage"></div>
<div class="alert alert-block alert-info">
- <h4 class="alert-heading">Remember! The customer admin account is only intended for creating users for your organisation.</h4>
+ <h4 class="alert-heading">Remember! The admin account is only intended for creating users for your organisation.</h4>
For full IXP Manager functionality, graphs and member information, log in under one of your user accounts.
</div>
-<table id="ixpDataTable" class="table table-striped table-bordered" cellspacing="0" cellpadding="0" border="0" style="display: none;">
+<table id="ixpDataTable" class="table table-striped table-bordered" cellspacing="0" cellpadding="0" border="0">
<thead>
<tr>
@@ -40,15 +40,15 @@
<td align="center">
<a href="{genUrl controller="cust-admin" action="toggle-enabled" id=$u->id}">
{if $u->disabled}
- <img src="{genUrl}/images/icon_no.png" width="16" height="16" alt="[DISABLED]" title="Disabled - click to enable" />
+ <i class="icon-remove"></i>
{else}
- <img src="{genUrl}/images/icon_yes.png" width="16" height="16" alt="[ENABLED]" title="Enabled - click to disable" />
+ <i class="icon-ok"></i>
{/if}
</a>
</td>
<td>
- <a href="{genUrl controller="cust-admin" action="edit-user" id=$u->id}">
- <img src="{genUrl}/images/joomla-admin/menu/edit.png" width="16" height="16" alt="[EDIT]" title="Click to edit" />
+ <a class="btn btn-mini" href="{genUrl controller="cust-admin" action="edit-user" id=$u->id}">
+ <i class="icon-pencil"></i>
</a>
</td>
</tr>
@@ -60,45 +60,29 @@
</table>
<p>
+ <br />
<a class="btn btn-primary" href="{genUrl controller='cust-admin' action='add-user'}">
Add New User
</a>
</p>
-<div id="instructions" title="IXP Manager - Instructions" style="display: hide;">
- <p>
- Welcome to INEX's IXP Manager!
- </p>
- <p>
- This account is a customer admin account and it can only be
- used to create sub users. Those sub users can then access the
- full functionality of this system.
- </p>
-</div>
<script>
-$(document).ready(function() {ldelim}
-
- oTable = $('#ixpDataTable').dataTable({ldelim}
-
- "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
- "sPaginationType": "bootstrap",
- "aaSorting": [[ 0, 'asc' ]],
- "iDisplayLength": 25,
- {rdelim}).show();
-
- $( '#instructions' ).dialog({ldelim}
- "autoOpen": false,
- "model": true
- {rdelim});
+$(document).ready(function() {
{if not $skipInstructions}
- $( '#instructions' ).dialog( 'open' );
+ bootbox.alert(
+ "<p><strong>Welcome to IXP Manager!</strong></p>"
+
+ + "<p>This account is an admin account and it can only be "
+ + "used to create user accounts for use within your organisation. "
+ + "Those users can then access the full functionality of this system."
+ );
{/if}
-{rdelim});
+});
</script>
@@ -24,11 +24,6 @@
You can now manage your mailing list subscriptions via
your <a href="{genUrl controller="profile"}">profile page</a>.
</li>
- <li>
- There are issues with the peering matrices (which also affect your
- <a href="{genUrl controller="dashboard" action="my-peering-manager"}">Peering Manager</a>).
- We are aware of this and are working on a fix.
- </li>
<li> Redesigned <a href="{genUrl controller="dashboard" action="statistics"}">statistics pages</a> making them clearer and more intuitive. </li>
<li>
Added weather maps for peering <a href="{genUrl controller="dashboard" action="weathermap" id=1}">LAN 1</a>
@@ -1,7 +1,7 @@
<p>
-Any peers appearing below are here because you (or one of your colleuges) selected to have
+Any peers appearing below are here because you (or one of your colleagues) selected to have
them <em>ignored</em> in the drop down actions.
</p>
Oops, something went wrong.

0 comments on commit ecb6149

Please sign in to comment.