Browse Source

HUE-6169 [editor] More obvious query log access when there is no "No error message"

Enrico Berti 8 years ago
parent
commit
eefb87c

File diff suppressed because it is too large
+ 0 - 0
desktop/libs/notebook/src/notebook/static/notebook/css/notebook.css


+ 22 - 3
desktop/libs/notebook/src/notebook/static/notebook/less/notebook.less

@@ -366,14 +366,21 @@
 
   .snippet-progress-container {
     height: 3px;
-    width: 100%;
     overflow: hidden;
+    margin-bottom: 2px;
+  }
+
+  .snippet-logs-btn {
+    margin-top: -9px;
+    margin-left: -3px;
+    font-size: 16px;
   }
 
   .snippet-execution-status {
-    margin-top: 2px;
+    margin-top: 10px;
     margin-left: 35px;
     margin-right: 20px;
+    margin-bottom: 4px;
   }
 
   .ace-container-resizable {
@@ -1244,12 +1251,24 @@
     z-index: 1030;
   }
 
+  .close-logs-overlay {
+    opacity: 0.8;
+    position: absolute;
+    top: 0;
+    right: 6px;
+    display: none;
+  }
+
+  .snippet-log-container:hover .close-logs-overlay {
+    display: block;
+  }
+
   .jobs-overlay {
     background-color: #FFF;
     opacity: 0.8;
     position: absolute;
     top: 10px;
-    right: 15px;
+    right: 20px;
 
     .progress-job {
       height: 2px;

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

@@ -612,6 +612,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
 <script type="text/html" id="snippet-log${ suffix }">
   <div class="snippet-log-container margin-bottom-10" data-bind="visible: showLogs() && status() != 'ready' && status() != 'loading'" style="display: none;">
     <div data-bind="delayedOverflow, css: resultsKlass" style="margin-top: 5px; position: relative;">
+      <a href="javascript: void(0)" class="inactive-action close-logs-overlay" data-bind="click: function(){ showLogs(false) }"><i class="fa fa-times"></i></a>
       <ul data-bind="visible: jobs().length > 0, foreach: jobs" class="unstyled jobs-overlay">
         <li data-bind="attr: {'id': $data.name.substr(4)}">
           %if is_embeddable:
@@ -888,7 +889,6 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
   <div class="hover-actions inline pull-right" style="font-size: 15px;">
     <!-- ko template: { name: 'query-redacted${ suffix }' } --><!-- /ko -->
     <!-- ko template: { name: 'longer-operation${ suffix }' } --><!-- /ko -->
-    <a class="inactive-action" href="javascript:void(0)" data-bind="visible: status() != 'ready' && status() != 'loading' && errors().length == 0, click: function() { hideFixedHeaders(); $data.showLogs(!$data.showLogs());}, css: {'blue': $data.showLogs}" title="${ _('Show Logs') }"><i class="fa fa-file-text-o"></i></a>
     <span class="execution-timer" data-bind="visible: type() != 'text' && status() != 'ready' && status() != 'loading', text: result.executionTime().toHHMMSS()" title="${ _('Execution time') }"></span>
 
     <!-- ko template: { name: 'snippet-header-statement-type${ suffix }' } --><!-- /ko -->
@@ -911,7 +911,6 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
 
    <!-- ko template: { name: 'snippet-header-statement-type${ suffix }' } --><!-- /ko -->
 
-    <a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="visible: status() != 'ready' && status() != 'loading', click: function() { hideFixedHeaders(); $data.showLogs(!$data.showLogs());}, css: {'blue': $data.showLogs}" title="${ _('Show Logs') }"><i class="fa fa-file-text-o"></i></a>
     <a class="inactive-action margin-left-10" href="javascript:void(0)" data-bind="toggle: settingsVisible, visible: hasProperties, css: { 'blue' : settingsVisible }" title="${ _('Settings and properties') }"><i class="fa fa-cog"></i></a>
     <a class="inactive-action margin-left-10 pointer" title="${ _('Show editor shortcuts') }" data-toggle="modal" data-target="#helpModal${ suffix }"><i class="fa fa-question"></i></a>
   </div>
@@ -1619,6 +1618,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
 
 <script type="text/html" id="snippet-execution-status${ suffix }">
   <div class="snippet-execution-status" data-bind="clickForAceFocus: ace">
+    <a class="inactive-action pull-left snippet-logs-btn" href="javascript:void(0)" data-bind="visible: status() === 'running' && errors().length == 0, click: function() { hideFixedHeaders(); $data.showLogs(!$data.showLogs());}, css: {'blue': $data.showLogs}" title="${ _('Toggle Logs') }"><i class="fa fa-fw" data-bind="css: { 'fa-caret-right': !$data.showLogs(), 'fa-caret-down': $data.showLogs() }"></i></a>
     <div class="snippet-progress-container" data-bind="visible: status() != 'canceled' && status() != 'with-optimizer-report'">
       <div class="progress-snippet progress" data-bind="css: {
         'progress-starting': progress() == 0 && status() == 'running',

Some files were not shown because too many files changed in this diff