Fix typo "swtch" to "switch" 02/1602/3
authorAlissa Bonas <abonas@redhat.com>
Wed, 2 Oct 2013 13:40:18 +0000 (16:40 +0300)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 9 Oct 2013 13:21:11 +0000 (13:21 +0000)
Change-Id: Ia3633309a861fb019225398aa4907cbf4b77936e
Signed-off-by: Alissa Bonas <abonas@redhat.com>
opendaylight/web/root/src/main/resources/js/jit.js
opendaylight/web/root/src/main/resources/js/open-topology.js
opendaylight/web/topology/src/main/java/org/opendaylight/controller/topology/web/Topology.java

index 7cfc2009477af05e7c5d3deb5575207f6e8fa302..dce2d2f1556c7ff0b770cdc75584a24933005195 100644 (file)
@@ -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);
                }
        }
   });
index d5041bda498c0c86cd742d10097a052e17af4a0a..ec5d87bede66fb00b68a5f7cfac60d8e0ddcdb59 100644 (file)
@@ -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';
                         }
                     },
index 29d2d2b4051a6b89ced33b5e17d81f4f59f47f62..3ba21f11632e1e6c643e5d6564ea7a006fb3ffbb 100644 (file)
@@ -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";
     }