Apply fixes from StyleCI (#14899)

Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
Jellyfrog
2023-03-13 22:32:22 +01:00
committed by GitHub
parent 0e322ae5d5
commit 68e0b3df28
220 changed files with 2050 additions and 2035 deletions

View File

@@ -105,7 +105,7 @@ if (! isset($vars['sort']) || empty($vars['sort'])) {
$sql .= " ORDER BY $sort";
if (isset($current)) {
$limit_low = (($current * $rowCount) - ($rowCount));
$limit_low = (($current * $rowCount) - $rowCount);
$limit_high = $rowCount;
}
@@ -145,7 +145,7 @@ foreach (dbFetchRows($sql, $param) as $alert) {
}
}
$hostname = '<div class="incident">' . generate_device_link($alert, shorthost(format_hostname($alert))) . '<div id="incident' . ($alert['id']) . '"';
$hostname = '<div class="incident">' . generate_device_link($alert, shorthost(format_hostname($alert))) . '<div id="incident' . $alert['id'] . '"';
if (is_numeric($vars['uncollapse_key_count'])) {
$hostname .= $max_row_length < (int) $vars['uncollapse_key_count'] ? '' : ' class="collapse"';
} else {
@@ -186,7 +186,7 @@ foreach (dbFetchRows($sql, $param) as $alert) {
$response[] = [
'id' => $rulei++,
'rule' => '<i title="' . htmlentities($alert['rule']) . '"><a href="' . \LibreNMS\Util\Url::generate(['page' => 'alert-rules']) . '">' . htmlentities($alert['name']) . '</a></i>',
'details' => '<a class="fa-solid fa-plus incident-toggle" style="display:none" data-toggle="collapse" data-target="#incident' . ($alert['id']) . '" data-parent="#alerts"></a>',
'details' => '<a class="fa-solid fa-plus incident-toggle" style="display:none" data-toggle="collapse" data-target="#incident' . $alert['id'] . '" data-parent="#alerts"></a>',
'verbose_details' => "<button type='button' class='btn btn-alert-details command-alert-details' aria-label='Details' id='alert-details' data-alert_log_id='{$alert_log_id}'><i class='fa-solid fa-circle-info'></i></button>",
'hostname' => $hostname,
'location' => generate_link($alert['location'], ['page' => 'devices', 'location' => $alert['location']]),