ae3e / ae3e-plotly-panel

Plotly panel for Grafana
Apache License 2.0
97 stars 21 forks source link

Incompatible with agenty-flowcharting-panel #7

Closed RedShift1 closed 3 years ago

RedShift1 commented 3 years ago

Grafana version 7.2.2 and also 7.1.5 plotly-panel version 0.3.1 agenty-flowcharting-panel version: 0.9.0

This plugins seems to be conflicting with agenty-flowcharting-panel. When one is loaded prior to the other, the other will fail.

Sequence: 1) Press CTRL+F5 for clean browser 2) Go to dashboard with flowcharting panel: flowcharting OK 3) Go to dashboard with plotly panel: plotly-panel fails to load

plugin_loader.ts:265 Error loading panel plugin: ae3e-plotly-panel TypeError: Cannot read property 'Config' of undefined
    at e.exports (/public/plugins/ae3e-plotly-panel/module.js:2)
    at Object.t.exports.695.../build/plotcss (/public/plugins/ae3e-plotly-panel/module.js:2)
    at a (/public/plugins/ae3e-plotly-panel/module.js:2)
    at eval (/public/plugins/ae3e-plotly-panel/module.js:2)
    at Object.t.exports.14.../src/core (/public/plugins/ae3e-plotly-panel/module.js:2)
    at a (/public/plugins/ae3e-plotly-panel/module.js:2)
    at eval (/public/plugins/ae3e-plotly-panel/module.js:2)
    at Object.t.exports.26../aggregate (/public/plugins/ae3e-plotly-panel/module.js:2)
    at a (/public/plugins/ae3e-plotly-panel/module.js:2)
    at t (/public/plugins/ae3e-plotly-panel/module.js:2)

image

1) Press CTRL+F5 for clean browser 2) Go to dashboard with plotly panel: plotly-panel OK 3) Go to dashboard with flowcharting panel: flowcharting fails to load

RedShift1 commented 3 years ago

https://github.com/algenty/grafana-flowcharting/issues/235

RedShift1 commented 3 years ago

Possibly related: https://github.com/plotly/plotly.js/issues/4563

ae3e commented 3 years ago

Thanks for reporting this issue and pointed me in the right direction. I didn't find yet a way to solve it right in the plugin but, if you have your own instance of Grafana, you can add this line window.PlotlyConfig = {MathJaxConfig: 'local'} in the <script> tag of the grafana-7.x.x/public/views/index.html file and restart Grafana.

<!DOCTYPE html>
<html lang="en">
  <head>
    <script>

       //INSERT CODE HERE
       window.PlotlyConfig = {MathJaxConfig: 'local'}

      // https://github.com/GoogleChromeLabs/tti-polyfill
      !(function() {
        if ('PerformanceLongTaskTiming' in window) {
          var g = (window.__tti = { e: [] });

Then it should work again...

RedShift1 commented 3 years ago

Thanks. I tested the workaround and it fixes '1) flowcharting -> 2) plotly' but not '1) plotly -> 2) flowcharting'

ae3e commented 3 years ago

I published a new version (v0.3.2) that fixes the 2 bugs. I hope it will work this time! 😉

RedShift1 commented 3 years ago

Works perfectly now! Thanks!