From f81dfbc335aed40b71a6a7c29892d0d12779046e Mon Sep 17 00:00:00 2001 From: Alissa Bonas Date: Wed, 2 Oct 2013 16:40:18 +0300 Subject: [PATCH] Fix typo "swtch" to "switch" Change-Id: Ia3633309a861fb019225398aa4907cbf4b77936e Signed-off-by: Alissa Bonas --- opendaylight/web/root/src/main/resources/js/jit.js | 10 +++++----- .../web/root/src/main/resources/js/open-topology.js | 6 +++--- .../opendaylight/controller/topology/web/Topology.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/opendaylight/web/root/src/main/resources/js/jit.js b/opendaylight/web/root/src/main/resources/js/jit.js index 7cfc200947..dce2d2f155 100644 --- a/opendaylight/web/root/src/main/resources/js/jit.js +++ b/opendaylight/web/root/src/main/resources/js/jit.js @@ -4109,7 +4109,7 @@ $jit.MultiGraph = new Class({ // add this adjacency into the current edges object adjsObj[obj2.id].push(adj); - if (adj.nodeFrom.data["$type"] != "swtch") { + if (adj.nodeFrom.data["$type"] != "switch") { // if this is not a switch (e.g. host), then add it to the switch because it will never be added by itself adjsObj2[obj.id].push(adj); } @@ -6126,7 +6126,7 @@ var MultiNodeHelper = { && Math.abs(pos.y - npos.y) <= height / 2; } }, - 'swtch': { + 'switch': { 'render': function(pos, canvas, animating) { var ctx = canvas.getCtx(); var img = new Image(); @@ -9782,14 +9782,14 @@ $jit.MultiTopology.$extend = true; return this.nodeHelper.host.contains(npos, pos); } }, - 'swtch': { + 'switch': { 'render': function(node, canvas, animating) { var pos = node.pos.getc(true); - this.nodeHelper.swtch.render(pos, canvas, animating); + this.nodeHelper.switch.render(pos, canvas, animating); }, 'contains': function(node, pos) { var npos = node.pos.getc(true); - return this.nodeHelper.swtch.contains(npos, pos); + return this.nodeHelper.switch.contains(npos, pos); } } }); diff --git a/opendaylight/web/root/src/main/resources/js/open-topology.js b/opendaylight/web/root/src/main/resources/js/open-topology.js index d5041bda49..ec5d87bede 100644 --- a/opendaylight/web/root/src/main/resources/js/open-topology.js +++ b/opendaylight/web/root/src/main/resources/js/open-topology.js @@ -45,7 +45,7 @@ one.topology.option = { }, label : function(style, node) { var marginTop, minWidth; - if (node.data["$type"] == "swtch") { + if (node.data["$type"] == "switch") { marginTop = "42px"; minWidth = "65px"; } else if (node.data["$type"] == "host") { @@ -118,8 +118,8 @@ one.topology.init = function(json) { if (node.id != undefined) { one.topology.graph.canvas.getElement().style.cursor = 'move'; } else if (eventInfo.edge != undefined - && eventInfo.edge.nodeTo.data["$type"] == "swtch" - && eventInfo.edge.nodeFrom.data["$type"] == "swtch") { + && eventInfo.edge.nodeTo.data["$type"] == "switch" + && eventInfo.edge.nodeFrom.data["$type"] == "switch") { one.topology.graph.canvas.getElement().style.cursor = 'pointer'; } }, diff --git a/opendaylight/web/topology/src/main/java/org/opendaylight/controller/topology/web/Topology.java b/opendaylight/web/topology/src/main/java/org/opendaylight/controller/topology/web/Topology.java index 29d2d2b405..3ba21f1163 100644 --- a/opendaylight/web/topology/src/main/java/org/opendaylight/controller/topology/web/Topology.java +++ b/opendaylight/web/topology/src/main/java/org/opendaylight/controller/topology/web/Topology.java @@ -614,7 +614,7 @@ public class Topology implements IObjectReader, IConfigurationAware { } protected class NodeType { - public static final String NODE = "swtch"; + public static final String NODE = "switch"; public static final String HOST = "host"; } -- 2.36.6