From 002eb3e1971ba0e3df1f51939ee643ad8959eed4 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sun, 29 Aug 2021 17:31:05 +0100 Subject: [PATCH] Updates searching and status indicator docs --- docs/searching.md | 30 ++++++++++++++++++++++++++++++ docs/status-indicators.md | 21 ++++++++++++++------- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/docs/searching.md b/docs/searching.md index b8540e86..dddd8424 100644 --- a/docs/searching.md +++ b/docs/searching.md @@ -47,6 +47,36 @@ For apps that you use regularly, you can set a custom keybinding. Use the `hotke In the above example, pressing 2 will launch Bookstack. Or hitting 3 will open Git in the workspace view. +## Web Search +It's possible to search the web directly from Dashy, which might be useful if you're using Dashy as your start page. This can be done by typing your query as normal, and then pressing . Web search options are configured under `appConfig.webSearch`. + +#### Setting Search Engine +Set your default search engine using the `webSearch.searchEngine` property. This defaults to DuckDuckGo. Search engine must be referenced by their key, the following providers are supported: +- [`duckduckgo`](https://duckduckgo.com), [`google`](https://google.com), [`whoogle`](https://whoogle.sdf.org), [`qwant`](https://www.qwant.com), [`startpage`](https://www.startpage.com), [`searx-bar`](https://searx.bar), [`searx-info`](https://searx.info) +- [`searx-tiekoetter`](https://searx.tiekoetter.com), [`searx-bissisoft`](https://searx.bissisoft.com), [`ecosia`](https://www.ecosia.org), [`metager`](https://metager.org/meta), [`swisscows`](https://swisscows.com), [`mojeek`](https://www.mojeek.com) +- [`wikipedia`](https://en.wikipedia.org), [`wolframalpha`](https://www.wolframalpha.com), [`stackoverflow`](https://stackoverflow.com), [`github`](https://github.com), [`reddit`](https://www.reddit.com), [`youtube`](https://youtube.com), [`bbc`](https://www.bbc.co.uk) + +#### Using Custom Search Engine +You can also use a custom search engine, that isn't included in the above list (like a self-hosted instance of [Whoogle](https://github.com/benbusby/whoogle-search) or [Searx](https://searx.github.io/searx/)). Set `searchEngine: custom`, and then specify the URL (plus query params) to you're search engine under `customSearchEngine`. + +For example: +```yaml +appConfig: + webSearch: + searchEngine: custom + customSearchEngine: 'https://searx.local/search?q=' +``` + +#### Setting Opening Method +In a similar way to opening apps, you can specify where you would like search results to be opened. This is done under the `openingMethod` attribute, and can be set to either `newtab`, `sametab` or `workspace`. By default results are opened in a new tab. + +#### Disabling Web Search +Web search can be disabled, by setting `disableWebSearch`, for example: + +```yaml +appConfig: + webSearch: { disableWebSearch: true } +``` ## Clearing Search You can clear your search term at any time, by pressing Esc. diff --git a/docs/status-indicators.md b/docs/status-indicators.md index 8f2a8469..ad9e6724 100644 --- a/docs/status-indicators.md +++ b/docs/status-indicators.md @@ -1,6 +1,6 @@ # Status Indicators -Dashy has an optional feature that can display a small icon next to each of your running services, indicating it's current status. This is useful if you are using Dashy as your homelab's start page, as it gives you an overview of the health of each of your running services. +Dashy has an optional feature that can display a small icon next to each of your running services, indicating it's current status. This can be useful if you are using Dashy as your homelab's start page, as it gives you an overview of the health of each of your running services. The status feature will show response time, response code, online/ offline check and if applicable, a relevant error message

@@ -24,21 +24,21 @@ sections: description: Firewall Central Management icon: networking/opnsense.png url: https://192.168.1.1 - statusCheck: false + statusCheck: false - title: MalTrail description: Malicious traffic detection system icon: networking/maltrail.png url: http://192.168.1.1:8338 - statusCheck: true + statusCheck: true - title: Ntopng description: Network traffic probe and network use monitor icon: networking/ntop.png url: http://192.168.1.1:3001 - statusCheck: true + statusCheck: true ``` ## Continuous Checking -By default, with status indicators enabled Dashy will check an applications status on page load, and will not keep indicators updated. This is usually desirable behavior. However, if you do want the status indicators to continue to poll your running services, this can be enabled by setting the `statusCheckInterval` attribute. Here you define an interval in seconds, and Dashy will poll your apps every x seconds. Note that if this number is very low (below 5 seconds), you may notice the app running slightly slower. +By default, with status indicators enabled Dashy will check an applications status on page load, and will not keep indicators updated. This is usually desirable behavior. However, if you do want the status indicators to continue to poll your running services, this can be enabled by setting the `statusCheckInterval` attribute. Here you define an interval as an integer in seconds, and Dashy will poll your apps every x seconds. Note that if this number is very low (below 5 seconds), you may notice the app running slightly slower. The following example, will instruct Dashy to continuously check the status of your services every 20 seconds @@ -57,6 +57,9 @@ You can set the `statusCheckUrl` property on any given item in order to do this. If your service is responding with an error, despite being up and running, it is most likely because custom headers for authentication, authorization or encoding are required. You can define these headers under the `statusCheckHeaders` property for any service. It should be defined as an object format, with the name of header as the key, and header content as the value. For example, `statusCheckHeaders: { 'X-Custom-Header': 'foobar' }` +## Disabling Security +By default, (if you're using HTTPS) any requests to insecure or non-HTTPS content will be blocked. This will cause the status check to fail. If you trust the endpoint (e.g. you're self-hosting it), then you can disable this security measure for an individual item. This is done by setting `statusCheckAllowInsecure: true` + ## Troubleshooting Failing Status Checks If the status is always returning an error, despite the service being online, then it is most likely an issue with access control, and should be fixed with the correct headers. Hover over the failing status to see the error code and response, in order to know where to start with addressing it. If your service requires requests to include any authorization in the headers, then use the `statusCheckHeaders` property, as described above. @@ -65,12 +68,16 @@ If you are still having issues, it may be because your target application is blo Access-Control-Allow-Origin: https://location-of-dashy/ Vary: Origin ``` +If the URL you are checking is not using HTTPS, then you may need to disable the rejection of insecure requests. This can be done by setting `statusCheckAllowInsecure` to true for a given item. + +If you're serving Dashy though a CDN, instead of using the Node server or Docker image, then the Node endpoint that makes requests will not be available to you, and all requests will fail. A workaround for this may be implemented in the future, but in the meantime, your only option is to use the Docker or Node deployment method. + For further troubleshooting, use an application like [Postman](https://postman.com) to diagnose the issue. ## How it Works -When Dashy is loaded, items with `statusCheck` enabled will make a request, to `https://[your-host-name]/ping?url=[address-or-servce]`, which in turn will ping that running service, and respond with a status code. Response time is calculated from the difference between start and end time of the request. +When the app is loaded, if `appConfig.statusCheck: true` is set, or if any items have the `statusCheck: true` enabled, then Dashy will make a request, to `https://[your-host-name]/ping?url=[address-or-servce]` (may al include GET params for headers and the secure flag), which in turn will ping that running service, and respond with a status code. Response time is calculated from the difference between start and end time of the request. When the response completes, an indicator will display next to each item. The color denotes the status: Yellow while waiting for the response to return, green if request was successful, red if it failed, and grey if it was unable to make the request all together. -All requests are made straight from your server, there is no intermediary. So providing you are hosting Dashy yourself, and are checking the status of other self-hosted services, there shouldn't be any privacy concerns. Requests are made asynchronously, so this won't have any impact on page load speeds. However recurring requests (using `statusCheckInterval`) may run more slowly if the interval between requests is very short. +All requests are made straight from your server, there is no intermediary. So providing you are hosting Dashy yourself, and are checking the status of other self-hosted services, there shouldn't be any privacy concerns. Requests are made asynchronously, so this won't have any significant impact on page load speeds. However recurring requests (using `statusCheckInterval`) may run more slowly if the interval between requests is very short.