mirror of
https://github.com/grafana/grafana.git
synced 2025-09-18 11:32:52 +08:00
Chore: Remove deprecated HorizontalGroup
in geo and transformers editors (#109602)
This commit is contained in:
@ -2400,9 +2400,6 @@ exports[`better eslint`] = {
|
|||||||
"public/app/features/expressions/guards.ts:5381": [
|
"public/app/features/expressions/guards.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/features/geo/editor/locationModeEditor.tsx:5381": [
|
|
||||||
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/features/geo/gazetteer/gazetteer.ts:5381": [
|
"public/app/features/geo/gazetteer/gazetteer.ts:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||||
@ -2801,9 +2798,6 @@ exports[`better eslint`] = {
|
|||||||
"public/app/features/transformers/FilterByValueTransformer/ValueMatchers/valueMatchersUI.ts:5381": [
|
"public/app/features/transformers/FilterByValueTransformer/ValueMatchers/valueMatchersUI.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/features/transformers/calculateHeatmap/editor/AxisEditor.tsx:5381": [
|
|
||||||
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/features/transformers/calculateHeatmap/editor/helper.ts:5381": [
|
"public/app/features/transformers/calculateHeatmap/editor/helper.ts:5381": [
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||||
],
|
],
|
||||||
@ -2858,15 +2852,9 @@ exports[`better eslint`] = {
|
|||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
||||||
],
|
],
|
||||||
"public/app/features/transformers/joinByLabels/JoinByLabelsTransformerEditor.tsx:5381": [
|
|
||||||
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/features/transformers/lookupGazetteer/FieldLookupTransformerEditor.tsx:5381": [
|
"public/app/features/transformers/lookupGazetteer/FieldLookupTransformerEditor.tsx:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||||
],
|
],
|
||||||
"public/app/features/transformers/partitionByValues/PartitionByValuesEditor.tsx:5381": [
|
|
||||||
[0, 0, 0, "\'HorizontalGroup\' import from \'@grafana/ui\' is restricted from being used by a pattern. Use Stack component instead.", "0"]
|
|
||||||
],
|
|
||||||
"public/app/features/transformers/spatial/optionsHelper.tsx:5381": [
|
"public/app/features/transformers/spatial/optionsHelper.tsx:5381": [
|
||||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||||
|
@ -5,7 +5,7 @@ import { StandardEditorProps, DataFrame, GrafanaTheme2 } from '@grafana/data';
|
|||||||
import { selectors } from '@grafana/e2e-selectors';
|
import { selectors } from '@grafana/e2e-selectors';
|
||||||
import { t } from '@grafana/i18n';
|
import { t } from '@grafana/i18n';
|
||||||
import { FrameGeometrySource, FrameGeometrySourceMode } from '@grafana/schema';
|
import { FrameGeometrySource, FrameGeometrySourceMode } from '@grafana/schema';
|
||||||
import { Alert, HorizontalGroup, Icon, Select, useStyles2 } from '@grafana/ui';
|
import { Alert, Icon, Select, useStyles2 } from '@grafana/ui';
|
||||||
|
|
||||||
import { FrameGeometryField, getGeometryField, getLocationMatchers } from '../utils/location';
|
import { FrameGeometryField, getGeometryField, getLocationMatchers } from '../utils/location';
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ export const LocationModeEditor = ({
|
|||||||
onChange(v.value);
|
onChange(v.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<HorizontalGroup className={styles.hGroup}>{dataValidation()}</HorizontalGroup>
|
{dataValidation()}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,7 @@ import { SelectableValue, StandardEditorProps, VariableOrigin } from '@grafana/d
|
|||||||
import { t } from '@grafana/i18n';
|
import { t } from '@grafana/i18n';
|
||||||
import { getTemplateSrv } from '@grafana/runtime';
|
import { getTemplateSrv } from '@grafana/runtime';
|
||||||
import { HeatmapCalculationBucketConfig, HeatmapCalculationMode } from '@grafana/schema';
|
import { HeatmapCalculationBucketConfig, HeatmapCalculationMode } from '@grafana/schema';
|
||||||
import { HorizontalGroup, RadioButtonGroup, ScaleDistribution } from '@grafana/ui';
|
import { RadioButtonGroup, ScaleDistribution, Stack } from '@grafana/ui';
|
||||||
|
|
||||||
import { SuggestionsInput } from '../../suggestionsInput/SuggestionsInput';
|
import { SuggestionsInput } from '../../suggestionsInput/SuggestionsInput';
|
||||||
import { numberOrVariableValidator } from '../../utils';
|
import { numberOrVariableValidator } from '../../utils';
|
||||||
@ -71,7 +71,7 @@ export const AxisEditor = ({ value, onChange, item }: StandardEditorProps<Heatma
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HorizontalGroup>
|
<Stack>
|
||||||
<RadioButtonGroup
|
<RadioButtonGroup
|
||||||
value={value?.mode || HeatmapCalculationMode.Size}
|
value={value?.mode || HeatmapCalculationMode.Size}
|
||||||
options={value?.scale?.type === ScaleDistribution.Log ? logModeOptions : modeOptions}
|
options={value?.scale?.type === ScaleDistribution.Log ? logModeOptions : modeOptions}
|
||||||
@ -98,6 +98,6 @@ export const AxisEditor = ({ value, onChange, item }: StandardEditorProps<Heatma
|
|||||||
}}
|
}}
|
||||||
suggestions={variables}
|
suggestions={variables}
|
||||||
/>
|
/>
|
||||||
</HorizontalGroup>
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
TransformerCategory,
|
TransformerCategory,
|
||||||
} from '@grafana/data';
|
} from '@grafana/data';
|
||||||
import { Trans, t } from '@grafana/i18n';
|
import { Trans, t } from '@grafana/i18n';
|
||||||
import { Alert, HorizontalGroup, InlineField, InlineFieldRow, Select, ValuePicker } from '@grafana/ui';
|
import { Alert, Stack, InlineField, InlineFieldRow, Select, ValuePicker } from '@grafana/ui';
|
||||||
|
|
||||||
import { getTransformationContent } from '../docs/getTransformationContent';
|
import { getTransformationContent } from '../docs/getTransformationContent';
|
||||||
import darkImage from '../images/dark/joinByLabels.svg';
|
import darkImage from '../images/dark/joinByLabels.svg';
|
||||||
@ -136,7 +136,7 @@ export function JoinByLabelsTransformerEditor({ input, options, onChange }: Prop
|
|||||||
error="Unable to join by the value label"
|
error="Unable to join by the value label"
|
||||||
invalid={v === options.value}
|
invalid={v === options.value}
|
||||||
>
|
>
|
||||||
<HorizontalGroup>
|
<Stack>
|
||||||
<Select
|
<Select
|
||||||
options={info.joinOptions}
|
options={info.joinOptions}
|
||||||
value={info.joinOptions.find((o) => o.value === v)}
|
value={info.joinOptions.find((o) => o.value === v)}
|
||||||
@ -153,7 +153,7 @@ export function JoinByLabelsTransformerEditor({ input, options, onChange }: Prop
|
|||||||
variant="secondary"
|
variant="secondary"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</HorizontalGroup>
|
</Stack>
|
||||||
</InlineField>
|
</InlineField>
|
||||||
</InlineFieldRow>
|
</InlineFieldRow>
|
||||||
))
|
))
|
||||||
|
@ -14,7 +14,7 @@ import {
|
|||||||
InlineFieldRow,
|
InlineFieldRow,
|
||||||
ValuePicker,
|
ValuePicker,
|
||||||
Button,
|
Button,
|
||||||
HorizontalGroup,
|
Stack,
|
||||||
FieldValidationMessage,
|
FieldValidationMessage,
|
||||||
RadioButtonGroup,
|
RadioButtonGroup,
|
||||||
} from '@grafana/ui';
|
} from '@grafana/ui';
|
||||||
@ -119,7 +119,7 @@ export function PartitionByValuesEditor({
|
|||||||
labelWidth={10}
|
labelWidth={10}
|
||||||
grow={true}
|
grow={true}
|
||||||
>
|
>
|
||||||
<HorizontalGroup>
|
<Stack>
|
||||||
{fieldNames.map((name) => (
|
{fieldNames.map((name) => (
|
||||||
<Button key={name} icon="times" variant="secondary" size="md" onClick={() => removeField(name)}>
|
<Button key={name} icon="times" variant="secondary" size="md" onClick={() => removeField(name)}>
|
||||||
{name}
|
{name}
|
||||||
@ -133,9 +133,10 @@ export function PartitionByValuesEditor({
|
|||||||
onChange={addField}
|
onChange={addField}
|
||||||
label={t('transformers.partition-by-values-editor.label-select-field', 'Select field')}
|
label={t('transformers.partition-by-values-editor.label-select-field', 'Select field')}
|
||||||
icon="plus"
|
icon="plus"
|
||||||
|
isFullWidth={false}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</HorizontalGroup>
|
</Stack>
|
||||||
</InlineField>
|
</InlineField>
|
||||||
</InlineFieldRow>
|
</InlineFieldRow>
|
||||||
<InlineFieldRow>
|
<InlineFieldRow>
|
||||||
|
Reference in New Issue
Block a user