mirror of
https://github.com/grafana/grafana.git
synced 2024-11-24 09:50:29 -06:00
Postgres: For template queries return [] and not error (#38060)
* Postgres: For template queries return [] and not error * remove the console error * update mssql and mysql Co-authored-by: Ying WANG <ying.wang@grafana.com>
This commit is contained in:
parent
ecfa32c8cb
commit
7f8576ee37
@ -26,10 +26,12 @@ Report a bug by submitting a [bug report](https://github.com/grafana/grafana/iss
|
||||
Follow the issue template and add additional information that will help us replicate the problem.
|
||||
|
||||
For data visualization issues:
|
||||
|
||||
- Query results from the inspect drawer (data tab & query inspector)
|
||||
- Panel settings can be extracted in the panel inspect drawer JSON tab
|
||||
|
||||
For a dashboard related issues:
|
||||
|
||||
- Dashboard JSON can be found in the dashboard settings JSON model view
|
||||
|
||||
For authentication and alerting Grafana server logs are useful.
|
||||
|
@ -25,6 +25,7 @@ Edit content in the `sources` directory.
|
||||
Use the Hugo shortcode [relref](https://gohugo.io/content-management/cross-references/#use-ref-and-relref) any time you are linking to other internal docs pages.
|
||||
|
||||
Syntax is:
|
||||
|
||||
```
|
||||
{{< relref "example.md" >}}
|
||||
```
|
||||
@ -33,7 +34,7 @@ You might need to add more context for the link (containing folders and so on, `
|
||||
|
||||
### Managing redirects
|
||||
|
||||
When moving content around or removing pages it's important that users following old links are properly redirected to the new location. We do this using the [aliases](https://gohugo.io/content-management/urls/#aliases) feature in Hugo.
|
||||
When moving content around or removing pages it's important that users following old links are properly redirected to the new location. We do this using the [aliases](https://gohugo.io/content-management/urls/#aliases) feature in Hugo.
|
||||
|
||||
If you are moving a page, add an `aliases` entry in the front matter referencing the old location of the page which will redirect the old url to the new location.
|
||||
|
||||
@ -57,7 +58,7 @@ Images are currently hosted in the grafana/website repo.
|
||||
|
||||
When a PR is merged with changes in the `docs/sources` directory, those changes are automatically synced by a GitHub action (`.github/workflows/publish.yml`) to the grafana/website repo.
|
||||
|
||||
* A PR that targets the `main` branch syncs to the `content/docs/grafana/next` directory in the `website` repository, and publishes to `https://grafana.com/docs/grafana/next/`.
|
||||
* A PR targeting the `latest/current` release branch syncs to the `content/docs/grafana/latest` directory in the `website` repository, and publishes to `https://grafana.com/docs/grafana/latest/`.
|
||||
- A PR that targets the `main` branch syncs to the `content/docs/grafana/next` directory in the `website` repository, and publishes to `https://grafana.com/docs/grafana/next/`.
|
||||
- A PR targeting the `latest/current` release branch syncs to the `content/docs/grafana/latest` directory in the `website` repository, and publishes to `https://grafana.com/docs/grafana/latest/`.
|
||||
|
||||
Once the sync is complete, the website will automatically publish to production - no further action is needed.
|
||||
|
@ -20,7 +20,7 @@ You can configure Grafana to only allow certain IP addresses or hostnames to be
|
||||
|
||||
The request security configuration option allows users to limit requests from the Grafana server. It targets requests that are generated by users. For more information, refer to [Request security]({{< relref "../enterprise/request-security.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
> **Note:** Request security is available in Grafana Enterprise v7.4 and later versions.
|
||||
> **Note:** Request security is available in Grafana Enterprise v7.4 and later versions.
|
||||
|
||||
## Firewall rules
|
||||
|
||||
|
@ -53,4 +53,4 @@ go tool trace <trace file>
|
||||
2019/11/24 22:20:42 Opening browser. Trace viewer is listening on http://127.0.0.1:39735
|
||||
```
|
||||
|
||||
For more information about how to analyze trace files, refer to [Go command trace](https://golang.org/cmd/trace/).
|
||||
For more information about how to analyze trace files, refer to [Go command trace](https://golang.org/cmd/trace/).
|
||||
|
@ -147,6 +147,9 @@ export class MssqlDatasource extends DataSourceWithBackend<MssqlQuery, MssqlOpti
|
||||
.pipe(
|
||||
map((rsp) => {
|
||||
return this.responseParser.transformMetricFindResponse(rsp);
|
||||
}),
|
||||
catchError((err) => {
|
||||
return of([]);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -157,6 +157,9 @@ export class MysqlDatasource extends DataSourceWithBackend<MySQLQuery, MySQLOpti
|
||||
.pipe(
|
||||
map((rsp) => {
|
||||
return this.responseParser.transformMetricFindResponse(rsp);
|
||||
}),
|
||||
catchError((err) => {
|
||||
return of([]);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { map as _map } from 'lodash';
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { lastValueFrom, of } from 'rxjs';
|
||||
import { map, catchError } from 'rxjs/operators';
|
||||
import { BackendDataSourceResponse, DataSourceWithBackend, FetchResponse, getBackendSrv } from '@grafana/runtime';
|
||||
import { AnnotationEvent, DataSourceInstanceSettings, MetricFindValue, ScopedVars } from '@grafana/data';
|
||||
|
||||
@ -159,6 +159,9 @@ export class PostgresDatasource extends DataSourceWithBackend<PostgresQuery, Pos
|
||||
.pipe(
|
||||
map((rsp) => {
|
||||
return this.responseParser.transformMetricFindResponse(rsp);
|
||||
}),
|
||||
catchError((err) => {
|
||||
return of([]);
|
||||
})
|
||||
)
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user