Pārlūkot izejas kodu

HUE-6801 [frontend] Set a minimum height to the log resizer binding

Enrico Berti 8 gadi atpakaļ
vecāks
revīzija
45ac70f16c

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

@@ -2096,6 +2096,9 @@
         },
         drag: function (event, ui) {
           var currentHeight = ui.offset.top - $target.offset().top - 20;
+          if (options.minHeight && currentHeight < options.minHeight) {
+            currentHeight = options.minHeight;
+          }
           $.totalStorage('hue.editor.logs.size', currentHeight);
           $target.css("height", currentHeight + "px");
           ui.offset.top = 0;

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

@@ -619,7 +619,7 @@ from notebook.conf import ENABLE_QUERY_BUILDER, ENABLE_QUERY_SCHEDULING, ENABLE_
       <pre data-bind="visible: result.logs() && result.logs().length == 0" class="logs logs-bigger">${ _('No logs available at this moment.') }</pre>
       <pre data-bind="visible: result.logs() && result.logs().length > 0, text: result.logs, logScroller: result.logs, logScrollerVisibilityEvent: showLogs, niceScroll" class="logs logs-bigger logs-populated"></pre>
     </div>
-    <div class="snippet-log-resizer" data-bind="visible: result.logs().length > 0, logResizer: {parent: '.snippet-log-container', target: '.logs-populated', mainScrollable: MAIN_SCROLLABLE, onStart: hideFixedHeaders, onResize: function(){ hideFixedHeaders(); redrawFixedHeaders(500); }}">
+    <div class="snippet-log-resizer" data-bind="visible: result.logs().length > 0, logResizer: {parent: '.snippet-log-container', target: '.logs-populated', mainScrollable: MAIN_SCROLLABLE, onStart: hideFixedHeaders, onResize: function(){ hideFixedHeaders(); redrawFixedHeaders(500); }, minHeight: 50}">
       <i class="fa fa-ellipsis-h"></i>
     </div>
   </div>