Skip to content

Commit 276a64b

Browse files
authored
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.
1 parent 261b7e8 commit 276a64b

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

Pihole/Pihole.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ public function livestats()
4848
$details->ads_percentage_today,
4949
1
5050
);
51-
$data["gravity"] = number_format(
52-
$details->domains_being_blocked,
53-
0,
54-
'',
55-
'.'
56-
);
5751

5852
$status = "active";
5953
}
@@ -64,7 +58,6 @@ public function livestats()
6458

6559
$data["ads_blocked"] = $results["queries"];
6660
$data["ads_percentage"] = $results["percent"];
67-
$data["gravity"] = $results["gravity"];
6861

6962
$status = "active";
7063
}
@@ -151,15 +144,13 @@ public function getInfo()
151144
$message = $auth->session->message;
152145
$queriesblocked = $datasummary->queries->blocked;
153146
$percentblocked = round($datasummary->queries->percent_blocked, 2);
154-
$gravity = number_format($datasummary->gravity->domains_being_blocked, 0, '', '.');
155147

156148
$data = [
157149
'valid' => $valid,
158150
'validity' => $validity,
159151
'message' => $message,
160152
'queries' => $queriesblocked,
161-
'percent' => $percentblocked,
162-
'gravity' => $gravity
153+
'percent' => $percentblocked
163154
];
164155
return $data;
165156
}

Pihole/livestats.blade.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77
<span class="title">Percent<br /> Blocked</span>
88
<strong>{!! $ads_percentage !!}</strong>
99
</li>
10-
<li>
11-
<span class="title">Domains<br /> Blocked</span>
12-
<strong>{!! $gravity !!}</strong>
13-
</li>
1410
</ul>

0 commit comments

Comments
 (0)