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.
|
Follow the issue template and add additional information that will help us replicate the problem.
|
||||||
|
|
||||||
For data visualization issues:
|
For data visualization issues:
|
||||||
|
|
||||||
- Query results from the inspect drawer (data tab & query inspector)
|
- Query results from the inspect drawer (data tab & query inspector)
|
||||||
- Panel settings can be extracted in the panel inspect drawer JSON tab
|
- Panel settings can be extracted in the panel inspect drawer JSON tab
|
||||||
|
|
||||||
For a dashboard related issues:
|
For a dashboard related issues:
|
||||||
|
|
||||||
- Dashboard JSON can be found in the dashboard settings JSON model view
|
- Dashboard JSON can be found in the dashboard settings JSON model view
|
||||||
|
|
||||||
For authentication and alerting Grafana server logs are useful.
|
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.
|
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:
|
Syntax is:
|
||||||
|
|
||||||
```
|
```
|
||||||
{{< relref "example.md" >}}
|
{{< relref "example.md" >}}
|
||||||
```
|
```
|
||||||
@ -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.
|
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 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 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.
|
Once the sync is complete, the website will automatically publish to production - no further action is needed.
|
||||||
|
@ -147,6 +147,9 @@ export class MssqlDatasource extends DataSourceWithBackend<MssqlQuery, MssqlOpti
|
|||||||
.pipe(
|
.pipe(
|
||||||
map((rsp) => {
|
map((rsp) => {
|
||||||
return this.responseParser.transformMetricFindResponse(rsp);
|
return this.responseParser.transformMetricFindResponse(rsp);
|
||||||
|
}),
|
||||||
|
catchError((err) => {
|
||||||
|
return of([]);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -157,6 +157,9 @@ export class MysqlDatasource extends DataSourceWithBackend<MySQLQuery, MySQLOpti
|
|||||||
.pipe(
|
.pipe(
|
||||||
map((rsp) => {
|
map((rsp) => {
|
||||||
return this.responseParser.transformMetricFindResponse(rsp);
|
return this.responseParser.transformMetricFindResponse(rsp);
|
||||||
|
}),
|
||||||
|
catchError((err) => {
|
||||||
|
return of([]);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { map as _map } from 'lodash';
|
import { map as _map } from 'lodash';
|
||||||
import { lastValueFrom } from 'rxjs';
|
import { lastValueFrom, of } from 'rxjs';
|
||||||
import { map } from 'rxjs/operators';
|
import { map, catchError } from 'rxjs/operators';
|
||||||
import { BackendDataSourceResponse, DataSourceWithBackend, FetchResponse, getBackendSrv } from '@grafana/runtime';
|
import { BackendDataSourceResponse, DataSourceWithBackend, FetchResponse, getBackendSrv } from '@grafana/runtime';
|
||||||
import { AnnotationEvent, DataSourceInstanceSettings, MetricFindValue, ScopedVars } from '@grafana/data';
|
import { AnnotationEvent, DataSourceInstanceSettings, MetricFindValue, ScopedVars } from '@grafana/data';
|
||||||
|
|
||||||
@ -159,6 +159,9 @@ export class PostgresDatasource extends DataSourceWithBackend<PostgresQuery, Pos
|
|||||||
.pipe(
|
.pipe(
|
||||||
map((rsp) => {
|
map((rsp) => {
|
||||||
return this.responseParser.transformMetricFindResponse(rsp);
|
return this.responseParser.transformMetricFindResponse(rsp);
|
||||||
|
}),
|
||||||
|
catchError((err) => {
|
||||||
|
return of([]);
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user