Fixing GUI to work with the new flow objective intents.

Fixing onos-check-flows script; it was broken badly.

Change-Id: I0962dcf879a1030449ac7cd5c0b19c211d5f36df
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitor.java b/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitor.java
index 3d733f9..1de86de 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitor.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/TrafficMonitor.java
@@ -29,6 +29,7 @@
 import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.flow.instructions.Instruction;
 import org.onosproject.net.flow.instructions.Instructions.OutputInstruction;
+import org.onosproject.net.intent.FlowObjectiveIntent;
 import org.onosproject.net.intent.FlowRuleIntent;
 import org.onosproject.net.intent.Intent;
 import org.onosproject.net.intent.LinkCollectionIntent;
@@ -572,6 +573,8 @@
                         links = ((PathIntent) installable).path().links();
                     } else if (installable instanceof FlowRuleIntent) {
                         links = linkResources(installable);
+                    } else if (installable instanceof FlowObjectiveIntent) {
+                        links = linkResources(installable);
                     } else if (installable instanceof LinkCollectionIntent) {
                         links = ((LinkCollectionIntent) installable).links();
                     } else if (installable instanceof OpticalPathIntent) {
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/topo/TopoIntentFilter.java b/web/gui/src/main/java/org/onosproject/ui/impl/topo/TopoIntentFilter.java
index 8372ded..12b9ce9 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/topo/TopoIntentFilter.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/topo/TopoIntentFilter.java
@@ -24,6 +24,7 @@
 import org.onosproject.net.device.DeviceService;
 import org.onosproject.net.flow.FlowRule;
 import org.onosproject.net.host.HostService;
+import org.onosproject.net.intent.FlowObjectiveIntent;
 import org.onosproject.net.intent.FlowRuleIntent;
 import org.onosproject.net.intent.HostToHostIntent;
 import org.onosproject.net.intent.Intent;
@@ -180,6 +181,10 @@
                     if (rulesContainDevice(flowRuleIntent.flowRules(), device.id())) {
                         return true;
                     }
+                } else if (installable instanceof FlowObjectiveIntent) {
+                    FlowObjectiveIntent objectiveIntent = (FlowObjectiveIntent) installable;
+                    return objectiveIntent.devices().contains(device.id());
+
                 } else if (installable instanceof LinkCollectionIntent) {
                     LinkCollectionIntent linksIntent = (LinkCollectionIntent) installable;
                     if (pathContainsDevice(linksIntent.links(), device.id())) {