Clean up pihole livestats (#817)

* Update livestats.blade.php

Clean up the live stats. Three columns was way too crowded. Every other app has two columns. This is much cleaner.

* Update Pihole.php

Remove unnecessary variables after updated livestats.

* Update Pihole.php

Remove whitespace.
This commit is contained in:
Brent Friedman 2025-02-26 05:17:38 -07:00 committed by GitHub
parent 261b7e8b36
commit 276a64b555
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 14 deletions

View File

@ -48,12 +48,6 @@ class Pihole extends \App\SupportedApps implements \App\EnhancedApps
$details->ads_percentage_today,
1
);
$data["gravity"] = number_format(
$details->domains_being_blocked,
0,
'',
'.'
);
$status = "active";
}
@ -64,7 +58,6 @@ class Pihole extends \App\SupportedApps implements \App\EnhancedApps
$data["ads_blocked"] = $results["queries"];
$data["ads_percentage"] = $results["percent"];
$data["gravity"] = $results["gravity"];
$status = "active";
}
@ -151,15 +144,13 @@ class Pihole extends \App\SupportedApps implements \App\EnhancedApps
$message = $auth->session->message;
$queriesblocked = $datasummary->queries->blocked;
$percentblocked = round($datasummary->queries->percent_blocked, 2);
$gravity = number_format($datasummary->gravity->domains_being_blocked, 0, '', '.');
$data = [
'valid' => $valid,
'validity' => $validity,
'message' => $message,
'queries' => $queriesblocked,
'percent' => $percentblocked,
'gravity' => $gravity
'percent' => $percentblocked
];
return $data;
}

View File

@ -7,8 +7,4 @@
<span class="title">Percent<br /> Blocked</span>
<strong>{!! $ads_percentage !!}</strong>
</li>
<li>
<span class="title">Domains<br /> Blocked</span>
<strong>{!! $gravity !!}</strong>
</li>
</ul>