Bri Prebilic Cole
Committed by Gerrit Code Review

ONOS-1817 - GUI -- Bytes and packets are now displayed in the flow table.

Change-Id: I0d2cc8134a36dc7421270cdca27686c43cc3a8aa
...@@ -59,6 +59,8 @@ public class FlowViewMessageHandler extends UiMessageHandler { ...@@ -59,6 +59,8 @@ public class FlowViewMessageHandler extends UiMessageHandler {
59 private static final String TIMEOUT = "timeout"; 59 private static final String TIMEOUT = "timeout";
60 private static final String PERMANENT = "permanent"; 60 private static final String PERMANENT = "permanent";
61 private static final String STATE = "state"; 61 private static final String STATE = "state";
62 + private static final String PACKETS = "packets";
63 + private static final String BYTES = "bytes";
62 64
63 private static final String COMMA = ", "; 65 private static final String COMMA = ", ";
64 66
...@@ -98,7 +100,7 @@ public class FlowViewMessageHandler extends UiMessageHandler { ...@@ -98,7 +100,7 @@ public class FlowViewMessageHandler extends UiMessageHandler {
98 100
99 private static final String[] COL_IDS = { 101 private static final String[] COL_IDS = {
100 ID, APP_ID, GROUP_ID, TABLE_ID, PRIORITY, SELECTOR, 102 ID, APP_ID, GROUP_ID, TABLE_ID, PRIORITY, SELECTOR,
101 - TREATMENT, TIMEOUT, PERMANENT, STATE 103 + TREATMENT, TIMEOUT, PERMANENT, STATE, PACKETS, BYTES
102 }; 104 };
103 105
104 public FlowTableRow(FlowEntry f) { 106 public FlowTableRow(FlowEntry f) {
...@@ -112,6 +114,8 @@ public class FlowViewMessageHandler extends UiMessageHandler { ...@@ -112,6 +114,8 @@ public class FlowViewMessageHandler extends UiMessageHandler {
112 add(TIMEOUT, f.timeout()); 114 add(TIMEOUT, f.timeout());
113 add(PERMANENT, f.isPermanent()); 115 add(PERMANENT, f.isPermanent());
114 add(STATE, capitalizeFully(f.state().toString())); 116 add(STATE, capitalizeFully(f.state().toString()));
117 + add(PACKETS, f.packets());
118 + add(BYTES, f.packets());
115 } 119 }
116 120
117 private String getSelectorString(FlowEntry f) { 121 private String getSelectorString(FlowEntry f) {
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
26 <td colId="timeout" sortable>Timeout </td> 26 <td colId="timeout" sortable>Timeout </td>
27 <td colId="permanent" sortable>Permanent </td> 27 <td colId="permanent" sortable>Permanent </td>
28 <td colId="state" sortable>State </td> 28 <td colId="state" sortable>State </td>
29 + <td colId="packets" sortable>Packets </td>
30 + <td colId="bytes" sortable>Bytes </td>
29 </tr> 31 </tr>
30 </table> 32 </table>
31 </div> 33 </div>
...@@ -33,7 +35,7 @@ ...@@ -33,7 +35,7 @@
33 <div class="table-body"> 35 <div class="table-body">
34 <table> 36 <table>
35 <tr ng-hide="tableData.length" class="no-data ignore-width"> 37 <tr ng-hide="tableData.length" class="no-data ignore-width">
36 - <td colspan="8"> 38 + <td colspan="10">
37 No Flows found 39 No Flows found
38 </td> 40 </td>
39 </tr> 41 </tr>
...@@ -47,13 +49,15 @@ ...@@ -47,13 +49,15 @@
47 <td>{{flow.timeout}}</td> 49 <td>{{flow.timeout}}</td>
48 <td>{{flow.permanent}}</td> 50 <td>{{flow.permanent}}</td>
49 <td>{{flow.state}}</td> 51 <td>{{flow.state}}</td>
52 + <td>{{flow.packets}}</td>
53 + <td>{{flow.bytes}}</td>
50 </tr> 54 </tr>
51 <tr class="ignore-width"> 55 <tr class="ignore-width">
52 - <td class="selector" colspan="8">{{flow.selector}}</td> 56 + <td class="selector" colspan="10">{{flow.selector}}</td>
53 </tr> 57 </tr>
54 <tr class="ignore-width" 58 <tr class="ignore-width"
55 ng-repeat-end ng-repeat-done> 59 ng-repeat-end ng-repeat-done>
56 - <td class="treatment" colspan="8">{{flow.treatment}}</td> 60 + <td class="treatment" colspan="10">{{flow.treatment}}</td>
57 </tr> 61 </tr>
58 </table> 62 </table>
59 </div> 63 </div>
......