Browse Source

HUE-5873 [editor] The download in progress modal doesn't close automatically on IE11

Enrico Berti 8 years ago
parent
commit
9728f73

+ 1 - 1
apps/beeswax/src/beeswax/data_export.py

@@ -28,7 +28,7 @@ LOG = logging.getLogger(__name__)
 
 
 FETCH_SIZE = 1000
-DOWNLOAD_COOKIE_AGE = 10
+DOWNLOAD_COOKIE_AGE = 1800 # 30 minutes
 
 
 def download(handle, format, db, id=None, file_name='query_result'):

+ 8 - 4
desktop/core/src/desktop/static/desktop/js/hue.json.js

@@ -62,10 +62,14 @@ JSON.bigdataParse = (function () {
 
 // Get the next character. When there are no more characters,
 // return the empty string.
-
-        ch = text.charAt(at);
-        at += 1;
-        return ch;
+        try {
+          ch = text.charAt(at);
+          at += 1;
+          return ch;
+        }
+        catch (e) {
+          return '';
+        }
       },
 
       number = function () {

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

@@ -389,6 +389,7 @@ except ImportError, e:
         }
 
         var self = this;
+        $.cookie('download-' + self.snippet.id(), null, { expires: -1, path: '/' })
         self.$downloadForm.find('input[name=\'format\']').val(format);
         self.$downloadForm.find('input[name=\'notebook\']').val(ko.mapping.toJSON(self.notebook.getContext()));
         self.$downloadForm.find('input[name=\'snippet\']').val(ko.mapping.toJSON(self.snippet.getContext()));