mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
GoogleCloudMonitoring: Remove unused code (#58347)
This commit is contained in:
parent
17cce38545
commit
0a8fdc4550
@ -1,10 +1,7 @@
|
||||
import { css } from '@emotion/css';
|
||||
import React, { FC } from 'react';
|
||||
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { HorizontalGroup, InlineField, InlineLabel, PopoverContent, Select } from '@grafana/ui';
|
||||
|
||||
import { INNER_LABEL_WIDTH, LABEL_WIDTH } from '../constants';
|
||||
import { InlineField, Select } from '@grafana/ui';
|
||||
|
||||
interface VariableQueryFieldProps {
|
||||
onChange: (value: string) => void;
|
||||
@ -33,60 +30,3 @@ export const VariableQueryField: FC<VariableQueryFieldProps> = ({
|
||||
</InlineField>
|
||||
);
|
||||
};
|
||||
|
||||
export interface Props {
|
||||
children: React.ReactNode;
|
||||
tooltip?: PopoverContent;
|
||||
label?: React.ReactNode;
|
||||
className?: string;
|
||||
noFillEnd?: boolean;
|
||||
labelWidth?: number;
|
||||
fillComponent?: React.ReactNode;
|
||||
htmlFor?: string;
|
||||
}
|
||||
|
||||
export const QueryEditorRow: FC<Props> = ({
|
||||
children,
|
||||
label,
|
||||
tooltip,
|
||||
fillComponent,
|
||||
noFillEnd = false,
|
||||
labelWidth = LABEL_WIDTH,
|
||||
htmlFor,
|
||||
...rest
|
||||
}) => {
|
||||
return (
|
||||
<div className="gf-form" {...rest}>
|
||||
{label && (
|
||||
<InlineLabel width={labelWidth} tooltip={tooltip} htmlFor={htmlFor}>
|
||||
{label}
|
||||
</InlineLabel>
|
||||
)}
|
||||
<div
|
||||
className={css`
|
||||
margin-right: 4px;
|
||||
`}
|
||||
>
|
||||
<HorizontalGroup spacing="xs" width="auto">
|
||||
{children}
|
||||
</HorizontalGroup>
|
||||
</div>
|
||||
<div className={'gf-form--grow'}>
|
||||
{noFillEnd || <div className={'gf-form-label gf-form-label--grow'}>{fillComponent}</div>}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export const QueryEditorField: FC<Props> = ({ children, label, tooltip, labelWidth = INNER_LABEL_WIDTH, ...rest }) => {
|
||||
return (
|
||||
<>
|
||||
{label && (
|
||||
<InlineLabel width={labelWidth} tooltip={tooltip} {...rest}>
|
||||
{label}
|
||||
</InlineLabel>
|
||||
)}
|
||||
{children}
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
@ -10,7 +10,7 @@ export { Aggregation } from './Aggregation';
|
||||
export { MetricQueryEditor } from './MetricQueryEditor';
|
||||
export { SLOQueryEditor } from './SLOQueryEditor';
|
||||
export { MQLQueryEditor } from './MQLQueryEditor';
|
||||
export { VariableQueryField, QueryEditorRow, QueryEditorField } from './Fields';
|
||||
export { VariableQueryField } from './Fields';
|
||||
export { VisualMetricQueryEditor } from './VisualMetricQueryEditor';
|
||||
export { PeriodSelect } from './PeriodSelect';
|
||||
export { Preprocessor } from './Preprocessor';
|
||||
|
Loading…
Reference in New Issue
Block a user