mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 07:52:16 +08:00
Rebased ndeevy:docs-config/configuration-consistency-update from grafana/master to resolve conflicts Co-authored-by: ndeevy <ndeevy@redhat.com>
This commit is contained in:
@ -15,7 +15,7 @@ Data source and panel plugins will show up like normal plugins. The app pages wi
|
||||
|
||||
## Enabling app plugins
|
||||
|
||||
After installing an app, it has to be enabled before it shows up as a data source or panel. You can do that on the app page in the config tab.
|
||||
After installing an app, it has to be enabled before it shows up as a data source or panel. You can do that on the app page in the configuration tab.
|
||||
|
||||
## Developing an App Plugin
|
||||
|
||||
|
@ -135,7 +135,7 @@ Use the `width-x` and `max-width-x` classes to control the width of your labels
|
||||
## Data Sources
|
||||
For more information about data sources, refer to the [basic guide for data sources](http://docs.grafana.org/plugins/developing/datasources/).
|
||||
|
||||
### Config Page Guidelines
|
||||
### Configuration Page Guidelines
|
||||
|
||||
- It should be as easy as possible for a user to configure a URL. If the data source is using the `datasource-http-settings` component, it should use the `suggest-url` attribute to suggest the default URL or a URL that is similar to what it should be (especially important if the URL refers to a REST endpoint that is not common knowledge for most users e.g. `https://yourserver:4000/api/custom-endpoint`).
|
||||
|
||||
@ -155,7 +155,7 @@ If possible, any passwords or secrets should be saved in the `secureJsonData` bl
|
||||
|
||||
Read more here about how [authentication for data sources]({{< relref "../add-authentication-for-data-source-plugins.md" >}}) works.
|
||||
|
||||
If using the proxy feature, the Config page should use the `secureJsonData` blob like this:
|
||||
If using the proxy feature, the Configuration page should use the `secureJsonData` blob like this:
|
||||
|
||||
- good: `<input type="password" class="gf-form-input" ng-model='ctrl.current.secureJsonData.password' placeholder="password"></input>`
|
||||
- bad: `<input type="password" class="gf-form-input" ng-model='ctrl.current.password' placeholder="password"></input>`
|
||||
|
@ -127,7 +127,7 @@ export const MyPanel: React.FC<Props> = ({ options, data, width, height }) => {
|
||||
|
||||
While all plugins are different, we'd like to share a migration process that has worked for some of our users.
|
||||
|
||||
1. Define your configuration model and `ConfigEditor`. For many plugins, the config editor is the simplest component so it's a good candidate to start with.
|
||||
1. Define your configuration model and `ConfigEditor`. For many plugins, the configuration editor is the simplest component so it's a good candidate to start with.
|
||||
1. Implement the `testDatasource()` method on the class that extends `DataSourceApi` using the settings in your configuration model to make sure you can successfully configure and access the external API.
|
||||
1. Implement the `query()` method. At this point, you can hard-code your query, because we haven’t yet implemented the query editor. The `query()` method supports both the new data frame response and the old TimeSeries response, so don’t worry about converting to the new format just yet.
|
||||
1. Implement the `QueryEditor`. How much work this requires depends on how complex your query model is.
|
||||
|
Reference in New Issue
Block a user