Merge "Fix NPE and enhance flows table"
authorGiovanni Meo <gmeo@cisco.com>
Wed, 8 May 2013 10:26:23 +0000 (10:26 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 8 May 2013 10:26:23 +0000 (10:26 +0000)
opendaylight/web/devices/src/main/java/org/opendaylight/controller/devices/web/Devices.java
opendaylight/web/flows/src/main/resources/js/page.js

index 1102a6382e649aa9389528ce5b6d438e5fc2ba8b..ec59ab740b76e14ca69b6e39643b4a20761fc1ae 100644 (file)
@@ -207,6 +207,9 @@ public class Devices implements IDaylightWeb {
         IForwardingStaticRouting staticRouting = (IForwardingStaticRouting) ServiceHelper
                 .getInstance(IForwardingStaticRouting.class, containerName,
                         this);
+        if (staticRouting == null) {
+            return null;
+        }
         List<Map<String, String>> staticRoutes = new ArrayList<Map<String, String>>();
         ConcurrentMap<String, StaticRouteConfig> routeConfigs = staticRouting
                 .getStaticRouteConfigs();
index 2d6b6bb4c5a205e7e50c1e3ca3ba4e64473f876a..f92e596b0aab2ecd23f36a7c25ac873c08c219f8 100644 (file)
@@ -162,7 +162,7 @@ one.f.detail = {
                        var body = [];
                        var tr = {};
                        var entry = [];
-
+                        entry.push(data['flow']['ingressPort']);
                        entry.push(data['flow']['etherType']);
                        entry.push(data['flow']['vlanId']);
                        entry.push(data['flow']['vlanPriority']);
@@ -212,7 +212,7 @@ one.f.detail = {
             return $table;
         },
                description : function(body) {
-                       var header = ['Ethernet Type', 'VLAN ID', 'VLAN Priority', 'Source MAC', 'Dest MAC', 'Source IP', 'Dest IP', 'TOS', 'Source Port', 'Dest Port', 'Protocol', 'Cookie'];
+                       var header = ['Input Port', 'Ethernet Type', 'VLAN ID', 'VLAN Priority', 'Source MAC', 'Dest MAC', 'Source IP', 'Dest IP', 'TOS', 'Source Port', 'Dest Port', 'Protocol', 'Cookie'];
                        var $thead = one.lib.dashlet.table.header(header);
                        var attributes = ['table-striped', 'table-bordered', 'table-condensed'];
                        var $table = one.lib.dashlet.table.table(attributes);