Skip to content

Commit

Permalink
Version 2.0.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
riclolsen committed Apr 28, 2024
1 parent f535a93 commit 9c51b66
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ needs read access to the directory.

# Changelog

## Version 2.0.2

* Fix file not found error when Grafana configured with "serve_from_sub_path = true".

## Version 2.0.1

* Fix errors related to crypto.randomUUID on http servers.
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ services:
context: ./.config
args:
grafana_image: ${GRAFANA_IMAGE:-grafana}
grafana_version: ${GRAFANA_VERSION:-9.0.0}
grafana_version: ${GRAFANA_VERSION:-10.4.2}
environment:
- GF_SECURITY_ALLOW_EMBEDDING=true
- GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s:3000/grafana/
- GF_SERVER_SERVE_FROM_SUB_PATH=true
ports:
- 3000:3000/tcp
volumes:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scadavis-synoptic-panel",
"version": "2.0.1",
"version": "2.0.2",
"description": "SCADA-like synoptic panel from SCADAvis.io",
"scripts": {
"build": "webpack -c ./webpack.config.ts --env production",
Expand Down
4 changes: 3 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { PanelPlugin } from '@grafana/data';
import { ScadavisPanel } from './ScadavisPanel';
import { ScadavisPanelOptions } from './types';
import { UploadSVG } from './SvgFilePicker';

declare global {
let grafanaBootData: any;
}
export const plugin = new PanelPlugin<ScadavisPanelOptions>(ScadavisPanel).setPanelOptions(builder => {
return builder
.addTextInput({
Expand Down
2 changes: 1 addition & 1 deletion src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"path": "img/scadavis-power.png"
}
],
"version": "2.0.1",
"version": "2.0.2",
"updated": "%TODAY%"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/synoptic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,14 +769,14 @@ export class ScadaVis {
if (this.iframeparams.indexOf('scrolling') >= 0) {
scrolling = '';
}

const subUrl = grafanaBootData?.appSubUrl || grafanaBootData?.settings?.appSubUrl || '';
iframehtm =
'<iframe id="' +
id +
'" sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox" ' +
this.iframeparams +
scrolling +
` src="/public/plugins/scadavis-synoptic-panel/synoptic/synoptic.html"></iframe>`;
` src="${subUrl}/public/plugins/scadavis-synoptic-panel/synoptic/synoptic.html"></iframe>`;
if (this.container.innerHTML !== undefined) {
(this.container as HTMLDivElement).appendChild(this.createElementFromHTML(iframehtm) as Node);
} else {
Expand Down

0 comments on commit 9c51b66

Please sign in to comment.