Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add data source configuration guide #1118

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

josmperez
Copy link
Contributor

Add guide for data source plugin configuration

@josmperez josmperez added type/docs Changes only affect the documentation no-changelog Don't include in changelog and version calculations labels Sep 13, 2024
@josmperez josmperez self-assigned this Sep 13, 2024
Copy link

github-actions bot commented Sep 13, 2024

Hello! 👋 This repository uses Auto for releasing packages using PR labels.

✨ This PR can be merged. It will not be considered when calculating future versions of the npm packages and will not appear in the changelogs.

@josmperez josmperez marked this pull request as ready for review October 11, 2024 01:30
@josmperez josmperez requested a review from a team as a code owner October 11, 2024 01:30
@josmperez josmperez requested review from mckn and removed request for a team October 11, 2024 01:30
@@ -0,0 +1,135 @@
---
id: data-source-configuration
title: Configure data sources
Copy link
Member

@academo academo Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current title makes it sound like we are going to teach developers how to configure their data sources instead of how to create good data source configuration options

Should this instead be "Best practices for data source configuration pages" ?


## Description and required fields

We recommend using the `DataSourceDescription` component from the [@grafana/experimental](https://github.com/grafana/grafana-experimental) repository. The plugin name and documentation link are required, but details about other fields is optional.
Copy link
Member

@academo academo Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am against suggesting people from using any kind of component from the grafana-experimental package. It is called experimental because we will break things there without any notice and we can't guarantee this document will keep up to date with changes in that repository.

If we are going to start recommending that component we will have to promote that component to grafana-ui.

@sympatheticmoose thoughts?


Use the `Authentication` component for handling authentication on the configuration page. This component is already wrapped inside a `ConfigSection`, so additional wrapping is unnecessary.

If your data source uses the deprecated `DataSourceHttpSettings` component for authentication, replace it with the `Authentication` component. For guidance on migrating from `DataSourceHttpSettings`, see the section below.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is DataSourceHttpSettings really deprecated?

I can't find anywhere where is tagged as deprecated. it is not mention in the source code https://github.com/grafana/grafana/blob/main/packages/grafana-ui/src/components/DataSourceSettings/DataSourceHttpSettings.tsx or in the story page docs https://developers.grafana.com/ui/latest/index.html?path=/docs/data-source-datasourcehttpsettings--docs and furthermore we actually recommend this component as the easiest way to go to configure authentication

@@ -0,0 +1,135 @@
---
id: data-source-configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a duplicated version of the previous file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Don't include in changelog and version calculations type/docs Changes only affect the documentation
Projects
Status: 🧑‍💻 In development
Development

Successfully merging this pull request may close these issues.

2 participants