Skip to content

Commit c06182f

Browse files
Docs website update (#401)
* docker file update * license update * docs website migration * changelog update * Update LICENSE Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> --------- Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
1 parent 1acc4e6 commit c06182f

39 files changed

+201
-9503
lines changed

.github/workflows/docs.yml

-43
This file was deleted.

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# Changelog
22

3+
## v1.3.10 - 2023-12-20
4+
5+
- ⚙️ **Docs**: Documentation website moved from [github pages](https://grafana.github.io/grafana-json-datasource) to [grafana.com/docs/plugins](https://grafana.com/docs/plugins/marcusolsson-json-datasource/latest/) page
6+
37
## v1.3.9 - 2023-11-21
48

5-
- Update configuration page to follow best practices
9+
- ⚙️ **Chore**: Update configuration page to follow best practices
610
- ⚙️ **Chore**: Remove legacy form styles
711
- ⚙️ **Chore**: Update readme and documentation
812
- ⚙️ **Chore**: Added lint github workflow

CONTRIBUTING.md

+1-12
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,7 @@ After you've created the pull request:
2828

2929
## Contribute documentation
3030

31-
This plugin uses [Docusaurus](https://docusaurus.io/) to build the [documentation](https://grafana.github.io/grafana-json-datasource).
32-
33-
For more information about writing documentation using Docusaurus, refer to the [Docusaurus documentation](https://docusaurus.io/docs/).
34-
35-
The individual documentation pages are written in Markdown. You can find them under [website/docs](website/docs).
36-
37-
To preview the documentation site on your local machine, run the following in your terminal:
38-
39-
```bash
40-
cd website/docs
41-
yarn start
42-
```
31+
The individual documentation pages are written in Markdown. You can find them under [docs/sources](./docs/sources/). Once documentation is updated, they will automatically published in [grafana.com/docs/plugins](https://grafana.com/docs/plugins/marcusolsson-json-datasource/latest/) website.
4332

4433
## Set up the project
4534

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2022 Grafana Labs
189+
Copyright 2024 Grafana Labs
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
11
# JSON API data source for Grafana
22

3-
[![Build](https://github.com/grafana/grafana-json-datasource/workflows/CI/badge.svg)](https://github.com/grafana/grafana-json-datasource/actions?query=workflow%3A%22CI%22)
4-
[![Release](https://github.com/grafana/grafana-json-datasource/workflows/Release/badge.svg)](https://github.com/grafana/grafana-json-datasource/actions?query=workflow%3ARelease)
5-
[![Marketplace](https://img.shields.io/badge/dynamic/json?logo=grafana&color=F47A20&label=marketplace&prefix=v&query=%24.items%5B%3F%28%40.slug%20%3D%3D%20%22marcusolsson-json-datasource%22%29%5D.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins)](https://grafana.com/grafana/plugins/marcusolsson-json-datasource)
6-
[![Downloads](https://img.shields.io/badge/dynamic/json?logo=grafana&color=F47A20&label=downloads&query=%24.items%5B%3F%28%40.slug%20%3D%3D%20%22marcusolsson-json-datasource%22%29%5D.downloads&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins)](https://grafana.com/grafana/plugins/marcusolsson-json-datasource)
7-
[![License](https://img.shields.io/github/license/grafana/grafana-json-datasource)](LICENSE)
8-
93
The Grafana JSON Datasource plugin empowers you to seamlessly integrate JSON data into Grafana. JSON is a versatile and widely used data format, and with this plugin, you can easily transform your JSON data into meaningful visualizations within Grafana dashboards.
104

115
## Documentation
126

13-
For comprehensive instructions on setting up and configuring the Grafana JSON API Datasource, please consult our official [documentation](https://grafana.github.io/grafana-json-datasource).
7+
For comprehensive instructions on setting up and configuring the Grafana JSON API Datasource, please consult our official [documentation](https://grafana.com/docs/plugins/marcusolsson-json-datasource/latest/).
148

159
## Contributing
1610

1711
We welcome and appreciate contributions from the open-source community to make this project better. Whether you want to report a bug, request a new feature, or submit code changes, please follow the guidelines below:
1812

19-
#### Reporting issues
13+
### Reporting issues
2014

2115
If you encounter a bug or have a suggestion for improvement, please check our [issues](https://github.com/grafana/grafana-json-datasource/issues) to see if a similar issue has already been reported. If not, feel free to open a new issue. When creating an issue, please provide as much detail as possible, including the version of the datasource you are using, your version of grafana and steps to reproduce the issue.
2216

23-
#### Requesting features
17+
### Requesting features
2418

2519
If you have an idea for a new feature or enhancement, we encourage you to create an [issue](https://github.com/grafana/grafana-json-datasource/issues). This can help gather feedback and refine the proposal.
2620

27-
#### Pull requests
21+
### Pull requests
2822

2923
If you'd like to contribute code to this project, please follow these steps:
3024

docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
context: ./.config
99
args:
1010
grafana_image: ${GRAFANA_IMAGE:-grafana-enterprise}
11-
grafana_version: ${GRAFANA_VERSION:-10.0.3}
11+
grafana_version: ${GRAFANA_VERSION:-main}
1212
ports:
1313
- 3000:3000/tcp
1414
volumes:
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/sources/_index.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: JSON API data source for Grafana
3+
menuTitle: JSON API data source
4+
description: This document introduces the JSON API data source
5+
aliases:
6+
keywords:
7+
- data source
8+
- json api
9+
labels:
10+
products:
11+
- oss
12+
- grafana cloud
13+
weight: 100
14+
---
15+
16+
JSON API is an open source data source plugin for Grafana that lets you visualize data from any URL that returns JSON, such as REST APIs or static file servers.
17+
18+
## Known Limitations
19+
20+
* Since the plugin doesn't keep a record of previous queries, each query needs to contain the complete data set you want to visualize. If you'd like to visualize how the data changes over time, you're probably better off storing the data in a database.
21+
22+
* This plugin doesn't support backend operations such as alerting, recorded queries, public dashboards, enterprise query caching, etc. If you prefer to use one of those options, use the [Grafana Infinity Datasource plugin](https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource/) instead.
23+
24+
* This plugins doesn't support authentication methods such as OAuth2, digest authentication, jwt authentication. If you prefer to use one of those options, use the [Grafana Infinity Datasource plugin](https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource/) instead.

website/docs/annotations.md renamed to docs/sources/annotations.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
---
2-
id: annotations
3-
title: Annotations
2+
title: Variables
3+
menuTitle: Variables
4+
description: This document explains the process of setting up variables using JSON API data source
5+
aliases:
6+
keywords:
7+
- data source
8+
- json api
9+
labels:
10+
products:
11+
- oss
12+
- grafana cloud
13+
weight: 600
414
---
515

6-
![Annotations](../static/img/annotation.png)
16+
![Annotations](https://raw.githubusercontent.com/grafana/grafana-json-datasource/main/docs/images/annotation.png)
717

818
[Annotations](https://grafana.com/docs/grafana/latest/dashboards/annotations) let you extract data from a data source and use it to annotate a dashboard.
919

10-
:::info
11-
Annotations support was added in **v1.0.1**. If you can't select the JSON API data source from the list of data sources, try updating to a more recent version.
12-
:::
20+
> **Info:** Annotations support was added in **v1.0.1**. If you can't select the JSON API data source from the list of data sources, try updating to a more recent version.
1321
1422
To use the JSON API data source for annotations, follow the instructions on [Querying other data sources](https://grafana.com/docs/grafana/latest/dashboards/annotations/#querying-other-data-sources). Make sure to select the JSON API from the list of data sources.
1523

website/docs/configuration.md renamed to docs/sources/configuration.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
---
2-
id: configuration
32
title: Configuration
3+
menuTitle: Configuration
4+
description: This document explains the configuration process of JSON API data source
5+
aliases:
6+
keywords:
7+
- data source
8+
- json api
9+
labels:
10+
products:
11+
- oss
12+
- grafana cloud
13+
weight: 300
414
---
515

616
## Add a JSON data source

docs/sources/installation.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: Installation
3+
menuTitle: Installation
4+
description: This document explains the installation process of JSON API data source
5+
aliases:
6+
keywords:
7+
- data source
8+
- json api
9+
labels:
10+
products:
11+
- oss
12+
- grafana cloud
13+
weight: 200
14+
---
15+
16+
You can install the plugin using [grafana-cli](https://grafana.com/docs/grafana/latest/administration/cli/), or by downloading the plugin manually.
17+
18+
## Install using grafana-cli
19+
20+
To install the latest version of the plugin, run the following command on the Grafana server:
21+
22+
In linux/macos, you can install the plugin using the following command
23+
24+
```bash
25+
grafana-cli plugins install marcusolsson-json-datasource
26+
```
27+
28+
whereas in windows machine, use the following command
29+
30+
```bash
31+
grafana-cli.exe plugins install marcusolsson-json-datasource
32+
```
33+
34+
## Install manually
35+
36+
1. Go to [Releases](https://github.com/grafana/grafana-json-datasource/releases) on the GitHub project page
37+
2. Find the release you want to install
38+
3. Download the release by clicking the release asset called `marcusolsson-json-datasource-<version>.zip`. You may need to un-collapse the **Assets** section to see it.
39+
4. Unarchive the plugin into the Grafana plugins directory.
40+
41+
In linux/macos, you can use the following command to extract the plugin
42+
43+
```bash
44+
unzip marcusolsson-json-datasource-<version>.zip
45+
mv marcusolsson-json-datasource /var/lib/grafana/plugins
46+
```
47+
48+
In windows, you can use the following command to extract the plugin
49+
50+
```powershell
51+
Expand-Archive -Path marcusolsson-json-datasource-<version>.zip -DestinationPath C:\grafana\data\plugins
52+
```
53+
54+
5. Restart the Grafana server to load the plugin

website/docs/jsonata.md renamed to docs/sources/jsonata.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
---
2-
id: jsonata
32
title: JSONata
3+
menuTitle: JSONata
4+
description: This document explains the jsonata usage in JSON API data source
5+
aliases:
6+
keywords:
7+
- data source
8+
- json api
9+
labels:
10+
products:
11+
- oss
12+
- grafana cloud
13+
weight: 430
414
---
515

616
[JSONata](https://docs.jsonata.org/) is a query and transformation language for JSON data.

website/docs/jsonpath.md renamed to docs/sources/jsonpath.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
---
2-
id: jsonpath
32
title: JSONPath
3+
menuTitle: JSONPath
4+
description: This document explains the jsonpath usage in JSON API data source
5+
aliases:
6+
keywords:
7+
- data source
8+
- json api
9+
labels:
10+
products:
11+
- oss
12+
- grafana cloud
13+
weight: 420
414
---
515

616
[JSONPath](https://goessner.net/articles/JsonPath/) is a query language for JSON structures.
@@ -15,24 +25,18 @@ $.store.book[*].title
1525
- `.` selects a child of the current element
1626
- `*` selects all elements within an object or array
1727

18-
:::note JSONPath Plus
19-
The JSON API data source uses the [JSONPath Plus](https://www.npmjs.com/package/jsonpath-plus) package to evaluate JSONPath expressions. JSONPath Plus extends the original specification with additional features.
20-
21-
For more information on the supported syntax, refer to the [project page](https://github.com/JSONPath-Plus/JSONPath).
22-
:::
28+
> **Note:** The JSON API data source uses the [JSONPath Plus](https://www.npmjs.com/package/jsonpath-plus) package to evaluate JSONPath expressions. JSONPath Plus extends the original specification with additional features. For more information on the supported syntax, refer to the [project page](https://github.com/JSONPath-Plus/JSONPath).
2329
2430
## Filters
2531

26-
:::note From version 1.3.4 filters are not supported anymore.
32+
> **Note:** From version 1.3.4 filters are not supported anymore.
2733
2834
If your dashboards currently rely on JSONPath queries containing subexpressions, there are a few potential migration paths:
2935

3036
1. For simple queries that use subexpressions for indexing/slicing, it may be possible to rewrite the query without a subexpressions for instance `[(@.length-1)]` can also be represented as `[:-1]`.
3137
2. For more complex queries, we suggest switching to the [`jsonata` language](http://docs.jsonata.org/simple), which the plugin also supports. This language has similar features to JSONPath, including support for filter expressions (called “predicates” in the documentation).
3238
3. If changing your existing queries isn’t feasible, the community plugin [“Infinity”](https://grafana.com/grafana/plugins/yesoreyeram-infinity-datasource/) supports JSONPath expressions, including filters and subexpressions if used with the `backend` parser option. Please note that Infinity is community supported plugin.
3339

34-
:::
35-
3640
Filters let you query elements based on a logical expression.
3741

3842
For example, to query the titles of the books that cost more than 10:

website/docs/macros.md renamed to docs/sources/macros.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
---
2-
id: macros
32
title: Macros
3+
menuTitle: Macros
4+
description: This document explains the macros provided by JSON API data source
5+
aliases:
6+
keywords:
7+
- data source
8+
- json api
9+
labels:
10+
products:
11+
- oss
12+
- grafana cloud
13+
weight: 410
414
---
515

616
Use macros to add dashboard context to your queries. Macros are available in HTTP params and JSONPath expressions.

0 commit comments

Comments
 (0)