mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Form migrations: TextArea from Forms namespace (#23436)
* Move from Forms namespace and move folder * Figrate pages from Forms * Make Enterprise mergable
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { FC, useMemo } from 'react';
|
||||
import { PanelModel, DashboardModel } from '../../state';
|
||||
import { SelectableValue, PanelPlugin, FieldConfigSource, PanelData } from '@grafana/data';
|
||||
import { Forms, Switch, Select, DataLinksInlineEditor, Input } from '@grafana/ui';
|
||||
import { Forms, Switch, Select, DataLinksInlineEditor, Input, TextArea } from '@grafana/ui';
|
||||
import { OptionsGroup } from './OptionsGroup';
|
||||
import { getPanelLinksVariableSuggestions } from '../../../panel/panellinks/link_srv';
|
||||
import { getVariables } from '../../../variables/state/selectors';
|
||||
@@ -45,7 +45,7 @@ export const PanelOptionsTab: FC<Props> = ({
|
||||
<Input defaultValue={panel.title} onBlur={e => onPanelConfigChange('title', e.currentTarget.value)} />
|
||||
</Forms.Field>
|
||||
<Forms.Field label="Description" description="Panel description supports markdown and links.">
|
||||
<Forms.TextArea
|
||||
<TextArea
|
||||
defaultValue={panel.description}
|
||||
onBlur={e => onPanelConfigChange('description', e.currentTarget.value)}
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useMemo } from 'react';
|
||||
|
||||
import { Forms, Button, HorizontalGroup } from '@grafana/ui';
|
||||
import { Forms, Button, HorizontalGroup, TextArea } from '@grafana/ui';
|
||||
import { e2e } from '@grafana/e2e';
|
||||
import { SaveDashboardFormProps } from '../types';
|
||||
|
||||
@@ -50,12 +50,7 @@ export const SaveDashboardForm: React.FC<SaveDashboardFormProps> = ({ dashboard,
|
||||
)}
|
||||
{(hasVariableChanged || hasTimeChanged) && <div className="gf-form-group" />}
|
||||
|
||||
<Forms.TextArea
|
||||
name="message"
|
||||
ref={register}
|
||||
placeholder="Add a note to describe your changes..."
|
||||
autoFocus
|
||||
/>
|
||||
<TextArea name="message" ref={register} placeholder="Add a note to describe your changes..." autoFocus />
|
||||
</div>
|
||||
|
||||
<HorizontalGroup>
|
||||
|
||||
@@ -2,7 +2,8 @@ import React, { useState } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { hot } from 'react-hot-loader';
|
||||
import { css, cx } from 'emotion';
|
||||
import { stylesFactory, useTheme, Forms, Button, Icon } from '@grafana/ui';
|
||||
import { stylesFactory, useTheme, TextArea, Button, Icon } from '@grafana/ui';
|
||||
|
||||
import { GrafanaTheme, AppEvents, DataSourceApi } from '@grafana/data';
|
||||
import { RichHistoryQuery, ExploreId } from 'app/types/explore';
|
||||
import { copyStringToClipboard, createUrlFromRichHistory, createDataQuery } from 'app/core/utils/richHistory';
|
||||
@@ -194,7 +195,7 @@ export function RichHistoryCard(props: Props) {
|
||||
|
||||
const updateComment = (
|
||||
<div className={styles.updateCommentContainer}>
|
||||
<Forms.TextArea
|
||||
<TextArea
|
||||
value={comment}
|
||||
placeholder={comment ? undefined : 'An optional description of what the query does.'}
|
||||
onChange={e => setComment(e.currentTarget.value)}
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { FormEvent, PureComponent } from 'react';
|
||||
import { connect, MapDispatchToProps, MapStateToProps } from 'react-redux';
|
||||
import { css } from 'emotion';
|
||||
import { AppEvents, NavModel } from '@grafana/data';
|
||||
import { Button, Forms, stylesFactory, Input } from '@grafana/ui';
|
||||
import { Button, Forms, stylesFactory, Input, TextArea } from '@grafana/ui';
|
||||
import Page from 'app/core/components/Page/Page';
|
||||
import { ImportDashboardOverview } from './components/ImportDashboardOverview';
|
||||
import { DashboardFileUpload } from './components/DashboardFileUpload';
|
||||
@@ -111,7 +111,7 @@ class DashboardImportUnConnected extends PureComponent<Props> {
|
||||
invalid={!!errors.dashboardJson}
|
||||
error={errors.dashboardJson && errors.dashboardJson.message}
|
||||
>
|
||||
<Forms.TextArea
|
||||
<TextArea
|
||||
name="dashboardJson"
|
||||
ref={register({
|
||||
required: 'Need a dashboard json model',
|
||||
|
||||
Reference in New Issue
Block a user