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
Apache License 2.0
977 stars 149 forks source link

The panel not showing any graphics - module.js error #281

Closed Pinkisagit closed 3 years ago

Pinkisagit commented 3 years ago

Hi,

The panel worked before (Grafana 7.3.6) although I have only been experimenting with it previously. Recently, I resumed my experimentation but I'm getting an error coming up in Chrom console:

flowcharting_error

I don't seem any graphics displayed, either in edit or display mode. If I open in draw.io, the drawing displays, so it's not an issue with a drawing.

I have updated to latest 7.5.0 to see if it can clear the issue but no luck.

Exception happens in this bit of code when running new Graph(this.container) (at line 10452 of module.js once prettified in Chrome):

key: "initGraph",
                    value: function() {
                        var t = p.a.trace.before(this.constructor.name + ".initGraph()");
                        return this.graph = new Graph(this.container),
                        this.graph.setPanning(!0),
                        this.clickBackup = this.graph.click,
                        this.dbclickBackup = this.graph.dblClick,
                        mxEvent.addMouseWheelListener(mxUtils.bind(this, this.eventMouseWheel), this.container),
                        (mxClient.IS_IE || mxClient.IS_EDGE) && mxEvent.addListener(this.container, "wheel", mxUtils.bind(this, this.eventMouseWheel)),
                        mxEvent.addListener(document, "keydown", mxUtils.bind(this, this.eventKey)),
                        this.container.addEventListener("contextmenu", (function(t) {
                            return t.preventDefault()
                        }
                        )),
                        this.graph.dblClick = this.eventDbClick.bind(this),
                        t.after(),
                        this
                    }

I don't know if this is enough info to investigate further but I'm happy to provide more if pointed in the right direction.

Cheers.

Pinkisagit commented 3 years ago

Ok, further digging into the exception debugging revealed the culprit - another panel's module.js seems to be interfering with this panel when in the same dashboard. Simple solution is to use a separate dashboard for my experimentations.

ReferenceError: Graph is not defined at t.value (http://tas-hist02/public/plugins/agenty-flowcharting-panel/module.js:2:199167) at new t (http://tas-hist02/public/plugins/agenty-flowcharting-panel/module.js:2:195973) at t.value (http://tas-hist02/public/plugins/agenty-flowcharting-panel/module.js:2:258068) at t.value (http://tas-hist02/public/plugins/agenty-flowcharting-panel/module.js:2:260105) at eval (http://tas-hist02/public/plugins/agenty-flowcharting-panel/module.js:2:269791) at Array.forEach () at t.value (http://tas-hist02/public/plugins/agenty-flowcharting-panel/module.js:2:269768) at t.eval (http://tas-hist02/public/plugins/agenty-flowcharting-panel/module.js:2:267185) at c (http://tas-hist02/public/plugins/jdbranham-diagram-panel/module.js:2:642713) at Generator.eval [as _invoke] (http://tas-hist02/public/plugins/jdbranham-diagram-panel/module.js:2:642466)