From f1bc2a2888331f9de0845af5e60ec2204f411d5d Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Wed, 15 Dec 2021 02:28:48 +0000 Subject: [PATCH] :sparkles: Builds system load usage widget --- docs/widgets.md | 22 ++++ src/components/Widgets/NdLoadHistory.vue | 144 +++++++++++++++++++++++ src/components/Widgets/WidgetBase.vue | 9 ++ 3 files changed, 175 insertions(+) create mode 100644 src/components/Widgets/NdLoadHistory.vue diff --git a/docs/widgets.md b/docs/widgets.md index 611bed60..0854cdbf 100644 --- a/docs/widgets.md +++ b/docs/widgets.md @@ -17,6 +17,8 @@ Dashy has support for displaying dynamic content in the form of widgets. There a - [Joke of the Day](#joke) - [Flight Data](#flight-data) - [Self-Hosted Services Widgets](#dynamic-widgets) + - [CPU History](#cpu-history-netdata) + - [System Load History](#load-history-netdata) - [Dynamic Widgets](#dynamic-widgets) - [Iframe Widget](#iframe-widget) - [HTML Embed Widget](#html-embedded-widget) @@ -388,6 +390,26 @@ Pull recent CPU usage history from NetData. host: http://192.168.1.1:19999 ``` +### Load History (NetData) + +Pull recent load usage in 1, 5 and 15 minute intervals, from NetData. + +

+ +##### Options + +**Field** | **Type** | **Required** | **Description** +--- | --- | --- | --- +**`host`** | `string` | Required | The URL to your NetData instance + +##### Example + +```yaml +- type: nd-load-history + options: + host: http://192.168.1.1:19999 +``` + --- ## Dynamic Widgets diff --git a/src/components/Widgets/NdLoadHistory.vue b/src/components/Widgets/NdLoadHistory.vue new file mode 100644 index 00000000..af8c9f5d --- /dev/null +++ b/src/components/Widgets/NdLoadHistory.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/src/components/Widgets/WidgetBase.vue b/src/components/Widgets/WidgetBase.vue index 3034bcf8..28f4151e 100644 --- a/src/components/Widgets/WidgetBase.vue +++ b/src/components/Widgets/WidgetBase.vue @@ -109,6 +109,13 @@ @error="handleError" :ref="widgetRef" /> +