azkaban-uncached
Changes
src/web/js/azkaban.common.utils.js 38(+38 -0)
src/web/js/azkaban.flow.graph.view.js 14(+9 -5)
src/web/js/azkaban.flow.job.view.js 16(+16 -0)
src/web/js/azkaban.flow.view.js 204(+92 -112)
src/web/js/azkaban.history.view.js 18(+17 -1)
src/web/js/azkaban.job.status.utils.js 26(+0 -26)
src/web/js/azkaban.staging.flow.view.js 26(+0 -26)
src/web/js/azkaban.svg.graph.view.js 41(+9 -32)
src/web/js/azkaban.triggers.view.js 18(+17 -1)
src/web/js/svgNavigate.js 16(+16 -0)
Details
diff --git a/src/java/azkaban/webapp/servlet/ProjectManagerServlet.java b/src/java/azkaban/webapp/servlet/ProjectManagerServlet.java
index 868c85d..8d87d68 100644
--- a/src/java/azkaban/webapp/servlet/ProjectManagerServlet.java
+++ b/src/java/azkaban/webapp/servlet/ProjectManagerServlet.java
@@ -107,7 +107,7 @@ public class ProjectManagerServlet extends LoginAbstractAzkabanServlet {
@Override
protected void handleGet(HttpServletRequest req, HttpServletResponse resp, Session session) throws ServletException, IOException {
- if ( hasParam(req, "project") ) {
+ if (hasParam(req, "project") ) {
if (hasParam(req, "ajax")) {
handleAJAXAction(req, resp, session);
}
@@ -825,7 +825,6 @@ public class ProjectManagerServlet extends LoginAbstractAzkabanServlet {
pageStartValue++;
page.add("page5", new PageSelection(String.valueOf(pageStartValue), pageSize, pageStartValue > maxPage, pageStartValue == pageNum, Math.min(pageStartValue, maxPage)));
-
page.render();
}
diff --git a/src/java/azkaban/webapp/servlet/velocity/executingflowpage.vm b/src/java/azkaban/webapp/servlet/velocity/executingflowpage.vm
index 5155d56..5c4f1d4 100644
--- a/src/java/azkaban/webapp/servlet/velocity/executingflowpage.vm
+++ b/src/java/azkaban/webapp/servlet/velocity/executingflowpage.vm
@@ -25,6 +25,7 @@
<script type="text/javascript" src="${context}/js/backbone-0.9.10-min.js"></script>
<script type="text/javascript" src="${context}/js/jquery.simplemodal-1.4.4.js"></script>
+ <script type="text/javascript" src="${context}/js/azkaban.common.utils.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.date.utils.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.context.menu.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.ajax.utils.js"></script>
@@ -71,6 +72,8 @@
<h4><a href="${context}/manager?project=${projectName}">Project <span>$projectName</span></a></h4>
<h4 class="separator">></h4>
<h4><a href="${context}/manager?project=${projectName}&flow=${flowid}">Flow <span>$flowid</span></a></h4>
+ <h4 class="separator">></h4>
+ <h4><a href="${context}/executor?execid=${execid}">Execution <span>$execid</span></a></h4>
</div>
</div>
diff --git a/src/java/azkaban/webapp/servlet/velocity/flowexecutionpanel.vm b/src/java/azkaban/webapp/servlet/velocity/flowexecutionpanel.vm
index f903ac5..f338e2d 100644
--- a/src/java/azkaban/webapp/servlet/velocity/flowexecutionpanel.vm
+++ b/src/java/azkaban/webapp/servlet/velocity/flowexecutionpanel.vm
@@ -17,6 +17,7 @@
<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>
diff --git a/src/java/azkaban/webapp/servlet/velocity/flowpage.vm b/src/java/azkaban/webapp/servlet/velocity/flowpage.vm
index e38100f..cde432c 100644
--- a/src/java/azkaban/webapp/servlet/velocity/flowpage.vm
+++ b/src/java/azkaban/webapp/servlet/velocity/flowpage.vm
@@ -28,6 +28,7 @@
<script type="text/javascript" src="${context}/js/azkaban.date.utils.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.ajax.utils.js"></script>
+ <script type="text/javascript" src="${context}/js/azkaban.common.utils.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.nav.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.layout.js"></script>
<script type="text/javascript" src="${context}/js/azkaban.flow.job.view.js"></script>
@@ -67,6 +68,8 @@
<h2><a href="${context}/manager?project=${project.name}&flow=${flowid}">Flow <span>$flowid</span></a></h2>
<div class="section-sub-hd">
<h4><a href="${context}/manager?project=${project.name}">Project <span>$project.name</span></a></h4>
+ <h4 class="separator">></h4>
+ <h4><a href="${context}/manager?project=${project.name}&flow=${flowid}">Flow <span>$flowid</span></a></h4>
</div>
<div id="executebtn" class="btn1">Schedule / Execute Flow</div>
diff --git a/src/java/azkaban/webapp/servlet/velocity/jobhistorypage.vm b/src/java/azkaban/webapp/servlet/velocity/jobhistorypage.vm
index e391b8f..05d4240 100644
--- a/src/java/azkaban/webapp/servlet/velocity/jobhistorypage.vm
+++ b/src/java/azkaban/webapp/servlet/velocity/jobhistorypage.vm
@@ -74,11 +74,12 @@
#end
<div id="all-jobs-content">
<div class="section-hd">
- <h2><a href="${context}/manager?project=${projectName}&job=${jobid}&history">Job <span>$jobid</span> History</a></h2>
+ <h2><a href="${context}/manager?project=${projectName}&job=${jobid}&history">Job History <span>$jobid</span></a></h2>
<div class="section-sub-hd">
<h4><a href="${context}/manager?project=${projectName}">Project <span>$projectName</span></a></h4>
+ <h4 class="separator">></h4>
+ <h4><a href="${context}/manager?project=${projectName}&job=${jobid}&history">Job History <span>$jobid</span></a></h4>
</div>
-
</div>
</div>
diff --git a/src/java/azkaban/webapp/servlet/velocity/joblogpage.vm b/src/java/azkaban/webapp/servlet/velocity/joblogpage.vm
index 0ccfbcd..200f5de 100644
--- a/src/java/azkaban/webapp/servlet/velocity/joblogpage.vm
+++ b/src/java/azkaban/webapp/servlet/velocity/joblogpage.vm
@@ -59,10 +59,10 @@
<div class="section-sub-hd">
<h4><a href="${context}/manager?project=${projectName}">Project <span>$projectName</span></a></h4>
<h4 class="separator">></h4>
- <h4><a href="${context}/executor?execid=${execid}#jobslist">Execution <span>$execid</span></a></h4>
- <h4 class="separator">></h4>
<h4><a href="${context}/manager?project=${projectName}&flow=${flowid}">Flow <span>$flowid</span></a></h4>
<h4 class="separator">></h4>
+ <h4><a href="${context}/executor?execid=${execid}#jobslist">Execution <span>$execid</span></a></h4>
+ <h4 class="separator">></h4>
<h4><a href="${context}/manager?project=${projectName}&flow=${flowid}&job=$jobid">Job <span>$jobid</span></a></h4>
</div>
</div>
diff --git a/src/java/azkaban/webapp/servlet/velocity/jobpage.vm b/src/java/azkaban/webapp/servlet/velocity/jobpage.vm
index 2586adf..8c19a53 100644
--- a/src/java/azkaban/webapp/servlet/velocity/jobpage.vm
+++ b/src/java/azkaban/webapp/servlet/velocity/jobpage.vm
@@ -60,6 +60,8 @@
<h4><a href="${context}/manager?project=${project.name}">Project <span>$project.name</span></a></h4>
<h4 class="separator">></h4>
<h4><a href="${context}/manager?project=${project.name}&flow=${flowid}">Flow <span>$flowid</span></a></h4>
+ <h4 class="separator">></h4>
+ <h4><a href="${context}/manager?project=${project.name}&flow=${flowid}&job=${jobid}">Job <span>$jobid</span></a></h4>
</div>
<a id="jobs-logs-btn" class="btn2" href="${context}/manager?project=${project.name}&job=$jobid&history">Job History</a>
src/web/js/azkaban.common.utils.js 38(+38 -0)
diff --git a/src/web/js/azkaban.common.utils.js b/src/web/js/azkaban.common.utils.js
new file mode 100644
index 0000000..411de17
--- /dev/null
+++ b/src/web/js/azkaban.common.utils.js
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2012 LinkedIn Corp.
+ *
+ * Licensed 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.
+ */
+
+function addClass(el, name) {
+ if (!hasClass(el, name)) {
+ var classes = el.getAttribute("class");
+ classes += classes ? ' ' + name : '' +name;
+ el.setAttribute("class", classes);
+ }
+}
+
+function removeClass(el, name) {
+ if (hasClass(el, name)) {
+ var classes = el.getAttribute("class");
+ el.setAttribute("class", classes.replace(new RegExp('(\\s|^)'+name+'(\\s|$)'),' ').replace(/^\s+|\s+$/g, ''));
+ }
+}
+
+function hasClass(el, name) {
+ var classes = el.getAttribute("class");
+ if (classes == null) {
+ return false;
+ }
+ return new RegExp('(\\s|^)'+name+'(\\s|$)').test(classes);
+}
src/web/js/azkaban.flow.graph.view.js 14(+9 -5)
diff --git a/src/web/js/azkaban.flow.graph.view.js b/src/web/js/azkaban.flow.graph.view.js
index 22aa24c..338b08c 100644
--- a/src/web/js/azkaban.flow.graph.view.js
+++ b/src/web/js/azkaban.flow.graph.view.js
@@ -120,9 +120,9 @@ azkaban.SvgGraphView = Backbone.View.extend({
this.nodes[id].disabled = true;
addClass(g, "disabled");
}
- else {
- this.nodes[id].disabled = false;
- removeClass(g, "disabled");
+ else {
+ this.nodes[id].disabled = false;
+ removeClass(g, "disabled");
}
}
},
@@ -226,7 +226,6 @@ azkaban.SvgGraphView = Backbone.View.extend({
var xOffset = 10;
var yOffset = 10;
-
var nodeG = document.createElementNS(svgns, "g");
nodeG.setAttributeNS(null, "class", "jobnode");
@@ -250,7 +249,12 @@ azkaban.SvgGraphView = Backbone.View.extend({
text.setAttributeNS(null, "y", 15);
text.setAttributeNS(null, "height", 10);
- this.addBounds(bounds, {minX:node.x - xOffset, minY: node.y - yOffset, maxX: node.x + xOffset, maxY: node.y + yOffset});
+ this.addBounds(bounds, {
+ minX: node.x - xOffset,
+ minY: node.y - yOffset,
+ maxX: node.x + xOffset,
+ maxY: node.y + yOffset
+ });
var backRect = document.createElementNS(svgns, 'rect');
backRect.setAttributeNS(null, "x", 0);
src/web/js/azkaban.flow.job.view.js 16(+16 -0)
diff --git a/src/web/js/azkaban.flow.job.view.js b/src/web/js/azkaban.flow.job.view.js
index fa14b58..d4dff6b 100644
--- a/src/web/js/azkaban.flow.job.view.js
+++ b/src/web/js/azkaban.flow.job.view.js
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2012 LinkedIn Corp.
+ *
+ * Licensed 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.
+ */
+
azkaban.JobListView = Backbone.View.extend({
events: {
"keyup input": "filterJobs",
src/web/js/azkaban.flow.view.js 204(+92 -112)
diff --git a/src/web/js/azkaban.flow.view.js b/src/web/js/azkaban.flow.view.js
index 11c6ee1..ce01dbc 100644
--- a/src/web/js/azkaban.flow.view.js
+++ b/src/web/js/azkaban.flow.view.js
@@ -40,73 +40,46 @@ var handleJobMenuClick = function(action, el, pos) {
}
}
-function hasClass(el, name)
-{
- var classes = el.getAttribute("class");
- if (classes == null) {
- return false;
- }
- return new RegExp('(\\s|^)'+name+'(\\s|$)').test(classes);
-}
-
-function addClass(el, name)
-{
- if (!hasClass(el, name)) {
- var classes = el.getAttribute("class");
- classes += classes ? ' ' + name : '' +name;
- el.setAttribute("class", classes);
- }
-}
-
-function removeClass(el, name)
-{
- if (hasClass(el, name)) {
- var classes = el.getAttribute("class");
- el.setAttribute("class", classes.replace(new RegExp('(\\s|^)'+name+'(\\s|$)'),' ').replace(/^\s+|\s+$/g, ''));
- }
-}
-
var flowTabView;
azkaban.FlowTabView= Backbone.View.extend({
- events : {
- "click #graphViewLink" : "handleGraphLinkClick",
- "click #executionsViewLink" : "handleExecutionLinkClick"
- },
- initialize : function(settings) {
- var selectedView = settings.selectedView;
- if (selectedView == "executions") {
- this.handleExecutionLinkClick();
- }
- else {
- this.handleGraphLinkClick();
- }
+ events : {
+ "click #graphViewLink" : "handleGraphLinkClick",
+ "click #executionsViewLink" : "handleExecutionLinkClick"
+ },
+ initialize : function(settings) {
+ var selectedView = settings.selectedView;
+ if (selectedView == "executions") {
+ this.handleExecutionLinkClick();
+ }
+ else {
+ this.handleGraphLinkClick();
+ }
- },
- render: function() {
- console.log("render graph");
- },
- handleGraphLinkClick: function(){
- $("#executionsViewLink").removeClass("selected");
- $("#graphViewLink").addClass("selected");
-
- $("#executionsView").hide();
- $("#graphView").show();
- },
- handleExecutionLinkClick: function() {
- $("#graphViewLink").removeClass("selected");
- $("#executionsViewLink").addClass("selected");
-
- $("#graphView").hide();
- $("#executionsView").show();
- executionModel.trigger("change:view");
- }
+ },
+ render: function() {
+ console.log("render graph");
+ },
+ handleGraphLinkClick: function(){
+ $("#executionsViewLink").removeClass("selected");
+ $("#graphViewLink").addClass("selected");
+
+ $("#executionsView").hide();
+ $("#graphView").show();
+ },
+ handleExecutionLinkClick: function() {
+ $("#graphViewLink").removeClass("selected");
+ $("#executionsViewLink").addClass("selected");
+
+ $("#graphView").hide();
+ $("#executionsView").show();
+ executionModel.trigger("change:view");
+ }
});
var jobListView;
-
var svgGraphView;
-
var executionsView;
+
azkaban.ExecutionsView = Backbone.View.extend({
events: {
"click #pageSelection li": "handleChangePageSelection"
@@ -287,7 +260,6 @@ azkaban.ExecutionsView = Backbone.View.extend({
},
"json"
);
-
}
});
@@ -347,65 +319,74 @@ $(function() {
// Execution model has to be created before the window switches the tabs.
executionModel = new azkaban.ExecutionModel();
executionsView = new azkaban.ExecutionsView({el:$('#executionsView'), model: executionModel});
-
flowTabView = new azkaban.FlowTabView({el:$( '#headertabs'), selectedView: selected });
graphModel = new azkaban.GraphModel();
- mainSvgGraphView = new azkaban.SvgGraphView({el:$('#svgDiv'), model: graphModel, rightClick: { "node": exNodeClickCallback, "edge": exEdgeClickCallback, "graph": exGraphClickCallback }});
- jobsListView = new azkaban.JobListView({el:$('#jobList'), model: graphModel, contextMenuCallback: exJobClickCallback});
+ mainSvgGraphView = new azkaban.SvgGraphView({
+ el: $('#svgDiv'),
+ model: graphModel,
+ rightClick: {
+ "node": exNodeClickCallback,
+ "edge": exEdgeClickCallback,
+ "graph": exGraphClickCallback
+ }
+ });
+ jobsListView = new azkaban.JobListView({
+ el: $('#jobList'),
+ model: graphModel,
+ contextMenuCallback: exJobClickCallback
+ });
var requestURL = contextURL + "/manager";
// Set up the Flow options view. Create a new one every time :p
- $('#executebtn').click( function() {
- var data = graphModel.get("data");
- var nodes = data.nodes;
-
- var executingData = {
- project: projectName,
- ajax: "executeFlow",
- flow: flowId
+ $('#executebtn').click( function() {
+ var data = graphModel.get("data");
+ var nodes = data.nodes;
+ var executingData = {
+ project: projectName,
+ ajax: "executeFlow",
+ flow: flowId
};
-
- flowExecuteDialogView.show(executingData);
- });
+
+ flowExecuteDialogView.show(executingData);
+ });
$.get(
- requestURL,
- {"project": projectName, "ajax":"fetchflowgraph", "flow":flowId},
- function(data) {
- // Create the nodes
- var nodes = {};
- for (var i=0; i < data.nodes.length; ++i) {
- var node = data.nodes[i];
- nodes[node.id] = node;
- }
- for (var i=0; i < data.edges.length; ++i) {
- var edge = data.edges[i];
- var fromNode = nodes[edge.from];
- var toNode = nodes[edge.target];
-
- if (!fromNode.outNodes) {
- fromNode.outNodes = {};
- }
- fromNode.outNodes[toNode.id] = toNode;
-
- if (!toNode.inNodes) {
- toNode.inNodes = {};
- }
- toNode.inNodes[fromNode.id] = fromNode;
- }
-
- console.log("data fetched");
- graphModel.set({data: data});
- graphModel.set({nodes: nodes});
- graphModel.set({disabled: {}});
- graphModel.trigger("change:graph");
-
- // Handle the hash changes here so the graph finishes rendering first.
- if (window.location.hash) {
- var hash = window.location.hash;
+ requestURL,
+ {"project": projectName, "ajax":"fetchflowgraph", "flow":flowId},
+ function(data) {
+ // Create the nodes
+ var nodes = {};
+ for (var i=0; i < data.nodes.length; ++i) {
+ var node = data.nodes[i];
+ nodes[node.id] = node;
+ }
+ for (var i=0; i < data.edges.length; ++i) {
+ var edge = data.edges[i];
+ var fromNode = nodes[edge.from];
+ var toNode = nodes[edge.target];
+ if (!fromNode.outNodes) {
+ fromNode.outNodes = {};
+ }
+ fromNode.outNodes[toNode.id] = toNode;
+
+ if (!toNode.inNodes) {
+ toNode.inNodes = {};
+ }
+ toNode.inNodes[fromNode.id] = fromNode;
+ }
+
+ console.log("data fetched");
+ graphModel.set({data: data});
+ graphModel.set({nodes: nodes});
+ graphModel.set({disabled: {}});
+ graphModel.trigger("change:graph");
+
+ // Handle the hash changes here so the graph finishes rendering first.
+ if (window.location.hash) {
+ var hash = window.location.hash;
if (hash == "#executions") {
flowTabView.handleExecutionLinkClick();
}
@@ -425,8 +406,7 @@ $(function() {
}
}
}
- },
- "json"
- );
-
+ },
+ "json"
+ );
});
src/web/js/azkaban.history.view.js 18(+17 -1)
diff --git a/src/web/js/azkaban.history.view.js b/src/web/js/azkaban.history.view.js
index 01bb55d..d1b99c0 100644
--- a/src/web/js/azkaban.history.view.js
+++ b/src/web/js/azkaban.history.view.js
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2012 LinkedIn Corp.
+ *
+ * Licensed 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.
+ */
+
$.namespace('azkaban');
var advFilterView;
@@ -88,4 +104,4 @@ $(function() {
});
});
-});
\ No newline at end of file
+});
src/web/js/azkaban.job.status.utils.js 26(+0 -26)
diff --git a/src/web/js/azkaban.job.status.utils.js b/src/web/js/azkaban.job.status.utils.js
index a4f90e4..ee03ae6 100644
--- a/src/web/js/azkaban.job.status.utils.js
+++ b/src/web/js/azkaban.job.status.utils.js
@@ -29,29 +29,3 @@ var statusStringMap = {
"UNKNOWN": "Unknown",
"PAUSED": "Paused"
};
-
-function hasClass(el, name)
-{
- var classes = el.getAttribute("class");
- if (classes == null) {
- return false;
- }
- return new RegExp('(\\s|^)'+name+'(\\s|$)').test(classes);
-}
-
-function addClass(el, name)
-{
- if (!hasClass(el, name)) {
- var classes = el.getAttribute("class");
- classes += classes ? ' ' + name : '' +name;
- el.setAttribute("class", classes);
- }
-}
-
-function removeClass(el, name)
-{
- if (hasClass(el, name)) {
- var classes = el.getAttribute("class");
- el.setAttribute("class", classes.replace(new RegExp('(\\s|^)'+name+'(\\s|$)'),' ').replace(/^\s+|\s+$/g, ''));
- }
-}
diff --git a/src/web/js/azkaban.jobhistory.view.js b/src/web/js/azkaban.jobhistory.view.js
index 99e3d89..29f0d12 100644
--- a/src/web/js/azkaban.jobhistory.view.js
+++ b/src/web/js/azkaban.jobhistory.view.js
@@ -30,7 +30,7 @@ azkaban.JobHistoryView = Backbone.View.extend({
width = $(this.el).width() - margin.left - margin.right,
height = 300 - margin.top - margin.bottom;
- var x = d3.time.scale()
+ var x = d3.time.scale()
.range([0, width]);
var y = d3.scale.linear()
src/web/js/azkaban.staging.flow.view.js 26(+0 -26)
diff --git a/src/web/js/azkaban.staging.flow.view.js b/src/web/js/azkaban.staging.flow.view.js
index 9104759..1b00553 100644
--- a/src/web/js/azkaban.staging.flow.view.js
+++ b/src/web/js/azkaban.staging.flow.view.js
@@ -168,32 +168,6 @@ function recurseAllDescendents(nodes, disabledMap, id, disable) {
}
}
-function hasClass(el, name)
-{
- var classes = el.getAttribute("class");
- if (classes == null) {
- return false;
- }
- return new RegExp('(\\s|^)'+name+'(\\s|$)').test(classes);
-}
-
-function addClass(el, name)
-{
- if (!hasClass(el, name)) {
- var classes = el.getAttribute("class");
- classes += classes ? ' ' + name : '' +name;
- el.setAttribute("class", classes);
- }
-}
-
-function removeClass(el, name)
-{
- if (hasClass(el, name)) {
- var classes = el.getAttribute("class");
- el.setAttribute("class", classes.replace(new RegExp('(\\s|^)'+name+'(\\s|$)'),' ').replace(/^\s+|\s+$/g, ''));
- }
-}
-
var flowTabView;
azkaban.FlowTabView= Backbone.View.extend({
events : {
src/web/js/azkaban.svg.graph.view.js 41(+9 -32)
diff --git a/src/web/js/azkaban.svg.graph.view.js b/src/web/js/azkaban.svg.graph.view.js
index 1aa7092..380dff0 100644
--- a/src/web/js/azkaban.svg.graph.view.js
+++ b/src/web/js/azkaban.svg.graph.view.js
@@ -14,33 +14,6 @@
* the License.
*/
-function hasClass(el, name)
-{
- var classes = el.getAttribute("class");
- if (classes == null) {
- return false;
- }
- return new RegExp('(\\s|^)'+name+'(\\s|$)').test(classes);
-}
-
-function addClass(el, name)
-{
- if (!hasClass(el, name)) {
- var classes = el.getAttribute("class");
- classes += classes ? ' ' + name : '' +name;
- el.setAttribute("class", classes);
- }
-}
-
-function removeClass(el, name)
-{
- if (hasClass(el, name)) {
- var classes = el.getAttribute("class");
- el.setAttribute("class", classes.replace(new RegExp('(\\s|^)'+name+'(\\s|$)'),' ').replace(/^\s+|\s+$/g, ''));
- }
-}
-
-
azkaban.SvgGraphView = Backbone.View.extend({
events: {
"click g" : "clickGraph",
@@ -167,9 +140,9 @@ azkaban.SvgGraphView = Backbone.View.extend({
this.nodes[id].disabled = true;
addClass(g, "disabled");
}
- else {
- this.nodes[id].disabled = false;
- removeClass(g, "disabled");
+ else {
+ this.nodes[id].disabled = false;
+ removeClass(g, "disabled");
}
}
},
@@ -304,7 +277,6 @@ azkaban.SvgGraphView = Backbone.View.extend({
circle.setAttributeNS(null, "r", 12);
circle.setAttributeNS(null, "style", "width:inherit;stroke-opacity:1");
-
var text = document.createElementNS(svgns, 'text');
var textLabel = document.createTextNode(node.label);
text.appendChild(textLabel);
@@ -312,7 +284,12 @@ azkaban.SvgGraphView = Backbone.View.extend({
text.setAttributeNS(null, "y", 15);
text.setAttributeNS(null, "height", 10);
- this.addBounds(bounds, {minX:node.x - xOffset, minY: node.y - yOffset, maxX: node.x + xOffset, maxY: node.y + yOffset});
+ this.addBounds(bounds, {
+ minX: node.x - xOffset,
+ minY: node.y - yOffset,
+ maxX: node.x + xOffset,
+ maxY: node.y + yOffset
+ });
var backRect = document.createElementNS(svgns, 'rect');
backRect.setAttributeNS(null, "x", 0);
src/web/js/azkaban.triggers.view.js 18(+17 -1)
diff --git a/src/web/js/azkaban.triggers.view.js b/src/web/js/azkaban.triggers.view.js
index 1bff2fd..3b9dfc7 100644
--- a/src/web/js/azkaban.triggers.view.js
+++ b/src/web/js/azkaban.triggers.view.js
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2012 LinkedIn Corp.
+ *
+ * Licensed 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.
+ */
+
$.namespace('azkaban');
function expireTrigger(triggerId) {
@@ -358,4 +374,4 @@ $(function() {
-});
\ No newline at end of file
+});
src/web/js/svgNavigate.js 16(+16 -0)
diff --git a/src/web/js/svgNavigate.js b/src/web/js/svgNavigate.js
index 68121f9..b42f8c1 100644
--- a/src/web/js/svgNavigate.js
+++ b/src/web/js/svgNavigate.js
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2012 LinkedIn Corp.
+ *
+ * Licensed 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.
+ */
+
(function($) {
var mouseUp = function(evt) {