You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,8 @@ there are two types of query the plugin supports, `table` or `timeserie`.
27
27
28
28
### query schema
29
29
30
-
after the frontend collects a query, it sends data of the following schema to its backend
30
+
after the frontend UI collects a query, it transforms and sends data of the following schema to its backend. an example query payload to the backend can be found at [code](./sample/timeserie-query.json)
31
+
31
32
```javascript
32
33
{
33
34
collection:"collection name",
@@ -41,11 +42,11 @@ after the frontend collects a query, it sends data of the following schema to it
a query is a `javascript` object, NOT a `json` object.
45
46
46
-
the `Collection Name` field specifies the name of the collection to perform an aggregation.
47
+
the `Collection Name` field, (mapped to `collection` in the above payload), specifies the name of the collection to perform an aggregation.
47
48
48
-
the `Aggregation Pipeline` field can have multiple aggregation steps. if you're familiar with `MongoDB Compass`, you can contruct your aggregations in the tool, then copy/paste the aggregration's `Node.js` export to the field - it's just simple as that. the supported data types are listed below.
49
+
the `Aggregation Pipeline` field, (mapped to `aggregations`), can have multiple aggregation steps. if you're familiar with `MongoDB Compass`, you can contruct your aggregations in the tool, then copy/paste the aggregration's `Node.js` export to the field - it's just simple as that. the supported data types are listed below.
49
50
50
51
```
51
52
string: "string",
@@ -62,7 +63,7 @@ the `Aggregation Pipeline` field can have multiple aggregation steps. if you're
62
63
63
64
-`$from`, `$to`, `$intervalMs` are grafana expandable variables for using as a time boundary and an interval
64
65
-`__name`, `__value`, `__timestamp` are the plugin's internal variables to construct a named grafana timeserie data frame
65
-
-an example query can be found at [code](./sample/timeserie-query.json). all 6 variables mentioned above are used. it `$group` by month and `$sum` how many movies were released during a month of a year.
66
+
-in [this](./sample/timeserie-query.json) example and in its `aggregations` array, all 6 variables mentioned above are used. it `$group` by month and `$sum` how many movies were released during a month of a year.
0 commit comments