Skip to content

Commit

Permalink
Merge pull request #10 from fiskaly/release/0.3.0
Browse files Browse the repository at this point in the history
Release: 0.3.0
  • Loading branch information
ppaulweber committed Feb 8, 2024
2 parents e79d69b + b2f9ecf commit f1681f3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.3.0

Provided dashboard variable-based query support.

## 0.2.0

Provided new `groupBy` functionality in `metric` query mode in order to perform data grouping for plain `metric` values as well as `rate` based functions.
Expand Down
8 changes: 2 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "surrealdb",
"author": "fiskaly",
"license": "Apache-2.0",
"version": "0.2.0",
"version": "0.3.0",
"description": "Grafana Data Source Plugin for SurrealDB",
"scripts": {
"build": "webpack -c ./.config/webpack/webpack.config.ts --env production",
Expand All @@ -22,17 +22,13 @@
"node": ">=20"
},
"dependencies": {
"@cypress/request": ">=3.0.0",
"@emotion/css": "11.10.6",
"@grafana/data": "10.0.3",
"@grafana/runtime": "10.0.3",
"@grafana/schema": "10.0.3",
"@grafana/ui": "10.0.3",
"log4js": ">=6.4.0",
"nanoid": ">=3.1.31",
"react": "18.2.0",
"react-dom": "18.2.0",
"tough-cookie": ">=4.1.3",
"tslib": "2.5.3",
"underscore": ">=1.12.1"
},
Expand Down
12 changes: 10 additions & 2 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Since the plugin is used to query the contents of one or multiple SurrealDB [tab
The plugin can be installed through the user interface in the Grafana service itself or by using the command-line utility via:

```
$ grafana-cli plugins install fiskaly-surrealdb-datasource
$ grafana cli plugins install fiskaly-surrealdb-datasource
```

If the Grafana service was setup in a containerized context via e.g. `docker-compose` or started locally on a machine the plugin can be installed automatically for the Grafana instance during start-up by setting the following environment variable:
Expand Down Expand Up @@ -72,6 +72,14 @@ Furthermore, based on the `Data` column there is an option to perform data group

![query](https://github.com/fiskaly/grafana.surrealdb/assets/6830431/77f47494-1815-48bc-8e40-ff43822bc68d)

## Variable Query

This plugin provides `raw` query support for dashboard variables.
The values of the first column in the query response are used for the result set of values for the defined variable in the dashboard.

---

![variable-query](https://github.com/fiskaly/grafana.surrealdb/assets/6830431/ec84cade-49ac-49d4-9479-323429641ee3)

## Design

Expand All @@ -81,7 +89,7 @@ The frontend is written in TypeScript and provides two major components:
(2) a `QueryEditor` to write queries in SurrealDB Query Language ([SurrealQL](https://docs.surrealdb.com/docs/surrealql/overview/)), configure the query mode, and interact with the backend part of the data source plugin.

The backend is written in Golang and provides a low-level connection through the SurrealDB [WebSocket](https://docs.surrealdb.com/docs/integration/websocket) interface.
After the successful connection and [signin](https://docs.surrealdb.com/docs/integration/websocket/#signin) operation, all queries send from the frontend part to the backend part are directly executed through the WebSocket connection using the [custom query](https://docs.surrealdb.com/docs/integration/websocket#query) operation.
After the successful connection and [signin](https://docs.surrealdb.com/docs/integration/websocket/#signin) operation, all queries sent from the frontend part to the backend part are directly executed through the WebSocket connection using the [custom query](https://docs.surrealdb.com/docs/integration/websocket#query) operation.

Since SurrealDB as well as Grafana support [variables](https://grafana.com/docs/grafana/latest/dashboards/variables/) the plugin supports and performs the following variable resolving steps:
(1) in the frontend part are all Grafana scope provided variables replaced; and
Expand Down

0 comments on commit f1681f3

Please sign in to comment.