Variables are available in the new DS picker and modal (#66923)

This commit is contained in:
Ivan Ortega Alba
2023-04-20 11:34:24 +02:00
committed by GitHub
parent a37bf1ac2a
commit 3edc246ca3
3 changed files with 4 additions and 3 deletions
@@ -146,11 +146,10 @@ const PickerContent = React.forwardRef<HTMLDivElement, PickerContentProps>((prop
<div className={styles.dataSourceList}>
<CustomScrollbar>
<DataSourceList
mixed
dashboard
{...props}
current={current}
onChange={changeCallback}
filter={(ds) => !ds.meta.builtIn && ds.name.includes(filterTerm ?? '')}
filter={(ds) => ds.name.includes(filterTerm ?? '')}
></DataSourceList>
</CustomScrollbar>
</div>
@@ -60,6 +60,7 @@ export function DataSourceModal({
<DataSourceList
dashboard={false}
mixed={false}
variables
// FIXME: Filter out the grafana data source in a hacky way
filter={(ds) => ds.name.includes(search) && ds.name !== '-- Grafana --'}
onChange={onChange}
@@ -81,6 +81,7 @@ export class DataSourcePicker extends PureComponent<DataSourcePickerProps, DataS
return (
<div>
<DataSourceDropdown
{...this.props}
datasources={this.getDatasources()}
onChange={this.onChange}
recentlyUsed={recentlyUsed}