Skip to content

Commit

Permalink
net/relayd: sync with master
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jan 22, 2025
1 parent 9e49c28 commit 7bbd455
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 33 deletions.
1 change: 1 addition & 0 deletions net/relayd/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
PLUGIN_NAME= relayd
PLUGIN_VERSION= 2.9
PLUGIN_REVISION= 1
PLUGIN_DEPENDS= relayd
PLUGIN_COMMENT= Relayd Load Balancer
PLUGIN_MAINTAINER= [email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public function configtestAction()
{
if ($this->request->isPost()) {
$result['status'] = 'ok';
$this->sessionClose();

$backend = new Backend();

Expand All @@ -96,7 +95,6 @@ public function reconfigureAction()
{
if ($this->request->isPost()) {
if ($this->lock()) {
$this->sessionClose();
$result['function'] = "reconfigure";
$result['status'] = 'failed';
$backend = new Backend();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ public function toggleAction($nodeType, $uuid, $enabled = null)
*/
public function searchAction($nodeType = null)
{
$this->sessionClose();
if ($this->request->isPost() && $nodeType != null) {
$this->validateNodeType($nodeType);
$grid = new UIModelGrid($this->getModel()->$nodeType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ public function toggleAction($nodeType = null, $id = null, $action = null)
{
$result = ["result" => "failed", "function" => "toggle"];
if ($this->request->isPost()) {
$this->sessionClose();
$backend = new Backend();
if (in_array($nodeType, ['redirect', 'table', 'host']) && in_array($action, ['enable', 'disable'])) {
if ($id != null && $id > 0) {
Expand All @@ -225,7 +224,9 @@ public function toggleAction($nodeType = null, $id = null, $action = null)
$relaydMdl->serializeToConfig();
Config::getInstance()->save();
// invoke service controller
return (new ServiceController())->reconfigureAction();
$srv = new ServiceController();
$srv->request = $this->request;
return $srv->reconfigureAction();
}
}
return $result;
Expand Down
54 changes: 26 additions & 28 deletions net/relayd/src/opnsense/mvc/app/views/OPNsense/Relayd/index.volt
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
{#

Copyright © 2018 by EURO-LOG AG
Copyright (c) 2021 Deciso B.V.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDEDAS ISAND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
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.

#}
# Copyright (c) 2018 EURO-LOG AG
# Copyright (c) 2021 Deciso B.V.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDEDAS ISAND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# 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.
#}

<script>

Expand Down Expand Up @@ -365,7 +363,7 @@ POSSIBILITY OF SUCH DAMAGE.
<th data-column-id="enabled" data-width="6em" data-type="string" data-formatter="rowtoggle">{{ lang._('Enabled') }}</th>
<th data-column-id="name" data-type="string">{{ lang._('Name') }}</th>
<th data-column-id="type" data-type="string">{{ lang._('Type') }}</th>
<th data-column-id="listen_address" data-type="string">{{ lang._('Adress') }}</th>
<th data-column-id="listen_address" data-type="string">{{ lang._('Address') }}</th>
<th data-column-id="listen_startport" data-formatter="listen_port" data-type="string">{{ lang._('Port') }}</th>
<th data-column-id="uuid" data-type="string" data-identifier="true" data-visible="false">{{ lang._('ID') }}</th>
<th data-column-id="commands" data-width="7em" data-formatter="commands" data-sortable="false">{{ lang._('Edit') }} | {{ lang._('Delete') }}</th>
Expand Down

0 comments on commit 7bbd455

Please sign in to comment.