azkaban-uncached
Changes
src/web/js/azkaban.project.view.js 45(+12 -33)
Details
diff --git a/src/java/azkaban/webapp/servlet/velocity/flowexecutionpanel.vm b/src/java/azkaban/webapp/servlet/velocity/flowexecutionpanel.vm
index f338e2d..bc4df20 100644
--- a/src/java/azkaban/webapp/servlet/velocity/flowexecutionpanel.vm
+++ b/src/java/azkaban/webapp/servlet/velocity/flowexecutionpanel.vm
@@ -14,172 +14,206 @@
* the License.
*#
-<script type="text/javascript" src="${context}/js/azkaban.layout.js"></script>
-<script type="text/javascript" src="${context}/js/svgNavigate.js"></script>
-<script type="text/javascript" src="${context}/js/azkaban.context.menu.js"></script>
-<script type="text/javascript" src="${context}/js/azkaban.common.utils.js"></script>
-<script type="text/javascript" src="${context}/js/azkaban.svg.graph.view.js"></script>
-<script type="text/javascript" src="${context}/js/azkaban.flow.execute.view.js"></script>
-
-<div id="modalBackground" class="modalBackground2">
-<div id="execute-flow-panel" class="modal modalContainer2">
- <h3 id="execute-flow-panel-title"></h3>
- <a title="Close" class="modal-close closeExecPanel">x</a>
- <div id="execute-message" class="message">
- </div>
-
- <div class="panel">
- <div id="executionGraphOptions">
- <div id="graphOptions" class="sideMenu">
- <h3 id="flowOption" viewpanel="svgDivCustom">Flow View</h3>
- <div>
- <p>Right click on the jobs to disable and enable jobs in the flow.</p>
- </div>
- <h3 viewpanel="notificationPanel">Notification</h3>
- <div>
- <p>Change the addresses where success and failure emails will be sent.</p>
- </div>
- <h3 viewpanel="failureOptions">Failure Options</h3>
- <div>
- <p>Select flow behavior when a failure is detected.</p>
- </div>
- <h3 viewpanel="concurrentPanel">Concurrent</h3>
- <div>
- <p>Change the behavior of the flow if it is already running.</p>
- </div>
- <h3 viewpanel="flowParametersPanel">Flow Parameters</h3>
- <div>
- <p>Add temporary flow parameters that are used to override global properties for each job.</p>
- </div>
- </div>
- </div>
- <div id="executionGraphOptionsPanel" class="rightPanel">
- <div id="svgDivCustom" class="svgDiv sidePanel" >
- <svg class="svgGraph" xmlns="http://www.w3.org/2000/svg" version="1.1" shape-rendering="optimize-speed" text-rendering="optimize-speed" >
- </svg>
- </div>
- <div id="notificationPanel" class="sidePanel">
- <div>
- <h4>Notify on Failure</h4>
- <p>On a job failure, notify on either the first failure, and/or when the failed flow finishes.</p>
- <input id="notifyFailureFirst" class="checkbox" type="checkbox" name="notify" value="first" checked /> <label for="notify">First Failure</label>
- <input id="notifyFailureLast" class="checkbox" type="checkbox" name="notify" value="last"></input> <label for="notify">Flow Finished</label>
-
-
- <h4>Failure Emails</h4>
- <div>
- <input id="overrideFailureEmails" type="checkbox" name="overrideFailureEmails" value="overrideFailureEmails" />
- <label for="overrideFailureEmails">Override flow email settings</label>
- </div>
- <p>Notify these addresses on failure. Comma, space or semi-colon delimited list.</p>
- <textarea id="failureEmails"></textarea>
- </div>
-
- <div>
- <h4>Success Emails</h4>
- <div>
- <input id="overrideSuccessEmails" type="checkbox" name="overrideSuccessEmails" value="overrideSuccessEmails" />
- <label for="overrideSuccessEmails">Override flow email settings</label>
- </div>
- <p>Notify when the flow finishes successfully. Comma, space or semi-colon delimited list.</p>
- <textarea id="successEmails"></textarea>
- </div>
- </div>
- <div id="failureOptions" class="failureOptions sidePanel">
- <h4>Failure Options</h4>
- <p>When a failure first occurs in the flow, select the execution behavior.</p>
- <ul>
- <li><span class="bold">Finish Current Running</span> finishes only the currently running jobs. It will not start any new jobs.</p></li>
- <li><span class="bold">Cancel All</span> immediately kills all jobs and fails the flow.</p></li>
- <li><span class="bold">Finish All Possible</span> will keep executing jobs as long as its dependencies are met.</p></li>
- </ul>
-
- <select id="failureAction" name="failureAction">
- <option value="finishCurrent">Finish Current Running</option>
- <option value="cancelImmediately">Cancel All</option>
- <option value="finishPossible">Finish All Possible</option>
- </select>
- </div>
- <div id="concurrentPanel" class="sidePanel">
- <h4>Concurrent Execution Options</h4>
- <p>If the flow is currently running, these are the options that can be set.</p>
-
- <input id="skip" class="radio" type="radio" name="concurrent" value="skip" checked /><label for="skip">Skip Execution</label>
- <p>Do not run flow if it is already running.</p>
-
- <input id="ignore" class="radio" type="radio" name="concurrent" value="ignore" checked /><label for="ignore">Run Concurrently</label>
- <p>Run the flow anyways. Previous execution is unaffected.</p>
-
- <input id="pipeline" class="radio" type="radio" name="concurrent" value="pipeline" /><label for="pipeline">Pipeline</label>
- <select id="pipelineLevel" name="pipelineLevel">
- <option value="1">Level 1</option>
- <option value="2">Level 2</option>
- </select>
- <p>Pipeline the flow, so the current execution will not be overrun.</p>
- <ul>
- <li>Level 1: block job A until the previous flow job A has completed.</li>
- <li>Level 2: block job A until the previous flow job A's children have completed.</li>
- </ul>
- <!--
- <input id="queue" class="radio" type="radio" name="concurrent" value="queue" /><label for="queue">Queue Job</label>
- <select id="queueLevel" name="queueLevel">
- <option value="1">1</option>
- <option value="2">2</option>
- </select>
- <p>Queue up to 2. Wait until the previous execution has completed before running.</p>
- -->
- </div>
- <div id="flowParametersPanel" class="sidePanel">
- <h4>Flow Property Override</h4>
- <div id="editTable" class="tableDiv">
- <table>
- <thead>
- <tr>
- <th>Name</th>
- <th>Value</th>
- </tr>
- </thead>
- <tbody>
- <tr id="addRow" class="addRow"><td id="addRow-col" colspan="2"><span class="addIcon"></span><a>Add Row</a></td></tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
-
- <div class="actions">
- #if(!$show_schedule || $show_schedule == 'true')
- <a class="btn2" id="schedule-btn">Schedule</a>
- #end
-
+ <script type="text/javascript" src="${context}/js/azkaban.layout.js"></script>
+ <script type="text/javascript" src="${context}/js/svgNavigate.js"></script>
+ <script type="text/javascript" src="${context}/js/azkaban.context.menu.js"></script>
+ <script type="text/javascript" src="${context}/js/azkaban.common.utils.js"></script>
+ <script type="text/javascript" src="${context}/js/azkaban.svg.graph.view.js"></script>
+ <script type="text/javascript" src="${context}/js/azkaban.flow.execute.view.js"></script>
+
+ <div class="modal fade" id="execute-flow-panel">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h4 class="modal-title" id="execute-flow-panel-title"></h4>
+ </div><!-- /modal-header -->
+ <div class="modal-body">
+ <div class="row">
+ <div class="col-sm-4">
+ <ul class="nav nav-stacked" id="graph-options">
+ <li id="flow-option" viewpanel="svg-div-custom">
+ Flow View
+ <small>Right click on the jobs to disable and enable jobs in the flow.</small>
+ </li>
+ <li viewpanel="notification-panel">
+ Notification
+ <small>Change the address where success and failure emails will be sent.</small>
+ </li>
+ <li viewpanel="failure-options">
+ Failure Options
+ <small>Select flow behavior when a failure is detected.</small>
+ </li>
+ <li viewpanel="concurrent-panel">
+ Concurrent
+ <small>Change the behavior of the flow if it is already running.</small>
+ </li>
+ <li viewpanel="flow-parameters-panel">
+ Flow Parameters
+ <small>Add temporary flow parameters that are used to override global settings for each job.</p>
+ </li>
+ </ul>
+ </div><!-- /col-sm-4 -->
+ <div class="col-sm-8">
+ <div id="execution-graph-options-panel">
+
+ ## SVG graph panel.
+
+ <div id="svg-div-custom">
+ <svg class="svgGraph" xmlns="http://www.w3.org/2000/svg" version="1.1" shape-rendering="optimize-speed" text-rendering="optimize-speed">
+ </svg>
+ </div>
+
+ ## Notification panel.
+
+ <div id="notification-panel">
+ <h4>Notify on failure</h4>
+ <p>On a job failure, notify on either the first failure, and/or when the failed flow finishes.</p>
+ <label class="checkbox-inline">
+ <input id="notify-failure-first" type="checkbox" name="notify" value="first">First failure
+ </label>
+ <label class="checkbox-inline">
+ <input id="notify-failure-last" type="checkbox" name="notify" value="last">Flow finished
+ </label>
+
+ <h4>Failure Emails</h4>
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" id="override-failure-emails" name="overrideFailureEmails" value="overrideFailureEmails">
+ Override flow email settings.
+ </label>
+ </div>
+ <label>Notify these addresses on failure. Comma, space, or semi-colon delimited list.</label>
+ <textarea class="form-control" rows="3" id="failure-emails"></textarea>
+
+ <h4>Success Emails</h4>
+ <div class="checkbox">
+ <label>
+ <input type="checkbox" name="overrideSuccessEmails" value="overrideSuccessEmails">
+ Override flow email settings.
+ </label>
+ </div>
+ <label>Notify when the flow finishes successfully. Comma, space, or semi-colon delimited list.</label>
+ <textarea class="form-control" rows="3" id="success-emails"></textarea>
+ </div>
+
+ ## Failure options panel.
+
+ <div id="failure-options">
+ <h4>Failure Options</h4>
+ <p>When a failure first occurs in the flow, select the execution behavior.</p>
+ <ul>
+ <li><strong>Finish Current Running</strong> finishes only the currently running job. It will not start any new jobs.</li>
+ <li><strong>Cancel All</strong> immediately kills all jobs and fails the flow.</li>
+ <li><strong>Finish All Possible</strong> will keep executing jobs as long as its dependencies are met.</li>
+ </ul>
+ <select id="failure-action" name="failureAction">
+ <option value="finishCurrent">Finish Current Running</option>
+ <option value="cancelImmediately">Cancel All</option>
+ <option value="finishPossible">Finish All Possible</option>
+ </select>
+ </div>
+
+ ## Concurrent execution options panel.
+
+ <div id="concurrent-panel">
+ <h4>Concurrent Execution Options</h4>
+ <p>If the flow is currently running, these are the options that can be set.</p>
+ <div class="radio">
+ <label>
+ <input type="radio" id="skip" name="concurrent" value="skip" checked="checked">
+ Skip Execution
+ </label>
+ <span class="help-block">Do not run flow if it is already running.</span>
+ </div>
+
+ <div class="radio">
+ <label>
+ <input type="radio" id="ignore" name="concurrent" value="ignore">
+ Run Concurrently
+ </label>
+ <span class="help-block">Do not run flow if it is already running.</span>
+ </div>
+
+ <div class="radio">
+ <label>
+ <input type="radio" id="pipeline" name="concurrent" value="pipeline">
+ Pipeline
+ </label>
+ <select id="pipelineLevel" name="pipelineLevel">
+ <option value="1">Level 1</option>
+ <option value="2">Level 2</option>
+ </select>
+ <span class="help-block">
+ Pipeline the flow, so the current execution will not be overrun.
+ <ul>
+ <li>Level 1: block job A until the previous flow job A has completed.</li>
+ <li>Level 2: block job A until the previous flow job A's children have completed.</li>
+ </li>
+ </span>
+ </div>
+ </div>
+
+## Flow parameters panel
+
+ <div id="flow-parameters-panel">
+ <h4>Flow Property Override</h4>
+ <div id="editTable">
+ <table>
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Value</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr id="addRow" class="addRow">
+ <td id="addRow-col" colspan="2">
+ <span class="addIcon"></span>
+ <a>Add Row</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+
+ </div><!-- /execution-graph-options-panel -->
+ </div><!-- /col-sm-8 -->
+ </div><!-- /row -->
+ </div><!-- /modal-body -->
+
+ <div class="modal-footer">
+#if (!$show_schedule || $show_schedule == 'true')
+ <button type="button" class="btn btn-success" id="schedule-btn">Schedule</button>
+#end
#*
- #if( $triggerPlugins.size() > 0 )
- #foreach( $triggerPlugin in $triggerPlugins )
- <a class="btn2" id=set-$triggerPlugin.pluginName>$triggerPlugin.pluginName</a>
- #end
- #end
+#if ($triggerPlugins.size() > 0)
+ #foreach ($triggerPlugin in $triggerPlugins)
+ <button type="button" class="btn btn-default" id=set-$triggerPlugin.pluginName>$triggerPlugin.pluginName</button>
+ #end
+#end
*#
- <a class="yes btn1" id="execute-btn">Execute</a>
- <a class="no simplemodal-close btn3 closeExecPanel">Cancel</a>
- </div>
-</div>
-</div>
-
-#if(!$show_schedule || $show_schedule == 'true')
-#parse( "azkaban/webapp/servlet/velocity/schedulepanel.vm" )
+ <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
+ <button type="button" class="btn btn-primary" id="execute-btn">Execute</button>
+ </div><!-- /modal-footer -->
+ </div><!-- /modal-content -->
+ </div><!-- /modal-dialog -->
+ </div><!-- /modal -->
+
+#if (!$show_schedule || $show_schedule == 'true')
+ #parse ("azkaban/webapp/servlet/velocity/schedulepanel.vm")
#end
#*
-#if( $triggerPlugins.size() > 0 )
- #foreach( $triggerPlugin in $triggerPlugins )
- #set ($prefix = $triggerPlugin.pluginName )
- #set ($webpath = $triggerPlugin.pluginPath )
- #parse( $triggerPlugin.inputPanelVM )
+#if ($triggerPlugins.size() > 0)
+ #foreach ($triggerPlugin in $triggerPlugins)
+ #set ($prefix = $triggerPlugin.pluginName)
+ #set ($webpath = $triggerPlugin.pluginPath)
+ #parse ($triggerPlugin.inputPanelVM)
#end
#end
*#
-<div id="contextMenu">
-
-</div>
+ <div id="contextMenu"></div>
+
diff --git a/src/java/azkaban/webapp/servlet/velocity/projectpage.vm b/src/java/azkaban/webapp/servlet/velocity/projectpage.vm
index 7d11650..3b301a9 100644
--- a/src/java/azkaban/webapp/servlet/velocity/projectpage.vm
+++ b/src/java/azkaban/webapp/servlet/velocity/projectpage.vm
@@ -21,6 +21,7 @@
#parse ("azkaban/webapp/servlet/velocity/style2.vm")
#parse ("azkaban/webapp/servlet/velocity/javascript.vm")
+ <script type="text/javascript" src="${context}/js/jqueryui/jquery-ui-1.10.1.custom.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.ajax.utils.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.nav.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.project.view.js"></script>
@@ -126,7 +127,7 @@
</table>
</div>
- <div class="well">
+ <div class="well" id="project-options">
<button id="project-upload-btn" class="btn btn-primary">Upload</button>
<button id="project-delete-btn" class="btn btn-danger">Delete Project</button>
</div>
@@ -153,24 +154,13 @@
<h4 class="modal-title">Upload Project Files</h4>
</div>
<div class="modal-body">
- <div class="alert alert-danger" id="modal-error-msg">$error_msg</div>
- <form id="upload-form" enctype="multipart/form-data" method="post" action="$!context/manager">
+ <div class="alert alert-danger" id="upload-project-modal-error-msg">$error_msg</div>
+ <form id="upload-project-form" enctype="multipart/form-data" method="post" action="$!context/manager">
<fieldset class="form-horizontal">
<div class="form-group">
<label for="path" class="col-sm-2 control-label">Job Archive</label>
<div class="col-sm-10">
- <div class="fileinput fileinput-new" data-provides="datainput">
- <div class="form-control uneditable-input span3" data-trigger="fileinput">
- <i class="glyphicon glyphicon-file fileinput-exists"></i>
- <span class="fileinput-filename"></span>
- </div>
- <span class="input-group-addon btn btn-default btn-file">
- <span class="fileinput-new">Select file</span>
- <span class="fileinput-exists">Change</span>
- <input type="file" name="...">
- </span>
- <a href="#" class="input-group-addon btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
- </div>
+ <input type="file" class="form-control" id="file" name="file">
</div>
</div>
</fieldset>
@@ -180,7 +170,7 @@
<input type="hidden" name="project" value="$project.name">
<input type="hidden" name="action" value="upload">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" id="upload-btn">Upload</button>
+ <button type="button" class="btn btn-primary" id="upload-project-btn">Upload</button>
</div>
</div>
</div>
@@ -221,14 +211,14 @@
<input type="hidden" name="project" value="$project.name">
<input type="hidden" name="delete" value="true">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
- <button type="button" class="btn btn-primary" id="delete-btn">Yes</button>
+ <button type="button" class="btn btn-danger" id="delete-btn">Yes</button>
</div>
</div>
</div>
</div>
- #parse ("azkaban/webapp/servlet/velocity/flowexecutionpanel2.vm")
- #parse ("azkaban/webapp/servlet/velocity/messagedialog2.vm")
+ #parse ("azkaban/webapp/servlet/velocity/flowexecutionpanel.vm")
+ #parse ("azkaban/webapp/servlet/velocity/messagedialog.vm")
#end
#parse ("azkaban/webapp/servlet/velocity/footer.vm")
diff --git a/src/web/js/azkaban.flow.execute.view.js b/src/web/js/azkaban.flow.execute.view.js
index fd3920f..6145eee 100644
--- a/src/web/js/azkaban.flow.execute.view.js
+++ b/src/web/js/azkaban.flow.execute.view.js
@@ -607,7 +607,7 @@ $(function() {
model: executableGraphModel
});
svgGraphView = new azkaban.SvgGraphView({
- el: $('#svgDivCustom'),
+ el: $('#svg-div-custom'),
model: executableGraphModel,
topGId:"topG",
graphMargin: 10,
src/web/js/azkaban.project.view.js 45(+12 -33)
diff --git a/src/web/js/azkaban.project.view.js b/src/web/js/azkaban.project.view.js
index 19ec6eb..6cf529d 100644
--- a/src/web/js/azkaban.project.view.js
+++ b/src/web/js/azkaban.project.view.js
@@ -28,35 +28,12 @@ azkaban.ProjectView = Backbone.View.extend({
handleUploadProjectJob: function(evt) {
console.log("click upload project");
- $('#upload-project').modal({
- closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
- position: ["20%",],
- containerId: 'confirm-container',
- containerCss: {
- 'height': '220px',
- 'width': '565px'
- },
- onShow: function (dialog) {
- var modal = this;
- $("#errorMsg").hide();
- }
- });
+ $('#upload-project-modal').modal();
},
handleDeleteProject: function(evt) {
- $('#delete-project').modal({
- closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
- position: ["20%",],
- containerId: 'confirm-container',
- containerCss: {
- 'height': '240px',
- 'width': '640px'
- },
- onShow: function (dialog) {
- var modal = this;
- $("#errorMsg").hide();
- }
- });
+ console.log("click delete project");
+ $('#delete-project-modal').modal();
},
render: function() {
@@ -64,17 +41,19 @@ azkaban.ProjectView = Backbone.View.extend({
});
var uploadProjectView;
-azkaban.UploadProjectView= Backbone.View.extend({
+azkaban.UploadProjectView = Backbone.View.extend({
events: {
- "click #upload-btn": "handleCreateProject"
+ "click #upload-project-btn": "handleCreateProject"
},
initialize: function(settings) {
- $("#errorMsg").hide();
+ console.log("Hide upload project modal error msg");
+ $("#upload-project-modal-error-msg").hide();
},
handleCreateProject: function(evt) {
- $("#upload-form").submit();
+ console.log("Upload project button.");
+ $("#upload-project-form").submit();
},
render: function() {
@@ -380,10 +359,10 @@ azkaban.ProjectSummaryView = Backbone.View.extend({
});
$(function() {
- projectView = new azkaban.ProjectView({el:$('#all-jobs-content')});
- uploadView = new azkaban.UploadProjectView({el:$('#upload-project')});
+ projectView = new azkaban.ProjectView({el:$('#project-options')});
+ uploadView = new azkaban.UploadProjectView({el:$('#upload-project-modal')});
flowTableView = new azkaban.FlowTableView({el:$('#flow-tabs')});
projectSummary = new azkaban.ProjectSummaryView({el:$('#project-summary')});
- deleteProjectView = new azkaban.DeleteProjectView({el: $('#delete-project')});
+ deleteProjectView = new azkaban.DeleteProjectView({el: $('#delete-project-modal')});
// Setting up the project tabs
});