Browse Source

HUE-9187 [editor] Add action to reset the executable from the error log in editor v2

Johan Ahlen 5 years ago
parent
commit
514d9b9bb1

+ 4 - 1
desktop/core/src/desktop/js/apps/notebook2/components/ko.executableLogs.js

@@ -29,7 +29,10 @@ export const NAME = 'executable-logs';
 
 // prettier-ignore
 const TEMPLATE = `
-<div class="snippet-error-container alert alert-error" data-bind="visible: errors().length" style="display: none;">
+<div class="snippet-error-container alert alert-error snippet-error-log" data-bind="visible: errors().length" style="display: none;">
+  <div class="clear-container" data-bind="with: activeExecutable">
+    <button type="button" class="close" data-bind="click: reset" aria-label="${I18n('Clear')}"><span aria-hidden="true">&times;</span></button>
+  </div>
   <ul class="unstyled" data-bind="foreach: errors">
     <li data-bind="text: $data"></li>
   </ul>

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


+ 26 - 0
desktop/libs/notebook/src/notebook/static/notebook/less/notebook2.less

@@ -1297,6 +1297,32 @@
     display: block;
   }
 
+  .snippet-error-log {
+    position: relative;
+
+    .clear-container {
+      position: absolute;
+      top: 6px;
+      right: 6px;
+
+      .close {
+        opacity: 0.5;
+
+        &:hover {
+          opacity: 1;
+        }
+      }
+
+      .close::before {
+        border-color: #a60115 !important;
+      }
+
+      .close::after {
+        border-color: #a60115 !important;
+      }
+    }
+  }
+
   .jobs-overlay {
     background-color: @cui-white;
     opacity: 0.8;

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