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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -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>

View File

@ -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}

View File

@ -81,6 +81,7 @@ export class DataSourcePicker extends PureComponent<DataSourcePickerProps, DataS
return (
<div>
<DataSourceDropdown
{...this.props}
datasources={this.getDatasources()}
onChange={this.onChange}
recentlyUsed={recentlyUsed}