|
|
@@ -14,7 +14,61 @@
|
|
|
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
## See the License for the specific language governing permissions and
|
|
|
## limitations under the License.
|
|
|
+<%!
|
|
|
+ from django.utils.translation import ugettext as _
|
|
|
+%>
|
|
|
+
|
|
|
|
|
|
<%namespace name="workflow" file="../editor2/common_workflow.mako" />
|
|
|
+<%namespace name="utils" file="../utils.inc.mako" />
|
|
|
+<%namespace name="dashboard" file="/common_dashboard.mako" />
|
|
|
+
|
|
|
+<link rel="stylesheet" href="${ static('oozie/css/common-editor.css') }">
|
|
|
+<link rel="stylesheet" href="${ static('oozie/css/workflow-editor.css') }">
|
|
|
+<link rel="stylesheet" href="${ static('desktop/ext/css/bootstrap-editable.css') }">
|
|
|
+
|
|
|
+${ dashboard.import_layout() }
|
|
|
+
|
|
|
+<script src="${ static('desktop/ext/js/bootstrap-editable.min.js') }"></script>
|
|
|
+<script src="${ static('desktop/js/ko.editable.js') }"></script>
|
|
|
+<script src="${ static('oozie/js/workflow-editor.ko.js') }" type="text/javascript" charset="utf-8"></script>
|
|
|
+<script src="${ static('oozie/js/workflow-editor.utils.js') }" type="text/javascript" charset="utf-8"></script>
|
|
|
+<script src="${ static('desktop/ext/js/jquery/plugins/jquery.curvedarrow.js') }" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
|
${ workflow.render() }
|
|
|
+
|
|
|
+<div id="loaded${doc_uuid}graph">
|
|
|
+ ${ workflow_graph | n,unicode }
|
|
|
+</div>
|
|
|
+
|
|
|
+<script type="text/javascript">
|
|
|
+
|
|
|
+ ${ utils.slaGlobal() }
|
|
|
+
|
|
|
+ % if layout_json != '':
|
|
|
+ var viewModel = new WorkflowEditorViewModel(${ layout_json | n,unicode }, ${ workflow_json | n,unicode }, ${ credentials_json | n,unicode }, ${ workflow_properties_json | n,unicode }, ${ subworkflows_json | n,unicode }, ${ can_edit_json | n,unicode });
|
|
|
+ ko.applyBindings(viewModel, $("#${graph_element_id}")[0]);
|
|
|
+ viewModel.isViewer = ko.observable(true);
|
|
|
+ viewModel.init();
|
|
|
+ fullLayout(viewModel);
|
|
|
+
|
|
|
+ var globalFilechooserOptions = {
|
|
|
+ skipInitialPathIfEmpty: true,
|
|
|
+ showExtraHome: true,
|
|
|
+ uploadFile: true,
|
|
|
+ createFolder: true,
|
|
|
+ extraHomeProperties: {
|
|
|
+ label: '${ _('Workspace') }',
|
|
|
+ icon: 'fa-folder-open',
|
|
|
+ path: viewModel.workflow.properties.deployment_dir()
|
|
|
+ },
|
|
|
+ deploymentDir: viewModel.workflow.properties.deployment_dir()
|
|
|
+ }
|
|
|
+ %endif
|
|
|
+
|
|
|
+ $(document).ready(function() {
|
|
|
+ % if layout_json != '':
|
|
|
+ drawArrows();
|
|
|
+ %endif
|
|
|
+ });
|
|
|
+</script>
|