diff --git a/main.py b/main.py index 83c4c89..65cf4c5 100644 --- a/main.py +++ b/main.py @@ -31,7 +31,6 @@ from jnpr.junos.exception import ConfigLoadError, CommitError from data.fr import FlowRoutesTable, FlowFilterTable -env = Environment(loader=FileSystemLoader('ui')) class MyDev(object): @@ -520,15 +519,13 @@ def load_settings(self): self.routers = config['routers'] self.vrfs = config['vrfs'] + class BGPFlow(object): @cherrypy.expose def index(self): - with open('ui/config.yml', 'r') as fp: - configvrf = yaml.load(fp) - vrflist = configvrf['vrfs'] - tmpl = env.get_template('index.html') - return tmpl.render(first_option=vrflist[0], second_option=vrflist[1]) + return open('ui/index.html', 'r') + @cherrypy.expose class BGPFlowWS(object): diff --git a/ui/index.html b/ui/index.html index 4d4c7c0..be8311c 100644 --- a/ui/index.html +++ b/ui/index.html @@ -23,7 +23,7 @@
-