diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php b/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php index a3d10ccc4..402373dc6 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/Api/SystemhealthController.php @@ -32,6 +32,7 @@ namespace OPNsense\Diagnostics\Api; use \OPNsense\Base\ApiControllerBase; use \OPNsense\Core\Backend; +use \OPNsense\Core\Config; /** * Class ServiceController @@ -585,4 +586,22 @@ class SystemhealthController extends ApiControllerBase return ["sets" => [], "d3" => [], "title" => "error", "y-axis_label" => ""]; } } + + /** + * Retrieve network interfaces by key (lan, wan, opt1,..) + * @return array + */ + public function getInterfacesAction() + { + // collect interface names + $intfmap = array(); + $config = Config::getInstance()->object() ; + if ($config->interfaces != null) { + foreach ($config->interfaces->children() as $key => $node) { + $intfmap[(string)$key] = array("descr" => !empty((string)$node->descr) ? (string)$node->descr : $key) ; + } + } + return $intfmap; + } + } diff --git a/src/opnsense/mvc/app/views/OPNsense/Diagnostics/systemhealth.volt b/src/opnsense/mvc/app/views/OPNsense/Diagnostics/systemhealth.volt index 1da70d6cb..3352e68f2 100644 --- a/src/opnsense/mvc/app/views/OPNsense/Diagnostics/systemhealth.volt +++ b/src/opnsense/mvc/app/views/OPNsense/Diagnostics/systemhealth.volt @@ -210,11 +210,11 @@ rrd_name = subitem + '-' + category; if (subitem==active_subitem) { - tabs += '