From 1ee95029f0ee47aa71174958e4b06c7d88264dc6 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 30 Nov 2023 08:11:33 +0100 Subject: [PATCH] sysutils/dec-hw: style sweep --- sysutils/dec-hw/Makefile | 1 - sysutils/dec-hw/pkg-descr | 1 - .../mvc/app/controllers/OPNsense/dechw/Api/InfoController.php | 4 ++-- sysutils/dec-hw/src/opnsense/scripts/dec-hw/powerstat | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sysutils/dec-hw/Makefile b/sysutils/dec-hw/Makefile index 326b54895..5ac268775 100644 --- a/sysutils/dec-hw/Makefile +++ b/sysutils/dec-hw/Makefile @@ -5,4 +5,3 @@ PLUGIN_MAINTAINER= stephan.de.wit@deciso.com PLUGIN_TIER= 2 .include "../../Mk/plugins.mk" - diff --git a/sysutils/dec-hw/pkg-descr b/sysutils/dec-hw/pkg-descr index c8f40a55e..30378c621 100644 --- a/sysutils/dec-hw/pkg-descr +++ b/sysutils/dec-hw/pkg-descr @@ -1,4 +1,3 @@ This package allows fetching the current power status for Deciso appliances with dual power supplies via an API call and includes a simple dashboard widget. - diff --git a/sysutils/dec-hw/src/opnsense/mvc/app/controllers/OPNsense/dechw/Api/InfoController.php b/sysutils/dec-hw/src/opnsense/mvc/app/controllers/OPNsense/dechw/Api/InfoController.php index 9581cc101..ad0393ba4 100644 --- a/sysutils/dec-hw/src/opnsense/mvc/app/controllers/OPNsense/dechw/Api/InfoController.php +++ b/sysutils/dec-hw/src/opnsense/mvc/app/controllers/OPNsense/dechw/Api/InfoController.php @@ -37,7 +37,7 @@ class InfoController extends ApiControllerBase { $result = [ "status" => "failed", - "status_translated" => gettext("Power status could not be fetched. + "status_translated" => gettext("Power status could not be fetched. This widget is only applicable to Deciso hardware with dual power supplies.") ]; $status = parse_ini_string((new Backend())->configdRun('dechw power')); @@ -52,6 +52,6 @@ class InfoController extends ApiControllerBase $result = array_merge($result, $status); } - return $result; + return $result; } } diff --git a/sysutils/dec-hw/src/opnsense/scripts/dec-hw/powerstat b/sysutils/dec-hw/src/opnsense/scripts/dec-hw/powerstat index 08773e451..81c24a015 100755 --- a/sysutils/dec-hw/src/opnsense/scripts/dec-hw/powerstat +++ b/sysutils/dec-hw/src/opnsense/scripts/dec-hw/powerstat @@ -11,5 +11,5 @@ i=1 for PIN in 4 5; do STATUS=$(gpioctl -f "$GPIOC" "$PIN") printf "pwr%d=%d\n" "$i" "$STATUS" - i=$((i + 1)) + i=$((i + 1)) done