Explorar o código

HUE-3230 [core] Remove Plotly dependency from common_header

Enrico Berti %!s(int64=9) %!d(string=hai) anos
pai
achega
8bd41b8

+ 3 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -3550,7 +3550,9 @@
   ko.bindingHandlers.plotly = {
     init: function (element, valueAccessor, allBindings) {
       var options = valueAccessor() || {};
-      Plotly.plot(element, options.data || [], options.layout || {}, {displaylogo: false});
+      if (Plotly){
+        Plotly.plot(element, options.data || [], options.layout || {}, {displaylogo: false});
+      }
     }
   };
 

+ 0 - 1
desktop/core/src/desktop/templates/common_header.mako

@@ -201,7 +201,6 @@ if USE_NEW_EDITOR.get():
   <script src="${ static('desktop/ext/js/bootstrap-better-typeahead.min.js') }"></script>
   <script src="${ static('desktop/ext/js/fileuploader.js') }"></script>
   <script src="${ static('desktop/js/popover-extra-placements.js') }"></script>
-  <script src="${ static('desktop/ext/js/plotly.js') }"></script>
 
   <script type="text/javascript" charset="utf-8">