net/haproxy: style adjustments

This commit is contained in:
Franco Fichtner
2021-03-05 13:46:27 +01:00
parent ca30bb9ab6
commit 2267242449
3 changed files with 9 additions and 12 deletions
@@ -72,15 +72,15 @@ class ExportController extends ApiControllerBase
$backend = new Backend();
if ($type == 'config') {
$result = $backend->configdRun("haproxy showconf");
$filename = 'haproxy.conf';
$filetype = 'text/plain';
$content = $result;
$result = $backend->configdRun("haproxy showconf");
$filename = 'haproxy.conf';
$filetype = 'text/plain';
$content = $result;
} else {
$result = $backend->configdRun("haproxy exportall");
$filename = 'haproxy_config_export.zip';
$filetype = 'application/zip';
$content = file_get_contents('/tmp/haproxy_config_export.zip');
$result = $backend->configdRun("haproxy exportall");
$filename = 'haproxy_config_export.zip';
$filetype = 'application/zip';
$content = file_get_contents('/tmp/haproxy_config_export.zip');
}
$response = array(
@@ -295,7 +295,6 @@ class MaintenanceController extends ApiMutableModelControllerBase
// Iterate over all possible cron jobs
foreach ($cronjobs as $cron => $cron_action) {
// Name of the item that holds the cron UUID
$cron_ref = "${cron}Cron";
@@ -303,7 +302,6 @@ class MaintenanceController extends ApiMutableModelControllerBase
if ((string)$mdlHaproxy->maintenance->cronjobs->$cron == "1") {
// Check if a cron job already exists
if ((string)$mdlHaproxy->maintenance->cronjobs->$cron_ref == "") {
// Create new cron job
$mdlCron = new Cron();
// NOTE: Only configd actions are valid commands for cronjobs
@@ -339,7 +337,6 @@ class MaintenanceController extends ApiMutableModelControllerBase
} else {
// Check if a cron job exists
if ((string)$mdlHaproxy->maintenance->cronjobs->$cron_ref != "") {
// Clean existin entry
$cron_uuid = (string)$mdlHaproxy->maintenance->cronjobs->$cron_ref;
$mdlHaproxy->maintenance->cronjobs->$cron_ref = "";
@@ -210,7 +210,7 @@ POSSIBILITY OF SUCH DAMAGE.
var row_id = $(this).data("row-id");
var rows = $("#grid-certificates").bootgrid("getCurrentRows");
var row = rows.filter(function(row) {
return row.id == row_id;
return row.id == row_id;
})[0];
var requested_count = row.total_count;
var frontend_ids = row.id