|
@@ -0,0 +1,184 @@
|
|
|
|
|
+## Licensed to Cloudera, Inc. under one
|
|
|
|
|
+## or more contributor license agreements. See the NOTICE file
|
|
|
|
|
+## distributed with this work for additional information
|
|
|
|
|
+## regarding copyright ownership. Cloudera, Inc. licenses this file
|
|
|
|
|
+## to you under the Apache License, Version 2.0 (the
|
|
|
|
|
+## "License"); you may not use this file except in compliance
|
|
|
|
|
+## with the License. You may obtain a copy of the License at
|
|
|
|
|
+##
|
|
|
|
|
+## http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
+##
|
|
|
|
|
+## Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
+## distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
+## 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 desktop.views import commonheader, commonfooter
|
|
|
|
|
+from django.utils.translation import ugettext as _
|
|
|
|
|
+%>
|
|
|
|
|
+
|
|
|
|
|
+<%namespace name="dashboard" file="/common_dashboard.mako" />
|
|
|
|
|
+<%namespace name="utils" file="../utils.inc.mako" />
|
|
|
|
|
+
|
|
|
|
|
+${ commonheader(_("Coordinator Editor"), "Oozie", user) | n,unicode }
|
|
|
|
|
+
|
|
|
|
|
+<script type="text/javascript">
|
|
|
|
|
+ if (window.location.hash != "") {
|
|
|
|
|
+ if (window.location.hash.indexOf("coordinator") > -1) {
|
|
|
|
|
+ location.href = "/oozie/editor/coordinator/edit/?" + window.location.hash.substr(1);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+<div class="search-bar">
|
|
|
|
|
+ <div class="pull-right" style="padding-right:50px">
|
|
|
|
|
+ <a title="${ _('Gen XML') }" rel="tooltip" data-placement="bottom" data-bind="click: gen_xml, css: {'btn': true}">
|
|
|
|
|
+ <i class="fa fa-file-code-o"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ <a title="${ _('Import coordinators') }" rel="tooltip" data-placement="bottom" data-bind="click: import_coordinators, css: {'btn': true}">
|
|
|
|
|
+ <i class="fa fa fa-download"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+
|
|
|
|
|
+ <a title="${ _('Submit') }" rel="tooltip" data-placement="bottom" data-bind="click: showSubmitPopup, css: {'btn': true}">
|
|
|
|
|
+ <i class="fa fa-play"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ <a title="${ _('Edit') }" rel="tooltip" data-placement="bottom" data-bind="click: toggleEditing, css: {'btn': true, 'btn-inverse': isEditing}">
|
|
|
|
|
+ <i class="fa fa-pencil"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+
|
|
|
|
|
+ % if user.is_superuser:
|
|
|
|
|
+ <button type="button" title="${ _('Settings') }" rel="tooltip" data-placement="bottom" data-toggle="modal" data-target="#settingsDemiModal" data-bind="css: {'btn': true}">
|
|
|
|
|
+ <i class="fa fa-cog"></i>
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <button type="button" title="${ _('Save') }" rel="tooltip" data-placement="bottom" data-loading-text="${ _("Saving...") }" data-bind="click: $root.save, css: {'btn': true}">
|
|
|
|
|
+ <i class="fa fa-save"></i>
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <a class="btn" href="${ url('oozie:new_coordinator') }" title="${ _('New') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}">
|
|
|
|
|
+ <i class="fa fa-file-o"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ <a class="btn" href="${ url('oozie:list_editor_coordinators') }" title="${ _('Coordinators') }" rel="tooltip" data-placement="bottom" data-bind="css: {'btn': true}">
|
|
|
|
|
+ <i class="fa fa-tags"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ % endif
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <form class="form-search" style="margin: 0">
|
|
|
|
|
+ <strong>${_("Name")}</strong>
|
|
|
|
|
+ <input data-bind="value: $root.coordinator.name"/>
|
|
|
|
|
+ </form>
|
|
|
|
|
+</div>
|
|
|
|
|
+
|
|
|
|
|
+<div>
|
|
|
|
|
+ <div class="span6">
|
|
|
|
|
+ ss
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="span6">
|
|
|
|
|
+ Datasets
|
|
|
|
|
+ </div>
|
|
|
|
|
+</div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+<div id="settingsDemiModal" class="demi-modal hide" data-backdrop="false">
|
|
|
|
|
+ <div class="modal-body">
|
|
|
|
|
+ <a href="javascript: void(0)" data-dismiss="modal" class="pull-right"><i class="fa fa-times"></i></a>
|
|
|
|
|
+ <div style="float: left; margin-right: 30px; text-align: center; line-height: 28px">
|
|
|
|
|
+
|
|
|
|
|
+ ${ _('Oozie Parameters') }
|
|
|
|
|
+ <ul data-bind="foreach: $root.coordinator.properties.parameters">
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <input data-bind="value: name"/>
|
|
|
|
|
+ <input data-bind="value: value"/>
|
|
|
|
|
+ <a href="#" data-bind="click: function(){ $root.coordinator.properties.parameters.remove(this); }">
|
|
|
|
|
+ <i class="fa fa-minus"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <button data-bind="click: function(){ $root.coordinator.properties.parameters.push({'name': '', 'value': ''}); }">
|
|
|
|
|
+ <i class="fa fa-plus"></i>
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <br/>
|
|
|
|
|
+ ${ _('Hadoop Properties') }
|
|
|
|
|
+ <ul data-bind="foreach: $root.coordinator.properties.properties">
|
|
|
|
|
+ <li>
|
|
|
|
|
+ <input data-bind="value: name"/>
|
|
|
|
|
+ <input data-bind="value: value"/>
|
|
|
|
|
+ <a href="#" data-bind="click: function(){ $root.coordinator.properties.properties.remove(this); }">
|
|
|
|
|
+ <i class="fa fa-minus"></i>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </li>
|
|
|
|
|
+ </ul>
|
|
|
|
|
+ <button data-bind="click: function(){ $root.coordinator.properties.properties.push({'name': '', 'value': ''}); }">
|
|
|
|
|
+ <i class="fa fa-plus"></i>
|
|
|
|
|
+ </button>
|
|
|
|
|
+
|
|
|
|
|
+ <br/>
|
|
|
|
|
+ ${ _("Job XML") }
|
|
|
|
|
+ <input data-bind="value: $root.coordinator.properties.job_xml"/>
|
|
|
|
|
+
|
|
|
|
|
+ <br/>
|
|
|
|
|
+ <div class="control-group">
|
|
|
|
|
+ <label class="control-label">${ _('SLA Configuration') }</label>
|
|
|
|
|
+ <div class="controls" data-bind="with: $root.coordinator.properties">
|
|
|
|
|
+ ${ utils.slaForm() }
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+<div id="submit-wf-modal" class="modal hide"></div>
|
|
|
|
|
+
|
|
|
|
|
+<div id="exposeOverlay"></div>
|
|
|
|
|
+
|
|
|
|
|
+<link rel="stylesheet" href="/static/ext/css/hue-filetypes.css">
|
|
|
|
|
+<link rel="stylesheet" href="/static/ext/css/hue-charts.css">
|
|
|
|
|
+<link rel="stylesheet" href="/static/ext/chosen/chosen.min.css">
|
|
|
|
|
+<link rel="stylesheet" href="/oozie/static/css/coordinator-editor.css">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+<script src="/static/ext/js/knockout-min.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
+<script src="/static/ext/js/knockout.mapping-2.3.2.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+<script src="/static/ext/js/bootstrap-editable.min.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
+<script src="/static/js/hue.utils.js"></script>
|
|
|
|
|
+<script src="/static/js/ko.editable.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
+<script src="/static/ext/chosen/chosen.jquery.min.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+<script src="/oozie/static/js/coordinator-editor.ko.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+<script type="text/javascript">
|
|
|
|
|
+ ${ utils.slaGlobal() }
|
|
|
|
|
+
|
|
|
|
|
+ var viewModel = new CoordinatorEditorViewModel(${ coordinator_json | n,unicode }, ${ credentials_json | n,unicode });
|
|
|
|
|
+ ko.applyBindings(viewModel);
|
|
|
|
|
+
|
|
|
|
|
+ function showAddActionDemiModal(widget) {
|
|
|
|
|
+ newAction = widget;
|
|
|
|
|
+ $("#addActionDemiModal").modal("show");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addActionDemiModalFieldPreview(field) {
|
|
|
|
|
+ if (newAction != null) {
|
|
|
|
|
+ viewModel.coordinator.addNode(newAction);
|
|
|
|
|
+ $("#addActionDemiModal").modal("hide");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function addActionDemiModalFieldCancel() {
|
|
|
|
|
+ viewModel.removeWidgetById(newAction.id());
|
|
|
|
|
+ }
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+${ commonfooter(messages) | n,unicode }
|