Skip to content

Commit acdf1ff

Browse files
authored
Update to Grafana 9.4.2 (#48)
* Update to Grafana 9.4.2 * Update screenshot.png
1 parent dfa1524 commit acdf1ff

13 files changed

+907
-867
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
### Features / Enhancements
66

77
- Update Docker customization to Grafana 9.4.2 (#47)
8+
- Update to Grafana 9.4.2 (#48)
9+
- Update Dynamic Text Panel 3.0.0 (#48)
810

911
## 2.1.0 (2023-02-18)
1012

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Application](https://raw.githubusercontent.com/volkovlabs/volkovlabs-app/main/img/app.png)
44

5-
![Grafana 9](https://img.shields.io/badge/Grafana-9.3.6-orange)
5+
![Grafana 9](https://img.shields.io/badge/Grafana-9.4.2-orange)
66
[![YouTube](https://img.shields.io/badge/YouTube-Playlist-red)](https://youtube.com/playlist?list=PLPow72ygztmTm_zY_PYqJtRYpMPpZglYC)
77
![CI](https://github.com/volkovlabs/volkovlabs-app/workflows/CI/badge.svg)
88
[![codecov](https://codecov.io/gh/VolkovLabs/volkovlabs-app/branch/main/graph/badge.svg)](https://codecov.io/gh/VolkovLabs/volkovlabs-app)
@@ -26,7 +26,7 @@ docker pull ghcr.io/volkovlabs/app:latest
2626

2727
## Bundle
2828

29-
Application plugin includes:
29+
Application plugin includes.
3030

3131
- [RSS/Atom data source](https://volkovlabs.io/plugins/volkovlabs-rss-datasource)
3232
- [Dynamic text panel](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel)

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"author": "Volkov Labs",
33
"description": "Volkov Labs Application plugin",
44
"devDependencies": {
5-
"@grafana/data": "9.3.6",
6-
"@grafana/runtime": "9.3.6",
7-
"@grafana/toolkit": "9.3.6",
8-
"@grafana/ui": "9.3.6",
5+
"@grafana/data": "9.4.2",
6+
"@grafana/runtime": "9.4.2",
7+
"@grafana/toolkit": "9.4.2",
8+
"@grafana/ui": "9.4.2",
99
"@types/enzyme": "^3.10.12",
1010
"@types/enzyme-adapter-react-16": "^1.0.6",
1111
"enzyme": "^3.11.0",
@@ -29,5 +29,5 @@
2929
"upgrade": "yarn upgrade --latest",
3030
"watch": "grafana-toolkit plugin:dev --watch"
3131
},
32-
"version": "2.1.0"
32+
"version": "2.2.0"
3333
}

src/marcusolsson-dynamictext-panel/CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Changelog
22

3+
## 3.0.0 (2023-02-19)
4+
5+
### Breaking changes
6+
7+
The default Content and JavaScript editors are not displayed by default unless values were modified.
8+
To display required editors, including the new Styles, they should be selected in the list.
9+
10+
### Features / Enhancements
11+
12+
- Update README features with new JavaScript Code Editor (#141)
13+
- Update to Grafana 9.3.6 (#147)
14+
- Update CI and Release workflows (#147)
15+
- Update README to include JavaScript tutorial (#148)
16+
- Add custom styles (#149)
17+
- Add option to display optional editors (#149)
18+
- Remove Panel Padding (#150)
19+
- Add Code Syntax Highlight (#151)
20+
- Add Breaking Changes for displaying optional editors (#152)
21+
22+
## 2.2.0 (2023-01-09)
23+
24+
### Features / Enhancements
25+
26+
- Add JSON helper to show objects and arrays (#121)
27+
- Update to Grafana 9.3.1 (#122)
28+
- Update Documentation links (#130, #131)
29+
- Add Split Helper (#132)
30+
- Refactor Text Component and Styles (#133)
31+
- Add JavaScript Code to add Handlebars helpers and Event handlers (#134)
32+
- Update default Content to `{{json @root}}` and Code Editor height to `200px` (#134)
33+
- Update CSS to fit images to screen (#135)
34+
- Add `getLocale()` parameter to JavaScript Code (#137)
35+
336
## 2.1.0 (2022-11-27)
437

538
### Breaking changes

src/marcusolsson-dynamictext-panel/LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
identification within third-party archives.
188188

189189
Copyright 2021-2022 Marcus Olsson
190-
Copyright 2022 Volkov Labs
190+
Copyright 2022-2023 Volkov Labs
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
2-
-----BEGIN PGP SIGNED MESSAGE-----
3-
Hash: SHA512
4-
5-
{
6-
"manifestVersion": "2.0.0",
7-
"signatureType": "community",
8-
"signedByOrg": "marcusolsson",
9-
"signedByOrgName": "Marcus Olsson",
10-
"plugin": "marcusolsson-dynamictext-panel",
11-
"version": "2.1.0",
12-
"time": 1669560123918,
13-
"keyId": "7e4d0c6a708866e7",
14-
"files": {
15-
"CHANGELOG.md": "ae115bf79bd497281626a2773f97e2a21731009c667a15dc6d9b0e8f22b518f0",
16-
"module.js.LICENSE.txt": "e8c02c32db0a1df801e3d57aab9722d00cf899e5a1b469795e18d19dc3b9f1c4",
17-
"img/logo.svg": "655cfc72eec8d19bda8f74d9fa3449b7b133b5ee66c7bd3db407fdfeada1cbd1",
18-
"img/screenshot.png": "eadb1e588dccd558fa3aee74e1a4ffa7fab992d810de198dc230293528f8dd23",
19-
"plugin.json": "93c59d3db6c7a5b65caf49da4373cffef76b5db96fd0f1feadc1080dc2647b29",
20-
"module.js": "0bc49d3b8bcc98fc48b5d4c36307ec0c5447086af09445ca49acedd785908685",
21-
"module.js.map": "112d9d377a990f3b004a52b61a3021263c2923d91d2dd088432b673817721215",
22-
"LICENSE": "a63c5165eb9778ded164326a26710064defbc9ffc295c8d49eda51bf9bd8f7d2",
23-
"README.md": "704d353d84ae0eca7d3f38cb7af84fdb32bed8a944ebcabb9bde8a92dcf5bfdd"
24-
}
25-
}
26-
-----BEGIN PGP SIGNATURE-----
27-
Version: OpenPGP.js v4.10.10
28-
Comment: https://openpgpjs.org
29-
30-
wrgEARMKAAYFAmODdzwAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq
31-
cIhm5yabAgjcMfnUR0k27bRKxKiW7fwpBAt/P5AYE/Dt3TAtnWt3VLzIGJAc
32-
ogYMFBcnJsJtVtGqczROGnZ2GtGrdaun4KLo4QIJAT0aYSTKGH35dzo4iWmt
33-
DW1RHjvgeMOQlfz52E+peIXnVM/AV29H29PMhiAZ1nmYU1kySLYrUcrqGekr
34-
i+V6zLpU
35-
=HhLi
36-
-----END PGP SIGNATURE-----
1+
2+
-----BEGIN PGP SIGNED MESSAGE-----
3+
Hash: SHA512
4+
5+
{
6+
"manifestVersion": "2.0.0",
7+
"signatureType": "community",
8+
"signedByOrg": "marcusolsson",
9+
"signedByOrgName": "Marcus Olsson",
10+
"plugin": "marcusolsson-dynamictext-panel",
11+
"version": "3.0.0",
12+
"time": 1676841447323,
13+
"keyId": "7e4d0c6a708866e7",
14+
"files": {
15+
"README.md": "b309ab42e0591a65d989e8ae6351c87f09adc19cc8292112372ab54e96849af3",
16+
"module.js.LICENSE.txt": "e8c02c32db0a1df801e3d57aab9722d00cf899e5a1b469795e18d19dc3b9f1c4",
17+
"plugin.json": "cfc5369d5be10d2f297fe0de413aa802ab05ee0782088a6e5a548bf4f7ef3fa6",
18+
"LICENSE": "f61b4f79d7a9894e10398b6fd55ce533b206a27df5e045a58eca3ea788cc9119",
19+
"img/logo.svg": "655cfc72eec8d19bda8f74d9fa3449b7b133b5ee66c7bd3db407fdfeada1cbd1",
20+
"img/screenshot.png": "68d355ffafe66ce4855566ccd7bf393e4c0dad66bddb3a2d2adb5e3eb057f50c",
21+
"CHANGELOG.md": "ad326e2cbef94f8675acbc75d627d3268dd3cc68e94ab6f7f6aec821e9031e35",
22+
"module.js": "c68ac6c2d78437c466a9e0288340ba38ed2e0f1f6c7de359693368c337c16363",
23+
"module.js.map": "80b3e067fe994430aab689ba5efc7242849379eeae744f96f62de231d191744c"
24+
}
25+
}
26+
-----BEGIN PGP SIGNATURE-----
27+
Version: OpenPGP.js v4.10.10
28+
Comment: https://openpgpjs.org
29+
30+
wrkEARMKAAYFAmPykecAIQkQfk0ManCIZucWIQTzOyW2kQdOhGNlcPN+TQxq
31+
cIhm50F1AgkBWBYrLtwNo3gYXG7qEGzehhntwTa2eG8/8DEh9tp2Bw9x3Tqw
32+
IvJ44UkcRDEvnV7vfynhenWX3oY1Y1iZlrTdxiYCCQHw7sKQOoSmHxX1hGdF
33+
V0MzX5gYSp6O1hJlshHkl3mZQFt8kACYZyQIJ2qf1ogMZ8tz4LbJQikf49G3
34+
STJjWOQCow==
35+
=TaFo
36+
-----END PGP SIGNATURE-----

src/marcusolsson-dynamictext-panel/README.md

+38-65
Original file line numberDiff line numberDiff line change
@@ -2,108 +2,81 @@
22

33
![Text](https://github.com/VolkovLabs/volkovlabs-dynamictext-panel/raw/main/src/img/screenshot.png)
44

5-
[![Grafana](https://img.shields.io/badge/Grafana-9.2.2-orange)](https://www.grafana.com)
5+
[![Grafana](https://img.shields.io/badge/Grafana-9.3.6-orange)](https://www.grafana.com)
66
![CI](https://github.com/volkovlabs/volkovlabs-dynamictext-panel/workflows/CI/badge.svg)
77
[![codecov](https://codecov.io/gh/VolkovLabs/volkovlabs-dynamictext-panel/branch/main/graph/badge.svg?token=0m6f0ktUar)](https://codecov.io/gh/VolkovLabs/volkovlabs-dynamictext-panel)
88
[![CodeQL](https://github.com/VolkovLabs/volkovlabs-dynamictext-panel/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/VolkovLabs/volkovlabs-dynamictext-panel/actions/workflows/codeql-analysis.yml)
99

1010
## Introduction
1111

12-
A Dynamic Text panel is a plugin for Grafana for dynamic, data-driven text with Markdown and Handlebars support.
12+
A Dynamic Text visualization panel is a Grafana plugin that transforms monotone text/table data into vibrant, easy-to-read information cards. The panel supports variables, Markdown and Handlebars.
1313

14-
While the built-in Text panel in Grafana does support variables, that's about as dynamic it gets. This panel lets you define a text template using the data from your data source query.
14+
The Dynamic Text visualization panel lets you define a text template using the data from your data source query.
1515

1616
[![Dynamic Text Plugin for Grafana | Markdown, HTML and Handlebars to transform data visualizations](https://raw.githubusercontent.com/volkovlabs/volkovlabs-dynamictext-panel/main/img/video.png)](https://youtu.be/MpNZ4Yl-p0U)
1717

18-
### Requirements
18+
## Requirements
1919

20-
- **Grafana 8.5+**, **Grafana 9.0+** is required for version 2.X.
21-
- **Grafana 7.0+** is required for version 1.X.
20+
- **Grafana 8.5+**, **Grafana 9.0+** is required for major versions 2 and 3.
21+
- **Grafana 7.0+** is required for major version 1.
2222

2323
## Getting Started
2424

25-
The Dynamic Text panel can be installed from the [Grafana Catalog](https://grafana.com/grafana/plugins/marcusolsson-dynamictext-panel/) or use the `grafana-cli` tool to install from the command line:
25+
The Dynamic Text visualization panel can be installed from the [Grafana Catalog](https://grafana.com/grafana/plugins/marcusolsson-dynamictext-panel/) or utilizing the Grafana command line tool.
26+
27+
For the latter, use the following command.
2628

2729
```bash
2830
grafana-cli plugins install marcusolsson-dynamictext-panel
2931
```
3032

3133
## Features
3234

33-
- Uses Monaco Code Editor with Auto formatting to update Templates.
35+
- Uses Monaco Code Editor with Auto formatting to update Templates, JavaScript Code and Styles.
3436
- Supports [Markdown](https://commonmark.org/help/) and [Handlebars](https://handlebarsjs.com/guide/expressions.html#basic-usage).
3537
- Uses [markdown-it](https://github.com/markdown-it/markdown-it) for rendering Markdown to HTML.
36-
- HTML inside templates is sanitized using [XSS](https://jsxss.com/en/index.html) through `textUtil`.
37-
- Allows to display Time global variables (`__to` and `__from`) as seconds, ISO, and formatted using `dayjs`.
38-
- Supports disable Sanitizing using Grafana configuration `disable_sanitize_html`.
39-
40-
## Content
41-
42-
To display data from your query result, enter the name of the field surrounded by double braces. For example, to display the value from the `Time` field:
43-
44-
```
45-
{{Time}}
46-
```
38+
- Supports Code syntax highlight using a11y styles.
39+
- Sanitizing
40+
- HTML inside templates is sanitized using [XSS](https://jsxss.com/en/index.html).
41+
- Can be disabled using Grafana configuration `disable_sanitize_html`.
42+
- Allows to display nested objects using `{{json object}}` Handlebars helper.
43+
- Allows displaying Time global variables (`__to` and `__from`) as seconds, ISO, and formatted using `dayjs`.
44+
- Allows adding Handlebars helpers and Event handlers.
45+
- Allows adding CSS styles.
46+
- Supports Internationalization using custom helpers.
4747

48-
Panels renders the template for every row in the query result. If a query returns multiple query results, you can select the query result you wish to display from a drop-down menu.
48+
## Documentation
4949

50-
Template support text processing using one or more helpers and recipies:
50+
| Section | Description |
51+
| ------------------------ | -------------------------------------------------------------- |
52+
| [Content](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/content) | Explains how to create a visualization template for your data. |
53+
| [Recipes](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/recipes) | Useful snippets that you can use in your templates. |
54+
| [Release Notes](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/release) | Stay up to date with the latest features and updates. |
5155

52-
- [Helpers](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/helpers) - functions that let you perform text transformation within your template.
53-
- [Recipes](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/recipes) - useful snippets that you can use in your templates.
56+
### Features
5457

55-
The panel renders Handlebars → Markdown → Sanitized HTML and displays the final result.
58+
| Section | Description |
59+
| ----------------------- | ------------------------------------------------------------------------------------------ |
60+
| [Data](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/data) | Demonstrates how to use the Every Row and All Rows options. |
61+
| [JavaScript Code](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/code) | Demonstrates how to add Handlebars helpers and Event handlers. |
62+
| [Styles](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/styles) | Demonstrates how to add CSS styles. |
63+
| [Helpers](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/helpers) | Helpers are functions that let you perform basic text transformation within your template. |
64+
| [Variables](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/variables) | Demonstrates how to use variables. |
5665

57-
### Default content
66+
## Tutorial
5867

59-
Whenever the data source query returns an empty result, Grafana displays the template in **Default content**. This can be useful to provide users with instructions on what to do, or who to contact, when the query returns an empty result.
68+
This video outlines all the new features we implemented, including the most asked-for JavaScript area code.
6069

61-
Even though there's no data from the data source, you can still use the available [helpers](https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/helpers).
62-
63-
### Sanitizing
64-
65-
Sanitizing is enabled by default and some elements like `<button>` are unavailable in the content.
66-
67-
To disable sanitizing, panel depends on the Grafana configuration option [`disable_sanitize_html`](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#disable_sanitize_html). For Docker container and Docker Compose, use as:
68-
69-
```bash
70-
- GF_PANELS_DISABLE_SANITIZE_HTML=true
71-
```
72-
73-
## Every row vs All rows
74-
75-
By default, the template configured in the **Content** field is rendered for each record in the result. You can render this template only once by selecting `All rows`. In this case, the query results are passed in as the `data` field to the template.
76-
77-
Handlebars provides a [builtin-helper](https://handlebarsjs.com/guide/builtin-helpers.html#each) to iterate over these records.
78-
79-
If your data source returns the following data:
80-
81-
```md
82-
| app | description | cluster | tier |
83-
| ---- | ---------------------------- | ------- | -------- |
84-
| auth | Handles user authentication. | prod | frontend |
85-
```
86-
87-
You can then write Markdown with placeholders for the data you want to use. The value inside each double brace expression refers to a field in the query result.
88-
89-
```md
90-
# {{app}}
91-
92-
{{description}}
93-
94-
{{#if (eq tier "frontend")}}
95-
Link: <a href='https://{{cluster}}.example.com/{{app}}'>https://{{cluster}}.example.com/{{app}}</a>
96-
{{/if}}
97-
```
70+
[![JavaScript code in the Dynamic text panel | Grafana functionality explodes](https://raw.githubusercontent.com/volkovlabs/volkovlabs-dynamictext-panel/main/img/javascript.png)](https://youtu.be/lJqk5Gobec4)
9871

9972
## Feedback
10073

101-
We love to hear from users, developers, and the whole community interested in this plugin. These are various ways to get in touch with us:
74+
We love to hear from you. There are various ways to get in touch with us.
10275

10376
- Ask a question, request a new feature, and file a bug with [GitHub issues](https://github.com/volkovlabs/volkovlabs-dynamictext-panel/issues/new/choose).
10477
- Sponsor our open-source plugins for Grafana with [GitHub Sponsor](https://github.com/sponsors/VolkovLabs).
10578
- Star the repository to show your support.
10679

10780
## License
10881

109-
- Apache License Version 2.0, see [LICENSE](https://github.com/volkovlabs/volkovlabs-dynamictext-panel/blob/main/LICENSE).
82+
Apache License Version 2.0, see [LICENSE](https://github.com/volkovlabs/volkovlabs-dynamictext-panel/blob/main/LICENSE).
Loading

src/marcusolsson-dynamictext-panel/module.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/marcusolsson-dynamictext-panel/module.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/marcusolsson-dynamictext-panel/plugin.json

+6-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@
1414
"keywords": ["text", "markdown", "handlebars"],
1515
"links": [
1616
{
17-
"name": "GitHub",
18-
"url": "https://github.com/volkovlabs/volkovlabs-dynamictext-panel"
19-
},
20-
{
21-
"name": "YouTube Playlist",
22-
"url": "https://www.youtube.com/playlist?list=PLPow72ygztmSRxDiDIAdXNIqD_RxLRjcW"
17+
"name": "Documentation",
18+
"url": "https://volkovlabs.io/plugins/volkovlabs-dynamictext-panel/"
2319
},
2420
{
25-
"name": "Website",
26-
"url": "https://volkovlabs.io"
21+
"name": "GitHub",
22+
"url": "https://github.com/volkovlabs/volkovlabs-dynamictext-panel"
2723
}
2824
],
2925
"logos": {
@@ -36,8 +32,8 @@
3632
"path": "img/screenshot.png"
3733
}
3834
],
39-
"updated": "2022-11-27",
40-
"version": "2.1.0"
35+
"updated": "2023-02-19",
36+
"version": "3.0.0"
4137
},
4238
"name": "Dynamic Text",
4339
"type": "panel"

src/plugin.json

-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
{
2121
"name": "GitHub",
2222
"url": "https://github.com/VolkovLabs/volkovlabs-app"
23-
},
24-
{
25-
"name": "YouTube Playlist",
26-
"url": "https://youtube.com/playlist?list=PLPow72ygztmTm_zY_PYqJtRYpMPpZglYC"
2723
}
2824
],
2925
"logos": {

0 commit comments

Comments
 (0)