algenty / grafana-flowcharting

Flowcharting, plugin for Grafana to create complexe visio's draws style like technical architectures, floorplan, diagrams, hierarchical schema based on draw.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong url for common.css

xuyungit opened this issue · comments

Hi,

I built the latest version using yarn archive and copy dist folder to the plugin folder of grafana, and it seems work properly. But browser tries to get common.css from URL_ROOT/mxgraph/css/common.css instead of URL_ROOT/public/plugins/agenty-flowcharting-panel/libs/drawio/mxgraph/css/common.css. Anything wrong with my build environment?

my setup:
yarn: 1.22.17
node: v16.15.1
grafana: 9.0.6

Thanks.

This is still valid for 1.0.0d (in my setup)

A workaround can be found by fixing/updating a line in the viewer-static.min.js in the snapshot to include the base path:
The corrected line should look like this: mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css") , just grep for mxLoadStylesheets&&mxClient.link( and you should find it.

Screenshot from 2023-03-29 15-02-45 png

I'm not good enough at typescript to know what causes this error, so if someone more experienced could take a swing, that would be cool