-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add query mode and Separate UA and GA4 Frontend (#87)
* Add Query Mode(time series, table), Seperate UA, GA4 query editor * Add error message at no time dimensions * Fix CI
- Loading branch information
Showing
10 changed files
with
384 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { QueryEditorProps } from '@grafana/data'; | ||
import { DataSource } from 'DataSource'; | ||
import { QueryEditorGA4 } from 'QueryEditorGA4'; | ||
import { QueryEditorUA } from 'QueryEditorUA'; | ||
import React, { PureComponent } from 'react'; | ||
import { GADataSourceOptions, GAQuery } from 'types'; | ||
|
||
type Props = QueryEditorProps<DataSource, GAQuery, GADataSourceOptions>; | ||
|
||
|
||
export class QueryEditorCommon extends PureComponent<Props> { | ||
constructor(props: Readonly<Props>) { | ||
super(props); | ||
this.props.query.version = props.datasource.getGaVersion() | ||
} | ||
render() { | ||
console.log("common") | ||
const { query, datasource, onChange, onRunQuery } = this.props; | ||
const { version } = query | ||
if (version === "v4") { | ||
return <QueryEditorGA4 datasource={datasource} onChange={onChange} onRunQuery={onRunQuery} query={query}></QueryEditorGA4> | ||
} else { | ||
return <QueryEditorUA datasource={datasource} onChange={onChange} onRunQuery={onRunQuery} query={query}></QueryEditorUA> | ||
} | ||
} | ||
} |
Oops, something went wrong.