|
|
|
@ -7,6 +7,7 @@ import { StoreState } from 'app/types'; |
|
|
|
|
import { PanelModel } from '../../state/PanelModel'; |
|
|
|
|
import { connect, MapStateToProps, MapDispatchToProps } from 'react-redux'; |
|
|
|
|
import { VizTypePicker } from '../../panel_editor/VizTypePicker'; |
|
|
|
|
import { Field } from '@grafana/ui/src/components/Forms/Field'; |
|
|
|
|
|
|
|
|
|
interface OwnProps { |
|
|
|
|
panel: PanelModel; |
|
|
|
@ -45,14 +46,16 @@ export const VisualizationTabUnconnected: FC<Props> = ({ panel, plugin, changePa |
|
|
|
|
return ( |
|
|
|
|
<div className={styles.wrapper}> |
|
|
|
|
<div className={styles.search}> |
|
|
|
|
<Input |
|
|
|
|
value={searchQuery} |
|
|
|
|
onChange={e => setSearchQuery(e.currentTarget.value)} |
|
|
|
|
prefix={<Icon name="filter" className={styles.icon} />} |
|
|
|
|
suffix={suffix} |
|
|
|
|
placeholder="Filter visualisations" |
|
|
|
|
autoFocus |
|
|
|
|
/> |
|
|
|
|
<Field label="Filters"> |
|
|
|
|
<Input |
|
|
|
|
value={searchQuery} |
|
|
|
|
onChange={e => setSearchQuery(e.currentTarget.value)} |
|
|
|
|
prefix={<Icon name="filter" className={styles.icon} />} |
|
|
|
|
suffix={suffix} |
|
|
|
|
placeholder="Filter visualisations" |
|
|
|
|
autoFocus |
|
|
|
|
/> |
|
|
|
|
</Field> |
|
|
|
|
</div> |
|
|
|
|
<div className={styles.visList}> |
|
|
|
|
<CustomScrollbar> |
|
|
|
@ -78,12 +81,11 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => { |
|
|
|
|
flex-direction: column; |
|
|
|
|
flex-grow: 1; |
|
|
|
|
max-height: 100%; |
|
|
|
|
padding: ${theme.spacing.md}; |
|
|
|
|
`,
|
|
|
|
|
search: css` |
|
|
|
|
padding: ${theme.spacing.sm} ${theme.spacing.md}; |
|
|
|
|
flex-grow: 0; |
|
|
|
|
flex-shrink: 1; |
|
|
|
|
margin-bottom: ${theme.spacing.sm}; |
|
|
|
|
`,
|
|
|
|
|
searchClear: css` |
|
|
|
|
color: ${theme.colors.gray60}; |
|
|
|
@ -93,7 +95,6 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => { |
|
|
|
|
flex-grow: 1; |
|
|
|
|
height: 100%; |
|
|
|
|
overflow: hidden; |
|
|
|
|
padding-left: ${theme.spacing.md}; |
|
|
|
|
`,
|
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|