|
1 | 1 | # Nodegraph API Plugin for Grafana |
2 | 2 |
|
3 | | -[](https://github.com/grafana/grafana-starter-datasource/actions?query=workflow%3A%22CI%22) |
| 3 | +[](LICENSE) |
| 4 | +[](https://github.com/hoptical/nodegraph-api-plugin/actions/workflows/ci.yml) |
| 5 | +[](https://github.com/hoptical/nodegraph-api-plugin/actions/workflows/release.yml) |
4 | 6 |
|
5 | 7 | This plugin provides a data source to connect a REST API to [nodegraph](https://grafana.com/docs/grafana/latest/visualizations/node-graph/) panel of Grafana. It is [signed and published by Grafana](https://grafana.com/grafana/plugins/hamedkarbasi93-nodegraphapi-datasource/). |
6 | 8 |
|
@@ -29,17 +31,17 @@ Alternatively, you can manually download the [latest](https://github.com/hoptica |
29 | 31 |
|
30 | 32 | You can now add the data source. Just enter the URL of your API app and push "Save & Test." You will get an error in case of connection failure. |
31 | 33 |
|
32 | | -> Important note: The browser should have access to the application, not the Grafana server. |
33 | | -
|
34 | 34 |  |
35 | 35 |
|
36 | 36 | In the Grafana dashboard, pick the Nodegraph panel and visualize the graph. |
37 | 37 |
|
38 | | -## API Configuration |
| 38 | +> Note on Application Access: |
| 39 | +> - Versions 0.x.x work in *direct* mode. i.e., The browser must have access to the API application. |
| 40 | +> - Versions 1.x.x+ work in *proxy* mode. i.e., The Grafana server should have access to the API application. |
39 | 41 |
|
40 | | -The REST API application should return data in the following format: |
| 42 | +## API Configuration |
41 | 43 |
|
42 | | - > Note: Your API application should handle CORS policy. Otherwise, you will face a CORS-Policy error in Grafana. |
| 44 | +The REST API application should handle three requests: *fields*, *data*, and *health*. They are described below. |
43 | 45 |
|
44 | 46 | ### Fetch Graph Fields |
45 | 47 |
|
@@ -174,7 +176,6 @@ In the `example` folder, you can find a simple API application in Python Flask. |
174 | 176 | ### Requirements: |
175 | 177 |
|
176 | 178 | - flask |
177 | | -- flask-cors |
178 | 179 |
|
179 | 180 | ### Run |
180 | 181 |
|
|
0 commit comments