Browse Source

HUE-3797 [oozie] Move the workflow creation logic out of the view

Romain Rigaux 9 years ago
parent
commit
23afa3e
2 changed files with 5 additions and 10 deletions
  1. 3 3
      apps/oozie/src/oozie/models2.py
  2. 2 7
      apps/oozie/src/oozie/views/editor2.py

+ 3 - 3
apps/oozie/src/oozie/models2.py

@@ -2795,7 +2795,7 @@ class History(object):
 
 class WorkflowBuilder():
   """
-  Focus on building nodes, not the UI layout.
+  Focus on building nodes, not the UI layout (should be graph automatically).
   """
   def create_hive_document_workflow(self, name, parameters, user):
     api = get_oozie(user)
@@ -3127,8 +3127,8 @@ class WorkflowBuilder():
       u'size': 12,
       }]}
     )
-  
-    workflow_doc = Document2.objects.create(name=name, type='oozie-workflow2', owner=user, data=data)
+
+    workflow_doc = Document2.objects.create(name=name, type='oozie-workflow2', owner=user, data=data, managed=True)
     Document.objects.link(workflow_doc, owner=workflow_doc.owner, name=workflow_doc.name, description=workflow_doc.description, extra='workflow2')
 
     return workflow_doc

File diff suppressed because it is too large
+ 2 - 7
apps/oozie/src/oozie/views/editor2.py


Some files were not shown because too many files changed in this diff