mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Form migrations: Switch to LegacyForms namespace (#23357)
* Move Switch to Legacy namespace * Make story internal * Fix import
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { ChangeEvent } from 'react';
|
||||
import { Switch } from '@grafana/ui';
|
||||
import { LegacyForms } from '@grafana/ui';
|
||||
const { Switch } = LegacyForms;
|
||||
import { PanelData } from '@grafana/data';
|
||||
import { CloudWatchQuery, AnnotationQuery } from '../types';
|
||||
import CloudWatchDatasource from '../datasource';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { PureComponent, ChangeEvent } from 'react';
|
||||
import { ExploreQueryFieldProps } from '@grafana/data';
|
||||
import { LegacyForms, ValidationEvents, EventsWithValidation, Switch } from '@grafana/ui';
|
||||
const { Input } = LegacyForms;
|
||||
import { LegacyForms, ValidationEvents, EventsWithValidation } from '@grafana/ui';
|
||||
const { Input, Switch } = LegacyForms;
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import { CloudWatchQuery } from '../types';
|
||||
import CloudWatchDatasource from '../datasource';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { PureComponent, ChangeEvent } from 'react';
|
||||
import { SelectableValue } from '@grafana/data';
|
||||
import { AzureCredentialsForm } from './AzureCredentialsForm';
|
||||
import { Switch, FormLabel, LegacyForms, Button } from '@grafana/ui';
|
||||
const { Select } = LegacyForms;
|
||||
import { FormLabel, LegacyForms, Button } from '@grafana/ui';
|
||||
const { Select, Switch } = LegacyForms;
|
||||
import { AzureDataSourceSettings } from '../types';
|
||||
|
||||
export interface State {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { DataSourceHttpSettings, FormLabel, LegacyForms, Switch } from '@grafana/ui';
|
||||
const { Select } = LegacyForms;
|
||||
import { DataSourceHttpSettings, FormLabel, LegacyForms } from '@grafana/ui';
|
||||
const { Select, Switch } = LegacyForms;
|
||||
import {
|
||||
DataSourcePluginOptionsEditorProps,
|
||||
onUpdateDatasourceJsonDataOptionSelect,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import { css } from 'emotion';
|
||||
import { Button, FormField, DataLinkInput, stylesFactory, Switch } from '@grafana/ui';
|
||||
import { Button, FormField, DataLinkInput, stylesFactory, LegacyForms } from '@grafana/ui';
|
||||
const { Switch } = LegacyForms;
|
||||
import { VariableSuggestion } from '@grafana/data';
|
||||
import { DataSourceSelectItem } from '@grafana/data';
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ import _ from 'lodash';
|
||||
import React, { PureComponent } from 'react';
|
||||
|
||||
// Types
|
||||
import { FormLabel, LegacyForms, Switch } from '@grafana/ui';
|
||||
import { FormLabel, LegacyForms } from '@grafana/ui';
|
||||
import { SelectableValue, QueryEditorProps } from '@grafana/data';
|
||||
|
||||
const { Select } = LegacyForms;
|
||||
const { Select, Switch } = LegacyForms;
|
||||
|
||||
import { PrometheusDatasource } from '../datasource';
|
||||
import { PromQuery, PromOptions } from '../types';
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
import React, { PureComponent, ChangeEvent } from 'react';
|
||||
|
||||
// Components
|
||||
import { PanelOptionsGroup, PanelOptionsGrid, Switch, FormField, FormLabel } from '@grafana/ui';
|
||||
import { PanelOptionsGroup, PanelOptionsGrid, FormField, FormLabel, LegacyForms } from '@grafana/ui';
|
||||
const { Switch } = LegacyForms;
|
||||
|
||||
import { PanelEditorProps, toIntegerOrUndefined, toNumberString } from '@grafana/data';
|
||||
|
||||
|
||||
@@ -7,13 +7,12 @@ import {
|
||||
PanelOptionsGroup,
|
||||
FormLabel,
|
||||
LegacyForms,
|
||||
Switch,
|
||||
FieldPropertiesEditor,
|
||||
ThresholdsEditor,
|
||||
LegacyValueMappingsEditor,
|
||||
DataLinksEditor,
|
||||
} from '@grafana/ui';
|
||||
const { Select } = LegacyForms;
|
||||
const { Select, Switch } = LegacyForms;
|
||||
import {
|
||||
DataLink,
|
||||
FieldConfig,
|
||||
|
||||
@@ -3,13 +3,14 @@ import React, { PureComponent } from 'react';
|
||||
import {
|
||||
PanelOptionsGrid,
|
||||
FieldDisplayEditor,
|
||||
Switch,
|
||||
LegacyForms,
|
||||
PanelOptionsGroup,
|
||||
FieldPropertiesEditor,
|
||||
ThresholdsEditor,
|
||||
LegacyValueMappingsEditor,
|
||||
DataLinksEditor,
|
||||
} from '@grafana/ui';
|
||||
const { Switch } = LegacyForms;
|
||||
import {
|
||||
PanelEditorProps,
|
||||
ReduceDataOptions,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { LegendOptions, PanelOptionsGroup, Switch, LegacyForms, StatsPicker } from '@grafana/ui';
|
||||
const { Input } = LegacyForms;
|
||||
import { LegendOptions, PanelOptionsGroup, LegacyForms, StatsPicker } from '@grafana/ui';
|
||||
const { Input, Switch } = LegacyForms;
|
||||
|
||||
export interface GraphLegendEditorLegendOptions extends LegendOptions {
|
||||
stats?: string[];
|
||||
|
||||
@@ -5,7 +5,6 @@ import React, { PureComponent } from 'react';
|
||||
// Types
|
||||
import { FieldConfig, PanelEditorProps } from '@grafana/data';
|
||||
import {
|
||||
Switch,
|
||||
LegendOptions,
|
||||
GraphTooltipOptions,
|
||||
PanelOptionsGrid,
|
||||
@@ -13,7 +12,7 @@ import {
|
||||
LegacyForms,
|
||||
FieldPropertiesEditor,
|
||||
} from '@grafana/ui';
|
||||
const { Select } = LegacyForms;
|
||||
const { Select, Switch } = LegacyForms;
|
||||
import { Options, GraphOptions } from './types';
|
||||
import { GraphLegendEditor } from './GraphLegendEditor';
|
||||
import { NewPanelEditorContext } from 'app/features/dashboard/components/PanelEditor/PanelEditor';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Libraries
|
||||
import React, { PureComponent } from 'react';
|
||||
import { Switch, PanelOptionsGrid, PanelOptionsGroup, FormLabel, LegacyForms } from '@grafana/ui';
|
||||
const { Select } = LegacyForms;
|
||||
import { PanelOptionsGrid, PanelOptionsGroup, FormLabel, LegacyForms } from '@grafana/ui';
|
||||
const { Select, Switch } = LegacyForms;
|
||||
|
||||
// Types
|
||||
import { Options } from './types';
|
||||
|
||||
@@ -4,7 +4,8 @@ import React, { PureComponent } from 'react';
|
||||
|
||||
// Types
|
||||
import { PanelEditorProps } from '@grafana/data';
|
||||
import { Switch } from '@grafana/ui';
|
||||
import { LegacyForms } from '@grafana/ui';
|
||||
const { Switch } = LegacyForms;
|
||||
import { Options } from './types';
|
||||
|
||||
export class TablePanelEditor extends PureComponent<PanelEditorProps<Options>> {
|
||||
|
||||
Reference in New Issue
Block a user