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}> <div className={styles.dataSourceList}>
<CustomScrollbar> <CustomScrollbar>
<DataSourceList <DataSourceList
mixed {...props}
dashboard
current={current} current={current}
onChange={changeCallback} onChange={changeCallback}
filter={(ds) => !ds.meta.builtIn && ds.name.includes(filterTerm ?? '')} filter={(ds) => ds.name.includes(filterTerm ?? '')}
></DataSourceList> ></DataSourceList>
</CustomScrollbar> </CustomScrollbar>
</div> </div>

View File

@ -60,6 +60,7 @@ export function DataSourceModal({
<DataSourceList <DataSourceList
dashboard={false} dashboard={false}
mixed={false} mixed={false}
variables
// FIXME: Filter out the grafana data source in a hacky way // FIXME: Filter out the grafana data source in a hacky way
filter={(ds) => ds.name.includes(search) && ds.name !== '-- Grafana --'} filter={(ds) => ds.name.includes(search) && ds.name !== '-- Grafana --'}
onChange={onChange} onChange={onChange}

View File

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