Clean up location and formatting of table filtering on flow table view.

Change-Id: I4eda382b53b4f2dd4285f2540de593744f63add5
diff --git a/web/gui/src/main/webapp/app/fw/widget/table.css b/web/gui/src/main/webapp/app/fw/widget/table.css
index 2386d8b..7ee5d94 100644
--- a/web/gui/src/main/webapp/app/fw/widget/table.css
+++ b/web/gui/src/main/webapp/app/fw/widget/table.css
@@ -77,9 +77,14 @@
     cursor: pointer;
 }
 
-/* Tabular view upper right control buttons */
+/* Tabular view controls */
 
-div.ctrl-btns {
+div.tabular-header .search {
+    margin: 0 0 10px 10px;
+}
+
+
+div.tabular-header div.ctrl-btns {
     display: inline-block;
     float: right;
     height: 44px;
@@ -87,12 +92,12 @@
     margin-right: 20px;
 }
 
-div.ctrl-btns div {
+div.tabular-header div.ctrl-btns div {
     display: inline-block;
     cursor: pointer;
 }
 
-div.ctrl-btns div.separator  {
+div.tabular-header div.ctrl-btns div.separator  {
     width: 0;
     height: 40px;
     padding: 0;
diff --git a/web/gui/src/main/webapp/app/view/flow/flow.html b/web/gui/src/main/webapp/app/view/flow/flow.html
index 912183b..89036e2 100644
--- a/web/gui/src/main/webapp/app/view/flow/flow.html
+++ b/web/gui/src/main/webapp/app/view/flow/flow.html
@@ -6,22 +6,6 @@
             ({{tableData.length}} total)
         </h2>
 
-        <div class="search">
-            <input type="text" ng-model="query" placeholder="Search"/>
-            <select ng-model="queryBy">
-                <option value="" disabled>Search By</option>
-                <option value="$">All</option>
-                <option value="id">Flow ID</option>
-                <option value="appId">App ID</option>
-                <option value="groupId">Group ID</option>
-                <option value="tableId">Table ID</option>
-                <option value="priority">Priority</option>
-                <option value="timeout">Timeout</option>
-                <option value="permanent">Permanent</option>
-                <option value="state">State</option>
-            </select>
-        </div>
-
         <div class="ctrl-btns">
             <div class="refresh" ng-class="{active: autoRefresh}"
                  icon icon-size="42" icon-id="refresh"
@@ -70,6 +54,21 @@
                  ng-click="nav('meter')"></div>
 
         </div>
+
+        <div class="search">
+            <input type="text" ng-model="queryTxt" placeholder="Search Text"/>
+            <select ng-model="queryBy">
+                <option value="" disabled>Search By</option>
+                <option value="$">All Fields</option>
+                <option value="id">Flow ID</option>
+                <option value="appId">App ID</option>
+                <option value="groupId">Group ID</option>
+                <option value="tableId">Table ID</option>
+                <option value="priority">Priority</option>
+                <option value="timeout">Timeout</option>
+            </select>
+        </div>
+
     </div>
 
     <div class="summary-list" onos-table-resize>
diff --git a/web/gui/src/main/webapp/app/view/flow/flow.js b/web/gui/src/main/webapp/app/view/flow/flow.js
index b77b0e8..872a2d1 100644
--- a/web/gui/src/main/webapp/app/view/flow/flow.js
+++ b/web/gui/src/main/webapp/app/view/flow/flow.js
@@ -67,13 +67,12 @@
 
             Object.defineProperty($scope, "queryFilter", {
                get: function() {
-               var out = {};
-               out[$scope.queryBy || "$"] = $scope.query;
-               return out;
+                   var out = {};
+                   out[$scope.queryBy || "$"] = $scope.queryTxt;
+                   return out;
                }
             });
 
-
             $log.log('OvFlowCtrl has been created');
         }]);
 }());