diff --git a/docs/widgets.md b/docs/widgets.md index 3f6f3e35..c72b6537 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -28,6 +28,7 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Memory History](#memory-history-netdata) - [System Load History](#load-history-netdata) - [Pi Hole Stats](#pi-hole-stats) + - [Pi Hole Queries](#pi-hole-queries) - [Dynamic Widgets](#dynamic-widgets) - [Iframe Widget](#iframe-widget) - [HTML Embed Widget](#html-embedded-widget) @@ -643,6 +644,30 @@ Displays the number of queries blocked by [Pi-Hole](https://pi-hole.net/). options: hostname: http://192.168.130.1 ``` +--- + +### Pi Hole Queries + +Shows top queries that were blocked and allowed by [Pi-Hole](https://pi-hole.net/). + +

+ +##### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`host`** | `string` | Required | The URL to your Pi-Hole instance +**`apiKey`** | `string` | Required | Your Pi-Hole web password. It is **NOT** your pi-hole admin interface or server password. It can be found in `/etc/pihole/setupVars.conf`, and is a 64-character located on the line that starts with `WEBPASSWORD` +**`count`** | `number` | _Optional_ | The number of queries to display. Defaults to `10` + +##### Example + +```yaml +- type: pi-hole-top-queries + options: + hostname: https://pi-hole.local + apiKey: xxxxxxxxxxxxxxxxxxxxxxx +``` --- diff --git a/src/components/Widgets/PiHoleTopQueries.vue b/src/components/Widgets/PiHoleTopQueries.vue new file mode 100644 index 00000000..ab9d518a --- /dev/null +++ b/src/components/Widgets/PiHoleTopQueries.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index fbb1a7aa..fb5c3587 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -130,6 +130,13 @@ @error="handleError" :ref="widgetRef" /> +