diff --git a/main.py b/main.py index 0347bfb..3ffe42a 100644 --- a/main.py +++ b/main.py @@ -223,7 +223,7 @@ def getActiveFlowRoutes(self): if hex_dig not in self.flow_active: - self.flow_active[hex_dig] = {'router': name, 'term': flow.term, 'destination': destination, + self.flow_active[hex_dig] = {'router': name, 'vrf': flowtable, 'term': flow.term, 'destination': destination, 'commAction': commAction, 'krtAction': krt_actions, 'age': str(_age['current']), 'hash': hex_dig, 'status': 'new'} @@ -273,7 +273,7 @@ def getActiveFlowRouteFilter(self): _item = item.split('=') data[didx] = _item[1] if len(_item) > 1 else _item[0] - self.filter_active[name].append({'data': data, 'packet_count': filter.packet_count, + self.filter_active[name].append({'vrf': table, 'data': data, 'packet_count': filter.packet_count, 'byte_count': filter.byte_count}) return True, self.filter_active diff --git a/ui/index.html b/ui/index.html index 8f2c417..4cc11cc 100644 --- a/ui/index.html +++ b/ui/index.html @@ -53,7 +53,7 @@

Monitoring BGP Flow

- Juniper Networks + Juniper Networks
@@ -102,6 +102,7 @@

Monitoring BGP Flow Router + VRF Name Destination Prefix Source Prefix @@ -129,6 +130,7 @@

Monitoring BGP Flow Name + VRF Destination Prefix Source Prefix Protocol @@ -342,4 +344,4 @@

- \ No newline at end of file + diff --git a/ui/internet2.png b/ui/internet2.png new file mode 100644 index 0000000..8b86b7b Binary files /dev/null and b/ui/internet2.png differ diff --git a/ui/ui.js b/ui/ui.js index f36a29b..718e380 100644 --- a/ui/ui.js +++ b/ui/ui.js @@ -119,6 +119,7 @@ $(document).ready(function () { return_data.push({ 'router': flow.router, + 'vrf': flow.vrf, 'term': flow.term, 'dstPrefix': flow.destination[0], 'dstPort': flow.destination[3], @@ -147,6 +148,10 @@ $(document).ready(function () { "data": "router", "defaultContent": "" }, + { + "data": "vrf", + "defaultContent": "" + }, { "data": "term", "defaultContent": "" @@ -202,6 +207,7 @@ $(document).ready(function () { return_data.push({ 'name': rname, + 'vrf': filter.vrf, 'dstPrefix': filter.data[0], 'dstPort': filter.data[3], 'srcPrefix': filter.data[1], @@ -223,6 +229,10 @@ $(document).ready(function () { "data": "name", "defaultContent": "" }, + { + "data": "vrf", + "defaultContent": "" + }, { "data": "dstPrefix", "defaultContent": "" @@ -610,4 +620,4 @@ function saveSettings(settings){ $("#errormsg").html(errorText).show(); } }); -} \ No newline at end of file +}