diff --git a/main.py b/main.py index d307dbf..e6cbe6a 100644 --- a/main.py +++ b/main.py @@ -431,6 +431,8 @@ def loadFlowRouteConfig(self): else: for vrf in self.vrfs: + _vrf_data = dict() + _data = dict() family = '' if vrf == 'default': try: @@ -489,7 +491,7 @@ def loadFlowRouteConfig(self): 'srcPrefix': route['match']['source'] if 'source' in route['match'] else None }) - return True, self.flow_config + return True, self.flow_config, self.vrfs def parseFlow(self, flow=None): _flow = flow.split(',') diff --git a/ui/index.html b/ui/index.html index cdffe57..6ba8452 100644 --- a/ui/index.html +++ b/ui/index.html @@ -174,8 +174,6 @@
@@ -265,8 +263,6 @@
diff --git a/ui/ui.js b/ui/ui.js index 1b9f68a..0c56fb3 100644 --- a/ui/ui.js +++ b/ui/ui.js @@ -44,6 +44,23 @@ $(document).ready(function () { var return_data = new Array(); + selectVrf = document.getElementById('selectVrf'); + selectModVrf = document.getElementById('selectModVrf'); + + $.each( response[2], function( index, value ) { + var opt = document.createElement('option'); + opt.text = value; + opt.value = value; + selectVrf.appendChild(opt); + }); + + $.each( response[2], function( index, value ) { + var opt = document.createElement('option'); + opt.text = value; + opt.value = value; + selectModVrf.appendChild(opt); + }); + $.each( response[1], function( name, flow ) { var action_val = new Array();