From 027f5d673fc8a8911cff894254575a39c9ca8c56 Mon Sep 17 00:00:00 2001 From: Karl Newell Date: Wed, 22 May 2019 09:14:21 -0700 Subject: [PATCH] Revert "first stab at using some templating for UI" This reverts commit 72729608a6007d00a4e64f17c41aca1aba22d74a. --- main.py | 9 +++------ ui/index.html | 10 +++++----- 2 files changed, 8 insertions(+), 11 deletions(-) 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 @@ - Internet2 BGP Portal + BGP Flow Spec Demo @@ -33,8 +33,8 @@ -

Internet2

-

BGP FlowSpec Portal

+

DevOps against DDoS

+

Monitoring BGP FlowSpec with Junos PyEZ