Interfaces: Overview - miinor cleanups for https://github.com/opnsense/core/issues/6832

o export full overview instead of ifconfig output, for debugging purposes its better to have the full picture
o remove json_encode() from getInterfaceAction() and let the framework do its usual thing...
This commit is contained in:
Ad Schellevis 2023-12-25 14:26:43 +01:00
parent 4d495ea6cc
commit 495d036d8d
2 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ class OverviewController extends ApiControllerBase
}
}
return json_encode($result);
return $result;
}
public function reloadInterfaceAction($identifier = null)
@ -276,6 +276,6 @@ class OverviewController extends ApiControllerBase
$this->sessionClose();
$this->response->setRawHeader('Content-Type: application/json');
$this->response->setRawHeader('Content-Disposition: attachment; filename=ifconfig.json');
echo (new Backend())->configdRun('interface list ifconfig');
echo json_encode($this->parseIfInfo(null, true));
}
}

View File

@ -292,7 +292,7 @@
<div class="tab-content content-box">
<div id="export-wrapper" class="btn-group">
<button id="export" class="btn btn-default" data-toggle="tooltip" title="" type="button" data-original-title="Download raw ifconfig output">
<button id="export" class="btn btn-default" data-toggle="tooltip" title="" type="button" data-original-title="Download overview (json)">
<span class="fa fa-cloud-download"></span>
</button>
</div>