mirror of https://github.com/grafana/grafana
Cloudwatch: reorg files in components (#73176)
parent
6880ab687c
commit
c2aeb9882d
@ -1,29 +0,0 @@ |
||||
import React, { InputHTMLAttributes } from 'react'; |
||||
|
||||
import { InlineFormLabel } from '@grafana/ui'; |
||||
|
||||
export interface Props extends InputHTMLAttributes<HTMLInputElement> { |
||||
label: string; |
||||
tooltip?: string; |
||||
children?: React.ReactNode; |
||||
} |
||||
|
||||
export const QueryField = ({ label, tooltip, children }: Partial<Props>) => ( |
||||
<> |
||||
<InlineFormLabel width={8} className="query-keyword" tooltip={tooltip}> |
||||
{label} |
||||
</InlineFormLabel> |
||||
{children} |
||||
</> |
||||
); |
||||
|
||||
export const QueryInlineField = ({ ...props }: Props) => { |
||||
return ( |
||||
<div className={'gf-form-inline'}> |
||||
<QueryField {...props} /> |
||||
<div className="gf-form gf-form--grow"> |
||||
<div className="gf-form-label gf-form-label--grow" /> |
||||
</div> |
||||
</div> |
||||
); |
||||
}; |
@ -1,10 +1,11 @@ |
||||
import { render, screen, waitFor } from '@testing-library/react'; |
||||
import React from 'react'; |
||||
|
||||
import { SQLBuilderEditor } from '..'; |
||||
import { setupMockedDataSource } from '../../__mocks__/CloudWatchDataSource'; |
||||
import { QueryEditorExpressionType, QueryEditorPropertyType } from '../../expressions'; |
||||
import { CloudWatchMetricsQuery, MetricEditorMode, MetricQueryType, SQLExpression } from '../../types'; |
||||
import { setupMockedDataSource } from '../../../../__mocks__/CloudWatchDataSource'; |
||||
import { QueryEditorExpressionType, QueryEditorPropertyType } from '../../../../expressions'; |
||||
import { CloudWatchMetricsQuery, MetricEditorMode, MetricQueryType, SQLExpression } from '../../../../types'; |
||||
|
||||
import { SQLBuilderEditor } from './SQLBuilderEditor'; |
||||
|
||||
const { datasource } = setupMockedDataSource(); |
||||
|
@ -1,7 +0,0 @@ |
||||
export { Dimensions } from './Dimensions/Dimensions'; |
||||
export { QueryInlineField, QueryField } from './Forms'; |
||||
export { QueryEditor as PanelQueryEditor } from './QueryEditor'; |
||||
export { CloudWatchLogsQueryEditor } from './LogsQueryEditor'; |
||||
export { MetricStatEditor } from './MetricStatEditor'; |
||||
export { SQLBuilderEditor } from './SQLBuilderEditor'; |
||||
export { MathExpressionQueryField } from './MathExpressionQueryField'; |
Loading…
Reference in new issue