Skip to content

Commit

Permalink
v2.0.2 - Fix the positioning of the wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
westc committed Nov 19, 2020
1 parent 9c08ca0 commit a89e704
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 11 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Changelog

- **2.0.1**
- **v2.0.2**
- Fix the positioning of the wrapper.

- **v2.0.1**
- Include the `dist/` directory again.

- **2.0.0**
- **v2.0.0**
- Making plugin work for Grafana 7.2.1 (or higher).
- Added [dom-to-image](https://github.com/tsayen/dom-to-image) to make screenshots work.
- Removed [html2canvas](https://github.com/niklasvh/html2canvas) because it stopped working with how Grafana is setup.
Expand Down
7 changes: 5 additions & 2 deletions dist/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Changelog

- **2.0.1**
- **v2.0.2**
- Fix the positioning of the wrapper.

- **v2.0.1**
- Include the `dist/` directory again.

- **2.0.0**
- **v2.0.0**
- Making plugin work for Grafana 7.2.1 (or higher).
- Added [dom-to-image](https://github.com/tsayen/dom-to-image) to make screenshots work.
- Removed [html2canvas](https://github.com/niklasvh/html2canvas) because it stopped working with how Grafana is setup.
Expand Down
11 changes: 9 additions & 2 deletions dist/module.js

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

2 changes: 1 addition & 1 deletion dist/module.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
}
],
"screenshots": [],
"version": "2.0.1",
"updated": "2020-11-13"
"version": "2.0.2",
"updated": "2020-11-19"
},

"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "westc-vuehtml-panel",
"private": true,
"version": "2.0.1",
"version": "2.0.2",
"description": "Create a highly customizable panel using Vue.js.",
"scripts": {
"build": "grafana-toolkit plugin:build",
Expand Down
10 changes: 9 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export default class SimpleCtrl extends MetricsPanelCtrl {
? `Export "${table.getAttribute('data-title')}" As CSV`
: `Export Table #${index + 1} As CSV`,
icon: 'fa fa-fw fa-table',
iconClassName: 'info-circle',
click: `ctrl.csvifyTable(${index})`,
});
}
Expand Down Expand Up @@ -309,10 +310,17 @@ export default class SimpleCtrl extends MetricsPanelCtrl {
}

// Add the nested CSS to the panel.
ctrl.stylesheet = JS.css(JSON.parse(pseudoCssToJSON(panel.css)), '.' + cls);
ctrl.stylesheet = JS.css(JSON.parse(pseudoCssToJSON(panel.css)), `.${cls}`);

// Add the randomized class name to the wrapper element while removing the
// previous class name if it is there.
elemPC.className = elemPC.className.replace(/(^|\s+)_\d+(?=\s+|$)/g, ' ').trim() + ' ' + cls;

Object.assign(elemPC.style, {
position: 'relative',
overflow: 'auto',
});

// Gets all dashboards via the API.
getAllDashboards((data, isSuccess) => {
if (isSuccess) {
Expand Down

0 comments on commit a89e704

Please sign in to comment.