ソースを参照

[oozie] Hide logs icon if logs are empty

Enrico Berti 10 年 前
コミット
9d7011b07f

+ 6 - 1
apps/oozie/src/oozie/templates/dashboard/list_oozie_workflow.mako

@@ -217,7 +217,12 @@ ${ layout.menubar(section='workflows', dashboard=True) }
         <script id="actionTemplate" type="text/html">
           <tr>
             <td>
-              <a data-bind="visible:externalId !='', attr: { href: log}" data-row-selector-exclude="true"><i class="fa fa-tasks"></i></a>
+              <!-- ko if: externalId !='' && log != '' && log != null -->
+              <a data-bind="attr: { href: log}" data-row-selector-exclude="true"><i class="fa fa-tasks"></i></a>
+              <!-- /ko -->
+              <!-- ko if: externalId =='' || log == '' || log == null -->
+              <i class="fa fa-ban muted"></i>
+              <!-- /ko -->
             </td>
             <td>
               <a data-bind="text: id, attr: { href: url}" data-row-selector="true"></a>

+ 1 - 1
apps/oozie/src/oozie/templates/editor2/common_workflow.mako

@@ -535,7 +535,7 @@
 </script>
 
 <script type="text/html" id="logs-icon">
-  <!-- ko if: $parent.logsURL() != '' -->
+  <!-- ko if: $parent.logsURL() != '' && $parent.logsURL() != null -->
     <a class="pull-right pointer logs-icon" data-bind="click: function(){ location.href = $parent.logsURL(); }" title="${ _('View logs') }"><i class="fa fa-tasks"></i></a>
   <!-- /ko -->
 </script>