Pārlūkot izejas kodu

[oozie] Delete any node in a fork

Romain Rigaux 11 gadi atpakaļ
vecāks
revīzija
a739e9e

+ 8 - 5
apps/oozie/src/oozie/templates/editor/workflow_editor.mako

@@ -273,7 +273,10 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user) | n,unicode }
     </div>
 
     <div>
-      I AM A FORK
+      To:
+      <span data-bind="foreach: children">
+        <span data-bind="text: $data['to']" /></span>
+      </span>
     </div>
   </div>
   <!-- /ko -->
@@ -289,7 +292,7 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user) | n,unicode }
     </div>
 
     <div>
-      FIN.
+      Then --> <span data-bind="text: children()[0]['to']" /></span>
     </div>
   </div>
   <!-- /ko -->
@@ -305,9 +308,9 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user) | n,unicode }
     </div>
 
     <div>
-       <!-- ko if: children().length == 1 -->
-       Start --> <input type="text" data-bind="value: children()[0]['to']" />
-       <!-- /ko -->
+      <!-- ko if: children().length == 1 -->
+      Start --> <input type="text" data-bind="value: children()[0]['to']" />
+      <!-- /ko -->
     </div>
   </div>
   <!-- /ko -->

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

@@ -122,7 +122,8 @@ var Node = function (node) {
   self.remove_link = function(name, child) {
     var _link = null;
     $.each(self.children(), function(index, link) {
-      if (name in link && link[name] == child) {
+      var _l = ko.mapping.toJS(link);
+      if (name in _l && _l[name] == child) {
         _link = link;
         return false;
       }