Эх сурвалжийг харах

HUE-7543 [editor] Prevent the risk icon from moving the editor down

Johan Ahlen 8 жил өмнө
parent
commit
d26ffc4e39

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
desktop/libs/notebook/src/notebook/static/notebook/css/notebook.css


+ 2 - 4
desktop/libs/notebook/src/notebook/static/notebook/less/notebook.less

@@ -1190,17 +1190,15 @@
     font-size: 15px;
     font-size: 15px;
   }
   }
 
 
-  .round-icon {
+  .optimizer-icon {
     display: inline-block;
     display: inline-block;
     width: 16px;
     width: 16px;
     height: 16px;
     height: 16px;
     text-align: center;
     text-align: center;
     line-height: 16px;
     line-height: 16px;
-    //border-radius: 8px;
     font-size: 14px;
     font-size: 14px;
     opacity: .8;
     opacity: .8;
     cursor: pointer;
     cursor: pointer;
-    margin-bottom: 12px;
     &.empty {
     &.empty {
       width: 1px;
       width: 1px;
       cursor: default;
       cursor: default;
@@ -1223,7 +1221,7 @@
     }
     }
   }
   }
 
 
-  .active .round-icon {
+  .active .optimizer-icon {
     opacity: 1;
     opacity: 1;
   }
   }
 
 

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

@@ -986,7 +986,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
       <!-- ko with: suggestion() -->
       <!-- ko with: suggestion() -->
         <!-- ko if: parseError -->
         <!-- ko if: parseError -->
           <!-- ko if: $parent.compatibilityTargetPlatform() == $parent.type() && $parent.compatibilitySourcePlatform() == $parent.type() -->
           <!-- ko if: $parent.compatibilityTargetPlatform() == $parent.type() && $parent.compatibilitySourcePlatform() == $parent.type() -->
-            <div class="round-icon error" data-bind="click: function(){ $parent.showOptimizer(! $parent.showOptimizer()) }, attr: { 'title': $parent.showOptimizer() ? '${ _ko('Close Validator') }' : '${ _ko('Open Validator') }'}">
+            <div class="optimizer-icon error" data-bind="click: function(){ $parent.showOptimizer(! $parent.showOptimizer()) }, attr: { 'title': $parent.showOptimizer() ? '${ _ko('Close Validator') }' : '${ _ko('Open Validator') }'}">
               <i class="fa fa-exclamation"></i>
               <i class="fa fa-exclamation"></i>
             </div>
             </div>
             <!-- ko if: $parent.showOptimizer -->
             <!-- ko if: $parent.showOptimizer -->
@@ -995,7 +995,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
           <!-- /ko -->
           <!-- /ko -->
           ## Oracle, MySQL compatibility... as they return a parseError and not encounteredString.
           ## Oracle, MySQL compatibility... as they return a parseError and not encounteredString.
           <!-- ko if: $parent.compatibilityTargetPlatform() != $parent.type() || $parent.type() != $parent.compatibilitySourcePlatform() -->
           <!-- ko if: $parent.compatibilityTargetPlatform() != $parent.type() || $parent.type() != $parent.compatibilitySourcePlatform() -->
-            <div class="round-icon warning" data-bind="click: function(){ $parent.showOptimizer(! $parent.showOptimizer()) }, attr: { 'title': $parent.showOptimizer() ? '${ _ko('Close Validator') }' : '${ _ko('Open Validator') }'}">
+            <div class="optimizer-icon warning" data-bind="click: function(){ $parent.showOptimizer(! $parent.showOptimizer()) }, attr: { 'title': $parent.showOptimizer() ? '${ _ko('Close Validator') }' : '${ _ko('Open Validator') }'}">
               <i class="fa fa-exclamation"></i>
               <i class="fa fa-exclamation"></i>
             </div>
             </div>
             <!-- ko if: $parent.showOptimizer -->
             <!-- ko if: $parent.showOptimizer -->
@@ -1005,7 +1005,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
         <!-- /ko -->
         <!-- /ko -->
         <!-- ko if: !parseError() && ($parent.compatibilityTargetPlatform() != $parent.type() || $parent.compatibilitySourcePlatform() != $parent.type()) -->
         <!-- ko if: !parseError() && ($parent.compatibilityTargetPlatform() != $parent.type() || $parent.compatibilitySourcePlatform() != $parent.type()) -->
           <!-- ko if: queryError.encounteredString().length == 0 -->
           <!-- ko if: queryError.encounteredString().length == 0 -->
-            <div class="round-icon success" data-bind="click: function(){ $parent.showOptimizer(! $parent.showOptimizer()) }, attr: { 'title': $parent.showOptimizer() ? '${ _ko('Close Validator') }' : '${ _ko('Open Validator') }'}">
+            <div class="optimizer-icon success" data-bind="click: function(){ $parent.showOptimizer(! $parent.showOptimizer()) }, attr: { 'title': $parent.showOptimizer() ? '${ _ko('Close Validator') }' : '${ _ko('Open Validator') }'}">
               <i class="fa fa-check"></i>
               <i class="fa fa-check"></i>
             </div>
             </div>
             <!-- ko if: $parent.showOptimizer -->
             <!-- ko if: $parent.showOptimizer -->
@@ -1022,7 +1022,7 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
           <!-- /ko -->
           <!-- /ko -->
         <!-- /ko -->
         <!-- /ko -->
         <!-- ko ifnot: queryError.encounteredString().length == 0 -->
         <!-- ko ifnot: queryError.encounteredString().length == 0 -->
-          <div class="round-icon warning" data-bind="click: function(){ $parent.showOptimizer(! $parent.showOptimizer()) }, attr: { 'title': $parent.showOptimizer() ? '${ _ko('Close Validator') }' : '${ _ko('Open Validator') }'}">
+          <div class="optimizer-icon warning" data-bind="click: function(){ $parent.showOptimizer(! $parent.showOptimizer()) }, attr: { 'title': $parent.showOptimizer() ? '${ _ko('Close Validator') }' : '${ _ko('Open Validator') }'}">
             <i class="fa fa-exclamation"></i>
             <i class="fa fa-exclamation"></i>
           </div>
           </div>
           <!-- ko if: $parent.showOptimizer -->
           <!-- ko if: $parent.showOptimizer -->
@@ -1034,23 +1034,23 @@ ${ sqlSyntaxDropdown.sqlSyntaxDropdown() }
     <!-- /ko -->
     <!-- /ko -->
     <!-- ko if: ! hasSuggestion() && topRisk() -->
     <!-- ko if: ! hasSuggestion() && topRisk() -->
       <!-- ko if: topRisk().risk === 'low' -->
       <!-- ko if: topRisk().risk === 'low' -->
-        <div class="round-icon success" data-bind="click: function () { huePubSub.publish('assist.highlight.risk.suggestions'); }, tooltip: { placement: 'bottom' }" title="${ _('Some low risks were detected, see the assistant for details.') }">
+        <div class="optimizer-icon success" data-bind="click: function () { huePubSub.publish('assist.highlight.risk.suggestions'); }, tooltip: { placement: 'bottom' }" title="${ _('Some low risks were detected, see the assistant for details.') }">
           <i class="fa fa-check"></i>
           <i class="fa fa-check"></i>
         </div>
         </div>
       <!-- /ko -->
       <!-- /ko -->
       <!-- ko if: topRisk().risk == 'medium' -->
       <!-- ko if: topRisk().risk == 'medium' -->
-        <div class="round-icon warning" data-bind="click: function () { huePubSub.publish('assist.highlight.risk.suggestions'); }, tooltip: { placement: 'bottom' }" title="${ _('Some medium risks were detected, see the assistant for details.') }">
+        <div class="optimizer-icon warning" data-bind="click: function () { huePubSub.publish('assist.highlight.risk.suggestions'); }, tooltip: { placement: 'bottom' }" title="${ _('Some medium risks were detected, see the assistant for details.') }">
           <i class="fa fa-exclamation"></i>
           <i class="fa fa-exclamation"></i>
         </div>
         </div>
       <!-- /ko -->
       <!-- /ko -->
       <!-- ko if: topRisk().risk == 'high' -->
       <!-- ko if: topRisk().risk == 'high' -->
-        <div class="round-icon error" data-bind="click: function () { huePubSub.publish('assist.highlight.risk.suggestions'); }, tooltip: { placement: 'bottom' }" title="${ _('Some high risks were detected, see the assistant for details.') }">
+        <div class="optimizer-icon error" data-bind="click: function () { huePubSub.publish('assist.highlight.risk.suggestions'); }, tooltip: { placement: 'bottom' }" title="${ _('Some high risks were detected, see the assistant for details.') }">
           <i class="fa fa-exclamation"></i>
           <i class="fa fa-exclamation"></i>
         </div>
         </div>
       <!-- /ko -->
       <!-- /ko -->
     <!-- /ko -->
     <!-- /ko -->
     <!-- ko if: hasSuggestion() == '' && ! topRisk() -->
     <!-- ko if: hasSuggestion() == '' && ! topRisk() -->
-      <div class="round-icon success" data-bind="click: function () { huePubSub.publish('assist.highlight.risk.suggestions'); }, tooltip: { placement: 'bottom' }" title="${ _('Query validated, no issues found.') }">
+      <div class="optimizer-icon success" data-bind="click: function () { huePubSub.publish('assist.highlight.risk.suggestions'); }, tooltip: { placement: 'bottom' }" title="${ _('Query validated, no issues found.') }">
         <i class="fa fa-check"></i>
         <i class="fa fa-check"></i>
       </div>
       </div>
     <!-- /ko -->
     <!-- /ko -->

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно