From d355b8dd3a3d9bbf7a854dfc2088d67165fe3b5b Mon Sep 17 00:00:00 2001 From: Loi Pan Date: Tue, 1 Jul 2014 20:24:05 +0100 Subject: [PATCH] Re-commit flow, port statistics per code review Change-Id: I26cd057e33ec37791cf58321b1e6921017e98bc8 Signed-off-by: Loi Pan --- src/app/node/flow-stat.tpl.html | 51 +++++++++++++++++++++++ src/app/node/index.tpl.html | 7 ++++ src/app/node/nodes.js | 41 ++++++++++++++++++- src/app/node/port-stat.tpl.html | 68 +++++++++++++++++++++++++++++++ src/assets/data/locale-en_US.json | 25 +++++++++++- 5 files changed, 189 insertions(+), 3 deletions(-) create mode 100644 src/app/node/flow-stat.tpl.html create mode 100644 src/app/node/port-stat.tpl.html diff --git a/src/app/node/flow-stat.tpl.html b/src/app/node/flow-stat.tpl.html new file mode 100644 index 00000000..ee3e64a0 --- /dev/null +++ b/src/app/node/flow-stat.tpl.html @@ -0,0 +1,51 @@ + + +

{{ 'FLOW_TABLE_STATISTICS_FOR_NODE_ID' | translate }} - {{data.id}}

+ + + + + + + + + + + + + + + + + + + + + +
{{ 'TABLE_ID' | translate }}{{ 'ACTIVE_FLOW' | translate }}{{ 'PKTS_MATCHED' | translate }}{{ 'PKTS_LOOKED_UP' | translate }}
{{ 'NO_DATA_FOUND' | translate }}
{{ncp['flow-node-inventory:id']}}{{ncp['opendaylight-flow-table-statistics:flow-table-statistics']['opendaylight-flow-table-statistics:active-flows']}}{{ncp['opendaylight-flow-table-statistics:flow-table-statistics']['opendaylight-flow-table-statistics:packets-matched']}}{{ncp['opendaylight-flow-table-statistics:flow-table-statistics']['opendaylight-flow-table-statistics:packets-looked-up']}}
+ + \ No newline at end of file diff --git a/src/app/node/index.tpl.html b/src/app/node/index.tpl.html index d96a3994..82468d5c 100644 --- a/src/app/node/index.tpl.html +++ b/src/app/node/index.tpl.html @@ -15,6 +15,7 @@ {{ 'NODE_ID' | translate }} {{ 'NODE_NAME' | translate }} {{ 'NODE_CONNECTORS' | translate }} + {{ 'STATISTICS' | translate }} @@ -23,6 +24,12 @@ {{item.id}} {{item['flow-node-inventory:description']}} {{item['node-connector'].length}} + + + {{ 'FLOWS' | translate }} + {{ 'NODE_CONNECTORS' | translate }} + + + +

{{ 'NODE_CONNECTOR_STATISTICS_FOR_NODE_ID' | translate }} - {{data.id}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{ 'NODE_CONNECTOR_ID' | translate }}{{ 'RX_PKTS' | translate }}{{ 'TX_PKTS' | translate }}{{ 'RX_BYTES' | translate }}{{ 'TX_BYTES' | translate }}{{ 'RX_DROPS' | translate }}{{ 'TX_DROPS' | translate }}{{ 'RX_ERRS' | translate }}{{ 'TX_ERRS' | translate }}{{ 'RX_FRAME_ERRS' | translate }}{{ 'RX_OVERRUN_ERRS' | translate }}{{ 'RX_CRC_ERRS' | translate }}{{ 'Collisions' | translate }}
{{ 'NO_DATA_FOUND' | translate }}
{{ncp.id}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:packets']['opendaylight-port-statistics:received']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:packets']['opendaylight-port-statistics:transmitted']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:bytes']['opendaylight-port-statistics:received']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:bytes']['opendaylight-port-statistics:transmitted']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:receive-drops']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:transmit-drops']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:receive-errors']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:transmit-errors']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:receive-frame-error']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:receive-over-run-error']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:receive-crc-error']}}{{ncp['opendaylight-port-statistics:flow-capable-node-connector-statistics']['opendaylight-port-statistics:collision-count']}}
+ + diff --git a/src/assets/data/locale-en_US.json b/src/assets/data/locale-en_US.json index 92570b12..2216e775 100644 --- a/src/assets/data/locale-en_US.json +++ b/src/assets/data/locale-en_US.json @@ -19,5 +19,26 @@ "FLOW_STATISTICS":"Flow Statistics", "NODE_CONNECTOR_STATISTICS": "Node Connector Statistics", "SEARCH_NODES":"Search Nodes", - "SEARCH_NODE_CONNECTORS":"Search Node Connectors" -} \ No newline at end of file + "SEARCH_NODE_CONNECTORS":"Search Node Connectors", + + "FLOW_TABLE_STATISTICS_FOR_NODE_ID":"Flow Table Statistics for Node Id", + "TABLE_ID":"Table Id", + "ACTIVE_FLOW":"Active Flow", + "PKTS_MATCHED":"Pkts Matched", + "PKTS_LOOKED_UP":"Pkts Looked-up", + "SHOW_ALL_TABLES":"Show all tables", + + "NODE_CONNECTOR_STATISTICS_FOR_NODE_ID":"Node Connector Statistics for Node Id", + "RX_PKTS":"Rx Pkts", + "TX_PKTS":"Tx Pkts", + "RX_BYTES":"Rx Bytes", + "TX_BYTES":"Tx Bytes", + "RX_DROPS":"Rx Drops", + "TX_DROPS":"Tx Drops", + "RX_ERRS":"Rx Errs", + "TX_ERRS":"Tx Errs", + "RX_FRAME_ERRS":"Rx Frame Errs", + "RX_OVERRUN_ERRS":"Rx OverRun Errs", + "RX_CRC_ERRS":"Rx CRC Errs", + "Collisions":"Collisions" +} -- 2.36.6