add mkdocs

This commit is contained in:
Ben Phelps 2023-09-29 21:01:11 +03:00
parent b215843b26
commit 47765ee05e
144 changed files with 4219 additions and 3 deletions

View file

@ -0,0 +1,51 @@
---
title: Date & Time
description: Date & Time Information Widget Configuration
---
This allows you to display the date and/or time, can be heavily configured using [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat).
Formatting is locale aware and will present your date in the regional format you expect, for example, `9/16/22, 3:03 PM` for locale `en` and `16.09.22, 15:03` for `de`. You can also specify a locale just for the datetime widget with the `locale` option (see below).
```yaml
- datetime:
text_size: xl
format:
timeStyle: short
```
Any options passed to `format` are passed directly to [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat), please reference the MDN documentation for all available options.
Valid text sizes are `4xl`, `3xl`, `2xl`, `xl`, `md`, `sm`, `xs`.
A few examples,
```yaml
# 13:37
format:
timeStyle: short
hourCycle: h23
```
```yaml
# 1:37 PM
format:
timeStyle: short
hour12: true
```
```yaml
# 1/23/22, 1:37 PM
format:
dateStyle: short
timeStyle: short
hour12: true
```
```yaml
# 4 januari 2023 om 13:51:25 PST
locale: nl
format:
dateStyle: long
timeStyle: long
```

View file

@ -0,0 +1,33 @@
---
title: Glances
description: Glances Information Widget Configuration
---
_(Find the Glances service widget [here](../services/glances.md))_
The Glances widget allows you to monitor the resources (CPU, memory, storage, temp & uptime) of host or another machine, and is designed to match the `resources` info widget. You can have multiple instances by adding another configuration block. The `cputemp`, `uptime` & `disk` states require separate API calls and thus are not enabled by default. Glances needs to be running in "web server" mode to enable the API, see the [glances docs](https://glances.readthedocs.io/en/latest/quickstart.html#web-server-mode).
```yaml
- glances:
url: http://host.or.ip:port
username: user # optional if auth enabled in Glances
password: pass # optional if auth enabled in Glances
cpu: true # optional, enabled by default, disable by setting to false
mem: true # optional, enabled by default, disable by setting to false
cputemp: true # disabled by default
uptime: true # disabled by default
disk: / # disabled by default, use mount point of disk(s) in glances. Can also be a list (see below)
expanded: true # show the expanded view
label: MyMachine # optional
```
Multiple disks can be specified as:
```yaml
disk:
- /
- /boot
...
```
_Added in v0.4.18, updated in v0.6.11, v0.6.21_

View file

@ -0,0 +1,14 @@
---
title: Greeting
description: Greeting Information Widget Configuration
---
This allows you to display simple text, can be configured like so:
```yaml
- greeting:
text_size: xl
text: Greeting Text
```
Valid text sizes are `4xl`, `3xl`, `2xl`, `xl`, `md`, `sm`, `xs`.

View file

@ -0,0 +1,4 @@
---
title: Info Widgets
description: Homepage info widgets.
---

View file

@ -0,0 +1,31 @@
---
title: Kubernetes
description: Kubernetes Information Widget Configuration
---
This is very similar to the Resources widget, but provides resource information about a Kubernetes cluster.
It provides CPU and Memory usage, by node and/or at the cluster level.
```yaml
- kubernetes:
cluster:
# Shows cluster-wide statistics
show: true
# Shows the aggregate CPU stats
cpu: true
# Shows the aggregate memory stats
memory: true
# Shows a custom label
showLabel: true
label: "cluster"
nodes:
# Shows node-specific statistics
show: true
# Shows the CPU for each node
cpu: true
# Shows the memory for each node
memory: true
# Shows the label, which is always the node name
showLabel: true
```

13
docs/widgets/info/logo.md Normal file
View file

@ -0,0 +1,13 @@
---
title: Logo
description: Logo Information Widget Configuration
---
This allows you to display the homepage logo, you can optionally specify your own icon using similar options as other icons, see [service icons](../../configs/services.md#icons).
```yaml
- logo:
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/I_Love_New_York.svg/1101px-I_Love_New_York.svg.png # optional
```
_Added in v0.4.18, updated in 0.X.X_

View file

@ -0,0 +1,29 @@
---
title: Longhorn
description: Longhorn Storage Widget Configuration
---
The Longhorn widget pulls storage utilization metrics from the Longhorn storage driver on Kubernetes.
It is designed to appear similar to the Resource widget's disk representation.
The exact metrics should be very similar to what is seen on the Longhorn dashboard itself.
It can show the aggregate metrics and/or the individual node metrics.
```yaml
- longhorn:
# Show the expanded view
expanded: true
# Shows a node representing the aggregate values
total: true
# Shows the node names as labels
labels: true
# Show the nodes
nodes: true
# An explicit list of nodes to show. All are shown by default if "nodes" is true
include:
- node1
- node2
```
The Longhorn URL and credentials are stored in the `providers` section of the `settings.yaml`.

View file

@ -0,0 +1,18 @@
---
title: Open-Meteo
description: Open-Meteo Information Widget Configuration
---
No registration is required at all! See [https://open-meteo.com/en/docs](https://open-meteo.com/en/docs)
```yaml
- openmeteo:
label: Kyiv # optional
latitude: 50.449684
longitude: 30.525026
timezone: Europe/Kiev # optional
units: metric # or imperial
cache: 5 # Time in minutes to cache API responses, to stay within limits
```
You can optionally not pass a `latitude` and `longitude` and the widget will use your current location (requires a secure context, eg. HTTPS).

View file

@ -0,0 +1,19 @@
---
title: OpenWeatherMap
description: OpenWeatherMap Information Widget Configuration
---
The free tier "One Call API" is all thats required, you will need to [subscribe](https://home.openweathermap.org/subscriptions/unauth_subscribe/onecall_30/base) and grab your API key.
```yaml
- openweathermap:
label: Kyiv #optional
latitude: 50.449684
longitude: 30.525026
units: metric # or imperial
provider: openweathermap
apiKey: youropenweathermapkey # required only if not using provider, this reveals api key in requests
cache: 5 # Time in minutes to cache API responses, to stay within limits
```
You can optionally not pass a `latitude` and `longitude` and the widget will use your current location (requires a secure context, eg. HTTPS).

View file

@ -0,0 +1,71 @@
---
title: Resources
description: Resources Information Widget Configuration
---
You can include all or some of the available resources. If you do not want to see that resource, simply pass `false`.
The disk path is the path reported by `df` (Mounted On), or the mount point of the disk.
The cpu and memory resource information are the container's usage while [glances](glances.md) displays statistics for the host machine on which it is installed.
_Note: unfortunately, the package used for getting CPU temp ([systeminformation](https://systeminformation.io)) is not compatibile with some setups and will not report any value(s) for CPU temp._
**Any disk you wish to access must be mounted to your container as a volume.**
```yaml
- resources:
cpu: true
memory: true
disk: /disk/mount/path
cputemp: true
uptime: true
units: imperial # only used by cpu temp
refresh: 3000 # optional, in ms
```
You can also pass a `label` option, which allows you to group resources under named sections,
```yaml
- resources:
label: System
cpu: true
memory: true
- resources:
label: Storage
disk: /mnt/storage
```
Which produces something like this,
<img width="373" alt="Resource Groups" src="https://user-images.githubusercontent.com/82196/189524699-e9005138-e049-4a9c-8833-ac06e39882da.png">
If you have more than a single disk and would like to group them together under the same label, you can pass an array of paths instead,
```yaml
- resources:
label: Storage
disk:
- /mnt/storage
- /mnt/backup
- /mnt/media
```
To produce something like this,
<img width="369" alt="Screenshot 2022-09-11 at 2 15 42 PM" src="https://user-images.githubusercontent.com/82196/189524583-abdf4cc6-99da-430c-b316-16c567db5639.png">
You can additionally supply an optional `expanded` property set to true in order to show additional details about the resources. By default the expanded property is set to false when not supplied.
```yaml
- resources:
label: Array Disks
expanded: true
disk:
- /disk1
- /disk2
- /disk3
```
![194136533-c4238c82-4d67-41a4-b3c8-18bf26d33ac2](https://user-images.githubusercontent.com/3441425/194728642-a9885274-922b-4027-acf5-a746f58fdfce.png)

View file

@ -0,0 +1,31 @@
---
title: Search
description: Search Information Widget Configuration
---
You can add a search bar to your top widget area that can search using Google, Duckduckgo, Bing, Baidu, Brave or any other custom provider that supports the basic `?q=` search query param.
```yaml
- search:
provider: google # google, duckduckgo, bing, baidu, brave or custom
focus: true # Optional, will set focus to the search bar on page load
target: _blank # One of _self, _blank, _parent or _top
```
or for a custom search:
```yaml
- search:
provider: custom
url: https://lougle.com/?q=
target: _blank
```
multiple providers is also supported via a dropdown (excluding custom):
```yaml
- search:
provider: [brave, google, duckduckgo]
```
_Added in v0.1.6, updated in 0.6.0_

View file

@ -0,0 +1,24 @@
---
title: Unifi Controller
description: Unifi Controller Information Widget Configuration
---
_(Find the Unifi Controller service widget [here](../services/unifi-controller.md))_
You can display general connectivity status from your Unifi (Network) Controller. When authenticating you will want to use a local account that has at least read privileges.
An optional 'site' parameter can be supplied, if it is not the widget will use the default site for the controller.
_Note: If you enter e.g. incorrect credentials and receive an "API Error", you may need to recreate the container to clear the cache._
<img width="162" alt="unifi_infowidget" src="https://user-images.githubusercontent.com/4887959/197706832-f5a8706b-7282-4892-a666-b7d999752562.png">
```yaml
- unifi_console:
url: https://unifi.host.or.ip:port
username: user
password: pass
site: Site Name # optional
```
_Added in v0.4.18, updated in 0.6.7_

View file

@ -0,0 +1,20 @@
---
title: Weather API
description: Weather API Information Widget Configuration
---
**Note: this widget is considered 'deprecated' since there is no longer a free Weather API tier for new members. See the openmeteo or openweathermap widgets for alternatives.**
The free tier is all thats required, you will need to [register](https://www.weatherapi.com/signup.aspx) and grab your API key.
```yaml
- weatherapi:
label: Kyiv # optional
latitude: 50.449684
longitude: 30.525026
units: metric # or imperial
apiKey: yourweatherapikey
cache: 5 # Time in minutes to cache API responses, to stay within limits
```
You can optionally not pass a `latitude` and `longitude` and the widget will use your current location (requires a secure context, eg. HTTPS).