Commit 138c738d by Carl Bergquist

Merge pull request #4294 from utkarshcmu/docs-fix

Fixed some typos in docs
parents fb450385 4fae1958
...@@ -8,7 +8,7 @@ page_keywords: grafana, plugins, documentation ...@@ -8,7 +8,7 @@ page_keywords: grafana, plugins, documentation
# Datasources # Datasources
Datasource plugins enables people to develop plugins for any database that commuicates over http. Its up to the plugin to transform the data into time series data so that any grafana panel can then show it. Datasource plugins enables people to develop plugins for any database that communicates over http. Its up to the plugin to transform the data into time series data so that any grafana panel can then show it.
To interact with the rest of grafana the plugins module file can export 5 different components. To interact with the rest of grafana the plugins module file can export 5 different components.
...@@ -54,7 +54,7 @@ Request object passed to datasource.query function ...@@ -54,7 +54,7 @@ Request object passed to datasource.query function
``` ```
There are two different kind of results for datasources. There are two different kind of results for datasources.
Time series and table. Time series is the most common format and is suppoert by all datasources and panels. Table format is only support by the Influxdb datasource and table panel. But we might se more of this in the future. Time series and table. Time series is the most common format and is supported by all datasources and panels. Table format is only support by the Influxdb datasource and table panel. But we might see more of this in the future.
Time series response from datasource.query Time series response from datasource.query
An array of An array of
......
...@@ -17,13 +17,13 @@ This class have to inherit from sdk.PanelCtrl or sdk.MetricsPanelCtrl and be exp ...@@ -17,13 +17,13 @@ This class have to inherit from sdk.PanelCtrl or sdk.MetricsPanelCtrl and be exp
}; };
``` ```
This class will be instancieted once for every panel of its kind in a dashboard and treated as an AngularJs controller. This class will be instantiated once for every panel of its kind in a dashboard and treated as an AngularJs controller.
## MetricsPanelCtrl or PanelCtrl ## MetricsPanelCtrl or PanelCtrl
MetricsPanelCtrl inherits from PanelCtrl and adds some common features for datasource usage. So if your Panel will be working with a datasource you should inherit from MetricsPanelCtrl. If dont need to access any datasource then you should inherit from PanelCtrl instead. MetricsPanelCtrl inherits from PanelCtrl and adds some common features for datasource usage. So if your Panel will be working with a datasource you should inherit from MetricsPanelCtrl. If don't need to access any datasource then you should inherit from PanelCtrl instead.
## Implementing a MetricsPanelCtrl ## Implementing a MetricsPanelCtrl
If you choose to inherit from MetricsPanelCtrl you should implement a function called refreshData that will take an datasource as inparameter when its time to get new data. Its recommended that the refreshData function calls the issueQueries in the base class but its not mandatory. An examples of such implementation can be found in our [example panel](https://github.com/grafana/grafana/blob/master/examples/panel-boilerplate-es5/module.js#L27-L38) If you choose to inherit from MetricsPanelCtrl you should implement a function called refreshData that will take a datasource as in parameter when its time to get new data. Its recommended that the refreshData function calls the issueQueries in the base class but its not mandatory. An examples of such implementation can be found in our [example panel](https://github.com/grafana/grafana/blob/master/examples/panel-boilerplate-es5/module.js#L27-L38)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment