mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CloudWatch Logs: Add selected region to autocomplete requests (#42194)
* Add region to get fields query * Fix and add tests
This commit is contained in:
@@ -263,7 +263,7 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
|
||||
};
|
||||
|
||||
onTypeahead = async (typeahead: TypeaheadInput): Promise<TypeaheadOutput> => {
|
||||
const { datasource } = this.props;
|
||||
const { datasource, query } = this.props;
|
||||
const { selectedLogGroups } = this.state;
|
||||
|
||||
if (!datasource.languageProvider) {
|
||||
@@ -276,7 +276,12 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
|
||||
|
||||
return await cloudwatchLanguageProvider.provideCompletionItems(
|
||||
{ text, value, prefix, wrapperClasses, labelKey, editor },
|
||||
{ history, absoluteRange, logGroupNames: selectedLogGroups.map((logGroup) => logGroup.value!) }
|
||||
{
|
||||
history,
|
||||
absoluteRange,
|
||||
logGroupNames: selectedLogGroups.map((logGroup) => logGroup.value!),
|
||||
region: query.region,
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user