Revision ae36a9e5
Added by sbeaver about 10 years ago
usr/local/www/diag_ipsec_spd.php | ||
---|---|---|
69 | 69 |
$tab_array[3] = array(gettext("SPD"), true, "diag_ipsec_spd.php"); |
70 | 70 |
$tab_array[4] = array(gettext("Logs"), false, "diag_logs.php?logfile=ipsec"); |
71 | 71 |
display_top_tabs($tab_array); |
72 |
?> |
|
73 |
<?php |
|
72 |
|
|
74 | 73 |
if (count($spd)){ |
75 | 74 |
?> |
76 |
<table class="table table-striped table-hover table-condensed"> |
|
77 |
<thead> |
|
78 |
<tr> |
|
79 |
<th><?= gettext("Source"); ?></th> |
|
80 |
<th><?= gettext("Destination"); ?></th> |
|
81 |
<th><?= gettext("Direction"); ?></th> |
|
82 |
<th><?= gettext("Protocol"); ?></th> |
|
83 |
<th><?= gettext("Tunnel endpoints"); ?></th> |
|
84 |
</tr> |
|
85 |
</thead> |
|
86 |
|
|
87 |
<tbody> |
|
75 |
<div class="table-responsive"> |
|
76 |
<table class="table table-striped table-hover table-condensed"> |
|
77 |
<thead> |
|
78 |
<tr> |
|
79 |
<th><?= gettext("Source"); ?></th> |
|
80 |
<th><?= gettext("Destination"); ?></th> |
|
81 |
<th><?= gettext("Direction"); ?></th> |
|
82 |
<th><?= gettext("Protocol"); ?></th> |
|
83 |
<th><?= gettext("Tunnel endpoints"); ?></th> |
|
84 |
</tr> |
|
85 |
</thead> |
|
86 |
|
|
87 |
<tbody> |
|
88 | 88 |
<?php |
89 |
foreach ($spd as $sp) { |
|
90 |
if($sp['dir'] == 'in') |
|
91 |
$dirstr = LEFTARROW . ' Inbound'; |
|
92 |
else |
|
93 |
$dirstr = RIGHTARROW . ' Outbound'; |
|
89 |
foreach ($spd as $sp) {
|
|
90 |
if($sp['dir'] == 'in')
|
|
91 |
$dirstr = LEFTARROW . ' Inbound';
|
|
92 |
else
|
|
93 |
$dirstr = RIGHTARROW . ' Outbound';
|
|
94 | 94 |
?> |
95 |
<tr> |
|
96 |
<td> |
|
97 |
<?=htmlspecialchars($sp['srcid'])?> |
|
98 |
</td> |
|
99 |
<td> |
|
100 |
<?=htmlspecialchars($sp['dstid'])?> |
|
101 |
</td> |
|
102 |
<td> |
|
103 |
<?=$dirstr ?> |
|
104 |
</td> |
|
105 |
<td> |
|
106 |
<?=htmlspecialchars(strtoupper($sp['proto']))?> |
|
107 |
</td> |
|
108 |
<td> |
|
109 |
<?=htmlspecialchars($sp['src'])?> -> <?=htmlspecialchars($sp['dst'])?>
|
|
110 |
</td> |
|
111 |
</tr> |
|
95 |
<tr>
|
|
96 |
<td>
|
|
97 |
<?=htmlspecialchars($sp['srcid'])?>
|
|
98 |
</td>
|
|
99 |
<td>
|
|
100 |
<?=htmlspecialchars($sp['dstid'])?>
|
|
101 |
</td>
|
|
102 |
<td>
|
|
103 |
<?=$dirstr ?>
|
|
104 |
</td>
|
|
105 |
<td>
|
|
106 |
<?=htmlspecialchars(strtoupper($sp['proto']))?>
|
|
107 |
</td>
|
|
108 |
<td>
|
|
109 |
<?=htmlspecialchars($sp['src'])?> -> <?=htmlspecialchars($sp['dst'])?>
|
|
110 |
</td>
|
|
111 |
</tr>
|
|
112 | 112 |
<?php |
113 |
} |
|
113 |
}
|
|
114 | 114 |
?> |
115 |
</tbody> |
|
116 |
</table> |
|
117 |
|
|
115 |
</tbody>
|
|
116 |
</table>
|
|
117 |
</div> |
|
118 | 118 |
<?php |
119 | 119 |
} // e-o-if (count($spd)) |
120 | 120 |
else { |
Also available in: Unified diff
diag_ipsec_spd conversion complete
Ready for review