瀏覽代碼

HUE-3472 [editor] Big number precision loss

Enrico Berti 9 年之前
父節點
當前提交
ab9982b

+ 2 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -706,13 +706,14 @@
         rows: rows,
         startOver: startOver
       }, function (data) {
+        data = JSON.bigdataParse(data);
         if (data.status == 0) {
           self.loadData(data, rows);
         } else {
           self._ajaxError(data);
           $(document).trigger("renderDataError", {snippet: self});
         }
-      }).fail(function (xhr, textStatus, errorThrown) {
+      }, 'text').fail(function (xhr, textStatus, errorThrown) {
         $(document).trigger("error", xhr.responseText);
       });
     };

+ 1 - 0
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -38,6 +38,7 @@ from desktop.views import _ko
 <link rel="stylesheet" href="${ static('desktop/ext/css/medium-editor.min.css') }">
 <link rel="stylesheet" href="${ static('desktop/css/bootstrap-medium-editor.css') }">
 
+<script src="${ static('desktop/js/hue.json.js') }"></script>
 <script src="${ static('desktop/ext/js/markdown.min.js') }"></script>
 <script src="${ static('desktop/ext/js/jquery/plugins/jquery.hotkeys.js') }"></script>
 <script src="${ static('desktop/ext/js/jquery/plugins/jquery.mousewheel.min.js') }"></script>