mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
Renamed query function - added 'Azure'
This commit is contained in:
parent
515673809e
commit
a046bcdd7c
@ -25,16 +25,16 @@ types of template variables.
|
||||
|
||||
The Azure Monitor data source provides the following queries you can specify in the Query field in the Variable edit view
|
||||
|
||||
| Name | Description |
|
||||
| --------------- | -------------------------------------------------------------------------------------------- |
|
||||
| Subscriptions | Returns subscriptions. |
|
||||
| Resource Groups | Returns resource groups for a specified subscription. |
|
||||
| Namespaces | Returns metric namespaces for the specified subscription and resource group. |
|
||||
| Resource Names | Returns a list of resource names for a specified subscription, resource group and namespace. |
|
||||
| Metric Names | Returns a list of metric names for a resource. |
|
||||
| Workspaces | Returns a list of workspaces for the specified subscription. |
|
||||
| Logs | Use a KQL query to return values. |
|
||||
| Resource Graph | Use an ARG query to return values. |
|
||||
| Name | Description |
|
||||
| -------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| Subscriptions | Returns subscriptions. |
|
||||
| Resource Groups | Returns resource groups for a specified subscription. |
|
||||
| Namespaces | Returns metric namespaces for the specified subscription and resource group. |
|
||||
| Resource Names | Returns a list of resource names for a specified subscription, resource group and namespace. |
|
||||
| Metric Names | Returns a list of metric names for a resource. |
|
||||
| Workspaces | Returns a list of workspaces for the specified subscription. |
|
||||
| Logs | Use a KQL query to return values. |
|
||||
| Azure Resource Graph | Use an ARG query to return values. |
|
||||
|
||||
Any Log Analytics KQL query that returns a single list of values can also be used in the Query field. For example:
|
||||
|
||||
|
@ -104,6 +104,7 @@ describe('VariableEditor:', () => {
|
||||
render(<VariableEditor {...ARGqueryProps()} />);
|
||||
await waitFor(() => screen.queryByTestId('mockeditor'));
|
||||
expect(screen.queryByLabelText('Subscriptions')).toBeInTheDocument();
|
||||
expect(screen.queryByText('Azure Resource Graph')).toBeInTheDocument();
|
||||
expect(screen.queryByLabelText('Select subscription')).not.toBeInTheDocument();
|
||||
expect(screen.queryByLabelText('Select query type')).not.toBeInTheDocument();
|
||||
expect(screen.queryByLabelText('Select resource group')).not.toBeInTheDocument();
|
||||
|
@ -33,7 +33,7 @@ const VariableEditor = (props: Props) => {
|
||||
{ label: 'Metric Names', value: AzureQueryType.MetricNamesQuery },
|
||||
{ label: 'Workspaces', value: AzureQueryType.WorkspacesQuery },
|
||||
{ label: 'Logs', value: AzureQueryType.LogAnalytics },
|
||||
{ label: 'Resource Graph', value: AzureQueryType.AzureResourceGraph },
|
||||
{ label: 'Azure Resource Graph', value: AzureQueryType.AzureResourceGraph },
|
||||
];
|
||||
if (typeof props.query === 'object' && props.query.queryType === AzureQueryType.GrafanaTemplateVariableFn) {
|
||||
// Add the option for the GrafanaTemplateVariableFn only if it's already in use
|
||||
|
Loading…
Reference in New Issue
Block a user