]> git.ipfire.org Git - ipfire.org.git/commitdiff
Drop unused format_asn() function
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Jun 2020 18:16:24 +0000 (18:16 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Jun 2020 18:16:24 +0000 (18:16 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/util.py
src/web/__init__.py

index 370c63a096c00d8071b03ac2a8ee47df77748a20..2252818ea538455812d324c4787700224178f892 100644 (file)
@@ -154,14 +154,6 @@ class Address(Object):
                return blacklists
 
 
-def format_asn(asn):
-       network = db.get_as(asn)
-
-       if network:
-               return "%s" % network
-
-       return "AS%s" % asn
-
 def format_size(s, max_unit=None):
        units = ("B", "kB", "MB", "GB", "TB")
 
index 53cb41c1e7be57941eecafdb99493558d208b494..2851516cd93bb7f96ec8eec108468007f350ac85 100644 (file)
@@ -50,7 +50,6 @@ class Application(tornado.web.Application):
 
                        # UI Methods
                        "ui_methods" : {
-                               "format_asn"                   : self.format_asn,
                                "format_country_name"          : self.format_country_name,
                                "format_language_name"         : self.format_language_name,
                                "format_month_name"            : self.format_month_name,
@@ -335,9 +334,6 @@ class Application(tornado.web.Application):
 
                logging.info("Successfully initialied application")
 
-       def format_asn(self, handler, asn):
-               return util.format_asn(asn)
-
        def format_country_name(self, handler, country_code):
                return ipfire.countries.get_name(country_code)