Commit 8c05a136 authored by Franco Fichtner's avatar Franco Fichtner

vpn/openvpn: collapse into menu

parent 87cfad6a
......@@ -234,12 +234,21 @@
<Edit url="/vpn_l2tp_users_edit.php*"/>
</Users>
</L2TP>
<OpenVPN url="/vpn_openvpn_server.php">
<ServerEdit url="/vpn_openvpn_server.php?*"/>
<Client url="/vpn_openvpn_client.php*"/>
<CSC url="/vpn_openvpn_csc.php*"/>
<ClientExport url="/vpn_openvpn_export.php*"/>
<SharedKeyExport url="/vpn_openvpn_export_shared.php"/>
<OpenVPN cssClass="fa fa-road">
<Client VisibleName="Client Settings" url="/vpn_openvpn_client.php">
<Edit url="/vpn_openvpn_client.php?*"/>
</Client>
<CSC VisibleName="Client Specific Overrides" url="/vpn_openvpn_csc.php">
<Edit url="/vpn_openvpn_csc.php?*"/>
</CSC>
<ClientExport VisibleName="Client Export" url="/vpn_openvpn_export.php">
<Edit url="/vpn_openvpn_export.php?*"/>
</ClientExport>
<ClientSharedKeyExport VisibleName="Shared Key Export" url="/vpn_openvpn_export_shared.php"/>
<Server VisibleName="Server Settings" url="/vpn_openvpn_server.php">
<Edit url="/vpn_openvpn_server.php?*"/>
</Server>
<Status VisibleName="Connection Status" url="/status_openvpn.php"/>
</OpenVPN>
<PPTP cssClass="fa fa-road">
<Settings url="/vpn_pptp.php"/>
......@@ -269,7 +278,6 @@
<VirtualServers url="/status_lb_vs.php"/>
</LoadBalancer>
<NTP url="/status_ntpd.php"/>
<OpenVPN url="/status_openvpn.php"/>
<Services url="/status_services.php">
<ServicesActions url="/status_services.php?*"/>
</Services>
......
......@@ -35,7 +35,6 @@ require_once("system.inc");
require_once("interfaces.inc");
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("OpenVPN"));
$shortcut_section = "openvpn";
$openvpn_logfile = '/var/log/openvpn.log';
......
......@@ -70,12 +70,6 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service =
return "";
$space = ($addspace) ? "&nbsp;" : "" ;
switch ($shortcut_section) {
case "openvpn":
if (!empty($service['mode']) && is_numeric($service['id']))
$link = "vpn_openvpn_{$service['mode']}.php?act=edit&amp;id={$service['id']}";
else
$link = $shortcuts[$shortcut_section]['main'];
break;
case "captiveportal":
if (!empty($service['zone']))
$link = "services_captiveportal.php?zone={$service['zone']}";
......@@ -184,12 +178,6 @@ $shortcuts['ipsec']['log'] = "diag_logs_ipsec.php";
$shortcuts['ipsec']['status'] = "diag_ipsec.php";
$shortcuts['ipsec']['service'] = "ipsec";
$shortcuts['openvpn'] = array();
$shortcuts['openvpn']['main'] = "vpn_openvpn_server.php";
$shortcuts['openvpn']['log'] = "diag_logs_openvpn.php";
$shortcuts['openvpn']['status'] = "status_openvpn.php";
$shortcuts['openvpn']['service'] = "openvpn";
$shortcuts['firewall'] = array();
$shortcuts['firewall']['main'] = "firewall_rules.php";
$shortcuts['firewall']['log'] = "diag_logs_filter.php";
......
......@@ -66,9 +66,7 @@ function kill_client($port, $remipp) {
return $killed;
}
$pgtitle = array(gettext("Status"), gettext("OpenVPN"));
$shortcut_section = "openvpn";
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Connection Status'));
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$vpnid = 0;
......
......@@ -32,9 +32,7 @@ require_once("openvpn.inc");
require_once("services.inc");
require_once("interfaces.inc");
$pgtitle = array(gettext("OpenVPN"), gettext("Client"));
$shortcut_section = "openvpn";
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Client'));
if (!isset($config['openvpn']['openvpn-client'])) {
$config['openvpn']['openvpn-client'] = array();
......@@ -459,16 +457,6 @@ if (isset($savemsg)) {
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), true, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Client Export"), false, "vpn_openvpn_export.php");
$tab_array[] = array(gettext("Shared Key Export"), false, "vpn_openvpn_export_shared.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<?php if ($act=="new" || $act=="edit") :
?>
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Shrew Soft Inc.
......@@ -30,9 +31,7 @@ require_once("openvpn.inc");
require_once("services.inc");
require_once("interfaces.inc");
$pgtitle = array(gettext("OpenVPN"), gettext("Client Specific Override"));
$shortcut_section = "openvpn";
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Client Specific Overrides'));
// define all fields used in this form
$all_form_fields = "custom_options,disable,common_name,block,description
......@@ -316,17 +315,6 @@ if ($act!="new" && $act!="edit") {
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), true, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Client Export"), false, "vpn_openvpn_export.php");
$tab_array[] = array(gettext("Shared Key Export"), false, "vpn_openvpn_export_shared.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<?php if ($act=="new" || $act=="edit") :
......
<?php
/*
vpn_openvpn_export.php
/*
Copyright (C) 2008 Shrew Soft Inc.
Copyright (C) 2010 Ermal Luçi
All rights reserved.
......@@ -26,9 +25,8 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
DISABLE_PHP_LINT_CHECKING
*/
require_once("guiconfig.inc");
require_once("openvpn.inc");
require_once("filter.inc");
......@@ -38,7 +36,7 @@ require_once("openvpn-client-export.inc");
global $current_openvpn_version, $current_openvpn_version_rev;
$pgtitle = array("OpenVPN", "Client Export Utility");
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Client Export'));
$ras_server = array();
if (isset($config['openvpn']['openvpn-server'])) {
......@@ -615,15 +613,6 @@ if (isset($savemsg)) {
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Client Export"), true, "vpn_openvpn_export.php");
$tab_array[] = array(gettext("Shared Key Export"), false, "vpn_openvpn_export_shared.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table width="100%" border="0" class="table table-striped" cellpadding="0" cellspacing="0">
......
......@@ -34,7 +34,7 @@ require_once("pfsense-utils.inc");
require_once("interfaces.inc");
require_once("openvpn-client-export.inc");
$pgtitle = array("OpenVPN", "Client Export Utility");
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Shared Key Export'));
$ras_server = array();
if (isset($config['openvpn']['openvpn-server'])) {
......@@ -294,15 +294,6 @@ if (isset($savemsg)) {
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Client Export"), false, "vpn_openvpn_export.php");
$tab_array[] = array(gettext("Shared Key Export"), true, "vpn_openvpn_export_shared.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table width="100%" border="0" class="table table-striped" cellpadding="0" cellspacing="0">
......
......@@ -395,8 +395,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
}
$pgtitle = array(gettext("OpenVPN"), gettext("Server"));
$shortcut_section = "openvpn";
$pgtitle = array(gettext('VPN'), gettext('OpenVPN'), gettext('Server'));
include("head.inc");
......@@ -707,16 +706,6 @@ function tuntap_change() {
<section class="col-xs-12">
<?php
$tab_array = array();
$tab_array[] = array(gettext("Server"), true, "vpn_openvpn_server.php");
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Client Export"), false, "vpn_openvpn_export.php");
$tab_array[] = array(gettext("Shared Key Export"), false, "vpn_openvpn_export_shared.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12">
<?php if ($act=="new" || $act=="edit") :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment