@@ -4,7 +4,12 @@ import { CHConfig, CHHttpHeader, CHSecureConfig } from 'types/config';
44import allLabels from './labelsV2' ;
55import { styles } from 'styles' ;
66import { selectors as allSelectors } from 'selectors' ;
7- import { DataSourcePluginOptionsEditorProps , KeyValue , onUpdateDatasourceJsonDataOptionChecked , onUpdateDatasourceJsonDataOption } from '@grafana/data' ;
7+ import {
8+ DataSourcePluginOptionsEditorProps ,
9+ KeyValue ,
10+ onUpdateDatasourceJsonDataOptionChecked ,
11+ onUpdateDatasourceJsonDataOption ,
12+ } from '@grafana/data' ;
813
914interface HttpHeadersConfigProps extends DataSourcePluginOptionsEditorProps < CHConfig , CHSecureConfig > {
1015 headers ?: CHHttpHeader [ ] ;
@@ -22,7 +27,8 @@ export const HttpHeadersConfigV2 = (props: HttpHeadersConfigProps) => {
2227 const [ forwardGrafanaHeaders , setForwardGrafanaHeaders ] = useState < boolean > ( props . forwardGrafanaHeaders || false ) ;
2328 const [ logHeadersAsComment , setLogHeadersAsComment ] = useState < boolean > ( props . logHeadersAsComment || false ) ;
2429 const [ logHeadersAsCommentRegex , setLogHeadersAsCommentRegex ] = useState < string > (
25- props . options . jsonData . logHeadersAsCommentRegex || allLabels . components . Config . HttpHeadersConfig . logHeadersAsCommentRegex . placeholder
30+ props . options . jsonData . logHeadersAsCommentRegex ||
31+ allLabels . components . Config . HttpHeadersConfig . logHeadersAsCommentRegex . placeholder
2632 ) ;
2733 const labels = allLabels . components . Config . HttpHeadersConfig ;
2834 const selectors = allSelectors . components . Config . HttpHeaderConfig ;
@@ -101,10 +107,7 @@ export const HttpHeadersConfigV2 = (props: HttpHeadersConfigProps) => {
101107 />
102108
103109 { logHeadersAsComment && (
104- < Field
105- label = { labels . logHeadersAsCommentRegex . label }
106- description = { labels . logHeadersAsCommentRegex . tooltip }
107- >
110+ < Field label = { labels . logHeadersAsCommentRegex . label } description = { labels . logHeadersAsCommentRegex . tooltip } >
108111 < Input
109112 data-testid = { selectors . logHeadersAsCommentRegexInput }
110113 value = { logHeadersAsCommentRegex }
0 commit comments