소스 검색

HUE-3071 [oozie] Add workflow link in dashboard graph for sub-workflow action

krish 9 년 전
부모
커밋
e3e883f

+ 1 - 0
apps/oozie/src/oozie/static/oozie/js/workflow-editor.ko.js

@@ -1323,5 +1323,6 @@ var ExtendedWidget = function (params) {
   self.progress = ko.observable(0);
   self.actionURL = ko.observable("");
   self.logsURL = ko.observable("");
+  self.externalIdUrl = ko.observable("");
   return self;
 }

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

@@ -684,6 +684,7 @@ ${ utils.slaGlobal() }
               }
               _w.actionURL(action.url);
               _w.logsURL(action.log);
+              _w.externalIdUrl(action.externalIdUrl);
             }
           });
           %endif

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

@@ -611,9 +611,12 @@
 
 
 <script type="text/html" id="logs-icon">
-  <!-- ko if: $parent.logsURL() != '' && $parent.logsURL() != null -->
+  <!-- ko if: $parent.widgetType() != 'subworkflow-widget' && $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 -->
+  <!-- ko if: $parent.widgetType() == 'subworkflow-widget' -->
+    <a class="pull-right pointer logs-icon" data-bind="attr: { href: $parent.externalIdUrl() }" title="${ _('View the workflow') }"><img src="${static('oozie/art/icon_oozie_workflow_48.png')}" class="app-icon"/></a>
+  <!-- /ko -->
 </script>