mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Improve typings 🧹 (#74599)
* various type fixes * candlestick panel type fixes * few more fixes * some fixes * more :) * moar! * undo change to SilencesFilter * undo change to configureStore
This commit is contained in:
@@ -27,15 +27,17 @@ export function queryIsEmpty(query: DataQuery): boolean {
|
||||
}
|
||||
|
||||
export function addQuery(queries: DataQuery[], query?: Partial<DataQuery>, datasource?: DataSourceRef): DataQuery[] {
|
||||
const q = query || {};
|
||||
q.refId = getNextRefIdChar(queries);
|
||||
q.hide = false;
|
||||
const q: DataQuery = {
|
||||
...query,
|
||||
refId: getNextRefIdChar(queries),
|
||||
hide: false,
|
||||
};
|
||||
|
||||
if (!q.datasource && datasource) {
|
||||
q.datasource = datasource;
|
||||
}
|
||||
|
||||
return [...queries, q as DataQuery];
|
||||
return [...queries, q];
|
||||
}
|
||||
|
||||
export function isDataQuery(url: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user