New workflow do not have any document persisted yey, and don't have any history
@@ -334,7 +334,7 @@
<span data-bind="visible: properties.enableMail">
<div class="airy">
<span class="widget-label" data-bind="text: $root.workflow_properties.to.label"></span>
- <input type="text" class="seventy" data-bind="value: properties.to, attr: { placeholder: $root.workflow_properties.to.help_text }" validate="nonempty"/>
+ <input type="text" class="seventy" data-bind="value: properties.to, attr: { placeholder: $root.workflow_properties.to.help_text }"/>
</div>
@@ -53,7 +53,7 @@ ${ commonheader(_("Workflow Editor"), "Oozie", user, "40px") | n,unicode }
<i class="fa fa-fw fa-cog"></i>
</a>
- <a title="${ _('History') }" rel="tooltip" data-placement="bottom" data-toggle="modal" data-target="#historyModal" data-bind="css: {'btn': true}">
+ <a title="${ _('History') }" rel="tooltip" data-placement="bottom" data-toggle="modal" data-target="#historyModal" data-bind="css: {'btn': true}, visible: workflow.id() != null">
<i class="fa fa-fw fa-history"></i>
@@ -108,7 +108,7 @@ def _edit_workflow(request, doc, workflow):
'history': hist.data_dict.get('history', '{}'),
'id': hist.id,
'date': hist.last_modified.strftime('%Y-%m-%dT%H:%M')
- } for hist in doc.get_history()], cls=JSONEncoderForHTML)
+ } for hist in doc.get_history()] if doc else [], cls=JSONEncoderForHTML)
})