From c5eab80d765ab03155399ce669c25cc17eb736c9 Mon Sep 17 00:00:00 2001 From: Bram Ceulemans Date: Tue, 8 Dec 2020 13:20:26 +0100 Subject: Added extended PiHole statistics --- src/components/services/PiHole.vue | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) (limited to 'src/components') diff --git a/src/components/services/PiHole.vue b/src/components/services/PiHole.vue index c08e1fa..47b1261 100644 --- a/src/components/services/PiHole.vue +++ b/src/components/services/PiHole.vue @@ -11,12 +11,19 @@
- +

{{ item.name }}

-

{{ item.subtitle }}

+

+ + +

{{ status.status }} @@ -42,6 +49,20 @@ export default { status: null, }; }, + computed: { + percentage: function () { + if (this.status) { + return this.status.ads_percentage_today.toFixed(1); + } + return ""; + }, + blocked: function () { + if (this.status) { + return this.status.dns_queries_today.toFixed(0); + } + return ""; + }, + }, created: function () { this.fetchStatus(); }, @@ -66,13 +87,13 @@ export default { &.enabled:before { background-color: #94e185; border-color: #78d965; - box-shadow: 0px 0px 4px 1px #94e185; + box-shadow: 0 0 4px 1px #94e185; } &.disabled:before { background-color: #c9404d; border-color: #c42c3b; - box-shadow: 0px 0px 4px 1px #c9404d; + box-shadow: 0 0 4px 1px #c9404d; } &:before { -- cgit v1.2.3