Selaa lähdekoodia

HUE-4116 [editor] Submit the correct workflow

Romain Rigaux 9 vuotta sitten
vanhempi
commit
ba178f740e

+ 2 - 2
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -1133,7 +1133,7 @@
     self.directoryUuid = ko.observable(typeof notebook.directoryUuid != "undefined" && notebook.directoryUuid != null ? notebook.directoryUuid : null);
     self.dependents = ko.mapping.fromJS(typeof notebook.dependents != "undefined" && notebook.dependents != null ? notebook.dependents : []);
     self.dependentsCoordinator = ko.computed(function() {
-      return $.grep(self.dependents(), function(doc) { return doc.type() == 'oozie-coordinator2' ;})
+      return $.grep(self.dependents(), function(doc) { return doc.type() == 'oozie-coordinator2' && doc.is_managed() == true ;})
     });
     self.history = ko.observableArray(vm.selectedNotebook() ? vm.selectedNotebook().history() : []);
     self.historyFilter = ko.observable('');
@@ -1611,7 +1611,7 @@
     };
 
     self.showSubmitPopup = function () {
-      $.get('/oozie/editor/coordinator/submit/' + 52687, {
+      $.get('/oozie/editor/coordinator/submit/' + self.dependentsCoordinator()[0].id(), {
       }, function (data) {
         $(document).trigger("showSubmitPopup", data);
       }).fail(function (xhr, textStatus, errorThrown) {

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

@@ -1048,7 +1048,7 @@ ${ hueIcons.symbols() }
       <!-- ko if: $root.selectedNotebook() -->
       <!-- ko with: $root.selectedNotebook() -->
         <!-- ko if: $root.selectedNotebook().isSaved() -->
-          <a data-bind="click: showSubmitPopup">Start</a></br>
+          <a data-bind="click: showSubmitPopup">Submit</a></br>
           <a href="#scheduledJobsTab" data-toggle="tab">${_('View')}</a>
 
           <div id="schedulerEditor">