Fixing port stats topo view rendering.

Change-Id: I6209268fc6dbdbf8914739305c35c5352a57a842
diff --git a/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java b/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
index e38c45d..67ceef7 100644
--- a/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
+++ b/core/api/src/main/java/org/onosproject/net/DefaultEdgeLink.java
@@ -78,4 +78,19 @@
                                    location, isIngress);
     }
 
+    /**
+     * Creates a an edge link, to the specified end-station.
+     *
+     * @param host      host
+     * @param isIngress true to indicate host-to-network direction; false
+     *                  for network-to-host direction
+     * @return new phantom edge link
+     */
+    public static DefaultEdgeLink createEdgeLink(Host host, boolean isIngress) {
+        checkNotNull(host, "Host cannot be null");
+        return new DefaultEdgeLink(ProviderId.NONE,
+                                   new ConnectPoint(host.id(), PortNumber.P0),
+                                   host.location(), isIngress);
+    }
+
 }
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
index 3ab7161..75d2994 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TopologyViewMessageHandlerBase.java
@@ -601,7 +601,8 @@
 
     private void addEdgeLinks(Map<LinkKey, BiLink> biLinks) {
         hostService.getHosts().forEach(host -> {
-            addLink(biLinks, createEdgeLink(host.location(), false));
+            addLink(biLinks, createEdgeLink(host, true));
+            addLink(biLinks, createEdgeLink(host, false));
         });
     }
 
@@ -722,7 +723,7 @@
             for (Link link : links) {
                 BiLink biLink = addLink(biLinks, link);
                 if (showTraffic) {
-                    biLink.addLoad(flowStatsService.load(link));
+                    biLink.addLoad(getLinkLoad(link));
                 }
                 biLink.addClass(type);
             }