Przeglądaj źródła

HUE-7946 [jb] Link to subworkflow on workflow dashboard page 404s in Hue 4 (Fix regression in Hue 3)

Roohi 7 lat temu
rodzic
commit
e815c36ef4

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

@@ -1453,6 +1453,7 @@ var ExtendedWidget = function (params) {
   self.actionURL = ko.observable("");
   self.logsURL = ko.observable("");
   self.externalId = ko.observable("");
+  self.externalJobId = ko.observable("");
   self.externalIdUrl = ko.observable("");
   return self;
 }

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

@@ -433,6 +433,7 @@ ${ dashboard.import_layout() }
       statusClass: "label " + getStatusClass(action.status),
       externalIdUrl: action.externalIdUrl,
       externalId: action.externalId,
+      externalJobId: action.externalJobId,
       startTime: action.startTime,
       endTime: action.endTime,
       errorMessage: action.errorMessage,

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

@@ -113,6 +113,7 @@ ${ dashboard.import_layout() }
                     _w.logsURL(action.log);
                     _w.externalIdUrl(action.externalIdUrl);
                     _w.externalId(action.id);
+                    _w.externalJobId(action.externalJobId);
                   }
                 });
               %endif

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

@@ -687,7 +687,12 @@
     <!-- /ko -->
   <!-- /ko -->
   <!-- ko if: $parent.widgetType() == 'subworkflow-widget' && $parent.externalIdUrl()-->
-    <a class="pull-right pointer logs-icon" data-bind="click: function(){ huePubSub.publish('oozie.action.click', $parent); }" title="${ _('View the workflow') }"><img src="${static('oozie/art/icon_oozie_workflow_48.png')}" class="app-icon" alt="${ _('Oozie workflow icon') }"/></a>
+   <!-- ko if: typeof $root.isEmbeddable !== 'undefined' -->
+     <a class="pull-right pointer logs-icon" data-bind="click: function(){ huePubSub.publish('browser.job.open.link', $parent.externalJobId); }" title="${ _('View the workflow') }"><img src="${static('oozie/art/icon_oozie_workflow_48.png')}" class="app-icon" alt="${ _('Oozie workflow icon') }"/></a>
+   <!-- /ko -->
+   <!-- ko if: typeof $root.isEmbeddable === 'undefined' -->
+     <a class="pull-right pointer logs-icon" data-bind="hueLink: $parent.externalIdUrl" title="${ _('View the workflow') }"><img src="${static('oozie/art/icon_oozie_workflow_48.png')}" class="app-icon" alt="${ _('Oozie workflow icon') }"/></a>
+   <!-- /ko -->
   <!-- /ko -->
 </script>
 

+ 1 - 0
apps/oozie/src/oozie/views/dashboard.py

@@ -999,6 +999,7 @@ def massaged_workflow_actions_for_json(workflow_actions, oozie_coordinator, oozi
       'status': action.status,
       'externalIdUrl': action.get_external_id_url(),
       'externalId': action.externalId,
+      'externalJobId': action.externalId,
       'startTime': format_time(action.startTime),
       'endTime': format_time(action.endTime),
       'retries': action.retries,