Bläddra i källkod

HUE-4328 [editor] File chooser in 'In HDFS (large file)' always open on /

Enrico Berti 9 år sedan
förälder
incheckning
e3b4c25d6c

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/jquery.filechooser.js

@@ -146,7 +146,7 @@
         $li.appendTo($ul);
       });
       $(self.element).find('.filechooser-services').empty().width(80);
-      $(self.element).find('.filechooser-tree').width(470).css('paddingLeft', '6px').css('borderLeft', '1px solid #EEE').css('marginLeft', '80px');
+      $(self.element).find('.filechooser-tree').width(470).css('paddingLeft', '6px').css('borderLeft', '1px solid #EEE').css('marginLeft', '80px').css('min-height', '330px');
       $ul.appendTo($(self.element).find('.filechooser-services'));
     }
   };

+ 4 - 0
desktop/libs/notebook/src/notebook/static/notebook/css/notebook.css

@@ -792,6 +792,10 @@ input[type="text"].filechooser-input {
   height: 31px;
 }
 
+#saveResultsForm .fileChooserBtn {
+  margin-top: -3px;
+}
+
 table.airy tr td {
   padding: 4px;
 }

+ 2 - 2
desktop/libs/notebook/src/notebook/templates/notebook_ko_components.mako

@@ -364,7 +364,7 @@ except ImportError, e:
                    ${ _('In HDFS (max %s cells)') % DOWNLOAD_CELL_LIMIT.get() }
                 </label>
                 <div data-bind="visible: saveTarget() == 'hdfs-file'" class="inline">
-                  <input data-bind="value: savePath, filechooser: { value: savePath, isNestedModal: true }, filechooserOptions: { uploadFile: false }, hdfsAutocomplete: savePath" type="text" name="target_file" placeholder="${_('Path to CSV file')}" class="pathChooser margin-left-10">
+                  <input data-bind="value: savePath, filechooser: { value: savePath, isNestedModal: true }, filechooserOptions: { uploadFile: false, skipInitialPathIfEmpty: true }, hdfsAutocomplete: savePath" type="text" name="target_file" placeholder="${_('Path to CSV file')}" class="pathChooser margin-left-10">
                 </div>
                 <label class="radio" data-bind="visible: saveTarget() == 'hdfs-file'">
                   <input data-bind="checked: saveOverwrite" type="checkbox" name="overwrite">
@@ -379,7 +379,7 @@ except ImportError, e:
                   &nbsp;${ _('In HDFS (large file)') }
                 </label>
                 <div data-bind="visible: saveTarget() == 'hdfs-directory'" class="inline">
-                  <input data-bind="value: savePath, filechooser: { value: savePath, isNestedModal: true }, filechooserOptions: { uploadFile: false }, hdfsAutocomplete: savePath" type="text" name="target_dir" placeholder="${_('Path to directory')}" class="pathChooser margin-left-10">
+                  <input data-bind="value: savePath, filechooser: { value: savePath, isNestedModal: true }, filechooserOptions: { uploadFile: false, skipInitialPathIfEmpty: true }, hdfsAutocomplete: savePath" type="text" name="target_dir" placeholder="${_('Path to directory')}" class="pathChooser margin-left-10">
                   <i class="fa fa-question-circle muted" title="${ _("Use this option if you have a large result. It will rerun the entire query and save the results to the chosen HDFS directory.") }"></i>
                 </div>
               </div>