From 4cdb730b59a643b8eee4ea38465a292076e43fcb Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Fri, 27 Jan 2012 19:12:59 +0100 Subject: [PATCH] Add copyright header --- README | 5 ++++- bird.py | 20 ++++++++++++++++++++ lg-proxy.py | 20 ++++++++++++++++++++ lg.py | 28 ++++++++++++++++++++-------- static/style.css | 7 +++++++ templates/layout.html | 3 +++ test.py | 6 ------ toolbox.py | 20 ++++++++++++++++++++ 8 files changed, 94 insertions(+), 15 deletions(-) delete mode 100644 test.py diff --git a/README b/README index 6359f8b..76fe84e 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ bird-lg depend on : - - python-flask + - python-flask >= 0.8 - python-dnspython @@ -15,3 +15,6 @@ On frontend: Each service can by embeded in any webserver by follow regular python-flask configuration + + +Only tested with bird 1.2.5 diff --git a/bird.py b/bird.py index c4e949f..5d945f3 100644 --- a/bird.py +++ b/bird.py @@ -1,3 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ts=4 +### +# +# Copyright (c) 2006 Mehdi Abaakouk +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 as +# published by the Free Software Foundation +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +# +### import socket import sys diff --git a/lg-proxy.py b/lg-proxy.py index 75d6ec1..a9225a9 100644 --- a/lg-proxy.py +++ b/lg-proxy.py @@ -1,3 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ts=4 +### +# +# Copyright (c) 2006 Mehdi Abaakouk +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 as +# published by the Free Software Foundation +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +# +### import subprocess diff --git a/lg.py b/lg.py index 66a4998..1a57d70 100755 --- a/lg.py +++ b/lg.py @@ -1,4 +1,24 @@ #!/usr/bin/python +# -*- coding: utf-8 -*- +# vim: ts=4 +### +# +# Copyright (c) 2006 Mehdi Abaakouk +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 as +# published by the Free Software Foundation +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +# +### import sys import os @@ -15,14 +35,6 @@ from flask import Flask, render_template, jsonify, redirect, session, request, a app = Flask(__name__) app.config.from_pyfile('lg.cfg') - -#def same_origin_policy_hander(resp): -# resp.headers["Access-Control-Allow-Origin"] = "*" -# return resp -# -#app.after_request(same_origin_policy_hander) -# - def add_links(text): if type(text) in [ str, unicode ]: text = text.split("\n") diff --git a/static/style.css b/static/style.css index 2ef0139..6d34087 100644 --- a/static/style.css +++ b/static/style.css @@ -5,6 +5,7 @@ html, body, ul, li { padding: 0 ; margin: 0; } html, body { height:100% ; + position:relative; } a { text-decoration: none; color:blue; } @@ -105,6 +106,12 @@ input#ipopup{ width: auto; } +#footer{ + position:fixed; + bottom:0px; + left:0px; + font-size: 10px; +} .error{ font-weight:normal; color:red; diff --git a/templates/layout.html b/templates/layout.html index 913cd16..a94b586 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -165,3 +165,6 @@ $( function() { {% block body %}{% endblock %} + diff --git a/test.py b/test.py deleted file mode 100644 index 5bf9068..0000000 --- a/test.py +++ /dev/null @@ -1,6 +0,0 @@ - -from bird import BirdSocketSingleton - -s = BirdSocketSingleton("h3", 9994) -print s.cmd("show protocols") -print s.cmd("show protocols all TETANEUTRAL") diff --git a/toolbox.py b/toolbox.py index 155c95e..534c118 100644 --- a/toolbox.py +++ b/toolbox.py @@ -1,3 +1,23 @@ +# -*- coding: utf-8 -*- +# vim: ts=4 +### +# +# Copyright (c) 2006 Mehdi Abaakouk +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 3 as +# published by the Free Software Foundation +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +# +### from dns import resolver,reversename import socket