diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-09-21 12:27:19 -0400 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-09-21 12:27:19 -0400 |
commit | 1144e24cabeda458b266b9874b827746f4c0f8a0 (patch) | |
tree | 1c59adbcdabbc3845be9bcb9ca06e7d218f0bb4b /src/usr/local/www | |
parent | 2f4685ca496f690f29d462c78528996a4339c0fb (diff) | |
download | pfsense-1144e24cabeda458b266b9874b827746f4c0f8a0.zip pfsense-1144e24cabeda458b266b9874b827746f4c0f8a0.tar.gz |
Fixed #7856
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/status_ipsec.php | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/usr/local/www/status_ipsec.php b/src/usr/local/www/status_ipsec.php index f1de72d..5b8dbac 100644 --- a/src/usr/local/www/status_ipsec.php +++ b/src/usr/local/www/status_ipsec.php @@ -85,10 +85,9 @@ function print_ipsec_body() { $a_phase1 = &$config['ipsec']['phase1']; $status = ipsec_list_sa(); $ipsecconnected = array(); - if (is_array($status)) { foreach ($status as $ikeid => $ikesa) { - $con_id = substr($ikeid, 3); + $con_id = substr($ikesa['con-id'],3); if ($ikesa['version'] == 1) { $ph1idx = substr($con_id, 0, strrpos(substr($con_id, 0, -1), '00')); @@ -227,14 +226,14 @@ function print_ipsec_body() { if ($ikesa['state'] != 'ESTABLISHED') { - 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>'); + 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>'); print('<i class="fa fa-sign-in icon-embed-btn"></i>'); print(gettext("Connect VPN")); print("</a>\n"); } else { - 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>'); + 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>'); print('<i class="fa fa-trash icon-embed-btn"></i>'); print(gettext("Disconnect")); print("</a><br />\n"); @@ -249,13 +248,13 @@ function print_ipsec_body() { if (is_array($ikesa['child-sas']) && (count($ikesa['child-sas']) > 0)) { print('<div>'); - print('<a type="button" id="btnchildsa-' . $ikeid . '" class="btn btn-sm btn-info">'); + print('<a type="button" id="btnchildsa-con'. $con_id .'-'. $ikesa['uniqueid'] . '" class="btn btn-sm btn-info">'); print('<i class="fa fa-plus-circle icon-embed-btn"></i>'); print(gettext('Show child SA entries')); print("</a>\n"); print(" </div>\n"); - print('<table class="table table-hover table-condensed" id="childsa-' . $ikeid . '" style="display:none">'); + print('<table class="table table-hover table-condensed" id="childsa-con'.$con_id.'-' . $ikesa['uniqueid'] . '" style="display:none">'); print("<thead>\n"); print('<tr class="bg-info">'); print('<th><?=gettext("Local subnets")?></th>'); @@ -539,6 +538,16 @@ events.push(function() { type: "post", data: { ajax: "ajax" + }, + tryCount : 0, + retryLimit :3, + error: function(xhr, textStatus, errorThrown){ + //alert("error.... retrying"); + if (this.tryCount <= this.retryLimit){ + ajax_lock = false; + update_table(); + } + return; } } ); |