mirror of https://github.com/sipwise/www_admin.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
206 lines
8.2 KiB
206 lines
8.2 KiB
[% IF Catalyst.config.billing_features %]
|
|
|
|
<h3 id="contract">SIP Peering Contracts</h3>
|
|
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<div class="actions">
|
|
<a href="/peering/contract_detail?edit_contract=1" class="aaction">create new</a>
|
|
</div>
|
|
[% END %]
|
|
|
|
<div class="p1">
|
|
[% IF contracts %]
|
|
<table class="contracts">
|
|
<tr>
|
|
<td class="table_header">ContractID</td>
|
|
<td class="table_header">Billing Profile</td>
|
|
<td class="table_header">Contact</td>
|
|
<td class="table_header">created</td>
|
|
<td style="width:40px;" />
|
|
</tr>
|
|
[% FOREACH contract = contracts %]
|
|
<tr class="[% sdentry.background %]">
|
|
<td>[% contract.id %]</td>
|
|
<td>[% contract.billing_profile_name%]</td>
|
|
<td>[% contract.short_contact %]</td>
|
|
<td>[% contract.create_timestamp %]</td>
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<td><a href="/peering/contract_detail?edit_contract=1&contract_id=[% contract.id %]" class="aaction">edit</a></td>
|
|
[% END %]
|
|
</tr>
|
|
[% END %]
|
|
</table>
|
|
[% ELSE %]
|
|
<div>
|
|
No sip peering contracts created yet.
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
|
|
[% END %]
|
|
|
|
<h3 id="groups">SIP Peering Groups</h3>
|
|
|
|
<div class="p1">
|
|
[% IF messages.epeermsg %]<div class="goodmsg">[% messages.epeermsg %]</div>[% END %]
|
|
[% IF messages.epeererr %]<div class="errormsg">[% messages.epeererr %]</div>[% END %]
|
|
|
|
[% IF peer_groups %]
|
|
<table class="domains">
|
|
<tr class="table_header">
|
|
<td>Name</td>
|
|
<td>Priority</td>
|
|
<td>Description</td>
|
|
[% IF Catalyst.config.billing_features %]
|
|
<td>Peering Contract</td>
|
|
[% END %]
|
|
<td style="width:40px;" />
|
|
<td style="width:60px;" />
|
|
</tr>
|
|
[% id = 0 %]
|
|
[% FOREACH grp = peer_groups %]
|
|
<tr>
|
|
[% IF grp.id == editid %]
|
|
<td>[% grp.name %]</td>
|
|
<form action="/peering/edit_grp" method="post">
|
|
<input type="hidden" name="grpid" value="[% grp.id %]" />
|
|
<td>
|
|
<select title="string, priority" size="1" name="priority">
|
|
[% count = 1 %]
|
|
[% WHILE count < 10 %]
|
|
<option [% "selected" IF grp.priority == count %]>[% count %]</option>
|
|
[% count = count + 1 %]
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<input type="text" id="addtxt" title="string, description of group"
|
|
name="grpdesc" value="[% grp.description %]" />
|
|
</td>
|
|
[% IF Catalyst.config.billing_features %]
|
|
<td>
|
|
<select size="1" name="peering_contract_id">
|
|
<option value="0" [% UNLESS grp.peering_contract_id %]selected="selected"[% END %]> </option>
|
|
[% FOREACH contract = contracts %]
|
|
<option value="[% contract.id %]"
|
|
[% IF grp.peering_contract_id == contract.id %]selected="selected"[% END %]
|
|
>[% contract.id %]</option>
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
[% END %]
|
|
<td>
|
|
<div class="postlink">
|
|
<label for="grpsave[% id %]">save</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="grpsave[% id %]" />
|
|
</div>
|
|
</td>
|
|
</form>
|
|
<td><a href="/peering" class="aaction">cancel</a></td>
|
|
[% ELSE %]
|
|
<td><a href="/peering/detail?group_id=[%grp.id%]" class="aaction">[% grp.name %]</a></td>
|
|
<td>[% grp.priority %]</td>
|
|
<td>[% grp.description %]</td>
|
|
[% IF Catalyst.config.billing_features %]
|
|
<td>[% grp.peering_contract_id %]</td>
|
|
[% END %]
|
|
<td>
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<a href="/peering?editid=[% grp.id %]" class="aaction">edit</a>
|
|
[% END %]
|
|
</td>
|
|
<form action="/peering/delete_grp" method="post">
|
|
<input type="hidden" name="grpid" value="[% grp.id %]" />
|
|
<td>
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<div class="postlink">
|
|
<label for="grpdel[% id %]">delete</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="grpdel[% id %]" />
|
|
</div>
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
</form>
|
|
</tr>
|
|
[% id = id + 1 %]
|
|
[% END %]
|
|
</table>
|
|
[% ELSE %]
|
|
<div>
|
|
No sip peering groups defined yet.
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
|
|
[% UNLESS Catalyst.session.admin.read_only %]
|
|
<h3 id="create_group">Create Peering Group</h3>
|
|
|
|
<div class="p1">
|
|
[% IF messages.cpeermsg %]<div class="goodmsg">[% messages.cpeermsg %]</div>[% END %]
|
|
[% IF messages.cpeererr %]<div class="errormsg">[% messages.cpeererr %]</div>[% END %]
|
|
|
|
<table class="domains">
|
|
<tr class="table_header">
|
|
<td>Name</td>
|
|
<td>Priority</td>
|
|
<td>Description</td>
|
|
[% IF Catalyst.config.billing_features %]
|
|
<td>Peering Contract</td>
|
|
[% END %]
|
|
<td style="width:40px;" />
|
|
<td style="width:60px;" />
|
|
</tr>
|
|
<form action="/peering/create_grp" method="post">
|
|
<tr>
|
|
<td>
|
|
<input type="text" size="20" name="grpname" title="string, name of group"
|
|
id="addtxt" value="[% garefill.name %]" />
|
|
</td>
|
|
<td>
|
|
<select title="string, priority" size="1" name="priority">
|
|
[% count = 1 %]
|
|
[% WHILE count < 10 %]
|
|
<option [% IF garefill.priority == count %]selected="selected"[% END %]>[% count %]</option>
|
|
[% count = count + 1 %]
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
<td>
|
|
<input type="text" size="20" name="grpdesc" title="string, description of group"
|
|
id="addtxt" value="[% garefill.description %]" />
|
|
</td>
|
|
[% IF Catalyst.config.billing_features %]
|
|
<td>
|
|
<select size="1" name="peering_contract_id">
|
|
<option value="0" [% UNLESS garefill.peering_contract_id %]selected="selected"[% END %]> </option>
|
|
[% FOREACH contract = contracts %]
|
|
<option value="[% contract.id %]"
|
|
[% IF garefill.peering_contract_id == contract.id %]selected="selected"[% END %]
|
|
>[% contract.id %]</option>
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
[% END %]
|
|
<td>
|
|
<div class="postlink">
|
|
<label for="grpadd">add</label>
|
|
<input type="image" class="hidden" src="/static/images/dot_trans.gif" alt="" id="grpadd" />
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
[% IF messages.acc || messages.atimezone %]
|
|
<tr><td colspan="5">
|
|
<div class="errormsg">
|
|
[% messages.acc %]
|
|
</div>
|
|
</td></tr>
|
|
[% END %]
|
|
</form>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
[% END %]
|
|
|
|
|