mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
ipsec: style update #2440
This commit is contained in:
parent
a14378c553
commit
07ef03335a
@ -343,8 +343,7 @@ $( document ).ready(function() {
|
||||
<td class="hidden-xs"><?=gettext("Phase 1 Proposal"); ?></td>
|
||||
<td class="hidden-xs"><?=gettext("Authentication"); ?></td>
|
||||
<td><?=gettext("Description"); ?></td>
|
||||
<td>
|
||||
</td>
|
||||
<td class="text-nowrap"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -359,7 +358,7 @@ $( document ).ready(function() {
|
||||
<button data-id="<?=$i; ?>" data-act="togglep1" type="submit"
|
||||
type="submit" class="act_move btn btn-<?= isset($ph1ent['disabled'])? "default":"success"?> btn-xs"
|
||||
title="<?=(isset($ph1ent['disabled'])) ? gettext("Enable phase 1 entry") : gettext("Disable phase 1 entry");?>" data-toggle="tooltip">
|
||||
<span class="fa fa-play"></span>
|
||||
<i class="fa fa-play fa-fw"></i>
|
||||
</button>
|
||||
</td>
|
||||
<td class="hidden-xs">
|
||||
@ -422,31 +421,29 @@ $( document ).ready(function() {
|
||||
<?= html_safe($p1_authentication_methods[$ph1ent['authentication_method']]['name']) ?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$ph1ent['descr'];?>
|
||||
<?= $ph1ent['descr'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<td class="text-nowrap">
|
||||
<button data-id="<?=$i; ?>" data-act="movep1" type="submit" class="act_move btn btn-default btn-xs"
|
||||
title="<?=gettext("move selected entries before this");?>" data-toggle="tooltip">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span>
|
||||
title="<?=gettext("move selected entries before this");?>" data-toggle="tooltip">
|
||||
<i class="fa fa-arrow-left fa-fw"></i>
|
||||
</button>
|
||||
<a href="vpn_ipsec_phase1.php?p1index=<?=$i; ?>" class="btn btn-default btn-xs" alt="edit"
|
||||
title="<?=gettext("edit phase1 entry"); ?>" data-toggle="tooltip">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a><br/>
|
||||
<button data-id="<?=$i; ?>"
|
||||
title="<?=gettext("delete phase1 entry");?>" data-toggle="tooltip"
|
||||
type="submit"
|
||||
class="act_delete_p1 btn btn-default btn-xs">
|
||||
<span class="fa fa-trash text-muted"></span>
|
||||
<a href="vpn_ipsec_phase1.php?p1index=<?=$i; ?>" class="btn btn-default btn-xs"
|
||||
title="<?= html_safe(gettext('Edit')) ?>" data-toggle="tooltip">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
</a>
|
||||
<button data-id="<?=$i; ?>" title="<?= html_safe(gettext('Delete')) ?>" data-toggle="tooltip"
|
||||
type="submit" class="act_delete_p1 btn btn-default btn-xs">
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
</button>
|
||||
<?php if (!isset($ph1ent['mobile'])) :
|
||||
<?php if (!isset($ph1ent['mobile'])):
|
||||
?>
|
||||
<a href="vpn_ipsec_phase1.php?dup=<?=$i; ?>" class="btn btn-default btn-xs" alt="add"
|
||||
title="<?=gettext("clone phase1 entry"); ?>" data-toggle="tooltip">
|
||||
<span class="fa fa-clone text-muted"></span>
|
||||
<a href="vpn_ipsec_phase1.php?dup=<?=$i; ?>" class="btn btn-default btn-xs"
|
||||
title="<?= html_safe(gettext('Clone')) ?>" data-toggle="tooltip">
|
||||
<i class="fa fa-clone fa-fw"></i>
|
||||
</a>
|
||||
<?php
|
||||
endif;?>
|
||||
endif ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -494,7 +491,7 @@ $( document ).ready(function() {
|
||||
<button data-id="<?=$ph2index; ?>" data-act="togglep2" type="submit"
|
||||
title="<?=(isset($ph2ent['disabled'])) ? gettext("Enable phase 2 entry") : gettext("Disable phase 2 entry"); ?>" data-toggle="tooltip"
|
||||
class="act_move btn btn-<?= isset($ph2ent['disabled'])?"default":"success";?> btn-xs">
|
||||
<span class="fa fa-play"></span>
|
||||
<i class="fa fa-play fa-fw"></i>
|
||||
</button>
|
||||
</td>
|
||||
<td class="hidden-xs">
|
||||
@ -552,29 +549,24 @@ $( document ).ready(function() {
|
||||
<td class="hidden-xs"><?=gettext("off"); ?></td>
|
||||
<?php
|
||||
endif; ?>
|
||||
<td>
|
||||
<button data-id="<?=$j; ?>" data-act="movep2"
|
||||
title="<?=gettext("move selected entries before this");?>" data-toggle="tooltip"
|
||||
type="submit"
|
||||
class="act_move btn btn-default btn-xs">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span>
|
||||
</button>
|
||||
<a href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']; ?>"
|
||||
title="<?=gettext("edit phase 2 entry"); ?>" data-toggle="tooltip"
|
||||
alt="edit" class="btn btn-default btn-xs">
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
</a>
|
||||
<button data-id="<?=$ph2index; ?>"
|
||||
title="<?=gettext("delete phase 2 entry");?>" data-toggle="tooltip"
|
||||
type="submit"
|
||||
class="act_delete_p2 btn btn-default btn-xs">
|
||||
<span class="fa fa-trash text-muted"></span>
|
||||
</button>
|
||||
<a href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']; ?>"
|
||||
title="<?=gettext("clone phase 2 entry"); ?>" data-toggle="tooltip"
|
||||
alt="add" class="btn btn-default btn-xs">
|
||||
<span class="fa fa-clone text-muted"></span>
|
||||
</a>
|
||||
<td class="text-nowrap">
|
||||
<button data-id="<?=$j; ?>" data-act="movep2" type="submit" class="act_move btn btn-default btn-xs"
|
||||
title="<?=gettext("move selected entries before this");?>" data-toggle="tooltip">
|
||||
<i class="fa fa-arrow-left fa-fw"></i>
|
||||
</button>
|
||||
<a href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']; ?>"
|
||||
title="<?= html_safe(gettext('Edit')) ?>" data-toggle="tooltip"
|
||||
class="btn btn-default btn-xs">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
</a>
|
||||
<button data-id="<?=$ph2index; ?>" type="submit" class="act_delete_p2 btn btn-default btn-xs"
|
||||
title="<?= html_safe(gettext('Delete')) ?>" data-toggle="tooltip">
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
</button>
|
||||
<a href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']; ?>" class="btn btn-default btn-xs"
|
||||
title="<?= html_safe(gettext('Clone')) ?>" data-toggle="tooltip">
|
||||
<i class="fa fa-clone fa-fw"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@ -583,24 +575,23 @@ $( document ).ready(function() {
|
||||
<tr>
|
||||
<td colspan="4" class="hidden-xs"></td>
|
||||
<td colspan="4"></td>
|
||||
<td>
|
||||
<td class="text-nowrap">
|
||||
<?php
|
||||
if ($j > 0) :?>
|
||||
|
||||
<button data-id="<?=$j+1; ?>" data-act="movep2" type="submit"
|
||||
title="<?=gettext("move selected phase 2 entries to end");?>" data-toggle="tooltip"
|
||||
class="act_move btn btn-default btn-xs">
|
||||
<span class="glyphicon glyphicon-arrow-down"></span>
|
||||
<button data-id="<?=$j+1; ?>" data-act="movep2" type="submit" class="act_move btn btn-default btn-xs"
|
||||
title="<?=gettext("move selected phase 2 entries to end");?>" data-toggle="tooltip">
|
||||
<i class="fa fa-arrow-down fa-fw"></i>
|
||||
</button>
|
||||
<button data-id="x" type="submit" title="<?=gettext("delete selected phase 2 entries");?>" data-toggle="tooltip"
|
||||
class="act_delete_p2 btn btn-default btn-xs">
|
||||
<span class="fa fa-trash text-muted"></span>
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
</button>
|
||||
<?php
|
||||
endif;?>
|
||||
<a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']; ?><?= isset($ph1ent['mobile'])?"&mobile=true":"";?>" class="btn btn-default btn-xs"
|
||||
title="<?=gettext("add phase 2 entry"); ?>" data-toggle="tooltip">
|
||||
<span alt="add" class="glyphicon glyphicon-plus"></span>
|
||||
title="<?=gettext("add phase 2 entry"); ?>" data-toggle="tooltip">
|
||||
<i class="fa fa-plus fa-fw"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@ -615,27 +606,27 @@ $( document ).ready(function() {
|
||||
<tr>
|
||||
<td colspan="4" class="hidden-xs"></td>
|
||||
<td colspan="4"> </td>
|
||||
<td>
|
||||
<td class="text-nowrap">
|
||||
<button
|
||||
type="submit"
|
||||
data-id="<?=$i;?>"
|
||||
data-act="movep1"
|
||||
title="<?=gettext("move selected phase 1 entries to end");?>"
|
||||
data-toggle="tooltip"
|
||||
class="act_move btn btn-default btn-xs">
|
||||
<span class="glyphicon glyphicon-arrow-down"></span>
|
||||
</button>
|
||||
<button data-id=""
|
||||
type="submit"
|
||||
title="<?=gettext("delete selected phase 1 entries");?>"
|
||||
data-toggle="tooltip"
|
||||
class="act_delete_p1 btn btn-default btn-xs">
|
||||
<span class="fa fa-trash text-muted"></span>
|
||||
</button>
|
||||
type="submit"
|
||||
data-id="<?=$i;?>"
|
||||
data-act="movep1"
|
||||
title="<?=gettext("move selected phase 1 entries to end");?>"
|
||||
data-toggle="tooltip"
|
||||
class="act_move btn btn-default btn-xs">
|
||||
<i class="fa fa-arrow-down fa-fw"></i>
|
||||
</button>
|
||||
<button data-id=""
|
||||
type="submit"
|
||||
title="<?=gettext("delete selected phase 1 entries");?>"
|
||||
data-toggle="tooltip"
|
||||
class="act_delete_p1 btn btn-default btn-xs">
|
||||
<i class="fa fa-trash fa-fw"></i>
|
||||
</button>
|
||||
<a href="vpn_ipsec_phase1.php" title="<?=gettext("add new phase 1 entry");?>" data-toggle="tooltip"
|
||||
alt="add" class="btn btn-default btn-xs">
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
</a>
|
||||
class="btn btn-default btn-xs">
|
||||
<i class="fa fa-plus fa-fw"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -63,9 +63,13 @@ $service_hook = 'ipsec';
|
||||
|
||||
include("head.inc");
|
||||
|
||||
?>
|
||||
$main_buttons = array(
|
||||
array('href' => 'vpn_ipsec_keys_edit.php', 'label' => gettext('Add')),
|
||||
);
|
||||
|
||||
?>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
// link delete buttons
|
||||
@ -116,9 +120,7 @@ if (is_subsystem_dirty('ipsec')) {
|
||||
<td><?=gettext("Identifier"); ?></td>
|
||||
<td><?=gettext("Pre-Shared Key"); ?></td>
|
||||
<td><?=gettext("Type"); ?></td>
|
||||
<td>
|
||||
<a href="vpn_ipsec_keys_edit.php" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a>
|
||||
</td>
|
||||
<td class="text-nowrap"></td>
|
||||
</tr>
|
||||
<?php $i = 0;
|
||||
$userkeys = array();
|
||||
@ -132,8 +134,8 @@ if (is_subsystem_dirty('ipsec')) {
|
||||
<td><?=htmlspecialchars($secretent['ident']) ;?></td>
|
||||
<td><?=htmlspecialchars($secretent['pre-shared-key']);?></td>
|
||||
<td>PSK</td>
|
||||
<td>
|
||||
<a href="system_usermanager.php?userid=<?=$secretent['id'];?>&act=edit" title="<?=gettext("edit"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||
<td class="text-nowrap">
|
||||
<a href="system_usermanager.php?userid=<?=$secretent['id'];?>&act=edit" title="<?= html_safe(gettext('Edit')) ?>" class="btn btn-default btn-xs"><i class="fa fa-pencil fa-fw"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@ -145,20 +147,18 @@ if (is_subsystem_dirty('ipsec')) {
|
||||
<td><?=htmlspecialchars($secretent['ident']);?></td>
|
||||
<td><?=htmlspecialchars($secretent['pre-shared-key']);?></td>
|
||||
<td><?=!empty($secretent['type']) ? htmlspecialchars($secretent['type']) : "PSK"?> </td>
|
||||
<td><a href="vpn_ipsec_keys_edit.php?id=<?=$i;?>" title="<?=gettext("edit key"); ?>" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-pencil"></span></a>
|
||||
<a id="del_<?=$i;?>" title="<?=gettext("delete key"); ?>" class="act_delete btn btn-default btn-xs"><span class="fa fa-trash text-muted"></span></a>
|
||||
<td class="text-nowrap">
|
||||
<a href="vpn_ipsec_keys_edit.php?id=<?=$i;?>" title="<?= html_safe(gettext('Edit')) ?>" class="btn btn-default btn-xs"><i class="fa fa-pencil fa-fw"></i></a>
|
||||
<a id="del_<?=$i;?>" title="<?= html_safe(gettext('Delete')) ?>" class="act_delete btn btn-default btn-xs"><i class="fa fa-trash fa-fw"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$i++;
|
||||
endforeach; ?>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<td colspan="4">
|
||||
<?=gettext("PSK for any user can be set by using an identifier of any/ANY") ?>
|
||||
</td>
|
||||
<td>
|
||||
<a href="vpn_ipsec_keys_edit.php" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -150,28 +150,19 @@ if (isset($config['ipsec']['phase2'])) {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($ipsec_tunnels as $ipsec_key => $ipsec) :
|
||||
?>
|
||||
<?php foreach ($ipsec_tunnels as $ipsec_key => $ipsec): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?=$ipsec['local-addrs'];?> <br/>
|
||||
(<?=$ipsec['remote-addrs'];?>)
|
||||
</td>
|
||||
<td><?=$ipsec['local-ts'];?></td>
|
||||
<td><?=$ipsec['remote-ts'];?></td>
|
||||
<td>
|
||||
<?php if($ipsec['active']):
|
||||
?>
|
||||
<span class='glyphicon glyphicon-transfer text-success' alt='Tunnel status'></span>
|
||||
<?php else:
|
||||
?>
|
||||
<span class='glyphicon glyphicon-transfer text-danger' alt='Tunnel status'></span>
|
||||
<?php endif;
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?=$ipsec['local-addrs'];?> <br/>
|
||||
(<?=$ipsec['remote-addrs'];?>)
|
||||
</td>
|
||||
<td><?=$ipsec['local-ts'];?></td>
|
||||
<td><?=$ipsec['remote-ts'];?></td>
|
||||
<td>
|
||||
<i class="fa fa-exchange fa-fw text-<?= $ipsec['active'] ? 'success' : 'danger' ?>"></i>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;
|
||||
?>
|
||||
<?php endforeach ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -192,7 +183,7 @@ if (isset($config['ipsec']['phase2'])) {
|
||||
<td><?=htmlspecialchars($lease['user']);?></td>
|
||||
<td><?=htmlspecialchars($lease['address']);?></td>
|
||||
<td>
|
||||
<span class='glyphicon glyphicon-transfer text-<?=$lease['status'] == 'online' ? "success" : "danger";?>'></span>
|
||||
<i class="fa fa-exchange fa-fw text-<?= $lease['status'] == 'online' ? "success" : 'danger' ?>"></i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user