Revision 1144e24c
Added by Steve Beaver almost 8 years ago
src/usr/local/www/status_ipsec.php | ||
---|---|---|
85 | 85 |
$a_phase1 = &$config['ipsec']['phase1']; |
86 | 86 |
$status = ipsec_list_sa(); |
87 | 87 |
$ipsecconnected = array(); |
88 |
|
|
89 | 88 |
if (is_array($status)) { |
90 | 89 |
foreach ($status as $ikeid => $ikesa) { |
91 |
$con_id = substr($ikeid, 3);
|
|
90 |
$con_id = substr($ikesa['con-id'],3);
|
|
92 | 91 |
|
93 | 92 |
if ($ikesa['version'] == 1) { |
94 | 93 |
$ph1idx = substr($con_id, 0, strrpos(substr($con_id, 0, -1), '00')); |
... | ... | |
227 | 226 |
|
228 | 227 |
if ($ikesa['state'] != 'ESTABLISHED') { |
229 | 228 |
|
230 |
print('<a href="status_ipsec.php?act=connect&ikeid=' . $con_id . '" class="btn btn-xs btn-success" data-toggle="tooltip" title="' . gettext("Connect VPN"). '" usepost>'); |
|
229 |
print('<a href="status_ipsec.php?act=connect&ikeid=' . $con_id . '&ikesaid=' .$ikesa['uniqueid'] . '" class="btn btn-xs btn-success" data-toggle="tooltip" title="' . gettext("Connect VPN"). '" usepost>');
|
|
231 | 230 |
print('<i class="fa fa-sign-in icon-embed-btn"></i>'); |
232 | 231 |
print(gettext("Connect VPN")); |
233 | 232 |
print("</a>\n"); |
234 | 233 |
|
235 | 234 |
} else { |
236 | 235 |
|
237 |
print('<a href="status_ipsec.php?act=ikedisconnect&ikeid=' . $con_id . '" class="btn btn-xs btn-danger" data-toggle="tooltip" title="' . gettext("Disconnect VPN") . '" usepost>');
|
|
236 |
print('<a href="status_ipsec.php?act=ikedisconnect&ikeid=' . $con_id . '&ikesaid=' .$ikesa['uniqueid'] . '"class="btn btn-xs btn-danger" data-toggle="tooltip" title="' . gettext("Disconnect VPN") . '" usepost>');
|
|
238 | 237 |
print('<i class="fa fa-trash icon-embed-btn"></i>'); |
239 | 238 |
print(gettext("Disconnect")); |
240 | 239 |
print("</a><br />\n"); |
... | ... | |
249 | 248 |
if (is_array($ikesa['child-sas']) && (count($ikesa['child-sas']) > 0)) { |
250 | 249 |
|
251 | 250 |
print('<div>'); |
252 |
print('<a type="button" id="btnchildsa-' . $ikeid . '" class="btn btn-sm btn-info">');
|
|
251 |
print('<a type="button" id="btnchildsa-con'. $con_id .'-'. $ikesa['uniqueid'] . '" class="btn btn-sm btn-info">');
|
|
253 | 252 |
print('<i class="fa fa-plus-circle icon-embed-btn"></i>'); |
254 | 253 |
print(gettext('Show child SA entries')); |
255 | 254 |
print("</a>\n"); |
256 | 255 |
print(" </div>\n"); |
257 | 256 |
|
258 |
print('<table class="table table-hover table-condensed" id="childsa-' . $ikeid . '" style="display:none">');
|
|
257 |
print('<table class="table table-hover table-condensed" id="childsa-con'.$con_id.'-' . $ikesa['uniqueid'] . '" style="display:none">');
|
|
259 | 258 |
print("<thead>\n"); |
260 | 259 |
print('<tr class="bg-info">'); |
261 | 260 |
print('<th><?=gettext("Local subnets")?></th>'); |
... | ... | |
539 | 538 |
type: "post", |
540 | 539 |
data: { |
541 | 540 |
ajax: "ajax" |
541 |
}, |
|
542 |
tryCount : 0, |
|
543 |
retryLimit :3, |
|
544 |
error: function(xhr, textStatus, errorThrown){ |
|
545 |
//alert("error.... retrying"); |
|
546 |
if (this.tryCount <= this.retryLimit){ |
|
547 |
ajax_lock = false; |
|
548 |
update_table(); |
|
549 |
} |
|
550 |
return; |
|
542 | 551 |
} |
543 | 552 |
} |
544 | 553 |
); |
Also available in: Unified diff
Fixed #7856