The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/packages/grafana-ui/src/components/DataSourceSettings/DataSourceHttpSettings.mdx

36 lines
1021 B

import { Meta, Props } from '@storybook/addon-docs/blocks';
import { DataSourceHttpSettings } from './DataSourceHttpSettings';
<Meta title="MDX|DataSourceHttpSettings" component={DataSourceHttpSettings} />
# DataSourceHttpSettings
Component for displaying the configuration options for a data source plugin.
### When to use
It is used in a `ConfigEditor` for data source plugins. You can find more examples in our core data source
plugins [here](https://github.com/grafana/grafana/tree/main/public/app/plugins/datasource).
### Example usage
```jsx
export const ConfigEditor = (props: Props) => {
const { options, onOptionsChange } = props;
return (
<>
<DataSourceHttpSettings
defaultUrl="http://localhost:9090"
dataSourceConfig={options}
showAccessOptions={true}
onChange={onOptionsChange}
sigV4AuthEnabled={false}
/>
{/* Additional configuration settings for your data source plugin.*/}
</>
);
};
```
<Props of={DataSourceHttpSettings} />