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

vpn/openvpn: collapse into menu

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