mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 10:03:33 -06:00
* Config and doc upgrades * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update tags text * Use service graph as a proper noun * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Update docs/sources/datasources/tempo/_index.md Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com> * Yarn prettier --------- Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
import { css } from '@emotion/css';
|
|
import React from 'react';
|
|
|
|
import { DataSourcePluginOptionsEditorProps, updateDatasourcePluginJsonDataOption } from '@grafana/data';
|
|
import { InlineField, InlineFieldRow, InlineSwitch } from '@grafana/ui';
|
|
|
|
import { TempoJsonData } from '../types';
|
|
|
|
interface Props extends DataSourcePluginOptionsEditorProps<TempoJsonData> {}
|
|
|
|
export function SearchSettings({ options, onOptionsChange }: Props) {
|
|
return (
|
|
<div className={styles.container}>
|
|
<h3 className="page-heading">Tempo search</h3>
|
|
<InlineFieldRow className={styles.row}>
|
|
<InlineField tooltip="Removes the search tab from the query editor" label="Hide search" labelWidth={26}>
|
|
<InlineSwitch
|
|
id="hideSearch"
|
|
value={options.jsonData.search?.hide}
|
|
onChange={(event: React.SyntheticEvent<HTMLInputElement>) =>
|
|
updateDatasourcePluginJsonDataOption({ onOptionsChange, options }, 'search', {
|
|
...options.jsonData.search,
|
|
hide: event.currentTarget.checked,
|
|
})
|
|
}
|
|
/>
|
|
</InlineField>
|
|
</InlineFieldRow>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
const styles = {
|
|
container: css`
|
|
label: container;
|
|
width: 100%;
|
|
`,
|
|
row: css`
|
|
label: row;
|
|
align-items: baseline;
|
|
`,
|
|
};
|