prewikka-1.0.0/0000775000076400007640000000000011347720623012376 5ustar yoannyoannprewikka-1.0.0/scripts/0000775000076400007640000000000011347720623014065 5ustar yoannyoannprewikka-1.0.0/scripts/prewikka-httpd0000664000076400007640000001164311340777332016755 0ustar yoannyoann#!/usr/bin/env python # Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the PreludeDB library. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import sys import os, os.path import time import cgi import urllib import mimetypes import shutil import getopt import SocketServer import BaseHTTPServer from prewikka import localization from prewikka import Core, Request, siteconfig class PrewikkaServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer): def __init__(self, core, *args, **kwargs): self.core = core apply(BaseHTTPServer.HTTPServer.__init__, (self,) + args, kwargs) class PrewikkaRequestHandler(Request.Request, BaseHTTPServer.BaseHTTPRequestHandler): def getCookieString(self): return self.headers.get("Cookie") def getQueryString(self): return self._query_string def getReferer(self): try: return self.input_headers["referer"] except KeyError: return "" def write(self, data): self.wfile.write(data) def read(self, *args, **kwargs): return apply(self.rfile.read, args, kwargs) def log_request(self, *args, **kwargs): pass def log_error(self, *args, **kwargs): pass def _processDynamic(self, arguments): self.input_headers.update(self.headers) for name, value in arguments.items(): self.arguments[name] = (len(value) == 1) and value[0] or value self.server.core.process(self) def sendResponse(self): self.send_response(200) Request.Request.sendResponse(self) def _processStatic(self): filename = os.path.abspath(siteconfig.htdocs_dir + "/" + urllib.unquote(self.path[len("prewikka/"):])) if filename.find(os.path.abspath(siteconfig.htdocs_dir)) != 0: self.send_error(403, "Request Forbidden") return # the following piece of code is from tracd of the trac project # (http://www.edgewall.com/products/trac/) try: f = open(filename, 'r') except IOError: self.send_error(404, "File not found") return self.send_response(200) mtype, enc = mimetypes.guess_type(filename) stat = os.fstat(f.fileno()) content_length = stat[6] last_modified = time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(stat[8])) self.send_header('Content-Type', mtype) self.send_header('Content-Length', str(content_length)) self.send_header('Last-Modified', last_modified) self.end_headers() shutil.copyfileobj(f, self.wfile) def do_GET(self): self._query_string = self.path self.init() if self.path == "/": self._processDynamic({ }) elif self.path.find("?") == 1: self._processDynamic(cgi.parse_qs(self.path[2:])) else: self._processStatic() def do_HEAD(self): self.do_GET() def do_POST(self): self._query_string = self.rfile.read(int(self.headers["Content-Length"])) self.init() self._processDynamic(cgi.parse_qs((self._query_string))) def getClientAddr(self): return self.client_address[0] def getClientPort(self): return self.client_address[1] def usage(): print "Usage: %s [options]" % sys.argv[0] print print "Options:" print "-c --config [config]\tConfiguration file to use (default: %s/prewikka.conf)" % siteconfig.conf_dir print "-p --port [port]\tPort number to use (default: 8000)" print "-a --address [address]\tIP to bind to (default: 0.0.0.0)" print sys.exit(1) if __name__ == "__main__": config = None addr, port = "0.0.0.0", 8000 opts, args = getopt.getopt(sys.argv[1:], "hc:a:p:", ["help", "config=", "address=", "port="]) for opt, arg in opts: if opt in ("-h", "--help"): usage() elif opt in ("-a", "--address"): addr = arg elif opt in ("-p", "--port"): port = int(arg) elif opt in ("-c", "--config"): config = arg mimetypes.init() core = Core.get_core_from_config(config) server = PrewikkaServer(core, (addr, port), PrewikkaRequestHandler) server.serve_forever() prewikka-1.0.0/AUTHORS0000664000076400007640000000040511200051577013436 0ustar yoannyoannPrewikka is brought to you by PreludeIDS Technologies (http://www.prelude-ids.com), - Written by Yoann Vandoorselaere - Written by Nicolas Delon - Originally written by Markus Alkio and Miika Keskinen. prewikka-1.0.0/langadmin.py0000775000076400007640000002050011200051577014673 0ustar yoannyoann#!/usr/bin/env python # Copyright (C) 2004,2005 by SICEm S.L. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # 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 Lesser General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. """ This script makes easy all the boring steps to use gettext with a python application. For localization you need to: 1 Mark the strings in the source code as translatable 2 Use xgettext to get a pot file from it 3 Use a copy of this pot file for every language you want to have translations 4 Translate these po files 5 Use msgmerge every time you change the source code and the strings you need to translate change 6 Generate the mo binary files for every po file you have To use this script you need to: - have a directory where you put the po files: the PO_DIR - have a directory where you put the mo files: the LANG_DIR - choose a name for the pot file: the POT_FILE - choose a name for the mo files: the MO_FILE Note that you have only one POT_FILE but you have one po file in the PO_DIR for every language you have translations. Then you have a MO_FILE for every po file and they are stored in LANG_DIR/lang/LC_MESSAGES/ where lang is the language this MO_FILE belongs to. """ from distutils.dep_util import newer from glob import glob import os from os.path import join, splitext, basename, exists, isdir from optparse import OptionParser import sys from shutil import copyfile class LangAdmin: def __init__(self, po_dir, pot_file, mo_file, lang_dir): # where to put the po files (one for each language) self.po_dir = po_dir # name of the pot (po template) file (it is stored in the cwd) self.pot_file = pot_file # name of the mo file (one for each directory) self.mo_file = mo_file # name of the directory where the mo files are stored self.lang_dir = lang_dir def get_languages(self): """Gives a list of all the languages that have translation""" languages = [] for lang in glob(join(self.po_dir, '*.po')): languages.append(splitext(basename(lang))[0]) return languages def _list_files(self, directory, recurse=True, ext="py"): files = glob(join(directory, "*." + ext)) if recurse: dirs = [join(directory, filename) for filename \ in os.listdir(directory) if isdir(join(directory, filename))] for d in dirs: files += self._list_files(d, recurse, ext) return files def generate_pot_file(self, recurse=True, directories=[]): """Get all the python files in the directories parameter and create a pot file using xgettext. If the recurse parameter is True it search for more .py files in the subdirectories of the directories list """ files = [] for dirname in directories: files += self._list_files(dirname, recurse) cmd = 'xgettext --copyright-holder="PreludeIDS Technologies" -k_ -kN_ -o %s %s' % (self.pot_file, ' '.join(files)) print cmd os.system(cmd) def add_language(self, lang): """Create another language by copying the self.pot_file into the self.po_dir using the lang parameter for its name. You need to fill at least the charset property of the prolog of this new file if you don't want the other commands to fail """ if not exists(self.pot_file): print 'ERROR: You need to generate the pot file before adding '\ 'any language.\n' \ 'Use the command pot for that' sys.exit(1) copyfile(self.pot_file, join(self.po_dir, lang+'.po')) print 'Please fill the prolog information of the file', \ join(self.po_dir, lang+'.po') def merge_translations(self): """Merge the new self.pot_file with the existing po files in the self.po_dir directory using the command msgmerge """ for lang_file in glob(join(self.po_dir, '*.po')): cmd = 'msgmerge -U %s %s' % (lang_file, self.pot_file) print cmd os.system(cmd) def generate_mo_files(self, verbose=True): """For every po file in the self.po_dir directory generates a self.mo_file using msgfmt. It guess the language name from the po file and creates the directories needed under self.lang_dir to put the final self.mo_file in the right place """ if not exists(self.lang_dir): os.mkdir(self.lang_dir) for lang in self.get_languages(): src = join(self.po_dir, lang+'.po') dst = join(self.lang_dir, lang, 'LC_MESSAGES', self.mo_file) if not exists(join(self.lang_dir, lang, 'LC_MESSAGES')): if not exists(join(self.lang_dir, lang)): os.mkdir(join(self.lang_dir, lang)) os.mkdir(join(self.lang_dir, lang, 'LC_MESSAGES')) # Skip files which are not modified if not newer(src, dst): continue cmd = 'msgfmt -o %s %s' % (dst, src) if verbose: print 'running', cmd os.system(cmd) if __name__ == '__main__': usage = """usage: %prog [options] command where command can be one of: list List all the languages supported add LANG Add the language LANG pot DIRS Get the translatable strings for every file in DIRS that is a .py file and creates the .pot file from them merge Merge all the languages files with the POT file mo Create a .mo file for every .po file and put it in the right place""" parser = OptionParser(usage) parser.add_option('--po-dir', action='store', dest='po_dir', default='po', help='directory to store the po files') parser.add_option('--pot-file', action='store', dest='pot_file', default='prewikka.pot', help='name of the pot (po template) file. It is stored in the cwd') parser.add_option('--mo-file', action='store', dest='mo_file', default='prewikka.mo', help='name of the mo file') parser.add_option('--lang-dir', action='store', dest='lang_dir', default='locale', help='directory to store the mo files') options, args = parser.parse_args() if len(args) == 0: parser.print_help() print '\nERROR: You should provide one command' sys.exit(1) langadmin = LangAdmin(options.po_dir, options.pot_file, options.mo_file, options.lang_dir) command = args.pop(0) if command == 'list': langs = langadmin.get_languages() print ' '.join(langs) elif command == 'pot': if len(args) == 0: parser.print_help() print '\nERROR: The pot command needs at least one directory to '\ 'look for .py files with translatable strings' sys.exit(1) langadmin.generate_pot_file(True, args) elif command == 'add': if len(args) != 1: parser.print_help() print '\nERROR: You need to specify one and only one language '\ 'to add' sys.exit(1) langadmin.add_language(args[0]) elif command == 'merge': langadmin.merge_translations() elif command == 'mo': langadmin.generate_mo_files() else: parser.print_help() print '\nERROR: Unknown command' sys.exit(1) prewikka-1.0.0/PKG-INFO0000664000076400007640000000034611347720623013476 0ustar yoannyoannMetadata-Version: 1.0 Name: prewikka Version: 1.0.0 Summary: UNKNOWN Home-page: http://www.prelude-ids.org Author: Yoann Vandoorselaere Author-email: yoann.v@prelude-ids.com License: UNKNOWN Description: UNKNOWN Platform: UNKNOWN prewikka-1.0.0/setup.py0000664000076400007640000002161511347717723014124 0ustar yoannyoann#!/usr/bin/env python # Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import sys import os, os.path import stat import glob from distutils.dist import Distribution from distutils.core import setup from distutils.command.build import build from distutils.command.build_py import build_py from distutils.command.install import install from distutils.command.install_scripts import install_scripts from distutils.command.install_data import install_data from distutils.core import Command from Cheetah.CheetahWrapper import CheetahWrapper PREWIKKA_VERSION = "1.0.0" LIBPRELUDE_REQUIRED_VERSION = "0.9.23" LIBPRELUDEDB_REQUIRED_VERSION = "0.9.12" from fnmatch import fnmatch from distutils.dep_util import newer def listfiles(*dirs): dir, pattern = os.path.split(os.path.join(*dirs)) return [os.path.join(dir, filename) for filename in os.listdir(os.path.abspath(dir)) if filename[0] != '.' and fnmatch(filename, pattern)] class my_install_data(install_data): def run(self): self.data_files.extend(self._compile_po_files()) install_data.run(self) def _compile_po_files(self): data_files = [] for po in listfiles("po", "*.po"): lang = os.path.basename(po[:-3]) mo = os.path.join("locale", lang, "LC_MESSAGES", "prewikka.mo") if not os.path.exists(mo) or newer(po, mo): directory = os.path.dirname(mo) if not os.path.exists(directory): print "creating %s" % directory os.makedirs(directory) cmd = 'msgfmt -o %s %s' % (mo, po) print "compiling %s -> %s" % (po, mo) if os.system(cmd) != 0: raise SystemExit("Error while running msgfmt") dest = os.path.dirname(os.path.join('share', mo)) data_files.append((dest, [mo])) return data_files class my_build_py(build_py): def finalize_options(self): build_py.finalize_options(self) self.outfiles = [ ] def get_outputs(self, *args, **kwargs): return self.outfiles + apply(build_py.get_outputs, (self, ) + args, kwargs) def build_templates(self): cheetah = CheetahWrapper() argbkp = sys.argv[0][:] for package in self.packages: package_dir = self.get_package_dir(package) templates = glob.glob(package_dir + '/*.tmpl') for template in templates: compiled = self.build_lib + "/" + template.replace(".tmpl", ".py") self.outfiles.append(compiled) if os.path.exists(compiled): template_stat = os.stat(template) compiled_stat = os.stat(compiled) if compiled_stat.st_mtime > template_stat.st_mtime: continue argv = [ sys.argv[0], "compile", "--nobackup", template ] cheetah.main(argv) sys.argv[0] = argbkp def run(self): self.build_templates() build_py.run(self) class MyDistribution(Distribution): def __init__(self, attrs): try: os.remove("prewikka/siteconfig.py") except: pass self.conf_files = [ ] Distribution.__init__(self, attrs) class my_install_scripts (install_scripts): def initialize_options (self): install_scripts.initialize_options(self) self.install_data = None def finalize_options (self): install_scripts.finalize_options(self) self.set_undefined_options('install', ('install_data', 'install_data')) def run (self): if not self.skip_build: self.run_command('build_scripts') self.outfiles = [] self.mkpath(os.path.normpath(self.install_dir)) ofile, copied = self.copy_file(os.path.join(self.build_dir, 'prewikka-httpd'), self.install_dir) if copied: self.outfiles.append(ofile) cgi_dir = os.path.join(self.install_data, 'share', 'prewikka', 'cgi-bin') if not os.path.exists(cgi_dir): os.makedirs(cgi_dir) ofile, copied = self.copy_file(os.path.join(self.build_dir, 'prewikka.cgi'), cgi_dir) if copied: self.outfiles.append(ofile) class my_install(install): def finalize_options(self): ### if no prefix is given, configuration should go to /etc or in {prefix}/etc otherwise if self.prefix: self.conf_prefix = self.prefix + "/etc/prewikka" else: self.conf_prefix = "/etc/prewikka" install.finalize_options(self) def install_conf(self): self.mkpath((self.root or "") + self.conf_prefix) for file in self.distribution.conf_files: dest = (self.root or "") + self.conf_prefix + "/" + os.path.basename(file) if os.path.exists(dest): dest += "-dist" self.copy_file(file, dest) def init_siteconfig(self): config = open("prewikka/siteconfig.py", "w") print >> config, "htdocs_dir = '%s'" % os.path.abspath((self.prefix + "/share/prewikka/htdocs")) print >> config, "database_dir = '%s'" % os.path.abspath((self.prefix + "/share/prewikka/database")) print >> config, "locale_dir = '%s'" % os.path.abspath((self.prefix + "/share/locale")) print >> config, "conf_dir = '%s'" % os.path.abspath((self.conf_prefix)) print >> config, "version = '%s'" % PREWIKKA_VERSION print >> config, "libprelude_required_version = '%s'" % LIBPRELUDE_REQUIRED_VERSION print >> config, "libpreludedb_required_version = '%s'" % LIBPRELUDEDB_REQUIRED_VERSION config.close() def run(self): os.umask(022) self.install_conf() self.init_siteconfig() install.run(self) self.mkpath((self.root or "") + self.prefix + "/share/prewikka/htdocs/generated_images") for dir in ("/", "share/prewikka", "share/prewikka/htdocs", "share/prewikka/htdocs/images", "share/prewikka/htdocs/js", "share/prewikka/htdocs/css", "share/prewikka/database", "share/prewikka/cgi-bin"): os.chmod((self.root or "") + self.prefix + "/" + dir, 0755) os.chmod((self.root or "") + self.conf_prefix, 0755) if not self.dry_run: for filename in self.get_outputs(): if filename.find(".conf") != -1: continue mode = os.stat(filename)[stat.ST_MODE] mode |= 044 if mode & 0100: mode |= 011 os.chmod(filename, mode) sqlite = open("database/sqlite.sql", "w") for line in os.popen("database/mysql2sqlite.sh database/mysql.sql"): print >> sqlite, line.rstrip() sqlite.close() pgsql = open("database/pgsql.sql", "w") for line in os.popen("database/mysql2pgsql.sh database/mysql.sql"): print >> pgsql, line.rstrip() pgsql.close() setup(name="prewikka", version=PREWIKKA_VERSION, maintainer = "Yoann Vandoorselaere", maintainer_email = "yoann.v@prelude-ids.com", url = "http://www.prelude-ids.org", packages=[ 'prewikka', 'prewikka.views', 'prewikka.templates', 'prewikka.modules', 'prewikka.modules.auth', 'prewikka.modules.auth.anonymous', 'prewikka.modules.auth.loginpassword', 'prewikka.modules.auth.cgi' ], data_files=[ ("share/prewikka/cgi-bin", [ "cgi-bin/prewikka.cgi" ]), ("share/prewikka/htdocs/images", glob.glob("htdocs/images/*")), ("share/prewikka/htdocs/css", glob.glob("htdocs/css/*.css")), ("share/prewikka/htdocs/js", glob.glob("htdocs/js/*.js")), ("share/prewikka/database", glob.glob("database/*.sql") + glob.glob("database/*.sh") )], scripts=[ "scripts/prewikka-httpd", "cgi-bin/prewikka.cgi" ], conf_files=[ "conf/prewikka.conf" ], cmdclass={ 'build_py': my_build_py, 'install': my_install, 'install_scripts': my_install_scripts, 'install_data': my_install_data }, distclass=MyDistribution) prewikka-1.0.0/prewikka.pot0000664000076400007640000006633411340777332014755 0ustar yoannyoann# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR PreludeIDS Technologies # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-02-10 13:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: prewikka/User.py:41 msgid "Permission Denied" msgstr "" #: prewikka/User.py:42 #, python-format msgid "Access to view '%s' forbidden" msgstr "" #: prewikka/Auth.py:29 msgid "Authentication failed" msgstr "" #: prewikka/Auth.py:35 msgid "Invalid session" msgstr "" #: prewikka/Auth.py:41 msgid "Session expired" msgstr "" #: prewikka/Auth.py:138 msgid "Logged out" msgstr "" #: prewikka/Log.py:65 #, python-format msgid "Unknown logtype specified: '%s'" msgstr "" #: prewikka/view.py:29 prewikka/view.py:35 prewikka/view.py:41 msgid "Parameters Normalization failed" msgstr "" #: prewikka/Database.py:98 #, python-format msgid "" "Database schema version %(version)s found when %(reqversion)s was required" msgstr "" #: prewikka/localization.py:107 msgid "January" msgstr "" #: prewikka/localization.py:108 msgid "February" msgstr "" #: prewikka/localization.py:109 msgid "March" msgstr "" #: prewikka/localization.py:110 msgid "April" msgstr "" #: prewikka/localization.py:111 msgid "May" msgstr "" #: prewikka/localization.py:112 msgid "June" msgstr "" #: prewikka/localization.py:113 msgid "July" msgstr "" #: prewikka/localization.py:114 msgid "August" msgstr "" #: prewikka/localization.py:115 msgid "September" msgstr "" #: prewikka/localization.py:116 msgid "November" msgstr "" #: prewikka/localization.py:117 msgid "October" msgstr "" #: prewikka/localization.py:118 msgid "December" msgstr "" #: prewikka/localization.py:120 msgid "Monday" msgstr "" #: prewikka/localization.py:121 msgid "Tuesday" msgstr "" #: prewikka/localization.py:122 msgid "Wednesday" msgstr "" #: prewikka/localization.py:123 msgid "Thursday" msgstr "" #: prewikka/localization.py:124 msgid "Friday" msgstr "" #: prewikka/localization.py:125 msgid "Saturday" msgstr "" #: prewikka/localization.py:126 msgid "Sunday" msgstr "" #: prewikka/Filter.py:78 #, python-format msgid "Invalid filter element '%s' referenced from filter formula" msgstr "" #: prewikka/views/messagesummary.py:304 prewikka/views/messagesummary.py:461 #: prewikka/views/messagesummary.py:691 prewikka/views/messagesummary.py:708 #: prewikka/views/messagesummary.py:731 prewikka/views/messagesummary.py:789 #: prewikka/views/messagesummary.py:808 prewikka/views/messagesummary.py:844 #: prewikka/templates/SensorListing.py:412 msgid "Name" msgstr "" #: prewikka/views/messagesummary.py:305 prewikka/views/messagesummary.py:611 msgid "Code" msgstr "" #: prewikka/views/messagesummary.py:306 msgid "Data length" msgstr "" #: prewikka/views/messagesummary.py:307 msgid "Data" msgstr "" #: prewikka/views/messagesummary.py:403 prewikka/views/messagesummary.py:846 msgid "Create time" msgstr "" #: prewikka/views/messagesummary.py:406 msgid "Detect time" msgstr "" #: prewikka/views/messagesummary.py:411 msgid "Analyzer time" msgstr "" #: prewikka/views/messagesummary.py:417 msgid "Process" msgstr "" #: prewikka/views/messagesummary.py:418 msgid "Process Path" msgstr "" #: prewikka/views/messagesummary.py:419 msgid "Process PID" msgstr "" #: prewikka/views/messagesummary.py:427 msgid "Node location" msgstr "" #: prewikka/views/messagesummary.py:449 #: prewikka/templates/HeartbeatListing.py:126 msgid "Node name" msgstr "" #: prewikka/views/messagesummary.py:452 msgid "Node name (resolved)" msgstr "" #: prewikka/views/messagesummary.py:454 #: prewikka/templates/HeartbeatListing.py:113 msgid "Node address" msgstr "" #: prewikka/views/messagesummary.py:460 prewikka/views/stats.py:711 #: prewikka/templates/HeartbeatListing.py:139 #: prewikka/templates/SensorListing.py:418 msgid "Model" msgstr "" #: prewikka/views/messagesummary.py:462 msgid "Analyzerid" msgstr "" #: prewikka/views/messagesummary.py:463 prewikka/views/messagesummary.py:563 #: prewikka/templates/SensorListing.py:424 msgid "Version" msgstr "" #: prewikka/views/messagesummary.py:464 prewikka/views/stats.py:719 #: prewikka/templates/SensorListing.py:430 msgid "Class" msgstr "" #: prewikka/views/messagesummary.py:466 msgid "Manufacturer" msgstr "" #: prewikka/views/messagesummary.py:474 msgid "Operating System" msgstr "" #: prewikka/views/messagesummary.py:492 #, python-format msgid "Analyzer Path (%d not shown)" msgstr "" #: prewikka/views/messagesummary.py:499 prewikka/views/messagesummary.py:1030 #: prewikka/views/messagesummary.py:1102 #, python-format msgid "Analyzer #%d" msgstr "" #: prewikka/views/messagesummary.py:509 msgid "Additional data" msgstr "" #: prewikka/views/messagesummary.py:512 prewikka/views/messagesummary.py:732 msgid "Meaning" msgstr "" #: prewikka/views/messagesummary.py:513 msgid "Value" msgstr "" #: prewikka/views/messagesummary.py:564 prewikka/views/messagesummary.py:585 msgid "Header length" msgstr "" #: prewikka/views/messagesummary.py:565 msgid "TOS" msgstr "" #: prewikka/views/messagesummary.py:566 prewikka/views/messagesummary.py:604 msgid "Length" msgstr "" #: prewikka/views/messagesummary.py:567 prewikka/views/messagesummary.py:613 msgid "Id" msgstr "" #: prewikka/views/messagesummary.py:571 msgid "Ip offset" msgstr "" #: prewikka/views/messagesummary.py:572 msgid "TTL" msgstr "" #: prewikka/views/messagesummary.py:573 prewikka/views/messagesummary.py:932 #: prewikka/views/messagesummary.py:935 prewikka/views/messagesummary.py:938 msgid "Protocol" msgstr "" #: prewikka/views/messagesummary.py:574 prewikka/views/messagesummary.py:596 #: prewikka/views/messagesummary.py:605 prewikka/views/messagesummary.py:612 msgid "Checksum" msgstr "" #: prewikka/views/messagesummary.py:575 msgid "Source address" msgstr "" #: prewikka/views/messagesummary.py:576 msgid "Target address" msgstr "" #: prewikka/views/messagesummary.py:581 prewikka/views/messagesummary.py:602 msgid "Source port" msgstr "" #: prewikka/views/messagesummary.py:582 prewikka/views/messagesummary.py:603 msgid "Target port" msgstr "" #: prewikka/views/messagesummary.py:586 msgid "Reserved" msgstr "" #: prewikka/views/messagesummary.py:595 msgid "Window" msgstr "" #: prewikka/views/messagesummary.py:597 msgid "URP" msgstr "" #: prewikka/views/messagesummary.py:610 prewikka/views/messagesummary.py:755 #: prewikka/views/messagesummary.py:788 prewikka/views/messagesummary.py:807 msgid "Type" msgstr "" #: prewikka/views/messagesummary.py:614 msgid "Seq #" msgstr "" #: prewikka/views/messagesummary.py:615 msgid "Mask" msgstr "" #: prewikka/views/messagesummary.py:616 msgid "Gateway Address" msgstr "" #: prewikka/views/messagesummary.py:617 msgid "Num address" msgstr "" #: prewikka/views/messagesummary.py:618 msgid "Wpa" msgstr "" #: prewikka/views/messagesummary.py:619 msgid "Lifetime" msgstr "" #: prewikka/views/messagesummary.py:620 msgid "Otime" msgstr "" #: prewikka/views/messagesummary.py:621 msgid "Rtime" msgstr "" #: prewikka/views/messagesummary.py:622 msgid "Ttime" msgstr "" #: prewikka/views/messagesummary.py:628 prewikka/views/messagesummary.py:1077 msgid "Payload" msgstr "" #: prewikka/views/messagesummary.py:675 #, python-format msgid "%d linked alerts missing (probably deleted)" msgstr "" #: prewikka/views/messagesummary.py:689 prewikka/views/messagesummary.py:985 #: prewikka/views/alertlisting.py:707 msgid "Correlation Alert" msgstr "" #: prewikka/views/messagesummary.py:695 msgid "Correlated Alert" msgstr "" #: prewikka/views/messagesummary.py:696 prewikka/views/messagesummary.py:713 msgid "Source Analyzer" msgstr "" #: prewikka/views/messagesummary.py:706 prewikka/views/messagesummary.py:988 #: prewikka/views/alertlisting.py:711 msgid "Tool Alert" msgstr "" #: prewikka/views/messagesummary.py:712 msgid "Linked Alert" msgstr "" #: prewikka/views/messagesummary.py:723 msgid "Text" msgstr "" #: prewikka/views/messagesummary.py:725 msgid "Ident" msgstr "" #: prewikka/views/messagesummary.py:730 msgid "Origin" msgstr "" #: prewikka/views/messagesummary.py:749 prewikka/views/stats.py:448 msgid "Severity" msgstr "" #: prewikka/views/messagesummary.py:752 msgid "Completion" msgstr "" #: prewikka/views/messagesummary.py:756 prewikka/views/messagesummary.py:762 msgid "Description" msgstr "" #: prewikka/views/messagesummary.py:761 msgid "Category" msgstr "" #: prewikka/views/messagesummary.py:785 msgid "User category" msgstr "" #: prewikka/views/messagesummary.py:790 prewikka/views/messagesummary.py:809 msgid "Number" msgstr "" #: prewikka/views/messagesummary.py:791 msgid "Tty" msgstr "" #: prewikka/views/messagesummary.py:810 msgid "Permission" msgstr "" #: prewikka/views/messagesummary.py:832 msgid "Change time" msgstr "" #: prewikka/views/messagesummary.py:833 msgid "Inode Number" msgstr "" #: prewikka/views/messagesummary.py:834 msgid "Major device" msgstr "" #: prewikka/views/messagesummary.py:835 msgid "Minor device" msgstr "" #: prewikka/views/messagesummary.py:836 msgid "C Major device" msgstr "" #: prewikka/views/messagesummary.py:837 msgid "C Minor device" msgstr "" #: prewikka/views/messagesummary.py:841 #, python-format msgid "Target file %s" msgstr "" #: prewikka/views/messagesummary.py:845 msgid "Path" msgstr "" #: prewikka/views/messagesummary.py:847 msgid "Modify time" msgstr "" #: prewikka/views/messagesummary.py:848 msgid "Access time" msgstr "" #: prewikka/views/messagesummary.py:849 msgid "Data size" msgstr "" #: prewikka/views/messagesummary.py:850 msgid "Disk size" msgstr "" #: prewikka/views/messagesummary.py:869 msgid "Web Service" msgstr "" #: prewikka/views/messagesummary.py:872 msgid "Url" msgstr "" #: prewikka/views/messagesummary.py:873 msgid "Cgi" msgstr "" #: prewikka/views/messagesummary.py:874 msgid "Http Method" msgstr "" #: prewikka/views/messagesummary.py:877 msgid "CGI Argument" msgstr "" #: prewikka/views/messagesummary.py:886 msgid "SNMP Service" msgstr "" #: prewikka/views/messagesummary.py:889 msgid "oid" msgstr "" #: prewikka/views/messagesummary.py:890 msgid "messageProcessingModel" msgstr "" #: prewikka/views/messagesummary.py:891 msgid "securityModel" msgstr "" #: prewikka/views/messagesummary.py:892 msgid "securityName" msgstr "" #: prewikka/views/messagesummary.py:893 msgid "securityLevel" msgstr "" #: prewikka/views/messagesummary.py:894 msgid "contextName" msgstr "" #: prewikka/views/messagesummary.py:895 msgid "contextEngineID" msgstr "" #: prewikka/views/messagesummary.py:896 msgid "command" msgstr "" #: prewikka/views/messagesummary.py:908 msgid "Port" msgstr "" #: prewikka/views/messagesummary.py:925 msgid "PortList" msgstr "" #: prewikka/views/messagesummary.py:928 msgid "ip_version" msgstr "" #: prewikka/views/messagesummary.py:961 #, python-format msgid "Source(%d)" msgstr "" #: prewikka/views/messagesummary.py:970 #, python-format msgid "Target(%d)" msgstr "" #: prewikka/views/messagesummary.py:991 msgid "Overflow Alert" msgstr "" #: prewikka/views/messagesummary.py:994 #: prewikka/templates/AlertListing.py:1149 msgid "Alert" msgstr "" #: prewikka/views/messagesummary.py:1013 msgid "MessageID" msgstr "" #: prewikka/views/messagesummary.py:1021 msgid "Actions" msgstr "" #: prewikka/views/messagesummary.py:1060 msgid "Network centric information" msgstr "" #: prewikka/views/messagesummary.py:1080 msgid "ASCII Payload" msgstr "" #: prewikka/views/messagesummary.py:1099 msgid "Heartbeat" msgstr "" #: prewikka/views/__init__.py:45 msgid "Events" msgstr "" #: prewikka/views/__init__.py:45 prewikka/templates/SensorListing.py:547 msgid "Alerts" msgstr "" #: prewikka/views/__init__.py:46 msgid "CorrelationAlerts" msgstr "" #: prewikka/views/__init__.py:47 msgid "ToolAlerts" msgstr "" #: prewikka/views/__init__.py:50 msgid "Agents" msgstr "" #: prewikka/views/__init__.py:51 prewikka/templates/SensorListing.py:553 msgid "Heartbeats" msgstr "" #: prewikka/views/__init__.py:53 msgid "Statistics" msgstr "" #: prewikka/views/__init__.py:54 msgid "Categorizations" msgstr "" #: prewikka/views/__init__.py:55 msgid "Sources" msgstr "" #: prewikka/views/__init__.py:56 msgid "Targets" msgstr "" #: prewikka/views/__init__.py:57 msgid "Analyzers" msgstr "" #: prewikka/views/__init__.py:58 msgid "Timeline" msgstr "" #: prewikka/views/__init__.py:61 msgid "Settings" msgstr "" #: prewikka/views/__init__.py:62 msgid "Filters" msgstr "" #: prewikka/views/__init__.py:64 msgid "My account" msgstr "" #: prewikka/views/__init__.py:67 msgid "User listing" msgstr "" #: prewikka/views/__init__.py:71 msgid "About" msgstr "" #: prewikka/views/sensor.py:51 msgid "Offline" msgstr "" #: prewikka/views/sensor.py:54 msgid "Unknown" msgstr "" #: prewikka/views/sensor.py:57 msgid "Missing" msgstr "" #: prewikka/views/sensor.py:59 msgid "Online" msgstr "" #: prewikka/views/sensor.py:158 msgid "Node location n/a" msgstr "" #: prewikka/views/sensor.py:159 msgid "Node name n/a" msgstr "" #: prewikka/views/sensor.py:160 msgid "OS version n/a" msgstr "" #: prewikka/views/sensor.py:161 msgid "OS type n/a" msgstr "" #: prewikka/views/filter.py:55 msgid "Example: (A AND B) OR (C AND D)" msgstr "" #: prewikka/views/filter.py:137 prewikka/templates/FilterEdition.py:221 msgid "Load" msgstr "" #: prewikka/views/filter.py:139 prewikka/templates/FilterEdition.py:339 #: prewikka/templates/MessageListing.py:665 prewikka/templates/Stats.py:531 msgid "Save" msgstr "" #: prewikka/views/filter.py:141 prewikka/templates/FilterEdition.py:227 #: prewikka/templates/SensorListing.py:406 #: prewikka/templates/SensorListing.py:559 #: prewikka/templates/MessageListing.py:369 msgid "Delete" msgstr "" #: prewikka/views/messagelisting.py:231 prewikka/templates/AlertListing.py:327 #: prewikka/templates/AlertListing.py:349 #: prewikka/templates/AlertListing.py:1198 #: prewikka/templates/AlertListing.py:1227 msgid "n/a" msgstr "" #: prewikka/views/stats.py:425 msgid "Top 10 Classifications" msgstr "" #: prewikka/views/stats.py:425 prewikka/templates/AlertListing.py:1111 msgid "Classification" msgstr "" #: prewikka/views/stats.py:433 msgid "Top 10 Alert References" msgstr "" #: prewikka/views/stats.py:433 msgid "References" msgstr "" #: prewikka/views/stats.py:442 prewikka/views/stats.py:768 msgid "High" msgstr "" #: prewikka/views/stats.py:443 prewikka/views/stats.py:769 msgid "Medium" msgstr "" #: prewikka/views/stats.py:444 prewikka/views/stats.py:770 msgid "Low" msgstr "" #: prewikka/views/stats.py:445 prewikka/views/stats.py:771 msgid "Informational" msgstr "" #: prewikka/views/stats.py:446 prewikka/views/stats.py:772 msgid "N/a" msgstr "" #: prewikka/views/stats.py:448 msgid "Severities" msgstr "" #: prewikka/views/stats.py:455 msgid "Alert Impact Types" msgstr "" #: prewikka/views/stats.py:455 msgid "Impact Types" msgstr "" #: prewikka/views/stats.py:490 msgid "Top Source Country" msgstr "" #: prewikka/views/stats.py:490 msgid "Country" msgstr "" #: prewikka/views/stats.py:542 msgid "Top 10 Source Addresses" msgstr "" #: prewikka/views/stats.py:542 prewikka/views/stats.py:645 #: prewikka/views/stats.py:727 msgid "Address" msgstr "" #: prewikka/views/stats.py:550 msgid "Top 10 Source Users" msgstr "" #: prewikka/views/stats.py:550 prewikka/views/stats.py:653 msgid "User" msgstr "" #: prewikka/views/stats.py:645 msgid "Top 10 Targeted Addresses" msgstr "" #: prewikka/views/stats.py:653 msgid "Top 10 Targeted Users" msgstr "" #: prewikka/views/stats.py:711 msgid "Top 10 Analyzer Models" msgstr "" #: prewikka/views/stats.py:719 msgid "Top 10 Analyzer Classes" msgstr "" #: prewikka/views/stats.py:727 msgid "Top 10 Analyzer Node Addresses" msgstr "" #: prewikka/views/stats.py:735 msgid "Analyzer Locations" msgstr "" #: prewikka/views/stats.py:735 msgid "Location" msgstr "" #: prewikka/templates/About.py:107 msgid "" "provides support to Large Accounts, Major Companies and Government Agencies " "around the world, to improve and strengthen the security of their systems " "and networks." msgstr "" #: prewikka/templates/About.py:125 msgid "Customizing Prelude" msgstr "" #: prewikka/templates/About.py:132 msgid "" "In keeping with the Open Source spirit, we encourage you to participate in " "the development of your application. You can order customized versions of " "Prelude to suit your needs: adapting, adding on functionality etc. Because " "they are carried out by PreludeIDS engineers, you know that any " "modifications made to the system will be integrated optimally and guaranteed " "by our technical support department. Additionally, the company can extend " "Prelude to handle yet unsupported sensors (including proprietary), ruleset " "extension to handle new devices and porting of Prelude to unsupported " "operating systems." msgstr "" #: prewikka/templates/About.py:141 msgid "Software Maintenance and Technical Support" msgstr "" #: prewikka/templates/About.py:148 msgid "" "PreludeIDS maintenance and support services guarantee optimal operation of " "the Prelude platform on your infrastructure. There are five support packages " "that provide our customers with peace of mind, knowing that they are not " "only covered for all outcomes, but that our experts are at hand to provide " "rapid and reliable solutions." msgstr "" #: prewikka/templates/About.py:157 msgid "Commercial licenses" msgstr "" #: prewikka/templates/About.py:164 msgid "The Prelude framework is licensed under the" msgstr "" #: prewikka/templates/About.py:170 msgid "" "PreludeIDS provides specific commercial licenses to allow proprietary " "systems based on Prelude to be developed and to interoperate." msgstr "" #: prewikka/templates/About.py:179 msgid "Advice, Deployment and Training" msgstr "" #: prewikka/templates/About.py:186 msgid "" "Through our partners, you have access to an array of top-of-the-line " "security services. By advising you on how to secure your infrastructure, " "deploying Prelude and training your users, we provide a turnkey solution to " "secure your infrastructure, delivered by specialists." msgstr "" #: prewikka/templates/About.py:205 msgid "Contact" msgstr "" #: prewikka/templates/About.py:211 msgid "Office" msgstr "" #: prewikka/templates/About.py:217 msgid "Website" msgstr "" #: prewikka/templates/About.py:230 msgid "Phone:" msgstr "" #: prewikka/templates/About.py:240 msgid "Fax:" msgstr "" #: prewikka/templates/HeartbeatListing.py:100 msgid "Agent" msgstr "" #: prewikka/templates/HeartbeatListing.py:151 #: prewikka/templates/AlertListing.py:1348 msgid "Time" msgstr "" #: prewikka/templates/HeartbeatListing.py:199 msgid "Heartbeat summary" msgstr "" #: prewikka/templates/HeartbeatListing.py:208 msgid "Filter on agent" msgstr "" #: prewikka/templates/HeartbeatListing.py:229 #: prewikka/templates/SensorListing.py:316 msgid "Filter on address" msgstr "" #: prewikka/templates/FilterEdition.py:191 msgid "Available filters" msgstr "" #: prewikka/templates/FilterEdition.py:242 msgid "Edition" msgstr "" #: prewikka/templates/FilterEdition.py:302 msgid "Formula:" msgstr "" #: prewikka/templates/FilterEdition.py:314 msgid "Name:" msgstr "" #: prewikka/templates/FilterEdition.py:326 msgid "Comment:" msgstr "" #: prewikka/templates/UserListing.py:100 msgid "Login" msgstr "" #: prewikka/templates/UserListing.py:156 msgid "Delete user" msgstr "" #: prewikka/templates/UserListing.py:169 msgid "Create user" msgstr "" #: prewikka/templates/SensorListing.py:232 #, python-format msgid "%d Node" msgid_plural "%d Nodes" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:237 #, python-format msgid "%d Analyzer" msgid_plural "%d Analyzers" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:244 #, python-format msgid "%d Online" msgid_plural "%d Online" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:246 #, python-format msgid "%d Offline" msgid_plural "%d Offline" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:248 #, python-format msgid "%d Unknown" msgid_plural "%d Unknown" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:250 #, python-format msgid "%d Missing" msgid_plural "%d Missing" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:328 msgid "Address information" msgstr "" #: prewikka/templates/SensorListing.py:362 msgid "Total:" msgstr "" #: prewikka/templates/SensorListing.py:436 msgid "Last heartbeat" msgstr "" #: prewikka/templates/SensorListing.py:442 msgid "Status" msgstr "" #: prewikka/templates/SensorListing.py:481 msgid "Alert listing" msgstr "" #: prewikka/templates/SensorListing.py:490 msgid "Heartbeat listing" msgstr "" #: prewikka/templates/SensorListing.py:499 msgid "Heartbeat analysis" msgstr "" #: prewikka/templates/ClassicLayout.py:231 msgid "logout" msgstr "" #: prewikka/templates/ClassicLayout.py:243 #, python-format msgid "%(username)s on %(date)s" msgstr "" #: prewikka/templates/UserSettings.py:157 msgid "Account information" msgstr "" #: prewikka/templates/UserSettings.py:168 msgid "Login:" msgstr "" #: prewikka/templates/UserSettings.py:201 msgid "Language:" msgstr "" #: prewikka/templates/UserSettings.py:235 msgid "Permissions:" msgstr "" #: prewikka/templates/UserSettings.py:298 msgid "Check All" msgstr "" #: prewikka/templates/UserSettings.py:324 msgid "Change password" msgstr "" #: prewikka/templates/UserSettings.py:334 msgid "Current password:" msgstr "" #: prewikka/templates/UserSettings.py:344 msgid "New password:" msgstr "" #: prewikka/templates/UserSettings.py:353 msgid "Confirm new password:" msgstr "" #: prewikka/templates/UserSettings.py:366 msgid "Submit Changes" msgstr "" #: prewikka/templates/MessageListing.py:478 msgid "Period" msgstr "" #: prewikka/templates/MessageListing.py:493 msgid "Minutes" msgstr "" #: prewikka/templates/MessageListing.py:502 msgid "Hours" msgstr "" #: prewikka/templates/MessageListing.py:511 msgid "Days" msgstr "" #: prewikka/templates/MessageListing.py:520 msgid "Months" msgstr "" #: prewikka/templates/MessageListing.py:529 msgid "Years" msgstr "" #: prewikka/templates/MessageListing.py:538 msgid "Unlimited" msgstr "" #: prewikka/templates/MessageListing.py:549 msgid "Timezone" msgstr "" #: prewikka/templates/MessageListing.py:560 msgid "Frontend localtime" msgstr "" #: prewikka/templates/MessageListing.py:569 msgid "Sensor localtime" msgstr "" #: prewikka/templates/MessageListing.py:578 msgid "UTC" msgstr "" #: prewikka/templates/MessageListing.py:589 msgid "Limit" msgstr "" #: prewikka/templates/MessageListing.py:613 msgid "Refresh" msgstr "" #: prewikka/templates/MessageListing.py:660 prewikka/templates/Stats.py:526 msgid "Apply" msgstr "" #: prewikka/templates/MessageListing.py:708 #: prewikka/templates/MessageListing.py:716 msgid "prev" msgstr "" #: prewikka/templates/MessageListing.py:729 #: prewikka/templates/MessageListing.py:737 msgid "current" msgstr "" #: prewikka/templates/MessageListing.py:750 #: prewikka/templates/MessageListing.py:758 msgid "next" msgstr "" #: prewikka/templates/MessageListing.py:812 msgid "total" msgstr "" #: prewikka/templates/AlertListing.py:112 msgid "Equal" msgstr "" #: prewikka/templates/AlertListing.py:118 msgid "Not equal" msgstr "" #: prewikka/templates/AlertListing.py:124 msgid "Lesser than" msgstr "" #: prewikka/templates/AlertListing.py:130 msgid "Greater than" msgstr "" #: prewikka/templates/AlertListing.py:136 msgid "Lesser or equal" msgstr "" #: prewikka/templates/AlertListing.py:142 msgid "Greater or equal" msgstr "" #: prewikka/templates/AlertListing.py:148 msgid "Substring" msgstr "" #: prewikka/templates/AlertListing.py:154 msgid "Substring (case-insensitive)" msgstr "" #: prewikka/templates/AlertListing.py:160 msgid "Regular expression" msgstr "" #: prewikka/templates/AlertListing.py:166 msgid "Regular expression (case-insensitive)" msgstr "" #: prewikka/templates/AlertListing.py:319 #: prewikka/templates/AlertListing.py:1190 msgid "info" msgstr "" #: prewikka/templates/AlertListing.py:321 #: prewikka/templates/AlertListing.py:1192 msgid "low" msgstr "" #: prewikka/templates/AlertListing.py:323 #: prewikka/templates/AlertListing.py:1194 msgid "medium" msgstr "" #: prewikka/templates/AlertListing.py:325 #: prewikka/templates/AlertListing.py:1196 msgid "high" msgstr "" #: prewikka/templates/AlertListing.py:345 #: prewikka/templates/AlertListing.py:1223 msgid "succeeded" msgstr "" #: prewikka/templates/AlertListing.py:347 #: prewikka/templates/AlertListing.py:1225 msgid "failed" msgstr "" #: prewikka/templates/AlertListing.py:843 msgid "Filter on" msgstr "" #: prewikka/templates/AlertListing.py:963 msgid "Group entry by:" msgstr "" #: prewikka/templates/AlertListing.py:1027 #: prewikka/templates/AlertListing.py:1035 msgid "filtered" msgstr "" #: prewikka/templates/AlertListing.py:1136 msgid "Type:" msgstr "" #: prewikka/templates/AlertListing.py:1151 msgid "CorrelationAlert" msgstr "" #: prewikka/templates/AlertListing.py:1153 msgid "OverflowAlert" msgstr "" #: prewikka/templates/AlertListing.py:1155 msgid "ToolAlert" msgstr "" #: prewikka/templates/AlertListing.py:1184 msgid "Severity:" msgstr "" #: prewikka/templates/AlertListing.py:1215 msgid "Completion:" msgstr "" #: prewikka/templates/AlertListing.py:1253 msgid "Source" msgstr "" #: prewikka/templates/AlertListing.py:1285 msgid "Target" msgstr "" #: prewikka/templates/AlertListing.py:1317 msgid "Analyzer" msgstr "" #: prewikka/templates/AlertListing.py:1459 msgid "See alert detail" msgstr "" #: prewikka/templates/AlertListing.py:1468 msgid "Filter on this classification.text" msgstr "" #: prewikka/templates/AlertListing.py:1522 msgid "Filter on this port/protocol" msgstr "" #: prewikka/templates/AlertListing.py:1541 #: prewikka/templates/AlertListing.py:1549 msgid "Port/protocol information" msgstr "" #: prewikka/templates/AlertListing.py:1598 msgid "alert" msgid_plural "alerts" msgstr[0] "" msgstr[1] "" #: prewikka/templates/AlertListing.py:1622 #, python-format msgid "%(hidden)d of %(total)d alerts not shown..." msgstr "" #: prewikka/templates/AlertListing.py:1633 #: prewikka/templates/AlertListing.py:1825 msgid "expand" msgstr "" #: prewikka/templates/AlertListing.py:1778 msgid "Filter on this reference" msgstr "" #: prewikka/templates/AlertListing.py:1802 msgid "source" msgstr "" #: prewikka/templates/AlertListing.py:1804 msgid "target" msgstr "" #: prewikka/templates/AlertListing.py:1814 #, python-format msgid "%(hidden)d of %(total)d %(name)ss not shown..." msgstr "" #: prewikka/templates/AlertListing.py:1856 #, python-format msgid "Filter on this %s" msgstr "" #: prewikka/templates/AlertListing.py:1874 #, python-format msgid "%s information" msgstr "" #: prewikka/templates/AlertListing.py:2114 msgid "Filter" msgstr "" #: prewikka/templates/LoginPasswordForm.py:130 msgid "Submit" msgstr "" #: prewikka/templates/Stats.py:356 msgid "Filter:" msgstr "" #: prewikka/templates/Stats.py:386 msgid "Time:" msgstr "" #: prewikka/templates/Stats.py:397 msgid "Hour" msgstr "" #: prewikka/templates/Stats.py:406 msgid "Day" msgstr "" #: prewikka/templates/Stats.py:415 msgid "Month" msgstr "" #: prewikka/templates/Stats.py:424 msgid "Custom" msgstr "" #: prewikka/templates/Stats.py:434 msgid "From:" msgstr "" #: prewikka/templates/Stats.py:477 msgid "To:" msgstr "" #: prewikka/modules/auth/cgi/cgi.py:41 msgid "CGI Authentication failed: no user specified." msgstr "" prewikka-1.0.0/README0000664000076400007640000000351511200051577013253 0ustar yoannyoannPrewikka: The Prelude-IDS console. Prewikka is brought to you by PreludeIDS Technologies (http://www.prelude-ids.com). Prewikka Overview ================= Originally written by Markus Alkio and Miika Keskinen, re-written and maintained by Nicolas Delon with the help of Yoann Vandoorselaere and Audrey Girard, on behalf of PreludeIDS Technologies, it was rapidly adopted as the new Prelude frontend. Prewikka is a professional looking application providing advanced feature like contextual filtering, aggregation, etc. Functionality Enhencement ========================= Prewikka functionality enhencement are available from the PreludeIDS Technologies company: http://www.prelude-ids.com, info@prelude-ids.com IRC === If there's something you just can't find out elsewhere, you want to give feedback directly to the authors or you're just bored, visit #prelude on irc.freenode.net Get Support =========== Prelude-user mailing list archives can be accessed at: http://www.prelude-ids.org/mailman/listinfo Commercial Support is available through the PreludeIDS Technologies company: http://www.prelude-ids.com, info@prelude-ids.com Help development ================ 1. SUBMITTING PATCHES The Prelude source is constantly changing. If you want to submit a patch, please do so from the most recent CVS source tree, subscribe to the prelude-devel mailing list by sending a mail to: prelude-devel-subscribe@prelude-ids.org and post your patch with a description of functionality. You can also attach patches to bugs on http://trac.prelude-ids.org 2. BUGS If you find any bugs, please report them to: http://trac.prelude-ids.org Please make sure that what you're reporting is actually a BUG and not a problem on your side. 3. SUGGESTIONS Subscribe to prelude-devel and give us your suggestions. prewikka-1.0.0/cgi-bin/0000775000076400007640000000000011347720623013706 5ustar yoannyoannprewikka-1.0.0/cgi-bin/prewikka.cgi0000775000076400007640000000506511200051577016211 0ustar yoannyoann#!/usr/bin/env python # Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import sys, os import copy import cgi from prewikka import Core, Request, Error, localization class CGIRequest(Request.Request): def init(self): Request.Request.init(self) fs = cgi.FieldStorage() for key in fs.keys(): self.arguments[key] = fs.getvalue(key) for key in fs.headers.keys(): self.input_headers[key] = fs.headers.get(key) def read(self, *args): return apply(sys.stdin.read, args) def write(self, data): sys.stdout.write(data) def getQueryString(self): return os.environ.get("REQUEST_URI", "").strip() def getClientAddr(self): return os.environ.get("REMOTE_ADDR", "").strip() def getClientPort(self): return int(os.environ.get("REMOTE_PORT", "0").strip()) def getServerAddr(self): return os.environ.get("SERVER_ADDR", "").strip() def getServerPort(self): return os.environ.get("SERVER_PORT", "").strip() def getUserAgent(self): return os.environ.get("USER_AGENT", "").strip() def getMethod(self): return os.environ.get("REQUEST_METHOD", "").strip() def getURI(self): return os.environ.get("REQUEST_URI", "").strip() def getCookieString(self): return os.environ.get("HTTP_COOKIE", "").strip() def getReferer(self): return os.environ.get("HTTP_REFERER", "").strip() def getRemoteUser(self): user = os.environ.get("REMOTE_USER", None) if user: user.strip() return user request = CGIRequest() request.init() core = Core.get_core_from_config(os.environ.get("PREWIKKA_CONFIG", None), threaded=False) core.process(request) prewikka-1.0.0/po/0000775000076400007640000000000011347720623013014 5ustar yoannyoannprewikka-1.0.0/po/pl.po0000664000076400007640000007602211340777332014000 0ustar yoannyoannmsgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-02-10 13:34+0100\n" "PO-Revision-Date: 2008-03-04 09:30+0100\n" "Last-Translator: Konrad Kosmowski \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Polish\n" "X-Poedit-Country: POLAND\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" #: prewikka/User.py:41 msgid "Permission Denied" msgstr "Odmowa dostępu" #: prewikka/User.py:42 #, python-format msgid "Access to view '%s' forbidden" msgstr "Odmowa dostępu do widoku '%s'" #: prewikka/Auth.py:29 msgid "Authentication failed" msgstr "Błąd uwierzytelniania" #: prewikka/Auth.py:35 msgid "Invalid session" msgstr "Nieprawidłowa sesja" #: prewikka/Auth.py:41 msgid "Session expired" msgstr "Sesja wygasła" #: prewikka/Auth.py:138 msgid "Logged out" msgstr "Wylogowany" #: prewikka/Log.py:65 #, python-format msgid "Unknown logtype specified: '%s'" msgstr "Nieznany typ pliku dziennika '%s'" #: prewikka/view.py:29 prewikka/view.py:35 prewikka/view.py:41 msgid "Parameters Normalization failed" msgstr "Normalizacja parametrów nie powiodła się" #: prewikka/Database.py:98 #, python-format msgid "" "Database schema version %(version)s found when %(reqversion)s was required" msgstr "" "Schemat bazy danych w wersji %(version)s, wymagana wersja schematu %" "(reqversion)s." #: prewikka/localization.py:107 msgid "January" msgstr "Styczeń" #: prewikka/localization.py:108 msgid "February" msgstr "Luty" #: prewikka/localization.py:109 msgid "March" msgstr "Marzec" #: prewikka/localization.py:110 msgid "April" msgstr "Kwiecień" #: prewikka/localization.py:111 msgid "May" msgstr "Maj" #: prewikka/localization.py:112 msgid "June" msgstr "Czerwiec" #: prewikka/localization.py:113 msgid "July" msgstr "Lipiec" #: prewikka/localization.py:114 msgid "August" msgstr "Sierpień" #: prewikka/localization.py:115 msgid "September" msgstr "Wrzesień" #: prewikka/localization.py:116 msgid "November" msgstr "Październik" #: prewikka/localization.py:117 msgid "October" msgstr "Listopad" #: prewikka/localization.py:118 msgid "December" msgstr "Grudzień" #: prewikka/localization.py:120 msgid "Monday" msgstr "Poniedziałek" #: prewikka/localization.py:121 msgid "Tuesday" msgstr "Wtorek" #: prewikka/localization.py:122 msgid "Wednesday" msgstr "Środa" #: prewikka/localization.py:123 msgid "Thursday" msgstr "Czwartek" #: prewikka/localization.py:124 msgid "Friday" msgstr "Piątek" #: prewikka/localization.py:125 msgid "Saturday" msgstr "Sobota" #: prewikka/localization.py:126 msgid "Sunday" msgstr "Niedziela" #: prewikka/Filter.py:78 #, python-format msgid "Invalid filter element '%s' referenced from filter formula" msgstr "Nieprawidłowy element filtra '%s' wywołany z formuły" #: prewikka/views/messagesummary.py:304 prewikka/views/messagesummary.py:461 #: prewikka/views/messagesummary.py:691 prewikka/views/messagesummary.py:708 #: prewikka/views/messagesummary.py:731 prewikka/views/messagesummary.py:789 #: prewikka/views/messagesummary.py:808 prewikka/views/messagesummary.py:844 #: prewikka/templates/SensorListing.py:412 msgid "Name" msgstr "Nazwa" #: prewikka/views/messagesummary.py:305 prewikka/views/messagesummary.py:611 msgid "Code" msgstr "Kod" #: prewikka/views/messagesummary.py:306 msgid "Data length" msgstr "Długość danych" #: prewikka/views/messagesummary.py:307 msgid "Data" msgstr "Dane" #: prewikka/views/messagesummary.py:403 prewikka/views/messagesummary.py:846 msgid "Create time" msgstr "Data utworzenia" #: prewikka/views/messagesummary.py:406 msgid "Detect time" msgstr "Data wykrycia" #: prewikka/views/messagesummary.py:411 msgid "Analyzer time" msgstr "Czas analizatora" #: prewikka/views/messagesummary.py:417 msgid "Process" msgstr "Proces" #: prewikka/views/messagesummary.py:418 msgid "Process Path" msgstr "Ścieżka procesu" #: prewikka/views/messagesummary.py:419 msgid "Process PID" msgstr "Identyfikator procesu" #: prewikka/views/messagesummary.py:427 msgid "Node location" msgstr "Lokalizacja węzła" #: prewikka/views/messagesummary.py:449 #: prewikka/templates/HeartbeatListing.py:126 msgid "Node name" msgstr "Nazwa węzła" #: prewikka/views/messagesummary.py:452 #, fuzzy msgid "Node name (resolved)" msgstr "Nazwa węzła" #: prewikka/views/messagesummary.py:454 #: prewikka/templates/HeartbeatListing.py:113 msgid "Node address" msgstr "Adres węzła" #: prewikka/views/messagesummary.py:460 prewikka/views/stats.py:711 #: prewikka/templates/HeartbeatListing.py:139 #: prewikka/templates/SensorListing.py:418 msgid "Model" msgstr "Typ" #: prewikka/views/messagesummary.py:462 msgid "Analyzerid" msgstr "ID analizatora" #: prewikka/views/messagesummary.py:463 prewikka/views/messagesummary.py:563 #: prewikka/templates/SensorListing.py:424 msgid "Version" msgstr "Wersja" #: prewikka/views/messagesummary.py:464 prewikka/views/stats.py:719 #: prewikka/templates/SensorListing.py:430 msgid "Class" msgstr "Klasa" #: prewikka/views/messagesummary.py:466 msgid "Manufacturer" msgstr "Dostawca" #: prewikka/views/messagesummary.py:474 msgid "Operating System" msgstr "System operacyjny" #: prewikka/views/messagesummary.py:492 #, python-format msgid "Analyzer Path (%d not shown)" msgstr "Ścieżka analizatora (%d ukryte)" #: prewikka/views/messagesummary.py:499 prewikka/views/messagesummary.py:1030 #: prewikka/views/messagesummary.py:1102 #, python-format msgid "Analyzer #%d" msgstr "Analizator nr %d" #: prewikka/views/messagesummary.py:509 msgid "Additional data" msgstr "Dodatkowe dane" #: prewikka/views/messagesummary.py:512 prewikka/views/messagesummary.py:732 msgid "Meaning" msgstr "Zmienna" #: prewikka/views/messagesummary.py:513 msgid "Value" msgstr "Wartość" #: prewikka/views/messagesummary.py:564 prewikka/views/messagesummary.py:585 msgid "Header length" msgstr "Nagłówek" #: prewikka/views/messagesummary.py:565 msgid "TOS" msgstr "TOS" #: prewikka/views/messagesummary.py:566 prewikka/views/messagesummary.py:604 msgid "Length" msgstr "Wielkość" #: prewikka/views/messagesummary.py:567 prewikka/views/messagesummary.py:613 msgid "Id" msgstr "ID" #: prewikka/views/messagesummary.py:571 msgid "Ip offset" msgstr "Ofset IP" #: prewikka/views/messagesummary.py:572 msgid "TTL" msgstr "TTL" #: prewikka/views/messagesummary.py:573 prewikka/views/messagesummary.py:932 #: prewikka/views/messagesummary.py:935 prewikka/views/messagesummary.py:938 msgid "Protocol" msgstr "Protokół" #: prewikka/views/messagesummary.py:574 prewikka/views/messagesummary.py:596 #: prewikka/views/messagesummary.py:605 prewikka/views/messagesummary.py:612 msgid "Checksum" msgstr "Suma" #: prewikka/views/messagesummary.py:575 msgid "Source address" msgstr "IP źródłowy" #: prewikka/views/messagesummary.py:576 msgid "Target address" msgstr "IP docelowy" #: prewikka/views/messagesummary.py:581 prewikka/views/messagesummary.py:602 msgid "Source port" msgstr "Port źródłowy" #: prewikka/views/messagesummary.py:582 prewikka/views/messagesummary.py:603 msgid "Target port" msgstr "Port docelowy" #: prewikka/views/messagesummary.py:586 msgid "Reserved" msgstr "Rezerw." #: prewikka/views/messagesummary.py:595 msgid "Window" msgstr "Okno" #: prewikka/views/messagesummary.py:597 msgid "URP" msgstr "URP" #: prewikka/views/messagesummary.py:610 prewikka/views/messagesummary.py:755 #: prewikka/views/messagesummary.py:788 prewikka/views/messagesummary.py:807 msgid "Type" msgstr "Typ" #: prewikka/views/messagesummary.py:614 msgid "Seq #" msgstr "Nr sekw." #: prewikka/views/messagesummary.py:615 msgid "Mask" msgstr "Maska" #: prewikka/views/messagesummary.py:616 msgid "Gateway Address" msgstr "Adres bramy" #: prewikka/views/messagesummary.py:617 msgid "Num address" msgstr "Adres numeryczny" #: prewikka/views/messagesummary.py:618 msgid "Wpa" msgstr "WPA" #: prewikka/views/messagesummary.py:619 msgid "Lifetime" msgstr "Czas życia" #: prewikka/views/messagesummary.py:620 msgid "Otime" msgstr "Otime" #: prewikka/views/messagesummary.py:621 msgid "Rtime" msgstr "Rtime" #: prewikka/views/messagesummary.py:622 msgid "Ttime" msgstr "Ttime" #: prewikka/views/messagesummary.py:628 prewikka/views/messagesummary.py:1077 msgid "Payload" msgstr "Zawartość" #: prewikka/views/messagesummary.py:675 #, python-format msgid "%d linked alerts missing (probably deleted)" msgstr "" #: prewikka/views/messagesummary.py:689 prewikka/views/messagesummary.py:985 #: prewikka/views/alertlisting.py:707 msgid "Correlation Alert" msgstr "Alert korelacji" #: prewikka/views/messagesummary.py:695 msgid "Correlated Alert" msgstr "Alert skorelowany" #: prewikka/views/messagesummary.py:696 prewikka/views/messagesummary.py:713 msgid "Source Analyzer" msgstr "Analizator źródłowy" #: prewikka/views/messagesummary.py:706 prewikka/views/messagesummary.py:988 #: prewikka/views/alertlisting.py:711 msgid "Tool Alert" msgstr "Alert narzędzia" #: prewikka/views/messagesummary.py:712 msgid "Linked Alert" msgstr "Alert połączony" #: prewikka/views/messagesummary.py:723 msgid "Text" msgstr "Tekst" #: prewikka/views/messagesummary.py:725 msgid "Ident" msgstr "Identyfikator" #: prewikka/views/messagesummary.py:730 msgid "Origin" msgstr "Pochodzenie" #: prewikka/views/messagesummary.py:749 prewikka/views/stats.py:448 msgid "Severity" msgstr "Krytyczność" #: prewikka/views/messagesummary.py:752 msgid "Completion" msgstr "Wykonanie" #: prewikka/views/messagesummary.py:756 prewikka/views/messagesummary.py:762 msgid "Description" msgstr "Opis" #: prewikka/views/messagesummary.py:761 msgid "Category" msgstr "Kategoria" #: prewikka/views/messagesummary.py:785 msgid "User category" msgstr "Kategoria użytkownika" #: prewikka/views/messagesummary.py:790 prewikka/views/messagesummary.py:809 msgid "Number" msgstr "Numer" #: prewikka/views/messagesummary.py:791 msgid "Tty" msgstr "TTY" #: prewikka/views/messagesummary.py:810 msgid "Permission" msgstr "Uprawnienia" #: prewikka/views/messagesummary.py:832 msgid "Change time" msgstr "Data zmiany" #: prewikka/views/messagesummary.py:833 msgid "Inode Number" msgstr "Numer 'inode'" #: prewikka/views/messagesummary.py:834 msgid "Major device" msgstr "Numer 'major' urządzenia" #: prewikka/views/messagesummary.py:835 msgid "Minor device" msgstr "Numer 'minor' urządzenia" #: prewikka/views/messagesummary.py:836 msgid "C Major device" msgstr "Urządzenie 'C major'" #: prewikka/views/messagesummary.py:837 msgid "C Minor device" msgstr "Urządzenie 'C minor'" #: prewikka/views/messagesummary.py:841 #, python-format msgid "Target file %s" msgstr "Docelowy plik %s" #: prewikka/views/messagesummary.py:845 msgid "Path" msgstr "Ścieżka" #: prewikka/views/messagesummary.py:847 msgid "Modify time" msgstr "Data modyfikacji" #: prewikka/views/messagesummary.py:848 msgid "Access time" msgstr "Data dostępu" #: prewikka/views/messagesummary.py:849 msgid "Data size" msgstr "Rozmiar danych" #: prewikka/views/messagesummary.py:850 msgid "Disk size" msgstr "Rozmiar dysku" #: prewikka/views/messagesummary.py:869 msgid "Web Service" msgstr "Usługa web" #: prewikka/views/messagesummary.py:872 msgid "Url" msgstr "URL" #: prewikka/views/messagesummary.py:873 msgid "Cgi" msgstr "CGI" #: prewikka/views/messagesummary.py:874 msgid "Http Method" msgstr "Metoda HTTP" #: prewikka/views/messagesummary.py:877 msgid "CGI Argument" msgstr "Argument CGI" #: prewikka/views/messagesummary.py:886 msgid "SNMP Service" msgstr "Usługa SNMP" #: prewikka/views/messagesummary.py:889 msgid "oid" msgstr "OID" #: prewikka/views/messagesummary.py:890 msgid "messageProcessingModel" msgstr "" #: prewikka/views/messagesummary.py:891 msgid "securityModel" msgstr "" #: prewikka/views/messagesummary.py:892 msgid "securityName" msgstr "" #: prewikka/views/messagesummary.py:893 msgid "securityLevel" msgstr "" #: prewikka/views/messagesummary.py:894 msgid "contextName" msgstr "" #: prewikka/views/messagesummary.py:895 msgid "contextEngineID" msgstr "" #: prewikka/views/messagesummary.py:896 msgid "command" msgstr "polecenie" #: prewikka/views/messagesummary.py:908 msgid "Port" msgstr "Port" #: prewikka/views/messagesummary.py:925 #, fuzzy msgid "PortList" msgstr "Port" #: prewikka/views/messagesummary.py:928 #, fuzzy msgid "ip_version" msgstr "Wersja" #: prewikka/views/messagesummary.py:961 #, python-format msgid "Source(%d)" msgstr "Źródło(%d)" #: prewikka/views/messagesummary.py:970 #, python-format msgid "Target(%d)" msgstr "Cel(%d)" #: prewikka/views/messagesummary.py:991 msgid "Overflow Alert" msgstr "Alert przeładowania" #: prewikka/views/messagesummary.py:994 #: prewikka/templates/AlertListing.py:1149 msgid "Alert" msgstr "Alert" #: prewikka/views/messagesummary.py:1013 msgid "MessageID" msgstr "" #: prewikka/views/messagesummary.py:1021 msgid "Actions" msgstr "Akcje" #: prewikka/views/messagesummary.py:1060 msgid "Network centric information" msgstr "Informacje dotyczące sieci" #: prewikka/views/messagesummary.py:1080 msgid "ASCII Payload" msgstr "Zawartość (ASCII)" #: prewikka/views/messagesummary.py:1099 msgid "Heartbeat" msgstr "Tętno" #: prewikka/views/__init__.py:45 msgid "Events" msgstr "Zdarzenia" #: prewikka/views/__init__.py:45 prewikka/templates/SensorListing.py:547 msgid "Alerts" msgstr "Alerty" #: prewikka/views/__init__.py:46 msgid "CorrelationAlerts" msgstr "Alerty korelacji" #: prewikka/views/__init__.py:47 msgid "ToolAlerts" msgstr "Alerty narzędzi" #: prewikka/views/__init__.py:50 msgid "Agents" msgstr "Agenci" #: prewikka/views/__init__.py:51 prewikka/templates/SensorListing.py:553 msgid "Heartbeats" msgstr "Tętno" #: prewikka/views/__init__.py:53 #, fuzzy msgid "Statistics" msgstr "Status" #: prewikka/views/__init__.py:54 #, fuzzy msgid "Categorizations" msgstr "Kategoria" #: prewikka/views/__init__.py:55 #, fuzzy msgid "Sources" msgstr "Źródło" #: prewikka/views/__init__.py:56 #, fuzzy msgid "Targets" msgstr "Cel" #: prewikka/views/__init__.py:57 #, fuzzy msgid "Analyzers" msgstr "ID analizatora" #: prewikka/views/__init__.py:58 #, fuzzy msgid "Timeline" msgstr "Czas" #: prewikka/views/__init__.py:61 msgid "Settings" msgstr "Ustawienia" #: prewikka/views/__init__.py:62 msgid "Filters" msgstr "Filtry" #: prewikka/views/__init__.py:64 msgid "My account" msgstr "Moje konto" #: prewikka/views/__init__.py:67 msgid "User listing" msgstr "Użytkownicy" #: prewikka/views/__init__.py:71 msgid "About" msgstr "O systemie" #: prewikka/views/sensor.py:51 msgid "Offline" msgstr "Niedostepny" #: prewikka/views/sensor.py:54 msgid "Unknown" msgstr "Nieznany" #: prewikka/views/sensor.py:57 msgid "Missing" msgstr "Brakujący" #: prewikka/views/sensor.py:59 msgid "Online" msgstr "Dostępny" #: prewikka/views/sensor.py:158 msgid "Node location n/a" msgstr "Lokalizacja węzła - bd." #: prewikka/views/sensor.py:159 msgid "Node name n/a" msgstr "Nazwa węzła - bd." #: prewikka/views/sensor.py:160 msgid "OS version n/a" msgstr "Wersja systemu - bd." #: prewikka/views/sensor.py:161 msgid "OS type n/a" msgstr "Typ systemu - bd." #: prewikka/views/filter.py:55 msgid "Example: (A AND B) OR (C AND D)" msgstr "Przykład: (A AND B) OR (C AND D)" #: prewikka/views/filter.py:137 prewikka/templates/FilterEdition.py:221 msgid "Load" msgstr "Wczytaj" #: prewikka/views/filter.py:139 prewikka/templates/FilterEdition.py:339 #: prewikka/templates/MessageListing.py:665 prewikka/templates/Stats.py:531 msgid "Save" msgstr "Zapisz" #: prewikka/views/filter.py:141 prewikka/templates/FilterEdition.py:227 #: prewikka/templates/SensorListing.py:406 #: prewikka/templates/SensorListing.py:559 #: prewikka/templates/MessageListing.py:369 msgid "Delete" msgstr "Usuń" #: prewikka/views/messagelisting.py:231 prewikka/templates/AlertListing.py:327 #: prewikka/templates/AlertListing.py:349 #: prewikka/templates/AlertListing.py:1198 #: prewikka/templates/AlertListing.py:1227 msgid "n/a" msgstr "" #: prewikka/views/stats.py:425 #, fuzzy msgid "Top 10 Classifications" msgstr "Klasyfikacja" #: prewikka/views/stats.py:425 prewikka/templates/AlertListing.py:1111 msgid "Classification" msgstr "Klasyfikacja" #: prewikka/views/stats.py:433 msgid "Top 10 Alert References" msgstr "" #: prewikka/views/stats.py:433 #, fuzzy msgid "References" msgstr "Odśwież" #: prewikka/views/stats.py:442 prewikka/views/stats.py:768 msgid "High" msgstr "" #: prewikka/views/stats.py:443 prewikka/views/stats.py:769 msgid "Medium" msgstr "" #: prewikka/views/stats.py:444 prewikka/views/stats.py:770 msgid "Low" msgstr "" #: prewikka/views/stats.py:445 prewikka/views/stats.py:771 #, fuzzy msgid "Informational" msgstr "Info: %s" #: prewikka/views/stats.py:446 prewikka/views/stats.py:772 msgid "N/a" msgstr "" #: prewikka/views/stats.py:448 #, fuzzy msgid "Severities" msgstr "Krytyczność" #: prewikka/views/stats.py:455 msgid "Alert Impact Types" msgstr "" #: prewikka/views/stats.py:455 msgid "Impact Types" msgstr "" #: prewikka/views/stats.py:490 #, fuzzy msgid "Top Source Country" msgstr "Port źródłowy" #: prewikka/views/stats.py:490 msgid "Country" msgstr "" #: prewikka/views/stats.py:542 #, fuzzy msgid "Top 10 Source Addresses" msgstr "IP źródłowy" #: prewikka/views/stats.py:542 prewikka/views/stats.py:645 #: prewikka/views/stats.py:727 #, fuzzy msgid "Address" msgstr "Adres numeryczny" #: prewikka/views/stats.py:550 msgid "Top 10 Source Users" msgstr "" #: prewikka/views/stats.py:550 prewikka/views/stats.py:653 msgid "User" msgstr "" #: prewikka/views/stats.py:645 #, fuzzy msgid "Top 10 Targeted Addresses" msgstr "IP docelowy" #: prewikka/views/stats.py:653 msgid "Top 10 Targeted Users" msgstr "" #: prewikka/views/stats.py:711 msgid "Top 10 Analyzer Models" msgstr "" #: prewikka/views/stats.py:719 msgid "Top 10 Analyzer Classes" msgstr "" #: prewikka/views/stats.py:727 msgid "Top 10 Analyzer Node Addresses" msgstr "" #: prewikka/views/stats.py:735 #, fuzzy msgid "Analyzer Locations" msgstr "Czas analizatora" #: prewikka/views/stats.py:735 #, fuzzy msgid "Location" msgstr "Lokalizacja węzła" #: prewikka/templates/About.py:107 msgid "" "provides support to Large Accounts, Major Companies and Government Agencies " "around the world, to improve and strengthen the security of their systems " "and networks." msgstr "" #: prewikka/templates/About.py:125 msgid "Customizing Prelude" msgstr "" #: prewikka/templates/About.py:132 msgid "" "In keeping with the Open Source spirit, we encourage you to participate in " "the development of your application. You can order customized versions of " "Prelude to suit your needs: adapting, adding on functionality etc. Because " "they are carried out by PreludeIDS engineers, you know that any " "modifications made to the system will be integrated optimally and guaranteed " "by our technical support department. Additionally, the company can extend " "Prelude to handle yet unsupported sensors (including proprietary), ruleset " "extension to handle new devices and porting of Prelude to unsupported " "operating systems." msgstr "" #: prewikka/templates/About.py:141 msgid "Software Maintenance and Technical Support" msgstr "" #: prewikka/templates/About.py:148 msgid "" "PreludeIDS maintenance and support services guarantee optimal operation of " "the Prelude platform on your infrastructure. There are five support packages " "that provide our customers with peace of mind, knowing that they are not " "only covered for all outcomes, but that our experts are at hand to provide " "rapid and reliable solutions." msgstr "" #: prewikka/templates/About.py:157 msgid "Commercial licenses" msgstr "" #: prewikka/templates/About.py:164 msgid "The Prelude framework is licensed under the" msgstr "" #: prewikka/templates/About.py:170 msgid "" "PreludeIDS provides specific commercial licenses to allow proprietary " "systems based on Prelude to be developed and to interoperate." msgstr "" #: prewikka/templates/About.py:179 msgid "Advice, Deployment and Training" msgstr "" #: prewikka/templates/About.py:186 msgid "" "Through our partners, you have access to an array of top-of-the-line " "security services. By advising you on how to secure your infrastructure, " "deploying Prelude and training your users, we provide a turnkey solution to " "secure your infrastructure, delivered by specialists." msgstr "" #: prewikka/templates/About.py:205 msgid "Contact" msgstr "" #: prewikka/templates/About.py:211 msgid "Office" msgstr "" #: prewikka/templates/About.py:217 msgid "Website" msgstr "" #: prewikka/templates/About.py:230 msgid "Phone:" msgstr "" #: prewikka/templates/About.py:240 msgid "Fax:" msgstr "" #: prewikka/templates/HeartbeatListing.py:100 msgid "Agent" msgstr "Agent" #: prewikka/templates/HeartbeatListing.py:151 #: prewikka/templates/AlertListing.py:1348 msgid "Time" msgstr "Czas" #: prewikka/templates/HeartbeatListing.py:199 msgid "Heartbeat summary" msgstr "Podsumowanie tętna" #: prewikka/templates/HeartbeatListing.py:208 msgid "Filter on agent" msgstr "Filtruj po agencie" #: prewikka/templates/HeartbeatListing.py:229 #: prewikka/templates/SensorListing.py:316 msgid "Filter on address" msgstr "Filtr po adresie" #: prewikka/templates/FilterEdition.py:191 msgid "Available filters" msgstr "Dostępne filtry" #: prewikka/templates/FilterEdition.py:242 msgid "Edition" msgstr "Edycja filtra" #: prewikka/templates/FilterEdition.py:302 msgid "Formula:" msgstr "Formuła:" #: prewikka/templates/FilterEdition.py:314 msgid "Name:" msgstr "Nazwa:" #: prewikka/templates/FilterEdition.py:326 msgid "Comment:" msgstr "Komentarz:" #: prewikka/templates/UserListing.py:100 msgid "Login" msgstr "Zaloguj" #: prewikka/templates/UserListing.py:156 msgid "Delete user" msgstr "Usuń konto" #: prewikka/templates/UserListing.py:169 msgid "Create user" msgstr "Utwórz konto" #: prewikka/templates/SensorListing.py:232 #, python-format msgid "%d Node" msgid_plural "%d Nodes" msgstr[0] "%d węzeł" msgstr[1] "%d węzły" msgstr[2] "%d węzłów" #: prewikka/templates/SensorListing.py:237 #, python-format msgid "%d Analyzer" msgid_plural "%d Analyzers" msgstr[0] "%d analizator" msgstr[1] "%d analizatory" msgstr[2] "%d analizatorów" #: prewikka/templates/SensorListing.py:244 #, fuzzy, python-format msgid "%d Online" msgid_plural "%d Online" msgstr[0] "%d dostępny" msgstr[1] "%d dostępne" msgstr[2] "%d dostępnych" #: prewikka/templates/SensorListing.py:246 #, fuzzy, python-format msgid "%d Offline" msgid_plural "%d Offline" msgstr[0] "%d niedostępny" msgstr[1] "%d niedostępne" msgstr[2] "%d niedostępnych" #: prewikka/templates/SensorListing.py:248 #, fuzzy, python-format msgid "%d Unknown" msgid_plural "%d Unknown" msgstr[0] "%d nieznany" msgstr[1] "%d nieznane" msgstr[2] "%d nieznanych" #: prewikka/templates/SensorListing.py:250 #, fuzzy, python-format msgid "%d Missing" msgid_plural "%d Missing" msgstr[0] "%d brakujący" msgstr[1] "%d brakujące" msgstr[2] "%d brakujących" #: prewikka/templates/SensorListing.py:328 msgid "Address information" msgstr "Informacje o adresie" #: prewikka/templates/SensorListing.py:362 msgid "Total:" msgstr "Wszystkich:" #: prewikka/templates/SensorListing.py:436 msgid "Last heartbeat" msgstr "Ostatnie tętno" #: prewikka/templates/SensorListing.py:442 msgid "Status" msgstr "Status" #: prewikka/templates/SensorListing.py:481 msgid "Alert listing" msgstr "Lista alertów" #: prewikka/templates/SensorListing.py:490 msgid "Heartbeat listing" msgstr "Lista informacji tętna" #: prewikka/templates/SensorListing.py:499 msgid "Heartbeat analysis" msgstr "Analiza tętna" #: prewikka/templates/ClassicLayout.py:231 msgid "logout" msgstr "Wyloguj" #: prewikka/templates/ClassicLayout.py:243 #, python-format msgid "%(username)s on %(date)s" msgstr "%(username)s %(date)s" #: prewikka/templates/UserSettings.py:157 msgid "Account information" msgstr "Informacje konta" #: prewikka/templates/UserSettings.py:168 msgid "Login:" msgstr "Konto:" #: prewikka/templates/UserSettings.py:201 msgid "Language:" msgstr "Język:" #: prewikka/templates/UserSettings.py:235 msgid "Permissions:" msgstr "Uprawnienia:" #: prewikka/templates/UserSettings.py:298 msgid "Check All" msgstr "Wszystkie" #: prewikka/templates/UserSettings.py:324 msgid "Change password" msgstr "Zmień hasło" #: prewikka/templates/UserSettings.py:334 msgid "Current password:" msgstr "Hasło:" #: prewikka/templates/UserSettings.py:344 msgid "New password:" msgstr "Nowe hasło:" #: prewikka/templates/UserSettings.py:353 msgid "Confirm new password:" msgstr "Potwierdź nowe hasło:" #: prewikka/templates/UserSettings.py:366 msgid "Submit Changes" msgstr "Wyślij zmiany" #: prewikka/templates/MessageListing.py:478 msgid "Period" msgstr "Okres" #: prewikka/templates/MessageListing.py:493 msgid "Minutes" msgstr "min." #: prewikka/templates/MessageListing.py:502 msgid "Hours" msgstr "godz." #: prewikka/templates/MessageListing.py:511 msgid "Days" msgstr "dni" #: prewikka/templates/MessageListing.py:520 msgid "Months" msgstr "mies." #: prewikka/templates/MessageListing.py:529 msgid "Years" msgstr "lat." #: prewikka/templates/MessageListing.py:538 msgid "Unlimited" msgstr "bez limitu" #: prewikka/templates/MessageListing.py:549 msgid "Timezone" msgstr "Czas" #: prewikka/templates/MessageListing.py:560 msgid "Frontend localtime" msgstr "systemu" #: prewikka/templates/MessageListing.py:569 msgid "Sensor localtime" msgstr "sondy" #: prewikka/templates/MessageListing.py:578 msgid "UTC" msgstr "UTC" #: prewikka/templates/MessageListing.py:589 msgid "Limit" msgstr "Limit" #: prewikka/templates/MessageListing.py:613 msgid "Refresh" msgstr "Odśwież" #: prewikka/templates/MessageListing.py:660 prewikka/templates/Stats.py:526 msgid "Apply" msgstr "Zastosuj" #: prewikka/templates/MessageListing.py:708 #: prewikka/templates/MessageListing.py:716 msgid "prev" msgstr "poprz." #: prewikka/templates/MessageListing.py:729 #: prewikka/templates/MessageListing.py:737 msgid "current" msgstr "bierz." #: prewikka/templates/MessageListing.py:750 #: prewikka/templates/MessageListing.py:758 msgid "next" msgstr "nast." #: prewikka/templates/MessageListing.py:812 msgid "total" msgstr "wszystkich" #: prewikka/templates/AlertListing.py:112 msgid "Equal" msgstr "Równa się" #: prewikka/templates/AlertListing.py:118 msgid "Not equal" msgstr "" #: prewikka/templates/AlertListing.py:124 msgid "Lesser than" msgstr "Mniej niż" #: prewikka/templates/AlertListing.py:130 msgid "Greater than" msgstr "Więcej niż" #: prewikka/templates/AlertListing.py:136 msgid "Lesser or equal" msgstr "Mniejszerówne niż" #: prewikka/templates/AlertListing.py:142 msgid "Greater or equal" msgstr "Większerówne niż" #: prewikka/templates/AlertListing.py:148 msgid "Substring" msgstr "Wycinek frazy" #: prewikka/templates/AlertListing.py:154 msgid "Substring (case-insensitive)" msgstr "Wycinek frazy (ignoruj wielkość liter)" #: prewikka/templates/AlertListing.py:160 msgid "Regular expression" msgstr "Wyrażenie regularne" #: prewikka/templates/AlertListing.py:166 msgid "Regular expression (case-insensitive)" msgstr "Wyrażenie regularne (ignoruj wielkość liter)" #: prewikka/templates/AlertListing.py:319 #: prewikka/templates/AlertListing.py:1190 msgid "info" msgstr "" #: prewikka/templates/AlertListing.py:321 #: prewikka/templates/AlertListing.py:1192 msgid "low" msgstr "" #: prewikka/templates/AlertListing.py:323 #: prewikka/templates/AlertListing.py:1194 msgid "medium" msgstr "" #: prewikka/templates/AlertListing.py:325 #: prewikka/templates/AlertListing.py:1196 msgid "high" msgstr "" #: prewikka/templates/AlertListing.py:345 #: prewikka/templates/AlertListing.py:1223 msgid "succeeded" msgstr "" #: prewikka/templates/AlertListing.py:347 #: prewikka/templates/AlertListing.py:1225 msgid "failed" msgstr "" #: prewikka/templates/AlertListing.py:843 #, fuzzy msgid "Filter on" msgstr "Filtruj po:" #: prewikka/templates/AlertListing.py:963 msgid "Group entry by:" msgstr "Grupuj po:" #: prewikka/templates/AlertListing.py:1027 #: prewikka/templates/AlertListing.py:1035 #, fuzzy msgid "filtered" msgstr "Filtr" #: prewikka/templates/AlertListing.py:1136 msgid "Type:" msgstr "Typ:" #: prewikka/templates/AlertListing.py:1151 msgid "CorrelationAlert" msgstr "Alert korelacji" #: prewikka/templates/AlertListing.py:1153 msgid "OverflowAlert" msgstr "Alert przepełnienia" #: prewikka/templates/AlertListing.py:1155 msgid "ToolAlert" msgstr "Alert narzędzia" #: prewikka/templates/AlertListing.py:1184 msgid "Severity:" msgstr "Krytyczność:" #: prewikka/templates/AlertListing.py:1215 msgid "Completion:" msgstr "Wykonanie:" #: prewikka/templates/AlertListing.py:1253 msgid "Source" msgstr "Źródło" #: prewikka/templates/AlertListing.py:1285 msgid "Target" msgstr "Cel" #: prewikka/templates/AlertListing.py:1317 #, fuzzy msgid "Analyzer" msgstr "ID analizatora" #: prewikka/templates/AlertListing.py:1459 msgid "See alert detail" msgstr "" #: prewikka/templates/AlertListing.py:1468 #, fuzzy msgid "Filter on this classification.text" msgstr "Filtr: %s" #: prewikka/templates/AlertListing.py:1522 #, fuzzy msgid "Filter on this port/protocol" msgstr "Filtr: %s" #: prewikka/templates/AlertListing.py:1541 #: prewikka/templates/AlertListing.py:1549 #, fuzzy msgid "Port/protocol information" msgstr "Informacje dotyczące sieci" #: prewikka/templates/AlertListing.py:1598 msgid "alert" msgid_plural "alerts" msgstr[0] "" msgstr[1] "" #: prewikka/templates/AlertListing.py:1622 #, python-format msgid "%(hidden)d of %(total)d alerts not shown..." msgstr "%(hidden)d z %(total)d wszystkich alertów ukryte..." #: prewikka/templates/AlertListing.py:1633 #: prewikka/templates/AlertListing.py:1825 msgid "expand" msgstr "rozwiń" #: prewikka/templates/AlertListing.py:1778 #, fuzzy msgid "Filter on this reference" msgstr "Filtr: %s" #: prewikka/templates/AlertListing.py:1802 msgid "source" msgstr "źródło" #: prewikka/templates/AlertListing.py:1804 msgid "target" msgstr "cel" #: prewikka/templates/AlertListing.py:1814 #, python-format msgid "%(hidden)d of %(total)d %(name)ss not shown..." msgstr "%(hidden)d z %(total)d %(name)ss ukryte..." #: prewikka/templates/AlertListing.py:1856 #, python-format msgid "Filter on this %s" msgstr "Filtr: %s" #: prewikka/templates/AlertListing.py:1874 #, python-format msgid "%s information" msgstr "Info: %s" #: prewikka/templates/AlertListing.py:2114 msgid "Filter" msgstr "Filtr" #: prewikka/templates/LoginPasswordForm.py:130 msgid "Submit" msgstr "Wyślij" #: prewikka/templates/Stats.py:356 #, fuzzy msgid "Filter:" msgstr "Filtr" #: prewikka/templates/Stats.py:386 #, fuzzy msgid "Time:" msgstr "Czas" #: prewikka/templates/Stats.py:397 #, fuzzy msgid "Hour" msgstr "godz." #: prewikka/templates/Stats.py:406 #, fuzzy msgid "Day" msgstr "dni" #: prewikka/templates/Stats.py:415 #, fuzzy msgid "Month" msgstr "mies." #: prewikka/templates/Stats.py:424 msgid "Custom" msgstr "" #: prewikka/templates/Stats.py:434 #, fuzzy msgid "From:" msgstr "Formuła:" #: prewikka/templates/Stats.py:477 #, fuzzy msgid "To:" msgstr "Wszystkich:" #: prewikka/modules/auth/cgi/cgi.py:41 msgid "CGI Authentication failed: no user specified." msgstr "Uwierzytelnianie CGI nie powiodło się - nie podano nazwy użytkownika." #~ msgid "Invalid 'analyzerid:messageid' pair, '%(analyzerid):%(messageid)'" #~ msgstr "" #~ "Nieprawidłowa para 'analyzerid:messageid', '%(analyzerid):%(messageid)'" #~ msgid "Sensor" #~ msgstr "Sonda" prewikka-1.0.0/po/ru.po0000664000076400007640000010676211340777332014020 0ustar yoannyoann# Russian Translation for Prewikka # Copyright (C) 2007 PreludeIDS Technologies # This file is distributed under the same license as the prewikka package. # bogdanov.valentin@gmail.com, 2007. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: 0.99\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-02-10 13:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Valentin Bogdanov \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: prewikka/User.py:41 msgid "Permission Denied" msgstr "Недостаточно прав" #: prewikka/User.py:42 #, python-format msgid "Access to view '%s' forbidden" msgstr "Просмотр '%s' запрещен" #: prewikka/Auth.py:29 msgid "Authentication failed" msgstr "Ошибка аутентификации" #: prewikka/Auth.py:35 msgid "Invalid session" msgstr "" #: prewikka/Auth.py:41 msgid "Session expired" msgstr "Время жизни сессии истекло" #: prewikka/Auth.py:138 msgid "Logged out" msgstr "Пользователь вышел из системы" #: prewikka/Log.py:65 #, python-format msgid "Unknown logtype specified: '%s'" msgstr "Указан неизвестный тип лога: '%s'" #: prewikka/view.py:29 prewikka/view.py:35 prewikka/view.py:41 msgid "Parameters Normalization failed" msgstr "Ошибка нормализации параметров" #: prewikka/Database.py:98 #, python-format msgid "" "Database schema version %(version)s found when %(reqversion)s was required" msgstr "" #: prewikka/localization.py:107 msgid "January" msgstr "Январь" #: prewikka/localization.py:108 msgid "February" msgstr "Февраль" #: prewikka/localization.py:109 msgid "March" msgstr "Март" #: prewikka/localization.py:110 msgid "April" msgstr "Апрель" #: prewikka/localization.py:111 msgid "May" msgstr "Май" #: prewikka/localization.py:112 msgid "June" msgstr "Июнь" #: prewikka/localization.py:113 msgid "July" msgstr "Июль" #: prewikka/localization.py:114 msgid "August" msgstr "Август" #: prewikka/localization.py:115 msgid "September" msgstr "Сентябрь" #: prewikka/localization.py:116 msgid "November" msgstr "Ноябрь" #: prewikka/localization.py:117 msgid "October" msgstr "Октябрь" #: prewikka/localization.py:118 msgid "December" msgstr "Декабрь" #: prewikka/localization.py:120 msgid "Monday" msgstr "Понедельник" #: prewikka/localization.py:121 msgid "Tuesday" msgstr "Вторник" #: prewikka/localization.py:122 msgid "Wednesday" msgstr "Среда" #: prewikka/localization.py:123 msgid "Thursday" msgstr "Четверг" #: prewikka/localization.py:124 msgid "Friday" msgstr "Пятница" #: prewikka/localization.py:125 msgid "Saturday" msgstr "Суббота" #: prewikka/localization.py:126 msgid "Sunday" msgstr "Воскресенье" #: prewikka/Filter.py:78 #, python-format msgid "Invalid filter element '%s' referenced from filter formula" msgstr "Ошибка в элементе фильтра '%s', на который ссылается формула фильтра" #: prewikka/views/messagesummary.py:304 prewikka/views/messagesummary.py:461 #: prewikka/views/messagesummary.py:691 prewikka/views/messagesummary.py:708 #: prewikka/views/messagesummary.py:731 prewikka/views/messagesummary.py:789 #: prewikka/views/messagesummary.py:808 prewikka/views/messagesummary.py:844 #: prewikka/templates/SensorListing.py:412 msgid "Name" msgstr "Имя" #: prewikka/views/messagesummary.py:305 prewikka/views/messagesummary.py:611 msgid "Code" msgstr "Код" #: prewikka/views/messagesummary.py:306 msgid "Data length" msgstr "Размер данных" #: prewikka/views/messagesummary.py:307 msgid "Data" msgstr "Данные" #: prewikka/views/messagesummary.py:403 prewikka/views/messagesummary.py:846 #, fuzzy msgid "Create time" msgstr "Время создания" #: prewikka/views/messagesummary.py:406 msgid "Detect time" msgstr "Время обнаружения" #: prewikka/views/messagesummary.py:411 msgid "Analyzer time" msgstr "Время анализатора" #: prewikka/views/messagesummary.py:417 msgid "Process" msgstr "Процесс" #: prewikka/views/messagesummary.py:418 msgid "Process Path" msgstr "Путь процесса" #: prewikka/views/messagesummary.py:419 msgid "Process PID" msgstr "PID процесса" #: prewikka/views/messagesummary.py:427 #, fuzzy msgid "Node location" msgstr "Расположение узла" #: prewikka/views/messagesummary.py:449 #: prewikka/templates/HeartbeatListing.py:126 #, fuzzy msgid "Node name" msgstr "Имя узла" #: prewikka/views/messagesummary.py:452 #, fuzzy msgid "Node name (resolved)" msgstr "Имя узла" #: prewikka/views/messagesummary.py:454 #: prewikka/templates/HeartbeatListing.py:113 #, fuzzy msgid "Node address" msgstr "Адрес узла" #: prewikka/views/messagesummary.py:460 prewikka/views/stats.py:711 #: prewikka/templates/HeartbeatListing.py:139 #: prewikka/templates/SensorListing.py:418 msgid "Model" msgstr "Модель" #: prewikka/views/messagesummary.py:462 msgid "Analyzerid" msgstr "Идентификатор анализатора" #: prewikka/views/messagesummary.py:463 prewikka/views/messagesummary.py:563 #: prewikka/templates/SensorListing.py:424 #, fuzzy msgid "Version" msgstr "Версия" #: prewikka/views/messagesummary.py:464 prewikka/views/stats.py:719 #: prewikka/templates/SensorListing.py:430 msgid "Class" msgstr "Класс" #: prewikka/views/messagesummary.py:466 msgid "Manufacturer" msgstr "Производитель" #: prewikka/views/messagesummary.py:474 msgid "Operating System" msgstr "Операционная система" #: prewikka/views/messagesummary.py:492 #, python-format msgid "Analyzer Path (%d not shown)" msgstr "Путь анализатора (%d не показан)" #: prewikka/views/messagesummary.py:499 prewikka/views/messagesummary.py:1030 #: prewikka/views/messagesummary.py:1102 #, python-format msgid "Analyzer #%d" msgstr "Анализатор #%d" #: prewikka/views/messagesummary.py:509 msgid "Additional data" msgstr "Дополнительные данные" #: prewikka/views/messagesummary.py:512 prewikka/views/messagesummary.py:732 msgid "Meaning" msgstr "Смысл" #: prewikka/views/messagesummary.py:513 msgid "Value" msgstr "Значение" #: prewikka/views/messagesummary.py:564 prewikka/views/messagesummary.py:585 msgid "Header length" msgstr "Длина заголовка" #: prewikka/views/messagesummary.py:565 msgid "TOS" msgstr "" #: prewikka/views/messagesummary.py:566 prewikka/views/messagesummary.py:604 msgid "Length" msgstr "Длина" #: prewikka/views/messagesummary.py:567 prewikka/views/messagesummary.py:613 msgid "Id" msgstr "" #: prewikka/views/messagesummary.py:571 msgid "Ip offset" msgstr "" #: prewikka/views/messagesummary.py:572 msgid "TTL" msgstr "" #: prewikka/views/messagesummary.py:573 prewikka/views/messagesummary.py:932 #: prewikka/views/messagesummary.py:935 prewikka/views/messagesummary.py:938 msgid "Protocol" msgstr "Протокол" #: prewikka/views/messagesummary.py:574 prewikka/views/messagesummary.py:596 #: prewikka/views/messagesummary.py:605 prewikka/views/messagesummary.py:612 msgid "Checksum" msgstr "Контрольная сумма" #: prewikka/views/messagesummary.py:575 #, fuzzy msgid "Source address" msgstr "Адрес узла" #: prewikka/views/messagesummary.py:576 #, fuzzy msgid "Target address" msgstr "Адрес узла" #: prewikka/views/messagesummary.py:581 prewikka/views/messagesummary.py:602 #, fuzzy msgid "Source port" msgstr "Порт источника" #: prewikka/views/messagesummary.py:582 prewikka/views/messagesummary.py:603 #, fuzzy msgid "Target port" msgstr "Порт цели" #: prewikka/views/messagesummary.py:586 msgid "Reserved" msgstr "Зарезервировано" #: prewikka/views/messagesummary.py:595 #, fuzzy msgid "Window" msgstr "Окно" #: prewikka/views/messagesummary.py:597 msgid "URP" msgstr "" #: prewikka/views/messagesummary.py:610 prewikka/views/messagesummary.py:755 #: prewikka/views/messagesummary.py:788 prewikka/views/messagesummary.py:807 msgid "Type" msgstr "Тип" #: prewikka/views/messagesummary.py:614 msgid "Seq #" msgstr "" #: prewikka/views/messagesummary.py:615 msgid "Mask" msgstr "Маска" #: prewikka/views/messagesummary.py:616 #, fuzzy msgid "Gateway Address" msgstr "Адрес шлюза" #: prewikka/views/messagesummary.py:617 msgid "Num address" msgstr "" #: prewikka/views/messagesummary.py:618 msgid "Wpa" msgstr "" #: prewikka/views/messagesummary.py:619 msgid "Lifetime" msgstr "Время жизни" #: prewikka/views/messagesummary.py:620 msgid "Otime" msgstr "" #: prewikka/views/messagesummary.py:621 msgid "Rtime" msgstr "" #: prewikka/views/messagesummary.py:622 #, fuzzy msgid "Ttime" msgstr "Время" #: prewikka/views/messagesummary.py:628 prewikka/views/messagesummary.py:1077 msgid "Payload" msgstr "Полезная нагрузка" #: prewikka/views/messagesummary.py:675 #, python-format msgid "%d linked alerts missing (probably deleted)" msgstr "" #: prewikka/views/messagesummary.py:689 prewikka/views/messagesummary.py:985 #: prewikka/views/alertlisting.py:707 #, fuzzy msgid "Correlation Alert" msgstr "Событие корреляции" #: prewikka/views/messagesummary.py:695 #, fuzzy msgid "Correlated Alert" msgstr "Событие корреляции" #: prewikka/views/messagesummary.py:696 prewikka/views/messagesummary.py:713 msgid "Source Analyzer" msgstr "" #: prewikka/views/messagesummary.py:706 prewikka/views/messagesummary.py:988 #: prewikka/views/alertlisting.py:711 #, fuzzy msgid "Tool Alert" msgstr "Событие со средства защиты" #: prewikka/views/messagesummary.py:712 msgid "Linked Alert" msgstr "Связанное событие" #: prewikka/views/messagesummary.py:723 #, fuzzy msgid "Text" msgstr "Текст" #: prewikka/views/messagesummary.py:725 msgid "Ident" msgstr "" #: prewikka/views/messagesummary.py:730 msgid "Origin" msgstr "" #: prewikka/views/messagesummary.py:749 prewikka/views/stats.py:448 #, fuzzy msgid "Severity" msgstr "Важность:" #: prewikka/views/messagesummary.py:752 #, fuzzy msgid "Completion" msgstr "Завершенность:" #: prewikka/views/messagesummary.py:756 prewikka/views/messagesummary.py:762 msgid "Description" msgstr "Описание" #: prewikka/views/messagesummary.py:761 msgid "Category" msgstr "Категория" #: prewikka/views/messagesummary.py:785 msgid "User category" msgstr "Категория пользователя" #: prewikka/views/messagesummary.py:790 prewikka/views/messagesummary.py:809 #, fuzzy msgid "Number" msgstr "Номер" #: prewikka/views/messagesummary.py:791 msgid "Tty" msgstr "" #: prewikka/views/messagesummary.py:810 #, fuzzy msgid "Permission" msgstr "Привилегии:" #: prewikka/views/messagesummary.py:832 msgid "Change time" msgstr "" #: prewikka/views/messagesummary.py:833 #, fuzzy msgid "Inode Number" msgstr "Номер inode" #: prewikka/views/messagesummary.py:834 msgid "Major device" msgstr "" #: prewikka/views/messagesummary.py:835 msgid "Minor device" msgstr "" #: prewikka/views/messagesummary.py:836 msgid "C Major device" msgstr "" #: prewikka/views/messagesummary.py:837 msgid "C Minor device" msgstr "" #: prewikka/views/messagesummary.py:841 #, fuzzy, python-format msgid "Target file %s" msgstr "Целевой файл %s" #: prewikka/views/messagesummary.py:845 msgid "Path" msgstr "Путь" #: prewikka/views/messagesummary.py:847 msgid "Modify time" msgstr "Время модификации" #: prewikka/views/messagesummary.py:848 msgid "Access time" msgstr "Время доступа" #: prewikka/views/messagesummary.py:849 msgid "Data size" msgstr "Размер данных" #: prewikka/views/messagesummary.py:850 msgid "Disk size" msgstr "Размер диска" #: prewikka/views/messagesummary.py:869 msgid "Web Service" msgstr "Web сервис" #: prewikka/views/messagesummary.py:872 msgid "Url" msgstr "" #: prewikka/views/messagesummary.py:873 msgid "Cgi" msgstr "" #: prewikka/views/messagesummary.py:874 msgid "Http Method" msgstr "Метод http" #: prewikka/views/messagesummary.py:877 msgid "CGI Argument" msgstr "Аргумент CGI" #: prewikka/views/messagesummary.py:886 msgid "SNMP Service" msgstr "SNMP-сервис" #: prewikka/views/messagesummary.py:889 msgid "oid" msgstr "" #: prewikka/views/messagesummary.py:890 msgid "messageProcessingModel" msgstr "" #: prewikka/views/messagesummary.py:891 msgid "securityModel" msgstr "" #: prewikka/views/messagesummary.py:892 msgid "securityName" msgstr "" #: prewikka/views/messagesummary.py:893 msgid "securityLevel" msgstr "" #: prewikka/views/messagesummary.py:894 #, fuzzy msgid "contextName" msgstr "Имя контекста" #: prewikka/views/messagesummary.py:895 msgid "contextEngineID" msgstr "" #: prewikka/views/messagesummary.py:896 msgid "command" msgstr "команда" #: prewikka/views/messagesummary.py:908 msgid "Port" msgstr "Порт" #: prewikka/views/messagesummary.py:925 #, fuzzy msgid "PortList" msgstr "Порт" #: prewikka/views/messagesummary.py:928 #, fuzzy msgid "ip_version" msgstr "Версия" #: prewikka/views/messagesummary.py:961 #, fuzzy, python-format msgid "Source(%d)" msgstr "Источник(%d)" #: prewikka/views/messagesummary.py:970 #, fuzzy, python-format msgid "Target(%d)" msgstr "Цель(%d)" #: prewikka/views/messagesummary.py:991 #, fuzzy msgid "Overflow Alert" msgstr "Событие переполнения" #: prewikka/views/messagesummary.py:994 #: prewikka/templates/AlertListing.py:1149 msgid "Alert" msgstr "Сигнал тревоги" #: prewikka/views/messagesummary.py:1013 msgid "MessageID" msgstr "" #: prewikka/views/messagesummary.py:1021 msgid "Actions" msgstr "Действие" #: prewikka/views/messagesummary.py:1060 #, fuzzy msgid "Network centric information" msgstr "Информация об учетной записи" #: prewikka/views/messagesummary.py:1080 msgid "ASCII Payload" msgstr "" #: prewikka/views/messagesummary.py:1099 #, fuzzy msgid "Heartbeat" msgstr "Пульс" #: prewikka/views/__init__.py:45 msgid "Events" msgstr "События" #: prewikka/views/__init__.py:45 prewikka/templates/SensorListing.py:547 msgid "Alerts" msgstr "Сигналы тревоги" #: prewikka/views/__init__.py:46 msgid "CorrelationAlerts" msgstr "События корреляции" #: prewikka/views/__init__.py:47 msgid "ToolAlerts" msgstr "События со средств защиты" #: prewikka/views/__init__.py:50 msgid "Agents" msgstr "Агенты" #: prewikka/views/__init__.py:51 prewikka/templates/SensorListing.py:553 msgid "Heartbeats" msgstr "Пульс" #: prewikka/views/__init__.py:53 msgid "Statistics" msgstr "" #: prewikka/views/__init__.py:54 #, fuzzy msgid "Categorizations" msgstr "Категория" #: prewikka/views/__init__.py:55 #, fuzzy msgid "Sources" msgstr "Источник" #: prewikka/views/__init__.py:56 #, fuzzy msgid "Targets" msgstr "Цель" #: prewikka/views/__init__.py:57 #, fuzzy msgid "Analyzers" msgstr "Идентификатор анализатора" #: prewikka/views/__init__.py:58 #, fuzzy msgid "Timeline" msgstr "Время" #: prewikka/views/__init__.py:61 msgid "Settings" msgstr "Настройки" #: prewikka/views/__init__.py:62 msgid "Filters" msgstr "Фильтры" #: prewikka/views/__init__.py:64 msgid "My account" msgstr "" #: prewikka/views/__init__.py:67 #, fuzzy msgid "User listing" msgstr "Список событий" #: prewikka/views/__init__.py:71 msgid "About" msgstr "О программе" #: prewikka/views/sensor.py:51 msgid "Offline" msgstr "" #: prewikka/views/sensor.py:54 msgid "Unknown" msgstr "Неизвестен" #: prewikka/views/sensor.py:57 msgid "Missing" msgstr "" #: prewikka/views/sensor.py:59 msgid "Online" msgstr "" #: prewikka/views/sensor.py:158 #, fuzzy msgid "Node location n/a" msgstr "Расположение узла" #: prewikka/views/sensor.py:159 #, fuzzy msgid "Node name n/a" msgstr "Имя узла" #: prewikka/views/sensor.py:160 #, fuzzy msgid "OS version n/a" msgstr "Ошибка сессии" #: prewikka/views/sensor.py:161 msgid "OS type n/a" msgstr "" #: prewikka/views/filter.py:55 msgid "Example: (A AND B) OR (C AND D)" msgstr "Пример: (A AND B) OR (C AND D)" #: prewikka/views/filter.py:137 prewikka/templates/FilterEdition.py:221 msgid "Load" msgstr "Загрузить" #: prewikka/views/filter.py:139 prewikka/templates/FilterEdition.py:339 #: prewikka/templates/MessageListing.py:665 prewikka/templates/Stats.py:531 msgid "Save" msgstr "Сохранить" #: prewikka/views/filter.py:141 prewikka/templates/FilterEdition.py:227 #: prewikka/templates/SensorListing.py:406 #: prewikka/templates/SensorListing.py:559 #: prewikka/templates/MessageListing.py:369 msgid "Delete" msgstr "Удалить" #: prewikka/views/messagelisting.py:231 prewikka/templates/AlertListing.py:327 #: prewikka/templates/AlertListing.py:349 #: prewikka/templates/AlertListing.py:1198 #: prewikka/templates/AlertListing.py:1227 msgid "n/a" msgstr "" #: prewikka/views/stats.py:425 #, fuzzy msgid "Top 10 Classifications" msgstr "Классификация" #: prewikka/views/stats.py:425 prewikka/templates/AlertListing.py:1111 msgid "Classification" msgstr "Классификация" #: prewikka/views/stats.py:433 msgid "Top 10 Alert References" msgstr "" #: prewikka/views/stats.py:433 msgid "References" msgstr "" #: prewikka/views/stats.py:442 prewikka/views/stats.py:768 #, fuzzy msgid "High" msgstr "высокий" #: prewikka/views/stats.py:443 prewikka/views/stats.py:769 #, fuzzy msgid "Medium" msgstr "средний" #: prewikka/views/stats.py:444 prewikka/views/stats.py:770 #, fuzzy msgid "Low" msgstr "низкий" #: prewikka/views/stats.py:445 prewikka/views/stats.py:771 #, fuzzy msgid "Informational" msgstr "Информация об адресе" #: prewikka/views/stats.py:446 prewikka/views/stats.py:772 msgid "N/a" msgstr "" #: prewikka/views/stats.py:448 #, fuzzy msgid "Severities" msgstr "Важность:" #: prewikka/views/stats.py:455 msgid "Alert Impact Types" msgstr "" #: prewikka/views/stats.py:455 msgid "Impact Types" msgstr "" #: prewikka/views/stats.py:490 #, fuzzy msgid "Top Source Country" msgstr "Порт источника" #: prewikka/views/stats.py:490 msgid "Country" msgstr "" #: prewikka/views/stats.py:542 #, fuzzy msgid "Top 10 Source Addresses" msgstr "Адрес узла" #: prewikka/views/stats.py:542 prewikka/views/stats.py:645 #: prewikka/views/stats.py:727 #, fuzzy msgid "Address" msgstr "Адрес узла" #: prewikka/views/stats.py:550 msgid "Top 10 Source Users" msgstr "" #: prewikka/views/stats.py:550 prewikka/views/stats.py:653 #, fuzzy msgid "User" msgstr "Пользователи" #: prewikka/views/stats.py:645 #, fuzzy msgid "Top 10 Targeted Addresses" msgstr "Адрес узла" #: prewikka/views/stats.py:653 msgid "Top 10 Targeted Users" msgstr "" #: prewikka/views/stats.py:711 msgid "Top 10 Analyzer Models" msgstr "" #: prewikka/views/stats.py:719 msgid "Top 10 Analyzer Classes" msgstr "" #: prewikka/views/stats.py:727 msgid "Top 10 Analyzer Node Addresses" msgstr "" #: prewikka/views/stats.py:735 #, fuzzy msgid "Analyzer Locations" msgstr "Время анализатора" #: prewikka/views/stats.py:735 #, fuzzy msgid "Location" msgstr "Расположение узла" #: prewikka/templates/About.py:107 msgid "" "provides support to Large Accounts, Major Companies and Government Agencies " "around the world, to improve and strengthen the security of their systems " "and networks." msgstr "" "предоставляет поддержку Крупным Клиентам, Ведущим Корпорациям и " "Государственным Структурам по всему миру, в задачах улучшения и повышения " "уровня безопасности их систем и сетей." #: prewikka/templates/About.py:125 msgid "Customizing Prelude" msgstr "Настройка Prelude" #: prewikka/templates/About.py:132 msgid "" "In keeping with the Open Source spirit, we encourage you to participate in " "the development of your application. You can order customized versions of " "Prelude to suit your needs: adapting, adding on functionality etc. Because " "they are carried out by PreludeIDS engineers, you know that any " "modifications made to the system will be integrated optimally and guaranteed " "by our technical support department. Additionally, the company can extend " "Prelude to handle yet unsupported sensors (including proprietary), ruleset " "extension to handle new devices and porting of Prelude to unsupported " "operating systems." msgstr "" #: prewikka/templates/About.py:141 msgid "Software Maintenance and Technical Support" msgstr "" #: prewikka/templates/About.py:148 msgid "" "PreludeIDS maintenance and support services guarantee optimal operation of " "the Prelude platform on your infrastructure. There are five support packages " "that provide our customers with peace of mind, knowing that they are not " "only covered for all outcomes, but that our experts are at hand to provide " "rapid and reliable solutions." msgstr "" #: prewikka/templates/About.py:157 msgid "Commercial licenses" msgstr "Коммерческая лицензия" #: prewikka/templates/About.py:164 msgid "The Prelude framework is licensed under the" msgstr "Компоненты Prelude лицензируется по" #: prewikka/templates/About.py:170 msgid "" "PreludeIDS provides specific commercial licenses to allow proprietary " "systems based on Prelude to be developed and to interoperate." msgstr "Компоненты Prelude лицензируется по" #: prewikka/templates/About.py:179 msgid "Advice, Deployment and Training" msgstr "Консультации, Развертывание и Обучение" #: prewikka/templates/About.py:186 msgid "" "Through our partners, you have access to an array of top-of-the-line " "security services. By advising you on how to secure your infrastructure, " "deploying Prelude and training your users, we provide a turnkey solution to " "secure your infrastructure, delivered by specialists." msgstr "" #: prewikka/templates/About.py:205 msgid "Contact" msgstr "Контакт" #: prewikka/templates/About.py:211 msgid "Office" msgstr "" #: prewikka/templates/About.py:217 msgid "Website" msgstr "" #: prewikka/templates/About.py:230 msgid "Phone:" msgstr "Телефон:" #: prewikka/templates/About.py:240 msgid "Fax:" msgstr "" #: prewikka/templates/HeartbeatListing.py:100 msgid "Agent" msgstr "Агент" #: prewikka/templates/HeartbeatListing.py:151 #: prewikka/templates/AlertListing.py:1348 msgid "Time" msgstr "Время" #: prewikka/templates/HeartbeatListing.py:199 msgid "Heartbeat summary" msgstr "Сводка пульса" #: prewikka/templates/HeartbeatListing.py:208 msgid "Filter on agent" msgstr "Фильтровать по агенту" #: prewikka/templates/HeartbeatListing.py:229 #: prewikka/templates/SensorListing.py:316 msgid "Filter on address" msgstr "Фильтровать по адресу" #: prewikka/templates/FilterEdition.py:191 msgid "Available filters" msgstr "Доступные фильтры:" #: prewikka/templates/FilterEdition.py:242 msgid "Edition" msgstr "Редактирование" #: prewikka/templates/FilterEdition.py:302 msgid "Formula:" msgstr "Формула:" #: prewikka/templates/FilterEdition.py:314 #, fuzzy msgid "Name:" msgstr "Имя" #: prewikka/templates/FilterEdition.py:326 msgid "Comment:" msgstr "Комментарий" #: prewikka/templates/UserListing.py:100 msgid "Login" msgstr "Имя пользователя" #: prewikka/templates/UserListing.py:156 msgid "Delete user" msgstr "Удалить пользователя" #: prewikka/templates/UserListing.py:169 msgid "Create user" msgstr "Создать пользователя" #: prewikka/templates/SensorListing.py:232 #, python-format msgid "%d Node" msgid_plural "%d Nodes" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:237 #, fuzzy, python-format msgid "%d Analyzer" msgid_plural "%d Analyzers" msgstr[0] "Идентификатор анализатора" msgstr[1] "Идентификатор анализатора" #: prewikka/templates/SensorListing.py:244 #, fuzzy, python-format msgid "%d Online" msgid_plural "%d Online" msgstr[0] "Идентификатор анализатора" msgstr[1] "Идентификатор анализатора" #: prewikka/templates/SensorListing.py:246 #, python-format msgid "%d Offline" msgid_plural "%d Offline" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:248 #, fuzzy, python-format msgid "%d Unknown" msgid_plural "%d Unknown" msgstr[0] "Неизвестен" msgstr[1] "Неизвестен" #: prewikka/templates/SensorListing.py:250 #, python-format msgid "%d Missing" msgid_plural "%d Missing" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:328 msgid "Address information" msgstr "Информация об адресе" #: prewikka/templates/SensorListing.py:362 #, fuzzy msgid "Total:" msgstr "всего" #: prewikka/templates/SensorListing.py:436 #, fuzzy msgid "Last heartbeat" msgstr "Последнее время пульса" #: prewikka/templates/SensorListing.py:442 msgid "Status" msgstr "" #: prewikka/templates/SensorListing.py:481 msgid "Alert listing" msgstr "Список событий" #: prewikka/templates/SensorListing.py:490 msgid "Heartbeat listing" msgstr "Просмотр пульса" #: prewikka/templates/SensorListing.py:499 msgid "Heartbeat analysis" msgstr "Анализ пульса" #: prewikka/templates/ClassicLayout.py:231 msgid "logout" msgstr "выход" #: prewikka/templates/ClassicLayout.py:243 #, python-format msgid "%(username)s on %(date)s" msgstr "" #: prewikka/templates/UserSettings.py:157 #, fuzzy msgid "Account information" msgstr "Информация об учетной записи" #: prewikka/templates/UserSettings.py:168 msgid "Login:" msgstr "Имя пользователя:" #: prewikka/templates/UserSettings.py:201 msgid "Language:" msgstr "Язык:" #: prewikka/templates/UserSettings.py:235 msgid "Permissions:" msgstr "Привилегии:" #: prewikka/templates/UserSettings.py:298 msgid "Check All" msgstr "Отметить все" #: prewikka/templates/UserSettings.py:324 msgid "Change password" msgstr "Изменить пароль:" #: prewikka/templates/UserSettings.py:334 msgid "Current password:" msgstr "Текущий пароль:" #: prewikka/templates/UserSettings.py:344 msgid "New password:" msgstr "Новый пароль:" #: prewikka/templates/UserSettings.py:353 msgid "Confirm new password:" msgstr "Подтвердить новый пароль:" #: prewikka/templates/UserSettings.py:366 msgid "Submit Changes" msgstr "Применить изменения" #: prewikka/templates/MessageListing.py:478 #, fuzzy msgid "Period" msgstr "Привилегии:" #: prewikka/templates/MessageListing.py:493 msgid "Minutes" msgstr "Минуты" #: prewikka/templates/MessageListing.py:502 msgid "Hours" msgstr "Часы" #: prewikka/templates/MessageListing.py:511 msgid "Days" msgstr "Дни" #: prewikka/templates/MessageListing.py:520 msgid "Months" msgstr "Месяцы" #: prewikka/templates/MessageListing.py:529 msgid "Years" msgstr "Годы" #: prewikka/templates/MessageListing.py:538 msgid "Unlimited" msgstr "Без ограничения" #: prewikka/templates/MessageListing.py:549 #, fuzzy msgid "Timezone" msgstr "Время" #: prewikka/templates/MessageListing.py:560 msgid "Frontend localtime" msgstr "Входное локальное время" #: prewikka/templates/MessageListing.py:569 msgid "Sensor localtime" msgstr "Локальное время сенсора" #: prewikka/templates/MessageListing.py:578 msgid "UTC" msgstr "" #: prewikka/templates/MessageListing.py:589 #, fuzzy msgid "Limit" msgstr "Предел:" #: prewikka/templates/MessageListing.py:613 msgid "Refresh" msgstr "" #: prewikka/templates/MessageListing.py:660 prewikka/templates/Stats.py:526 msgid "Apply" msgstr "Применить" #: prewikka/templates/MessageListing.py:708 #: prewikka/templates/MessageListing.py:716 msgid "prev" msgstr "пред" #: prewikka/templates/MessageListing.py:729 #: prewikka/templates/MessageListing.py:737 msgid "current" msgstr "текущий" #: prewikka/templates/MessageListing.py:750 #: prewikka/templates/MessageListing.py:758 msgid "next" msgstr "след" #: prewikka/templates/MessageListing.py:812 msgid "total" msgstr "всего" #: prewikka/templates/AlertListing.py:112 msgid "Equal" msgstr "Равно" #: prewikka/templates/AlertListing.py:118 msgid "Not equal" msgstr "" #: prewikka/templates/AlertListing.py:124 msgid "Lesser than" msgstr "Меньше чем" #: prewikka/templates/AlertListing.py:130 msgid "Greater than" msgstr "Больше чем" #: prewikka/templates/AlertListing.py:136 msgid "Lesser or equal" msgstr "Меньше или равно" #: prewikka/templates/AlertListing.py:142 msgid "Greater or equal" msgstr "Больше или равно" #: prewikka/templates/AlertListing.py:148 msgid "Substring" msgstr "Подстрока" #: prewikka/templates/AlertListing.py:154 msgid "Substring (case-insensitive)" msgstr "Подстрока (нечувствительная к регистру)" #: prewikka/templates/AlertListing.py:160 msgid "Regular expression" msgstr "Регулярное выражение" #: prewikka/templates/AlertListing.py:166 msgid "Regular expression (case-insensitive)" msgstr "Регулярное выражени (нечувствительное к регистру)" #: prewikka/templates/AlertListing.py:319 #: prewikka/templates/AlertListing.py:1190 msgid "info" msgstr "информационный" #: prewikka/templates/AlertListing.py:321 #: prewikka/templates/AlertListing.py:1192 msgid "low" msgstr "низкий" #: prewikka/templates/AlertListing.py:323 #: prewikka/templates/AlertListing.py:1194 msgid "medium" msgstr "средний" #: prewikka/templates/AlertListing.py:325 #: prewikka/templates/AlertListing.py:1196 msgid "high" msgstr "высокий" #: prewikka/templates/AlertListing.py:345 #: prewikka/templates/AlertListing.py:1223 msgid "succeeded" msgstr "успешно" #: prewikka/templates/AlertListing.py:347 #: prewikka/templates/AlertListing.py:1225 msgid "failed" msgstr "ошибка" #: prewikka/templates/AlertListing.py:843 #, fuzzy msgid "Filter on" msgstr "Фильтровать по:" #: prewikka/templates/AlertListing.py:963 msgid "Group entry by:" msgstr "Группировать записи по:" #: prewikka/templates/AlertListing.py:1027 #: prewikka/templates/AlertListing.py:1035 #, fuzzy msgid "filtered" msgstr "ошибка" #: prewikka/templates/AlertListing.py:1136 msgid "Type:" msgstr "Тип:" #: prewikka/templates/AlertListing.py:1151 msgid "CorrelationAlert" msgstr "Событие корреляции" #: prewikka/templates/AlertListing.py:1153 msgid "OverflowAlert" msgstr "Событие переполнения" #: prewikka/templates/AlertListing.py:1155 msgid "ToolAlert" msgstr "Событие со средства защиты" #: prewikka/templates/AlertListing.py:1184 msgid "Severity:" msgstr "Важность:" #: prewikka/templates/AlertListing.py:1215 msgid "Completion:" msgstr "Завершенность:" #: prewikka/templates/AlertListing.py:1253 msgid "Source" msgstr "Источник" #: prewikka/templates/AlertListing.py:1285 msgid "Target" msgstr "Цель" #: prewikka/templates/AlertListing.py:1317 #, fuzzy msgid "Analyzer" msgstr "Идентификатор анализатора" #: prewikka/templates/AlertListing.py:1459 msgid "See alert detail" msgstr "" #: prewikka/templates/AlertListing.py:1468 #, fuzzy msgid "Filter on this classification.text" msgstr "Фильтровать по адресу" #: prewikka/templates/AlertListing.py:1522 #, fuzzy msgid "Filter on this port/protocol" msgstr "Фильтровать по адресу" #: prewikka/templates/AlertListing.py:1541 #: prewikka/templates/AlertListing.py:1549 #, fuzzy msgid "Port/protocol information" msgstr "Информация об учетной записи" #: prewikka/templates/AlertListing.py:1598 #, fuzzy msgid "alert" msgid_plural "alerts" msgstr[0] "Сигнал тревоги" msgstr[1] "Сигнал тревоги" #: prewikka/templates/AlertListing.py:1622 #, python-format msgid "%(hidden)d of %(total)d alerts not shown..." msgstr "" #: prewikka/templates/AlertListing.py:1633 #: prewikka/templates/AlertListing.py:1825 msgid "expand" msgstr "" #: prewikka/templates/AlertListing.py:1778 #, fuzzy msgid "Filter on this reference" msgstr "Фильтровать по адресу" #: prewikka/templates/AlertListing.py:1802 #, fuzzy msgid "source" msgstr "Источник" #: prewikka/templates/AlertListing.py:1804 #, fuzzy msgid "target" msgstr "Цель" #: prewikka/templates/AlertListing.py:1814 #, python-format msgid "%(hidden)d of %(total)d %(name)ss not shown..." msgstr "" #: prewikka/templates/AlertListing.py:1856 #, fuzzy, python-format msgid "Filter on this %s" msgstr "Фильтровать по адресу" #: prewikka/templates/AlertListing.py:1874 #, fuzzy, python-format msgid "%s information" msgstr "Информация об адресе" #: prewikka/templates/AlertListing.py:2114 #, fuzzy msgid "Filter" msgstr "Фильтры" #: prewikka/templates/LoginPasswordForm.py:130 msgid "Submit" msgstr "Применить" #: prewikka/templates/Stats.py:356 msgid "Filter:" msgstr "Фильтр:" #: prewikka/templates/Stats.py:386 #, fuzzy msgid "Time:" msgstr "Время" #: prewikka/templates/Stats.py:397 #, fuzzy msgid "Hour" msgstr "Часы" #: prewikka/templates/Stats.py:406 #, fuzzy msgid "Day" msgstr "Дни" #: prewikka/templates/Stats.py:415 #, fuzzy msgid "Month" msgstr "Месяцы" #: prewikka/templates/Stats.py:424 msgid "Custom" msgstr "" #: prewikka/templates/Stats.py:434 #, fuzzy msgid "From:" msgstr "Формула:" #: prewikka/templates/Stats.py:477 #, fuzzy msgid "To:" msgstr "всего" #: prewikka/modules/auth/cgi/cgi.py:41 msgid "CGI Authentication failed: no user specified." msgstr "Ошибка аутентификации CGI: пользователь не указан" #~ msgid "none" #~ msgstr "нет" #~ msgid "Sensor" #~ msgstr "Сенсор" #~ msgid "Session invalid" #~ msgstr "Ошибка сессии" #~ msgid "Username and password do not match." #~ msgstr "Имя пользователя и пароль не подходят." #, fuzzy #~ msgid "SSLcert Authentication failed: Not in a SSL session." #~ msgstr "Ошибка аутентификации CGI: пользователь не указан" #, fuzzy #~ msgid "SSLcert Authentication failed: no user specified in x509 CN." #~ msgstr "Ошибка аутентификации CGI: пользователь не указан" #, fuzzy #~ msgid "All analyzers online" #~ msgstr "Время анализатора" #~ msgid "Analyzer #0" #~ msgstr "Анализатор #0" #~ msgid "on" #~ msgstr "вкл" #, fuzzy #~ msgid "Node Name" #~ msgstr "Имя узла" #~ msgid "No agent available" #~ msgstr "Нет доступных агентов" #~ msgid "French" #~ msgstr "Français" #~ msgid "OS" #~ msgstr "ОС" #~ msgid "Latest status" #~ msgstr "Последний статус" #~ msgid "Brazilian Portuguese" #~ msgstr "Бразильский Португальский" #~ msgid "Headquarter" #~ msgstr "Штаб-квартира" #~ msgid "Step:" #~ msgstr "Шаг:" #~ msgid "Tz:" #~ msgstr "Временная зона:" prewikka-1.0.0/po/fr.po0000664000076400007640000010526411340777332013775 0ustar yoannyoann# French Translation for Prewikka # Copyright (C) 2007 PreludeIDS Technologies # This file is distributed under the same license as the prewikka package. # sebastien.tricaud@wengo.com, 2007. # msgid "" msgstr "" "Project-Id-Version: Prewikka 0.99\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-02-10 13:34+0100\n" "PO-Revision-Date: 2007-05-03 15:55+0100\n" "Last-Translator: Girard \n" "Language-Team: French\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: prewikka/User.py:41 msgid "Permission Denied" msgstr "Accès refusé" #: prewikka/User.py:42 #, python-format msgid "Access to view '%s' forbidden" msgstr "Accès à la vue '%s' interdit" #: prewikka/Auth.py:29 #, fuzzy msgid "Authentication failed" msgstr "Echec de l'authentification CGI : aucun utilisateur spécifié." #: prewikka/Auth.py:35 msgid "Invalid session" msgstr "Session invalide" #: prewikka/Auth.py:41 #, fuzzy msgid "Session expired" msgstr "Accès refusé" #: prewikka/Auth.py:138 msgid "Logged out" msgstr "Session terminée" #: prewikka/Log.py:65 #, python-format msgid "Unknown logtype specified: '%s'" msgstr "Type de log inconnu : '%s'" #: prewikka/view.py:29 prewikka/view.py:35 prewikka/view.py:41 msgid "Parameters Normalization failed" msgstr "Echec de normalisation des paramètres" #: prewikka/Database.py:98 #, python-format msgid "" "Database schema version %(version)s found when %(reqversion)s was required" msgstr "" "La version du schéma (%(version)s) différente de celle requise (%(reqversion)" "s)" #: prewikka/localization.py:107 msgid "January" msgstr "Janvier" #: prewikka/localization.py:108 msgid "February" msgstr "Février" #: prewikka/localization.py:109 msgid "March" msgstr "Mars" #: prewikka/localization.py:110 msgid "April" msgstr "Avril" #: prewikka/localization.py:111 msgid "May" msgstr "Mai" #: prewikka/localization.py:112 msgid "June" msgstr "Juin" #: prewikka/localization.py:113 msgid "July" msgstr "Juillet" #: prewikka/localization.py:114 msgid "August" msgstr "Août" #: prewikka/localization.py:115 msgid "September" msgstr "Septembre" #: prewikka/localization.py:116 msgid "November" msgstr "Novembre" #: prewikka/localization.py:117 msgid "October" msgstr "Octobre" #: prewikka/localization.py:118 msgid "December" msgstr "Décembre" #: prewikka/localization.py:120 msgid "Monday" msgstr "Lundi" #: prewikka/localization.py:121 msgid "Tuesday" msgstr "Mardi" #: prewikka/localization.py:122 msgid "Wednesday" msgstr "Mercredi" #: prewikka/localization.py:123 msgid "Thursday" msgstr "Jeudi" #: prewikka/localization.py:124 msgid "Friday" msgstr "Vendredi" #: prewikka/localization.py:125 msgid "Saturday" msgstr "Samedi" #: prewikka/localization.py:126 msgid "Sunday" msgstr "Dimanche" #: prewikka/Filter.py:78 #, python-format msgid "Invalid filter element '%s' referenced from filter formula" msgstr "L'élément de filtre '%s' référencé depuis la formule est invalide" #: prewikka/views/messagesummary.py:304 prewikka/views/messagesummary.py:461 #: prewikka/views/messagesummary.py:691 prewikka/views/messagesummary.py:708 #: prewikka/views/messagesummary.py:731 prewikka/views/messagesummary.py:789 #: prewikka/views/messagesummary.py:808 prewikka/views/messagesummary.py:844 #: prewikka/templates/SensorListing.py:412 msgid "Name" msgstr "Nom" #: prewikka/views/messagesummary.py:305 prewikka/views/messagesummary.py:611 msgid "Code" msgstr "" #: prewikka/views/messagesummary.py:306 msgid "Data length" msgstr "Taille des données" #: prewikka/views/messagesummary.py:307 msgid "Data" msgstr "Données" #: prewikka/views/messagesummary.py:403 prewikka/views/messagesummary.py:846 msgid "Create time" msgstr "Heure de création" #: prewikka/views/messagesummary.py:406 msgid "Detect time" msgstr "Heure de détection" #: prewikka/views/messagesummary.py:411 msgid "Analyzer time" msgstr "Heure de l'agent" #: prewikka/views/messagesummary.py:417 msgid "Process" msgstr "Processus" #: prewikka/views/messagesummary.py:418 msgid "Process Path" msgstr "Chemin du Processus" #: prewikka/views/messagesummary.py:419 msgid "Process PID" msgstr "ID du Processus" #: prewikka/views/messagesummary.py:427 msgid "Node location" msgstr "Emplacement du noeud" #: prewikka/views/messagesummary.py:449 #: prewikka/templates/HeartbeatListing.py:126 msgid "Node name" msgstr "Nom du noeud" #: prewikka/views/messagesummary.py:452 #, fuzzy msgid "Node name (resolved)" msgstr "Nom du noeud" #: prewikka/views/messagesummary.py:454 #: prewikka/templates/HeartbeatListing.py:113 msgid "Node address" msgstr "Adresse du noeud" #: prewikka/views/messagesummary.py:460 prewikka/views/stats.py:711 #: prewikka/templates/HeartbeatListing.py:139 #: prewikka/templates/SensorListing.py:418 msgid "Model" msgstr "Modèle" #: prewikka/views/messagesummary.py:462 msgid "Analyzerid" msgstr "" #: prewikka/views/messagesummary.py:463 prewikka/views/messagesummary.py:563 #: prewikka/templates/SensorListing.py:424 msgid "Version" msgstr "Version" #: prewikka/views/messagesummary.py:464 prewikka/views/stats.py:719 #: prewikka/templates/SensorListing.py:430 msgid "Class" msgstr "Classe" #: prewikka/views/messagesummary.py:466 msgid "Manufacturer" msgstr "Fabricant" #: prewikka/views/messagesummary.py:474 msgid "Operating System" msgstr "Système d'Exploitation" #: prewikka/views/messagesummary.py:492 #, python-format msgid "Analyzer Path (%d not shown)" msgstr "Chemin vers l'agent (%d non visibles)" #: prewikka/views/messagesummary.py:499 prewikka/views/messagesummary.py:1030 #: prewikka/views/messagesummary.py:1102 #, python-format msgid "Analyzer #%d" msgstr "Agent #%d" #: prewikka/views/messagesummary.py:509 msgid "Additional data" msgstr "Données Additionelles" #: prewikka/views/messagesummary.py:512 prewikka/views/messagesummary.py:732 msgid "Meaning" msgstr "Signification" #: prewikka/views/messagesummary.py:513 msgid "Value" msgstr "Valeur" #: prewikka/views/messagesummary.py:564 prewikka/views/messagesummary.py:585 msgid "Header length" msgstr "Taille de l'en-tête" #: prewikka/views/messagesummary.py:565 msgid "TOS" msgstr "" #: prewikka/views/messagesummary.py:566 prewikka/views/messagesummary.py:604 msgid "Length" msgstr "Taille" #: prewikka/views/messagesummary.py:567 prewikka/views/messagesummary.py:613 msgid "Id" msgstr "" #: prewikka/views/messagesummary.py:571 msgid "Ip offset" msgstr "Décalage ip" #: prewikka/views/messagesummary.py:572 msgid "TTL" msgstr "" #: prewikka/views/messagesummary.py:573 prewikka/views/messagesummary.py:932 #: prewikka/views/messagesummary.py:935 prewikka/views/messagesummary.py:938 msgid "Protocol" msgstr "Protocole" #: prewikka/views/messagesummary.py:574 prewikka/views/messagesummary.py:596 #: prewikka/views/messagesummary.py:605 prewikka/views/messagesummary.py:612 msgid "Checksum" msgstr "Somme de contrôle" #: prewikka/views/messagesummary.py:575 msgid "Source address" msgstr "Adresse source" #: prewikka/views/messagesummary.py:576 msgid "Target address" msgstr "Adresse destination" #: prewikka/views/messagesummary.py:581 prewikka/views/messagesummary.py:602 msgid "Source port" msgstr "Port source" #: prewikka/views/messagesummary.py:582 prewikka/views/messagesummary.py:603 msgid "Target port" msgstr "Port destination" #: prewikka/views/messagesummary.py:586 msgid "Reserved" msgstr "Réservé" #: prewikka/views/messagesummary.py:595 msgid "Window" msgstr "Fenêtre" #: prewikka/views/messagesummary.py:597 msgid "URP" msgstr "" #: prewikka/views/messagesummary.py:610 prewikka/views/messagesummary.py:755 #: prewikka/views/messagesummary.py:788 prewikka/views/messagesummary.py:807 msgid "Type" msgstr "Type" #: prewikka/views/messagesummary.py:614 msgid "Seq #" msgstr "" #: prewikka/views/messagesummary.py:615 msgid "Mask" msgstr "Masque" #: prewikka/views/messagesummary.py:616 msgid "Gateway Address" msgstr "Adresse de la Passerelle" #: prewikka/views/messagesummary.py:617 #, fuzzy msgid "Num address" msgstr "Adresse du noeud" #: prewikka/views/messagesummary.py:618 msgid "Wpa" msgstr "" #: prewikka/views/messagesummary.py:619 msgid "Lifetime" msgstr "Durée de vie" #: prewikka/views/messagesummary.py:620 #, fuzzy msgid "Otime" msgstr "Temps" #: prewikka/views/messagesummary.py:621 #, fuzzy msgid "Rtime" msgstr "Temps" #: prewikka/views/messagesummary.py:622 #, fuzzy msgid "Ttime" msgstr "Temps" #: prewikka/views/messagesummary.py:628 prewikka/views/messagesummary.py:1077 msgid "Payload" msgstr "Données" #: prewikka/views/messagesummary.py:675 #, python-format msgid "%d linked alerts missing (probably deleted)" msgstr "" #: prewikka/views/messagesummary.py:689 prewikka/views/messagesummary.py:985 #: prewikka/views/alertlisting.py:707 msgid "Correlation Alert" msgstr "Alerte de Corrélation" #: prewikka/views/messagesummary.py:695 msgid "Correlated Alert" msgstr "Alertes de Corrélation" #: prewikka/views/messagesummary.py:696 prewikka/views/messagesummary.py:713 msgid "Source Analyzer" msgstr "Agent Source" #: prewikka/views/messagesummary.py:706 prewikka/views/messagesummary.py:988 #: prewikka/views/alertlisting.py:711 msgid "Tool Alert" msgstr "Alertes d'Outil" #: prewikka/views/messagesummary.py:712 msgid "Linked Alert" msgstr "Alertes Liées" #: prewikka/views/messagesummary.py:723 msgid "Text" msgstr "Texte" #: prewikka/views/messagesummary.py:725 msgid "Ident" msgstr "Identité" #: prewikka/views/messagesummary.py:730 msgid "Origin" msgstr "Origine" #: prewikka/views/messagesummary.py:749 prewikka/views/stats.py:448 msgid "Severity" msgstr "Gravité" #: prewikka/views/messagesummary.py:752 msgid "Completion" msgstr "Accomplissement" #: prewikka/views/messagesummary.py:756 prewikka/views/messagesummary.py:762 msgid "Description" msgstr "" #: prewikka/views/messagesummary.py:761 msgid "Category" msgstr "Catégorie" #: prewikka/views/messagesummary.py:785 msgid "User category" msgstr "Catégorie d'Utilisateur" #: prewikka/views/messagesummary.py:790 prewikka/views/messagesummary.py:809 msgid "Number" msgstr "Nombre" #: prewikka/views/messagesummary.py:791 msgid "Tty" msgstr "" #: prewikka/views/messagesummary.py:810 msgid "Permission" msgstr "Permission" #: prewikka/views/messagesummary.py:832 msgid "Change time" msgstr "Modifier le temps" #: prewikka/views/messagesummary.py:833 msgid "Inode Number" msgstr "Numéro de l'Inode" #: prewikka/views/messagesummary.py:834 msgid "Major device" msgstr "Périphérique majeur" #: prewikka/views/messagesummary.py:835 msgid "Minor device" msgstr "Périphérique mineur" #: prewikka/views/messagesummary.py:836 msgid "C Major device" msgstr "Périphérique majeur C" #: prewikka/views/messagesummary.py:837 msgid "C Minor device" msgstr "Périphérique mineur C" #: prewikka/views/messagesummary.py:841 #, python-format msgid "Target file %s" msgstr "Fichier Destination %s" #: prewikka/views/messagesummary.py:845 msgid "Path" msgstr "Chemin" #: prewikka/views/messagesummary.py:847 msgid "Modify time" msgstr "Temps de modification" #: prewikka/views/messagesummary.py:848 msgid "Access time" msgstr "Temps d'accès" #: prewikka/views/messagesummary.py:849 msgid "Data size" msgstr "Taille des Données" #: prewikka/views/messagesummary.py:850 msgid "Disk size" msgstr "Taille du Disque" #: prewikka/views/messagesummary.py:869 msgid "Web Service" msgstr "Service Web" #: prewikka/views/messagesummary.py:872 msgid "Url" msgstr "" #: prewikka/views/messagesummary.py:873 msgid "Cgi" msgstr "" #: prewikka/views/messagesummary.py:874 msgid "Http Method" msgstr "Méthode http" #: prewikka/views/messagesummary.py:877 msgid "CGI Argument" msgstr "Argument CGI" #: prewikka/views/messagesummary.py:886 msgid "SNMP Service" msgstr "Service SNMP" #: prewikka/views/messagesummary.py:889 msgid "oid" msgstr "" #: prewikka/views/messagesummary.py:890 msgid "messageProcessingModel" msgstr "modèleParcoursMessage" #: prewikka/views/messagesummary.py:891 msgid "securityModel" msgstr "modèleSécurité" #: prewikka/views/messagesummary.py:892 msgid "securityName" msgstr "nomSécurité" #: prewikka/views/messagesummary.py:893 msgid "securityLevel" msgstr "niveauSécurité" #: prewikka/views/messagesummary.py:894 msgid "contextName" msgstr "nomContexte" #: prewikka/views/messagesummary.py:895 msgid "contextEngineID" msgstr "IDmoteurContexte" #: prewikka/views/messagesummary.py:896 msgid "command" msgstr "commande" #: prewikka/views/messagesummary.py:908 msgid "Port" msgstr "" #: prewikka/views/messagesummary.py:925 msgid "PortList" msgstr "" #: prewikka/views/messagesummary.py:928 #, fuzzy msgid "ip_version" msgstr "Version" #: prewikka/views/messagesummary.py:961 #, python-format msgid "Source(%d)" msgstr "Source(%d)" #: prewikka/views/messagesummary.py:970 #, python-format msgid "Target(%d)" msgstr "Destination(%d)" #: prewikka/views/messagesummary.py:991 msgid "Overflow Alert" msgstr "Surnombre d'alertes" #: prewikka/views/messagesummary.py:994 #: prewikka/templates/AlertListing.py:1149 msgid "Alert" msgstr "Alerte" #: prewikka/views/messagesummary.py:1013 msgid "MessageID" msgstr "" #: prewikka/views/messagesummary.py:1021 msgid "Actions" msgstr "" #: prewikka/views/messagesummary.py:1060 msgid "Network centric information" msgstr "Informations réseau" #: prewikka/views/messagesummary.py:1080 msgid "ASCII Payload" msgstr "Données ASCII" #: prewikka/views/messagesummary.py:1099 msgid "Heartbeat" msgstr "Pulsations" #: prewikka/views/__init__.py:45 msgid "Events" msgstr "Evénements" #: prewikka/views/__init__.py:45 prewikka/templates/SensorListing.py:547 msgid "Alerts" msgstr "Alertes" #: prewikka/views/__init__.py:46 msgid "CorrelationAlerts" msgstr "Alertes de Corrélation" #: prewikka/views/__init__.py:47 msgid "ToolAlerts" msgstr "Alertes d'outils" #: prewikka/views/__init__.py:50 msgid "Agents" msgstr "Agents" #: prewikka/views/__init__.py:51 prewikka/templates/SensorListing.py:553 msgid "Heartbeats" msgstr "Pulsations" #: prewikka/views/__init__.py:53 msgid "Statistics" msgstr "" #: prewikka/views/__init__.py:54 #, fuzzy msgid "Categorizations" msgstr "Catégorie" #: prewikka/views/__init__.py:55 #, fuzzy msgid "Sources" msgstr "Source" #: prewikka/views/__init__.py:56 #, fuzzy msgid "Targets" msgstr "Destination" #: prewikka/views/__init__.py:57 #, fuzzy msgid "Analyzers" msgstr "%d Agent" #: prewikka/views/__init__.py:58 #, fuzzy msgid "Timeline" msgstr "Fuseau Horaire" #: prewikka/views/__init__.py:61 msgid "Settings" msgstr "Paramètres" #: prewikka/views/__init__.py:62 msgid "Filters" msgstr "Filtres" #: prewikka/views/__init__.py:64 msgid "My account" msgstr "Mon compte" #: prewikka/views/__init__.py:67 msgid "User listing" msgstr "Utilisateurs" #: prewikka/views/__init__.py:71 msgid "About" msgstr "A propos" #: prewikka/views/sensor.py:51 msgid "Offline" msgstr "Déconnecté" #: prewikka/views/sensor.py:54 msgid "Unknown" msgstr "Inconnu" #: prewikka/views/sensor.py:57 msgid "Missing" msgstr "Manquant" #: prewikka/views/sensor.py:59 msgid "Online" msgstr "Connecté" #: prewikka/views/sensor.py:158 msgid "Node location n/a" msgstr "Emplacement du noeud inconnu" #: prewikka/views/sensor.py:159 msgid "Node name n/a" msgstr "Nom du noeud inconnu" #: prewikka/views/sensor.py:160 msgid "OS version n/a" msgstr "Version système inconnu" #: prewikka/views/sensor.py:161 msgid "OS type n/a" msgstr "Type du système inconnu" #: prewikka/views/filter.py:55 msgid "Example: (A AND B) OR (C AND D)" msgstr "Exemple : (A AND B) OR (C AND D)" #: prewikka/views/filter.py:137 prewikka/templates/FilterEdition.py:221 msgid "Load" msgstr "Charger" #: prewikka/views/filter.py:139 prewikka/templates/FilterEdition.py:339 #: prewikka/templates/MessageListing.py:665 prewikka/templates/Stats.py:531 msgid "Save" msgstr "Enregistrer" #: prewikka/views/filter.py:141 prewikka/templates/FilterEdition.py:227 #: prewikka/templates/SensorListing.py:406 #: prewikka/templates/SensorListing.py:559 #: prewikka/templates/MessageListing.py:369 msgid "Delete" msgstr "Effacer" #: prewikka/views/messagelisting.py:231 prewikka/templates/AlertListing.py:327 #: prewikka/templates/AlertListing.py:349 #: prewikka/templates/AlertListing.py:1198 #: prewikka/templates/AlertListing.py:1227 msgid "n/a" msgstr "" #: prewikka/views/stats.py:425 #, fuzzy msgid "Top 10 Classifications" msgstr "Classification" #: prewikka/views/stats.py:425 prewikka/templates/AlertListing.py:1111 msgid "Classification" msgstr "Classification" #: prewikka/views/stats.py:433 msgid "Top 10 Alert References" msgstr "" #: prewikka/views/stats.py:433 #, fuzzy msgid "References" msgstr "Rafraichir" #: prewikka/views/stats.py:442 prewikka/views/stats.py:768 #, fuzzy msgid "High" msgstr "haute" #: prewikka/views/stats.py:443 prewikka/views/stats.py:769 #, fuzzy msgid "Medium" msgstr "moyenne" #: prewikka/views/stats.py:444 prewikka/views/stats.py:770 #, fuzzy msgid "Low" msgstr "basse" #: prewikka/views/stats.py:445 prewikka/views/stats.py:771 #, fuzzy msgid "Informational" msgstr "Information sur la %s" #: prewikka/views/stats.py:446 prewikka/views/stats.py:772 msgid "N/a" msgstr "" #: prewikka/views/stats.py:448 #, fuzzy msgid "Severities" msgstr "Gravité" #: prewikka/views/stats.py:455 msgid "Alert Impact Types" msgstr "" #: prewikka/views/stats.py:455 msgid "Impact Types" msgstr "" #: prewikka/views/stats.py:490 #, fuzzy msgid "Top Source Country" msgstr "Port source" #: prewikka/views/stats.py:490 msgid "Country" msgstr "" #: prewikka/views/stats.py:542 #, fuzzy msgid "Top 10 Source Addresses" msgstr "Adresse source" #: prewikka/views/stats.py:542 prewikka/views/stats.py:645 #: prewikka/views/stats.py:727 #, fuzzy msgid "Address" msgstr "Adresse du noeud" #: prewikka/views/stats.py:550 msgid "Top 10 Source Users" msgstr "" #: prewikka/views/stats.py:550 prewikka/views/stats.py:653 #, fuzzy msgid "User" msgstr "Utilisateurs" #: prewikka/views/stats.py:645 #, fuzzy msgid "Top 10 Targeted Addresses" msgstr "Adresse destination" #: prewikka/views/stats.py:653 msgid "Top 10 Targeted Users" msgstr "" #: prewikka/views/stats.py:711 msgid "Top 10 Analyzer Models" msgstr "" #: prewikka/views/stats.py:719 msgid "Top 10 Analyzer Classes" msgstr "" #: prewikka/views/stats.py:727 msgid "Top 10 Analyzer Node Addresses" msgstr "" #: prewikka/views/stats.py:735 #, fuzzy msgid "Analyzer Locations" msgstr "Heure de l'agent" #: prewikka/views/stats.py:735 #, fuzzy msgid "Location" msgstr "Emplacement du noeud" #: prewikka/templates/About.py:107 msgid "" "provides support to Large Accounts, Major Companies and Government Agencies " "around the world, to improve and strengthen the security of their systems " "and networks." msgstr "" "accompagne les Grands Comptes, Grands Groupes et Administrations du monde " "entier dans l'amélioration et le renforcement de la sécurité de leurs " "systèmes et réseaux." #: prewikka/templates/About.py:125 msgid "Customizing Prelude" msgstr "Personnaliser Prelude" #: prewikka/templates/About.py:132 msgid "" "In keeping with the Open Source spirit, we encourage you to participate in " "the development of your application. You can order customized versions of " "Prelude to suit your needs: adapting, adding on functionality etc. Because " "they are carried out by PreludeIDS engineers, you know that any " "modifications made to the system will be integrated optimally and guaranteed " "by our technical support department. Additionally, the company can extend " "Prelude to handle yet unsupported sensors (including proprietary), ruleset " "extension to handle new devices and porting of Prelude to unsupported " "operating systems." msgstr "" "Dans l'esprit Open Source, nous vous proposons de participer au " "développement de votre logiciel. Vous pouvez commander des développements " "personnalisés de Prelude en fonction de vos besoins : customisation, ajout " "de fonctionnalités, etc. Réalisées par les ingénieurs PreludeIDS, les " "modifications apportées au système Prelude vous donneront l’assurance d’être " "intégrées de façon optimisée et garanties par notre Support Technique. De " "plus, notre entreprise peut mettre en compatibilité des sondes non encore " "supportées (incluant des sondes propriétaires), réaliser une extension des " "signatures pour la gestion de nouveaux systèmes ou encore porter Prelude sur " "un OS non encore supporté." #: prewikka/templates/About.py:141 msgid "Software Maintenance and Technical Support" msgstr "Support Technique et Maintenance Logicielle" #: prewikka/templates/About.py:148 msgid "" "PreludeIDS maintenance and support services guarantee optimal operation of " "the Prelude platform on your infrastructure. There are five support packages " "that provide our customers with peace of mind, knowing that they are not " "only covered for all outcomes, but that our experts are at hand to provide " "rapid and reliable solutions." msgstr "" "Le support PreludeIDS vous garantit le fonctionnement optimal du système " "Prelude sur votre infrastructure. PreludeIDS a créé cinq offres de support " "technique packagées. En vous assurant une assistance en cas d'incident, le " "support PreludeIDS met à votre disposition nos experts pour vous fournir des " "solutions rapides et fiables." #: prewikka/templates/About.py:157 msgid "Commercial licenses" msgstr "Licences commerciales" #: prewikka/templates/About.py:164 msgid "The Prelude framework is licensed under the" msgstr "La plateforme Prelude est diffusée sous licence" #: prewikka/templates/About.py:170 msgid "" "PreludeIDS provides specific commercial licenses to allow proprietary " "systems based on Prelude to be developed and to interoperate." msgstr "" "PreludeIDS Technologies propose des licences commerciales afin de permettre " "le développement et l’interopérabilité d’applications propriétaires." #: prewikka/templates/About.py:179 msgid "Advice, Deployment and Training" msgstr "Conseil, Déploiement et Formation" #: prewikka/templates/About.py:186 msgid "" "Through our partners, you have access to an array of top-of-the-line " "security services. By advising you on how to secure your infrastructure, " "deploying Prelude and training your users, we provide a turnkey solution to " "secure your infrastructure, delivered by specialists." msgstr "" "Aux côtés de ses partenaires, PreludeIDS vous propose des solutions haut de " "gamme associées à une grande qualité de conseils et de services (conseil, " "deploiement, formation, etc.) afin de concrétiser vos projets sécurité." #: prewikka/templates/About.py:205 msgid "Contact" msgstr "Contact" #: prewikka/templates/About.py:211 msgid "Office" msgstr "Bureau" #: prewikka/templates/About.py:217 msgid "Website" msgstr "Site web" #: prewikka/templates/About.py:230 msgid "Phone:" msgstr "Téléphone :" #: prewikka/templates/About.py:240 msgid "Fax:" msgstr "Fax :" #: prewikka/templates/HeartbeatListing.py:100 msgid "Agent" msgstr "Agent" #: prewikka/templates/HeartbeatListing.py:151 #: prewikka/templates/AlertListing.py:1348 msgid "Time" msgstr "Temps" #: prewikka/templates/HeartbeatListing.py:199 msgid "Heartbeat summary" msgstr "Détails sur l'heartbeat" #: prewikka/templates/HeartbeatListing.py:208 msgid "Filter on agent" msgstr "Filtrer sur l'agent" #: prewikka/templates/HeartbeatListing.py:229 #: prewikka/templates/SensorListing.py:316 msgid "Filter on address" msgstr "Filtrer sur l'adresse" #: prewikka/templates/FilterEdition.py:191 msgid "Available filters" msgstr "Filtres disponibles" #: prewikka/templates/FilterEdition.py:242 msgid "Edition" msgstr "Edition" #: prewikka/templates/FilterEdition.py:302 msgid "Formula:" msgstr "Formule :" #: prewikka/templates/FilterEdition.py:314 msgid "Name:" msgstr "Nom :" #: prewikka/templates/FilterEdition.py:326 msgid "Comment:" msgstr "Commentaire :" #: prewikka/templates/UserListing.py:100 msgid "Login" msgstr "Identifiant" #: prewikka/templates/UserListing.py:156 msgid "Delete user" msgstr "Effacer l'utilisateur" #: prewikka/templates/UserListing.py:169 msgid "Create user" msgstr "Créer un utilisateur" #: prewikka/templates/SensorListing.py:232 #, python-format msgid "%d Node" msgid_plural "%d Nodes" msgstr[0] "%d Noeud" msgstr[1] "%d Noeuds" #: prewikka/templates/SensorListing.py:237 #, python-format msgid "%d Analyzer" msgid_plural "%d Analyzers" msgstr[0] "%d Agent" msgstr[1] "%d Agents" #: prewikka/templates/SensorListing.py:244 #, fuzzy, python-format msgid "%d Online" msgid_plural "%d Online" msgstr[0] "%d Connecté" msgstr[1] "%d Connectés" #: prewikka/templates/SensorListing.py:246 #, fuzzy, python-format msgid "%d Offline" msgid_plural "%d Offline" msgstr[0] "%d Déconnecté" msgstr[1] "%d Déconnectés" #: prewikka/templates/SensorListing.py:248 #, fuzzy, python-format msgid "%d Unknown" msgid_plural "%d Unknown" msgstr[0] "%d Inconnu" msgstr[1] "%d Inconnus" #: prewikka/templates/SensorListing.py:250 #, fuzzy, python-format msgid "%d Missing" msgid_plural "%d Missing" msgstr[0] "%d Manquant" msgstr[1] "%d Manquants" #: prewikka/templates/SensorListing.py:328 msgid "Address information" msgstr "Informations sur l'adresse" #: prewikka/templates/SensorListing.py:362 #, fuzzy msgid "Total:" msgstr "total" #: prewikka/templates/SensorListing.py:436 msgid "Last heartbeat" msgstr "Dernière pulsation" #: prewikka/templates/SensorListing.py:442 msgid "Status" msgstr "" #: prewikka/templates/SensorListing.py:481 msgid "Alert listing" msgstr "Liste des alertes" #: prewikka/templates/SensorListing.py:490 msgid "Heartbeat listing" msgstr "Liste des pulsations" #: prewikka/templates/SensorListing.py:499 msgid "Heartbeat analysis" msgstr "Analyse des pulsations" #: prewikka/templates/ClassicLayout.py:231 msgid "logout" msgstr "déconnexion" #: prewikka/templates/ClassicLayout.py:243 #, python-format msgid "%(username)s on %(date)s" msgstr "%(username)s le %(date)s" #: prewikka/templates/UserSettings.py:157 msgid "Account information" msgstr "Informations sur le compte" #: prewikka/templates/UserSettings.py:168 msgid "Login:" msgstr "Identifiant :" #: prewikka/templates/UserSettings.py:201 msgid "Language:" msgstr "Langue :" #: prewikka/templates/UserSettings.py:235 msgid "Permissions:" msgstr "Permissions :" #: prewikka/templates/UserSettings.py:298 msgid "Check All" msgstr "Cocher tout" #: prewikka/templates/UserSettings.py:324 msgid "Change password" msgstr "Modifier le mot de passe" #: prewikka/templates/UserSettings.py:334 msgid "Current password:" msgstr "Mot de passe actuel :" #: prewikka/templates/UserSettings.py:344 msgid "New password:" msgstr "Nouveau mot de passe :" #: prewikka/templates/UserSettings.py:353 msgid "Confirm new password:" msgstr "Confirmation du mot de passe :" #: prewikka/templates/UserSettings.py:366 msgid "Submit Changes" msgstr "Soumettre les modifications" #: prewikka/templates/MessageListing.py:478 msgid "Period" msgstr "Periode" #: prewikka/templates/MessageListing.py:493 msgid "Minutes" msgstr "Minutes" #: prewikka/templates/MessageListing.py:502 msgid "Hours" msgstr "Heures" #: prewikka/templates/MessageListing.py:511 msgid "Days" msgstr "Jours" #: prewikka/templates/MessageListing.py:520 msgid "Months" msgstr "Mois" #: prewikka/templates/MessageListing.py:529 msgid "Years" msgstr "Années" #: prewikka/templates/MessageListing.py:538 msgid "Unlimited" msgstr "Illimitée" #: prewikka/templates/MessageListing.py:549 msgid "Timezone" msgstr "Fuseau Horaire" #: prewikka/templates/MessageListing.py:560 msgid "Frontend localtime" msgstr "Heure locale de Prewikka" #: prewikka/templates/MessageListing.py:569 msgid "Sensor localtime" msgstr "Heure locale de la sonde" #: prewikka/templates/MessageListing.py:578 msgid "UTC" msgstr "" #: prewikka/templates/MessageListing.py:589 msgid "Limit" msgstr "Limite" #: prewikka/templates/MessageListing.py:613 msgid "Refresh" msgstr "Rafraichir" #: prewikka/templates/MessageListing.py:660 prewikka/templates/Stats.py:526 msgid "Apply" msgstr "Appliquer" #: prewikka/templates/MessageListing.py:708 #: prewikka/templates/MessageListing.py:716 msgid "prev" msgstr "préc" #: prewikka/templates/MessageListing.py:729 #: prewikka/templates/MessageListing.py:737 msgid "current" msgstr "actuel" #: prewikka/templates/MessageListing.py:750 #: prewikka/templates/MessageListing.py:758 msgid "next" msgstr "suiv" #: prewikka/templates/MessageListing.py:812 msgid "total" msgstr "total" #: prewikka/templates/AlertListing.py:112 msgid "Equal" msgstr "Egal" #: prewikka/templates/AlertListing.py:118 msgid "Not equal" msgstr "" #: prewikka/templates/AlertListing.py:124 msgid "Lesser than" msgstr "Plus petit que" #: prewikka/templates/AlertListing.py:130 msgid "Greater than" msgstr "Plus grand que" #: prewikka/templates/AlertListing.py:136 msgid "Lesser or equal" msgstr "Plus petit ou égal" #: prewikka/templates/AlertListing.py:142 msgid "Greater or equal" msgstr "Plus grand ou égal" #: prewikka/templates/AlertListing.py:148 msgid "Substring" msgstr "Sous chaîne" #: prewikka/templates/AlertListing.py:154 msgid "Substring (case-insensitive)" msgstr "Sous chaîne (non sensible à la casse)" #: prewikka/templates/AlertListing.py:160 msgid "Regular expression" msgstr "Expression régulière" #: prewikka/templates/AlertListing.py:166 msgid "Regular expression (case-insensitive)" msgstr "Expression régulière (non sensible à la casse)" #: prewikka/templates/AlertListing.py:319 #: prewikka/templates/AlertListing.py:1190 msgid "info" msgstr "info" #: prewikka/templates/AlertListing.py:321 #: prewikka/templates/AlertListing.py:1192 msgid "low" msgstr "basse" #: prewikka/templates/AlertListing.py:323 #: prewikka/templates/AlertListing.py:1194 msgid "medium" msgstr "moyenne" #: prewikka/templates/AlertListing.py:325 #: prewikka/templates/AlertListing.py:1196 msgid "high" msgstr "haute" #: prewikka/templates/AlertListing.py:345 #: prewikka/templates/AlertListing.py:1223 msgid "succeeded" msgstr "succès" #: prewikka/templates/AlertListing.py:347 #: prewikka/templates/AlertListing.py:1225 msgid "failed" msgstr "échec" #: prewikka/templates/AlertListing.py:843 #, fuzzy msgid "Filter on" msgstr "Filtrer sur :" #: prewikka/templates/AlertListing.py:963 msgid "Group entry by:" msgstr "Grouper les entrées par :" #: prewikka/templates/AlertListing.py:1027 #: prewikka/templates/AlertListing.py:1035 #, fuzzy msgid "filtered" msgstr "échec" #: prewikka/templates/AlertListing.py:1136 msgid "Type:" msgstr "Type :" #: prewikka/templates/AlertListing.py:1151 msgid "CorrelationAlert" msgstr "Alertes de correlation" #: prewikka/templates/AlertListing.py:1153 msgid "OverflowAlert" msgstr "Alertes de débordement" #: prewikka/templates/AlertListing.py:1155 msgid "ToolAlert" msgstr "Alertes d'outils" #: prewikka/templates/AlertListing.py:1184 msgid "Severity:" msgstr "Gravité :" #: prewikka/templates/AlertListing.py:1215 msgid "Completion:" msgstr "Accomplissement :" #: prewikka/templates/AlertListing.py:1253 msgid "Source" msgstr "Source" #: prewikka/templates/AlertListing.py:1285 msgid "Target" msgstr "Destination" #: prewikka/templates/AlertListing.py:1317 #, fuzzy msgid "Analyzer" msgstr "%d Agent" #: prewikka/templates/AlertListing.py:1459 msgid "See alert detail" msgstr "" #: prewikka/templates/AlertListing.py:1468 #, fuzzy msgid "Filter on this classification.text" msgstr "Filtrer sur la %s" #: prewikka/templates/AlertListing.py:1522 #, fuzzy msgid "Filter on this port/protocol" msgstr "Filtrer sur la %s" #: prewikka/templates/AlertListing.py:1541 #: prewikka/templates/AlertListing.py:1549 #, fuzzy msgid "Port/protocol information" msgstr "Informations réseau" #: prewikka/templates/AlertListing.py:1598 msgid "alert" msgid_plural "alerts" msgstr[0] "alerte" msgstr[1] "alertes" #: prewikka/templates/AlertListing.py:1622 #, python-format msgid "%(hidden)d of %(total)d alerts not shown..." msgstr "%(hidden)d sur %(total)d alertes invisibles..." #: prewikka/templates/AlertListing.py:1633 #: prewikka/templates/AlertListing.py:1825 msgid "expand" msgstr "développer" #: prewikka/templates/AlertListing.py:1778 #, fuzzy msgid "Filter on this reference" msgstr "Filtrer sur la %s" #: prewikka/templates/AlertListing.py:1802 msgid "source" msgstr "source" #: prewikka/templates/AlertListing.py:1804 msgid "target" msgstr "destination" #: prewikka/templates/AlertListing.py:1814 #, python-format msgid "%(hidden)d of %(total)d %(name)ss not shown..." msgstr "%(hidden)d sur %(total)d %(name)ss invisibles..." #: prewikka/templates/AlertListing.py:1856 #, python-format msgid "Filter on this %s" msgstr "Filtrer sur la %s" #: prewikka/templates/AlertListing.py:1874 #, python-format msgid "%s information" msgstr "Information sur la %s" #: prewikka/templates/AlertListing.py:2114 msgid "Filter" msgstr "Filtre" #: prewikka/templates/LoginPasswordForm.py:130 msgid "Submit" msgstr "Valider" #: prewikka/templates/Stats.py:356 #, fuzzy msgid "Filter:" msgstr "Filtre" #: prewikka/templates/Stats.py:386 #, fuzzy msgid "Time:" msgstr "Temps" #: prewikka/templates/Stats.py:397 #, fuzzy msgid "Hour" msgstr "Heures" #: prewikka/templates/Stats.py:406 #, fuzzy msgid "Day" msgstr "Jours" #: prewikka/templates/Stats.py:415 #, fuzzy msgid "Month" msgstr "Mois" #: prewikka/templates/Stats.py:424 msgid "Custom" msgstr "" #: prewikka/templates/Stats.py:434 #, fuzzy msgid "From:" msgstr "Formule :" #: prewikka/templates/Stats.py:477 #, fuzzy msgid "To:" msgstr "total" #: prewikka/modules/auth/cgi/cgi.py:41 msgid "CGI Authentication failed: no user specified." msgstr "Echec de l'authentification CGI : aucun utilisateur spécifié." #~ msgid "Invalid 'analyzerid:messageid' pair, '%(analyzerid):%(messageid)'" #~ msgstr "Paire 'analyzerid:messageid' invalide, '%(analyzerid):%(messageid)'" #~ msgid "none" #~ msgstr "aucun" #~ msgid "Sensor" #~ msgstr "Sonde" #, fuzzy #~ msgid "Failed authentication" #~ msgstr "Echec de l'authentification" #~ msgid "Expired session" #~ msgstr "Session expirée" #~ msgid "Username and password do not match." #~ msgstr "Identifiant et/ou mot de passe erroné(s)" #~ msgid "anonymous" #~ msgstr "anonyme" #~ msgid "The Prewikka database does not seem to have been created" #~ msgstr "La base de données pour Prewikka n'a pas l'air d'avoir été crée" #, fuzzy #~ msgid "SSLcert Authentication failed: Not in a SSL session." #~ msgstr "Echec de l'authentification CGI : aucun utilisateur spécifié." #, fuzzy #~ msgid "SSLcert Authentication failed: no user specified in x509 CN." #~ msgstr "Echec de l'authentification CGI : aucun utilisateur spécifié." # python-format #~ msgid "%(missing)d missing, %(unknown)d unknown of %(total)d analyzers" #~ msgstr "%(missing)d manquants, %(unknown)d inconnus sur %(total)d agents" #~ msgid "All analyzers online" #~ msgstr "Tout les agents sont connectés" # python-format #~ msgid "%(missing)d missing, %(unknown)d unknown, of %(total)d analyzers" #~ msgstr "%(missing)d manquant, %(unknown)d inconnus, sur %(total)d agents" #~ msgid "on" #~ msgstr "le" #, fuzzy #~ msgid "Node Name" #~ msgstr "Nom du noeud" #~ msgid "No agent available" #~ msgstr "Pas d'agent disponible" #~ msgid "French" #~ msgstr "Français" #~ msgid "Latest status" #~ msgstr "Dernier état" prewikka-1.0.0/po/es.po0000664000076400007640000010230611340777332013767 0ustar yoannyoann# Spanish translation for Prewikka. # Copyright (C) 2007 PreludeIDS Technologies # This file is distributed under the same license as the Prewikka package. # Carlo G. Añez M. , 2007. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Prewikka 0.99\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-02-10 13:34+0100\n" "PO-Revision-Date: 2007-04-11 10:55-0400\n" "Last-Translator: Carlo Anez \n" "Language-Team: SPANISH\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Spanish\n" "X-Poedit-Country: Bolivia\n" "X-Poedit-SourceCharset: utf-8\n" #: prewikka/User.py:41 msgid "Permission Denied" msgstr "Permiso Denegado" #: prewikka/User.py:42 #, python-format msgid "Access to view '%s' forbidden" msgstr "El acceso a la vista '%s' esta prohibida" #: prewikka/Auth.py:29 msgid "Authentication failed" msgstr "Autenticación fallida" #: prewikka/Auth.py:35 msgid "Invalid session" msgstr "" #: prewikka/Auth.py:41 msgid "Session expired" msgstr "Sesión expirada" #: prewikka/Auth.py:138 msgid "Logged out" msgstr "Desconectado" #: prewikka/Log.py:65 #, python-format msgid "Unknown logtype specified: '%s'" msgstr "Tipo de log especificado desconocido: '%s'" #: prewikka/view.py:29 prewikka/view.py:35 prewikka/view.py:41 msgid "Parameters Normalization failed" msgstr "La normalización de los parámetros falló" #: prewikka/Database.py:98 #, python-format msgid "" "Database schema version %(version)s found when %(reqversion)s was required" msgstr "" #: prewikka/localization.py:107 msgid "January" msgstr "Enero" #: prewikka/localization.py:108 msgid "February" msgstr "Febero" #: prewikka/localization.py:109 msgid "March" msgstr "Marzo" #: prewikka/localization.py:110 msgid "April" msgstr "Abril" #: prewikka/localization.py:111 msgid "May" msgstr "Mayo" #: prewikka/localization.py:112 msgid "June" msgstr "Junio" #: prewikka/localization.py:113 msgid "July" msgstr "Julio" #: prewikka/localization.py:114 msgid "August" msgstr "Agosto" #: prewikka/localization.py:115 msgid "September" msgstr "Septiembre" #: prewikka/localization.py:116 msgid "November" msgstr "Noviembre" #: prewikka/localization.py:117 msgid "October" msgstr "Octubre" #: prewikka/localization.py:118 msgid "December" msgstr "Diciembre" #: prewikka/localization.py:120 msgid "Monday" msgstr "Lunes" #: prewikka/localization.py:121 msgid "Tuesday" msgstr "Martes" #: prewikka/localization.py:122 msgid "Wednesday" msgstr "Miercoles" #: prewikka/localization.py:123 msgid "Thursday" msgstr "Jueves" #: prewikka/localization.py:124 msgid "Friday" msgstr "Viernes" #: prewikka/localization.py:125 msgid "Saturday" msgstr "Sábado" #: prewikka/localization.py:126 msgid "Sunday" msgstr "Domingo" #: prewikka/Filter.py:78 #, python-format msgid "Invalid filter element '%s' referenced from filter formula" msgstr "" "Elemento de filtro '%s' inválido, referenciado por la formula del filtro" #: prewikka/views/messagesummary.py:304 prewikka/views/messagesummary.py:461 #: prewikka/views/messagesummary.py:691 prewikka/views/messagesummary.py:708 #: prewikka/views/messagesummary.py:731 prewikka/views/messagesummary.py:789 #: prewikka/views/messagesummary.py:808 prewikka/views/messagesummary.py:844 #: prewikka/templates/SensorListing.py:412 msgid "Name" msgstr "Nombre" #: prewikka/views/messagesummary.py:305 prewikka/views/messagesummary.py:611 msgid "Code" msgstr "" #: prewikka/views/messagesummary.py:306 msgid "Data length" msgstr "" #: prewikka/views/messagesummary.py:307 msgid "Data" msgstr "" #: prewikka/views/messagesummary.py:403 prewikka/views/messagesummary.py:846 #, fuzzy msgid "Create time" msgstr "Crear usuario" #: prewikka/views/messagesummary.py:406 msgid "Detect time" msgstr "" #: prewikka/views/messagesummary.py:411 msgid "Analyzer time" msgstr "" #: prewikka/views/messagesummary.py:417 msgid "Process" msgstr "" #: prewikka/views/messagesummary.py:418 msgid "Process Path" msgstr "" #: prewikka/views/messagesummary.py:419 msgid "Process PID" msgstr "" #: prewikka/views/messagesummary.py:427 #, fuzzy msgid "Node location" msgstr "Lugar del nodo" #: prewikka/views/messagesummary.py:449 #: prewikka/templates/HeartbeatListing.py:126 #, fuzzy msgid "Node name" msgstr "Nombre del nodo" #: prewikka/views/messagesummary.py:452 #, fuzzy msgid "Node name (resolved)" msgstr "Nombre del nodo" #: prewikka/views/messagesummary.py:454 #: prewikka/templates/HeartbeatListing.py:113 #, fuzzy msgid "Node address" msgstr "Dirección del nodo" #: prewikka/views/messagesummary.py:460 prewikka/views/stats.py:711 #: prewikka/templates/HeartbeatListing.py:139 #: prewikka/templates/SensorListing.py:418 msgid "Model" msgstr "" #: prewikka/views/messagesummary.py:462 msgid "Analyzerid" msgstr "" #: prewikka/views/messagesummary.py:463 prewikka/views/messagesummary.py:563 #: prewikka/templates/SensorListing.py:424 #, fuzzy msgid "Version" msgstr "Permisos:" #: prewikka/views/messagesummary.py:464 prewikka/views/stats.py:719 #: prewikka/templates/SensorListing.py:430 msgid "Class" msgstr "" #: prewikka/views/messagesummary.py:466 msgid "Manufacturer" msgstr "" #: prewikka/views/messagesummary.py:474 msgid "Operating System" msgstr "" #: prewikka/views/messagesummary.py:492 #, python-format msgid "Analyzer Path (%d not shown)" msgstr "" #: prewikka/views/messagesummary.py:499 prewikka/views/messagesummary.py:1030 #: prewikka/views/messagesummary.py:1102 #, python-format msgid "Analyzer #%d" msgstr "" #: prewikka/views/messagesummary.py:509 msgid "Additional data" msgstr "" #: prewikka/views/messagesummary.py:512 prewikka/views/messagesummary.py:732 msgid "Meaning" msgstr "" #: prewikka/views/messagesummary.py:513 msgid "Value" msgstr "" #: prewikka/views/messagesummary.py:564 prewikka/views/messagesummary.py:585 msgid "Header length" msgstr "" #: prewikka/views/messagesummary.py:565 #, fuzzy msgid "TOS" msgstr "SO" #: prewikka/views/messagesummary.py:566 prewikka/views/messagesummary.py:604 msgid "Length" msgstr "" #: prewikka/views/messagesummary.py:567 prewikka/views/messagesummary.py:613 msgid "Id" msgstr "" #: prewikka/views/messagesummary.py:571 msgid "Ip offset" msgstr "" #: prewikka/views/messagesummary.py:572 msgid "TTL" msgstr "" #: prewikka/views/messagesummary.py:573 prewikka/views/messagesummary.py:932 #: prewikka/views/messagesummary.py:935 prewikka/views/messagesummary.py:938 msgid "Protocol" msgstr "" #: prewikka/views/messagesummary.py:574 prewikka/views/messagesummary.py:596 #: prewikka/views/messagesummary.py:605 prewikka/views/messagesummary.py:612 msgid "Checksum" msgstr "" #: prewikka/views/messagesummary.py:575 #, fuzzy msgid "Source address" msgstr "Dirección del nodo" #: prewikka/views/messagesummary.py:576 #, fuzzy msgid "Target address" msgstr "Dirección del nodo" #: prewikka/views/messagesummary.py:581 prewikka/views/messagesummary.py:602 #, fuzzy msgid "Source port" msgstr "Origen" #: prewikka/views/messagesummary.py:582 prewikka/views/messagesummary.py:603 #, fuzzy msgid "Target port" msgstr "Destino" #: prewikka/views/messagesummary.py:586 msgid "Reserved" msgstr "" #: prewikka/views/messagesummary.py:595 #, fuzzy msgid "Window" msgstr "informacion" #: prewikka/views/messagesummary.py:597 msgid "URP" msgstr "" #: prewikka/views/messagesummary.py:610 prewikka/views/messagesummary.py:755 #: prewikka/views/messagesummary.py:788 prewikka/views/messagesummary.py:807 msgid "Type" msgstr "Tipo" #: prewikka/views/messagesummary.py:614 msgid "Seq #" msgstr "" #: prewikka/views/messagesummary.py:615 msgid "Mask" msgstr "" #: prewikka/views/messagesummary.py:616 #, fuzzy msgid "Gateway Address" msgstr "Dirección del nodo" #: prewikka/views/messagesummary.py:617 #, fuzzy msgid "Num address" msgstr "Dirección del nodo" #: prewikka/views/messagesummary.py:618 msgid "Wpa" msgstr "" #: prewikka/views/messagesummary.py:619 msgid "Lifetime" msgstr "" #: prewikka/views/messagesummary.py:620 #, fuzzy msgid "Otime" msgstr "Hora" #: prewikka/views/messagesummary.py:621 #, fuzzy msgid "Rtime" msgstr "Hora" #: prewikka/views/messagesummary.py:622 #, fuzzy msgid "Ttime" msgstr "Hora" #: prewikka/views/messagesummary.py:628 prewikka/views/messagesummary.py:1077 msgid "Payload" msgstr "" #: prewikka/views/messagesummary.py:675 #, python-format msgid "%d linked alerts missing (probably deleted)" msgstr "" #: prewikka/views/messagesummary.py:689 prewikka/views/messagesummary.py:985 #: prewikka/views/alertlisting.py:707 #, fuzzy msgid "Correlation Alert" msgstr "Alerta de correlación" #: prewikka/views/messagesummary.py:695 #, fuzzy msgid "Correlated Alert" msgstr "Alerta de correlación" #: prewikka/views/messagesummary.py:696 prewikka/views/messagesummary.py:713 msgid "Source Analyzer" msgstr "" #: prewikka/views/messagesummary.py:706 prewikka/views/messagesummary.py:988 #: prewikka/views/alertlisting.py:711 #, fuzzy msgid "Tool Alert" msgstr "Alerta de herramienta" #: prewikka/views/messagesummary.py:712 msgid "Linked Alert" msgstr "" #: prewikka/views/messagesummary.py:723 #, fuzzy msgid "Text" msgstr "siguiente" #: prewikka/views/messagesummary.py:725 #, fuzzy msgid "Ident" msgstr "Agente:" #: prewikka/views/messagesummary.py:730 msgid "Origin" msgstr "" #: prewikka/views/messagesummary.py:749 prewikka/views/stats.py:448 #, fuzzy msgid "Severity" msgstr "Severidad" #: prewikka/views/messagesummary.py:752 #, fuzzy msgid "Completion" msgstr "Completado:" #: prewikka/views/messagesummary.py:756 prewikka/views/messagesummary.py:762 msgid "Description" msgstr "" #: prewikka/views/messagesummary.py:761 msgid "Category" msgstr "" #: prewikka/views/messagesummary.py:785 msgid "User category" msgstr "" #: prewikka/views/messagesummary.py:790 prewikka/views/messagesummary.py:809 #, fuzzy msgid "Number" msgstr "Noviembre" #: prewikka/views/messagesummary.py:791 msgid "Tty" msgstr "" #: prewikka/views/messagesummary.py:810 #, fuzzy msgid "Permission" msgstr "Permisos:" #: prewikka/views/messagesummary.py:832 msgid "Change time" msgstr "" #: prewikka/views/messagesummary.py:833 #, fuzzy msgid "Inode Number" msgstr "Nombre del nodo" #: prewikka/views/messagesummary.py:834 msgid "Major device" msgstr "" #: prewikka/views/messagesummary.py:835 msgid "Minor device" msgstr "" #: prewikka/views/messagesummary.py:836 msgid "C Major device" msgstr "" #: prewikka/views/messagesummary.py:837 msgid "C Minor device" msgstr "" #: prewikka/views/messagesummary.py:841 #, fuzzy, python-format msgid "Target file %s" msgstr "Destino" #: prewikka/views/messagesummary.py:845 msgid "Path" msgstr "" #: prewikka/views/messagesummary.py:847 msgid "Modify time" msgstr "" #: prewikka/views/messagesummary.py:848 msgid "Access time" msgstr "" #: prewikka/views/messagesummary.py:849 msgid "Data size" msgstr "" #: prewikka/views/messagesummary.py:850 msgid "Disk size" msgstr "" #: prewikka/views/messagesummary.py:869 msgid "Web Service" msgstr "" #: prewikka/views/messagesummary.py:872 msgid "Url" msgstr "" #: prewikka/views/messagesummary.py:873 msgid "Cgi" msgstr "" #: prewikka/views/messagesummary.py:874 msgid "Http Method" msgstr "" #: prewikka/views/messagesummary.py:877 msgid "CGI Argument" msgstr "" #: prewikka/views/messagesummary.py:886 msgid "SNMP Service" msgstr "" #: prewikka/views/messagesummary.py:889 msgid "oid" msgstr "" #: prewikka/views/messagesummary.py:890 msgid "messageProcessingModel" msgstr "" #: prewikka/views/messagesummary.py:891 msgid "securityModel" msgstr "" #: prewikka/views/messagesummary.py:892 msgid "securityName" msgstr "" #: prewikka/views/messagesummary.py:893 msgid "securityLevel" msgstr "" #: prewikka/views/messagesummary.py:894 #, fuzzy msgid "contextName" msgstr "Nombre del nodo" #: prewikka/views/messagesummary.py:895 msgid "contextEngineID" msgstr "" #: prewikka/views/messagesummary.py:896 msgid "command" msgstr "" #: prewikka/views/messagesummary.py:908 msgid "Port" msgstr "" #: prewikka/views/messagesummary.py:925 msgid "PortList" msgstr "" #: prewikka/views/messagesummary.py:928 #, fuzzy msgid "ip_version" msgstr "Permisos:" #: prewikka/views/messagesummary.py:961 #, fuzzy, python-format msgid "Source(%d)" msgstr "Origen" #: prewikka/views/messagesummary.py:970 #, fuzzy, python-format msgid "Target(%d)" msgstr "Destino" #: prewikka/views/messagesummary.py:991 #, fuzzy msgid "Overflow Alert" msgstr "Alerta de desborde" #: prewikka/views/messagesummary.py:994 #: prewikka/templates/AlertListing.py:1149 msgid "Alert" msgstr "Alerta" #: prewikka/views/messagesummary.py:1013 msgid "MessageID" msgstr "" #: prewikka/views/messagesummary.py:1021 msgid "Actions" msgstr "" #: prewikka/views/messagesummary.py:1060 #, fuzzy msgid "Network centric information" msgstr "Información sobre cuentas" #: prewikka/views/messagesummary.py:1080 msgid "ASCII Payload" msgstr "" #: prewikka/views/messagesummary.py:1099 #, fuzzy msgid "Heartbeat" msgstr "Pulsos" #: prewikka/views/__init__.py:45 msgid "Events" msgstr "Eventos" #: prewikka/views/__init__.py:45 prewikka/templates/SensorListing.py:547 msgid "Alerts" msgstr "Alertas" #: prewikka/views/__init__.py:46 msgid "CorrelationAlerts" msgstr "Alertas de correlación" #: prewikka/views/__init__.py:47 msgid "ToolAlerts" msgstr "Alertas de herramientas" #: prewikka/views/__init__.py:50 msgid "Agents" msgstr "Agentes" #: prewikka/views/__init__.py:51 prewikka/templates/SensorListing.py:553 msgid "Heartbeats" msgstr "Pulsos" #: prewikka/views/__init__.py:53 msgid "Statistics" msgstr "" #: prewikka/views/__init__.py:54 msgid "Categorizations" msgstr "" #: prewikka/views/__init__.py:55 #, fuzzy msgid "Sources" msgstr "Origen" #: prewikka/views/__init__.py:56 #, fuzzy msgid "Targets" msgstr "Destino" #: prewikka/views/__init__.py:57 #, fuzzy msgid "Analyzers" msgstr "Alertas" #: prewikka/views/__init__.py:58 #, fuzzy msgid "Timeline" msgstr "Hora" #: prewikka/views/__init__.py:61 msgid "Settings" msgstr "Configuraciones" #: prewikka/views/__init__.py:62 msgid "Filters" msgstr "Filtros" #: prewikka/views/__init__.py:64 msgid "My account" msgstr "" #: prewikka/views/__init__.py:67 #, fuzzy msgid "User listing" msgstr "Lista de alertas" #: prewikka/views/__init__.py:71 msgid "About" msgstr "Información" #: prewikka/views/sensor.py:51 msgid "Offline" msgstr "" #: prewikka/views/sensor.py:54 msgid "Unknown" msgstr "" #: prewikka/views/sensor.py:57 msgid "Missing" msgstr "" #: prewikka/views/sensor.py:59 #, fuzzy msgid "Online" msgstr "ninguno" #: prewikka/views/sensor.py:158 #, fuzzy msgid "Node location n/a" msgstr "Lugar del nodo" #: prewikka/views/sensor.py:159 #, fuzzy msgid "Node name n/a" msgstr "Nombre del nodo" #: prewikka/views/sensor.py:160 #, fuzzy msgid "OS version n/a" msgstr "Sesión invalida" #: prewikka/views/sensor.py:161 msgid "OS type n/a" msgstr "" #: prewikka/views/filter.py:55 msgid "Example: (A AND B) OR (C AND D)" msgstr "" #: prewikka/views/filter.py:137 prewikka/templates/FilterEdition.py:221 msgid "Load" msgstr "Carga" #: prewikka/views/filter.py:139 prewikka/templates/FilterEdition.py:339 #: prewikka/templates/MessageListing.py:665 prewikka/templates/Stats.py:531 msgid "Save" msgstr "Guardar" #: prewikka/views/filter.py:141 prewikka/templates/FilterEdition.py:227 #: prewikka/templates/SensorListing.py:406 #: prewikka/templates/SensorListing.py:559 #: prewikka/templates/MessageListing.py:369 msgid "Delete" msgstr "Borrar" #: prewikka/views/messagelisting.py:231 prewikka/templates/AlertListing.py:327 #: prewikka/templates/AlertListing.py:349 #: prewikka/templates/AlertListing.py:1198 #: prewikka/templates/AlertListing.py:1227 msgid "n/a" msgstr "" #: prewikka/views/stats.py:425 #, fuzzy msgid "Top 10 Classifications" msgstr "Clasificación" #: prewikka/views/stats.py:425 prewikka/templates/AlertListing.py:1111 msgid "Classification" msgstr "Clasificación" #: prewikka/views/stats.py:433 msgid "Top 10 Alert References" msgstr "" #: prewikka/views/stats.py:433 msgid "References" msgstr "" #: prewikka/views/stats.py:442 prewikka/views/stats.py:768 #, fuzzy msgid "High" msgstr "alta" #: prewikka/views/stats.py:443 prewikka/views/stats.py:769 #, fuzzy msgid "Medium" msgstr "mediana" #: prewikka/views/stats.py:444 prewikka/views/stats.py:770 #, fuzzy msgid "Low" msgstr "baja" #: prewikka/views/stats.py:445 prewikka/views/stats.py:771 #, fuzzy msgid "Informational" msgstr "Información de la dirección" #: prewikka/views/stats.py:446 prewikka/views/stats.py:772 msgid "N/a" msgstr "" #: prewikka/views/stats.py:448 #, fuzzy msgid "Severities" msgstr "Severidad" #: prewikka/views/stats.py:455 msgid "Alert Impact Types" msgstr "" #: prewikka/views/stats.py:455 msgid "Impact Types" msgstr "" #: prewikka/views/stats.py:490 #, fuzzy msgid "Top Source Country" msgstr "Origen" #: prewikka/views/stats.py:490 msgid "Country" msgstr "" #: prewikka/views/stats.py:542 #, fuzzy msgid "Top 10 Source Addresses" msgstr "Dirección del nodo" #: prewikka/views/stats.py:542 prewikka/views/stats.py:645 #: prewikka/views/stats.py:727 #, fuzzy msgid "Address" msgstr "Dirección del nodo" #: prewikka/views/stats.py:550 msgid "Top 10 Source Users" msgstr "" #: prewikka/views/stats.py:550 prewikka/views/stats.py:653 #, fuzzy msgid "User" msgstr "Usuarios" #: prewikka/views/stats.py:645 #, fuzzy msgid "Top 10 Targeted Addresses" msgstr "Dirección del nodo" #: prewikka/views/stats.py:653 msgid "Top 10 Targeted Users" msgstr "" #: prewikka/views/stats.py:711 msgid "Top 10 Analyzer Models" msgstr "" #: prewikka/views/stats.py:719 msgid "Top 10 Analyzer Classes" msgstr "" #: prewikka/views/stats.py:727 msgid "Top 10 Analyzer Node Addresses" msgstr "" #: prewikka/views/stats.py:735 msgid "Analyzer Locations" msgstr "" #: prewikka/views/stats.py:735 #, fuzzy msgid "Location" msgstr "Lugar del nodo" #: prewikka/templates/About.py:107 msgid "" "provides support to Large Accounts, Major Companies and Government Agencies " "around the world, to improve and strengthen the security of their systems " "and networks." msgstr "" "Proveer soporte a Empresas Grandes, Agencias de Gobierno, Cuentas " "Importantes alrededor del mundo, para mejorar y fortificar la seguridad de " "sus sistemas y redes" #: prewikka/templates/About.py:125 msgid "Customizing Prelude" msgstr "Personalizando Prelude" #: prewikka/templates/About.py:132 msgid "" "In keeping with the Open Source spirit, we encourage you to participate in " "the development of your application. You can order customized versions of " "Prelude to suit your needs: adapting, adding on functionality etc. Because " "they are carried out by PreludeIDS engineers, you know that any " "modifications made to the system will be integrated optimally and guaranteed " "by our technical support department. Additionally, the company can extend " "Prelude to handle yet unsupported sensors (including proprietary), ruleset " "extension to handle new devices and porting of Prelude to unsupported " "operating systems." msgstr "" "Manteniendo el espíritu del Código Abierto, los animamos a que participen en " "el desarrollo de su aplicación. Se pueden ordenar versiones personalizadas " "de Prelude para sus necesidades: adaptando, añadiendo funcionalidades etc. " "Ya que estos cambios son realizado por ingenieros certificados por " "PreludeIDS, se puede saber que cualquier modificación realizada al sisetma " "sera integrada optimamente y garantizada por el departamento de soporte " "tecnico nuestro. Adicionalmente, la empresa puede extender Prelude para " "soportar sensores no soportados (incluyendo propietarios), extensiones de de " "reglas para soportar nuevos dispositivos y ejecutar Prelude en sistemas " "operativos no soportados. " #: prewikka/templates/About.py:141 msgid "Software Maintenance and Technical Support" msgstr "Mantenimiento de software y Soporte Técnico" #: prewikka/templates/About.py:148 #, fuzzy msgid "" "PreludeIDS maintenance and support services guarantee optimal operation of " "the Prelude platform on your infrastructure. There are five support packages " "that provide our customers with peace of mind, knowing that they are not " "only covered for all outcomes, but that our experts are at hand to provide " "rapid and reliable solutions." msgstr "" "El mantenimiento y servicios de soporte de PreludeIDS garantiza la operación " "óptima de la plataforma Prelude en su infraestructura. Con nuestro servicio " "de soporte, usted se beneficiará con asistencia prioritaria y con la " "experiencia de nuestros ingenieros, mientras el servicio de mantenimiento " "que ofrecemos mantiene y actualiza su software." #: prewikka/templates/About.py:157 msgid "Commercial licenses" msgstr "Licencias comerciales" #: prewikka/templates/About.py:164 msgid "The Prelude framework is licensed under the" msgstr "El ambiente de trabajo de Prelude esta licenciado bajo la" #: prewikka/templates/About.py:170 msgid "" "PreludeIDS provides specific commercial licenses to allow proprietary " "systems based on Prelude to be developed and to interoperate." msgstr "" "PreludeIDS provee licencias comerciales específicas para permitir a sistemas " "propietarios basados en Prelude sean desarrollados y que puedan interoperar " "entre ellos." #: prewikka/templates/About.py:179 msgid "Advice, Deployment and Training" msgstr "Consultas, Implementación y Entrenamiento" #: prewikka/templates/About.py:186 msgid "" "Through our partners, you have access to an array of top-of-the-line " "security services. By advising you on how to secure your infrastructure, " "deploying Prelude and training your users, we provide a turnkey solution to " "secure your infrastructure, delivered by specialists." msgstr "" "A través de nuestros socios de negocios, se tiene acceso a un conjunto de " "servicios valudas como los mejores del mercado. Al aconsejarlo en como " "asegurar su infraestructura, implementando Prelude y entrenando a sus " "usuarios, le proveemos una solución eficiente para asegurar su " "infraestructura, llevado de la mano de especialistas." #: prewikka/templates/About.py:205 msgid "Contact" msgstr "Contacto" #: prewikka/templates/About.py:211 msgid "Office" msgstr "" #: prewikka/templates/About.py:217 msgid "Website" msgstr "Sitio Web" #: prewikka/templates/About.py:230 msgid "Phone:" msgstr "Telefono" #: prewikka/templates/About.py:240 msgid "Fax:" msgstr "" #: prewikka/templates/HeartbeatListing.py:100 msgid "Agent" msgstr "Agente:" #: prewikka/templates/HeartbeatListing.py:151 #: prewikka/templates/AlertListing.py:1348 msgid "Time" msgstr "Hora" #: prewikka/templates/HeartbeatListing.py:199 msgid "Heartbeat summary" msgstr "Resumen de pulsos" #: prewikka/templates/HeartbeatListing.py:208 msgid "Filter on agent" msgstr "Filtrar por agente" #: prewikka/templates/HeartbeatListing.py:229 #: prewikka/templates/SensorListing.py:316 msgid "Filter on address" msgstr "Filtrar por dirección" #: prewikka/templates/FilterEdition.py:191 msgid "Available filters" msgstr "Filtros disponibles" #: prewikka/templates/FilterEdition.py:242 msgid "Edition" msgstr "Edición" #: prewikka/templates/FilterEdition.py:302 msgid "Formula:" msgstr "Formula:" #: prewikka/templates/FilterEdition.py:314 #, fuzzy msgid "Name:" msgstr "Nombre" #: prewikka/templates/FilterEdition.py:326 msgid "Comment:" msgstr "Comentario:" #: prewikka/templates/UserListing.py:100 msgid "Login" msgstr "Usuario" #: prewikka/templates/UserListing.py:156 msgid "Delete user" msgstr "Borrar usuario" #: prewikka/templates/UserListing.py:169 msgid "Create user" msgstr "Crear usuario" #: prewikka/templates/SensorListing.py:232 #, python-format msgid "%d Node" msgid_plural "%d Nodes" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:237 #, python-format msgid "%d Analyzer" msgid_plural "%d Analyzers" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:244 #, fuzzy, python-format msgid "%d Online" msgid_plural "%d Online" msgstr[0] "ninguno" msgstr[1] "ninguno" #: prewikka/templates/SensorListing.py:246 #, fuzzy, python-format msgid "%d Offline" msgid_plural "%d Offline" msgstr[0] "ninguno" msgstr[1] "ninguno" #: prewikka/templates/SensorListing.py:248 #, python-format msgid "%d Unknown" msgid_plural "%d Unknown" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:250 #, python-format msgid "%d Missing" msgid_plural "%d Missing" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:328 #, fuzzy msgid "Address information" msgstr "Información de la dirección" #: prewikka/templates/SensorListing.py:362 #, fuzzy msgid "Total:" msgstr "total" #: prewikka/templates/SensorListing.py:436 #, fuzzy msgid "Last heartbeat" msgstr "Hora de último pulso" #: prewikka/templates/SensorListing.py:442 msgid "Status" msgstr "" #: prewikka/templates/SensorListing.py:481 msgid "Alert listing" msgstr "Lista de alertas" #: prewikka/templates/SensorListing.py:490 msgid "Heartbeat listing" msgstr "Listado de pulsos" #: prewikka/templates/SensorListing.py:499 msgid "Heartbeat analysis" msgstr "Análisis de pulsos" #: prewikka/templates/ClassicLayout.py:231 msgid "logout" msgstr "Desconectarse" #: prewikka/templates/ClassicLayout.py:243 #, python-format msgid "%(username)s on %(date)s" msgstr "" #: prewikka/templates/UserSettings.py:157 #, fuzzy msgid "Account information" msgstr "Información sobre cuentas" #: prewikka/templates/UserSettings.py:168 msgid "Login:" msgstr "Ingreso:" #: prewikka/templates/UserSettings.py:201 msgid "Language:" msgstr "Idioma:" #: prewikka/templates/UserSettings.py:235 msgid "Permissions:" msgstr "Permisos:" #: prewikka/templates/UserSettings.py:298 msgid "Check All" msgstr "Seleccionar todos" #: prewikka/templates/UserSettings.py:324 msgid "Change password" msgstr "Cambiar contraeña" #: prewikka/templates/UserSettings.py:334 msgid "Current password:" msgstr "Contraseña actual" #: prewikka/templates/UserSettings.py:344 msgid "New password:" msgstr "Nueva contraseña:" #: prewikka/templates/UserSettings.py:353 msgid "Confirm new password:" msgstr "Confirmar nueva contraseña:" #: prewikka/templates/UserSettings.py:366 msgid "Submit Changes" msgstr "Enviar Cambios" #: prewikka/templates/MessageListing.py:478 #, fuzzy msgid "Period" msgstr "Permisos:" #: prewikka/templates/MessageListing.py:493 msgid "Minutes" msgstr "Minutos" #: prewikka/templates/MessageListing.py:502 msgid "Hours" msgstr "Horas" #: prewikka/templates/MessageListing.py:511 msgid "Days" msgstr "Días" #: prewikka/templates/MessageListing.py:520 msgid "Months" msgstr "Meses" #: prewikka/templates/MessageListing.py:529 msgid "Years" msgstr "Años" #: prewikka/templates/MessageListing.py:538 msgid "Unlimited" msgstr "Ilimitado" #: prewikka/templates/MessageListing.py:549 #, fuzzy msgid "Timezone" msgstr "Hora" #: prewikka/templates/MessageListing.py:560 msgid "Frontend localtime" msgstr "Hora local del Frontend" #: prewikka/templates/MessageListing.py:569 msgid "Sensor localtime" msgstr "Hora local del Sensor" #: prewikka/templates/MessageListing.py:578 msgid "UTC" msgstr "UTC" #: prewikka/templates/MessageListing.py:589 #, fuzzy msgid "Limit" msgstr "Límite:" #: prewikka/templates/MessageListing.py:613 msgid "Refresh" msgstr "" #: prewikka/templates/MessageListing.py:660 prewikka/templates/Stats.py:526 msgid "Apply" msgstr "Aplicar" #: prewikka/templates/MessageListing.py:708 #: prewikka/templates/MessageListing.py:716 msgid "prev" msgstr "previo" #: prewikka/templates/MessageListing.py:729 #: prewikka/templates/MessageListing.py:737 msgid "current" msgstr "actual" #: prewikka/templates/MessageListing.py:750 #: prewikka/templates/MessageListing.py:758 msgid "next" msgstr "siguiente" #: prewikka/templates/MessageListing.py:812 msgid "total" msgstr "total" #: prewikka/templates/AlertListing.py:112 msgid "Equal" msgstr "Igual" #: prewikka/templates/AlertListing.py:118 msgid "Not equal" msgstr "" #: prewikka/templates/AlertListing.py:124 msgid "Lesser than" msgstr "Menor que" #: prewikka/templates/AlertListing.py:130 msgid "Greater than" msgstr "Mayor que" #: prewikka/templates/AlertListing.py:136 msgid "Lesser or equal" msgstr "Menor o igual" #: prewikka/templates/AlertListing.py:142 msgid "Greater or equal" msgstr "Mayor o igual" #: prewikka/templates/AlertListing.py:148 msgid "Substring" msgstr "Subcadena" #: prewikka/templates/AlertListing.py:154 msgid "Substring (case-insensitive)" msgstr "Subcadena (no importa)" #: prewikka/templates/AlertListing.py:160 msgid "Regular expression" msgstr "Expresión regular" #: prewikka/templates/AlertListing.py:166 msgid "Regular expression (case-insensitive)" msgstr "Expresión regular (insensible)" #: prewikka/templates/AlertListing.py:319 #: prewikka/templates/AlertListing.py:1190 #, fuzzy msgid "info" msgstr "informacion" #: prewikka/templates/AlertListing.py:321 #: prewikka/templates/AlertListing.py:1192 msgid "low" msgstr "baja" #: prewikka/templates/AlertListing.py:323 #: prewikka/templates/AlertListing.py:1194 msgid "medium" msgstr "mediana" #: prewikka/templates/AlertListing.py:325 #: prewikka/templates/AlertListing.py:1196 msgid "high" msgstr "alta" #: prewikka/templates/AlertListing.py:345 #: prewikka/templates/AlertListing.py:1223 msgid "succeeded" msgstr "exitoso" #: prewikka/templates/AlertListing.py:347 #: prewikka/templates/AlertListing.py:1225 msgid "failed" msgstr "fallido" #: prewikka/templates/AlertListing.py:843 #, fuzzy msgid "Filter on" msgstr "Filtrar por:" #: prewikka/templates/AlertListing.py:963 msgid "Group entry by:" msgstr "Agrupar entrada por:" #: prewikka/templates/AlertListing.py:1027 #: prewikka/templates/AlertListing.py:1035 #, fuzzy msgid "filtered" msgstr "fallido" #: prewikka/templates/AlertListing.py:1136 msgid "Type:" msgstr "Tipo:" #: prewikka/templates/AlertListing.py:1151 #, fuzzy msgid "CorrelationAlert" msgstr "Alerta de correlación" #: prewikka/templates/AlertListing.py:1153 #, fuzzy msgid "OverflowAlert" msgstr "Alerta de desborde" #: prewikka/templates/AlertListing.py:1155 #, fuzzy msgid "ToolAlert" msgstr "Alerta de herramienta" #: prewikka/templates/AlertListing.py:1184 #, fuzzy msgid "Severity:" msgstr "Severidad" #: prewikka/templates/AlertListing.py:1215 #, fuzzy msgid "Completion:" msgstr "Completado:" #: prewikka/templates/AlertListing.py:1253 msgid "Source" msgstr "Origen" #: prewikka/templates/AlertListing.py:1285 msgid "Target" msgstr "Destino" #: prewikka/templates/AlertListing.py:1317 #, fuzzy msgid "Analyzer" msgstr "Alerta" #: prewikka/templates/AlertListing.py:1459 msgid "See alert detail" msgstr "" #: prewikka/templates/AlertListing.py:1468 #, fuzzy msgid "Filter on this classification.text" msgstr "Filtrar por dirección" #: prewikka/templates/AlertListing.py:1522 #, fuzzy msgid "Filter on this port/protocol" msgstr "Filtrar por dirección" #: prewikka/templates/AlertListing.py:1541 #: prewikka/templates/AlertListing.py:1549 #, fuzzy msgid "Port/protocol information" msgstr "Información sobre cuentas" #: prewikka/templates/AlertListing.py:1598 #, fuzzy msgid "alert" msgid_plural "alerts" msgstr[0] "Alerta" msgstr[1] "Alerta" #: prewikka/templates/AlertListing.py:1622 #, python-format msgid "%(hidden)d of %(total)d alerts not shown..." msgstr "" #: prewikka/templates/AlertListing.py:1633 #: prewikka/templates/AlertListing.py:1825 msgid "expand" msgstr "" #: prewikka/templates/AlertListing.py:1778 #, fuzzy msgid "Filter on this reference" msgstr "Filtrar por dirección" #: prewikka/templates/AlertListing.py:1802 #, fuzzy msgid "source" msgstr "Origen" #: prewikka/templates/AlertListing.py:1804 #, fuzzy msgid "target" msgstr "Destino" #: prewikka/templates/AlertListing.py:1814 #, python-format msgid "%(hidden)d of %(total)d %(name)ss not shown..." msgstr "" #: prewikka/templates/AlertListing.py:1856 #, fuzzy, python-format msgid "Filter on this %s" msgstr "Filtrar por dirección" #: prewikka/templates/AlertListing.py:1874 #, fuzzy, python-format msgid "%s information" msgstr "Información de la dirección" #: prewikka/templates/AlertListing.py:2114 #, fuzzy msgid "Filter" msgstr "Filtros" #: prewikka/templates/LoginPasswordForm.py:130 msgid "Submit" msgstr "Enviar" #: prewikka/templates/Stats.py:356 msgid "Filter:" msgstr "Filtro:" #: prewikka/templates/Stats.py:386 #, fuzzy msgid "Time:" msgstr "Hora" #: prewikka/templates/Stats.py:397 #, fuzzy msgid "Hour" msgstr "Horas" #: prewikka/templates/Stats.py:406 #, fuzzy msgid "Day" msgstr "Días" #: prewikka/templates/Stats.py:415 #, fuzzy msgid "Month" msgstr "Meses" #: prewikka/templates/Stats.py:424 msgid "Custom" msgstr "" #: prewikka/templates/Stats.py:434 #, fuzzy msgid "From:" msgstr "Formula:" #: prewikka/templates/Stats.py:477 #, fuzzy msgid "To:" msgstr "total" #: prewikka/modules/auth/cgi/cgi.py:41 msgid "CGI Authentication failed: no user specified." msgstr "Autenticación fallida de CGI: no se especifico el usuario" #, fuzzy #~ msgid "none" #~ msgstr "en" #~ msgid "Sensor" #~ msgstr "Sensor" #~ msgid "Session invalid" #~ msgstr "Sesión invalida" #~ msgid "Username and password do not match." #~ msgstr "El usuario y contraseña no concuerdan" #, fuzzy #~ msgid "SSLcert Authentication failed: Not in a SSL session." #~ msgstr "Autenticación fallida de CGI: no se especifico el usuario" #, fuzzy #~ msgid "SSLcert Authentication failed: no user specified in x509 CN." #~ msgstr "Autenticación fallida de CGI: no se especifico el usuario" #~ msgid "on" #~ msgstr "en" #~ msgid "Node Name" #~ msgstr "Nombre del nodo" #~ msgid "No agent available" #~ msgstr "No hay agentes disponibles" #~ msgid "Latest status" #~ msgstr "Último estado" #~ msgid "Headquarter" #~ msgstr "Casa matrix" #~ msgid "Step:" #~ msgstr "Buscar:" #~ msgid "Tz:" #~ msgstr "Zh:" prewikka-1.0.0/po/de.po0000664000076400007640000010315411340777332013752 0ustar yoannyoann# German Translation for Prewikka # Copyright (C) 2007 PreludeIDS Techologies # This file is distributed under the same license as the prewikka package. # Bjoern Weiland , 2007. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Prewikka 0.99\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-02-10 13:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Bjoern Weiland \n" "Language-Team: German\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: prewikka/User.py:41 msgid "Permission Denied" msgstr "Zugriff verweigert" #: prewikka/User.py:42 #, python-format msgid "Access to view '%s' forbidden" msgstr "Zugang zu '%s' verboten" #: prewikka/Auth.py:29 msgid "Authentication failed" msgstr "Authentifizierung fehlgeschlagen" #: prewikka/Auth.py:35 msgid "Invalid session" msgstr "Session ungültig" #: prewikka/Auth.py:41 msgid "Session expired" msgstr "Session abgelaufen" #: prewikka/Auth.py:138 msgid "Logged out" msgstr "Ausgeloggt" #: prewikka/Log.py:65 #, python-format msgid "Unknown logtype specified: '%s'" msgstr "Unbekannter Logtyp: '%s'" #: prewikka/view.py:29 prewikka/view.py:35 prewikka/view.py:41 msgid "Parameters Normalization failed" msgstr "Parameter-Normalisierung fehlgeschlagen" #: prewikka/Database.py:98 #, python-format msgid "" "Database schema version %(version)s found when %(reqversion)s was required" msgstr "" "Datenbank Schema version %(version)s gefunden, aber %(reqversion)s benötigt" #: prewikka/localization.py:107 msgid "January" msgstr "Januar" #: prewikka/localization.py:108 msgid "February" msgstr "Februar" #: prewikka/localization.py:109 msgid "March" msgstr "März" #: prewikka/localization.py:110 msgid "April" msgstr "April" #: prewikka/localization.py:111 msgid "May" msgstr "Mai" #: prewikka/localization.py:112 msgid "June" msgstr "Juni" #: prewikka/localization.py:113 msgid "July" msgstr "Juli" #: prewikka/localization.py:114 msgid "August" msgstr "August" #: prewikka/localization.py:115 msgid "September" msgstr "September" #: prewikka/localization.py:116 msgid "November" msgstr "November" #: prewikka/localization.py:117 msgid "October" msgstr "Oktober" #: prewikka/localization.py:118 msgid "December" msgstr "Dezember" #: prewikka/localization.py:120 msgid "Monday" msgstr "Montag" #: prewikka/localization.py:121 msgid "Tuesday" msgstr "Dienstag" #: prewikka/localization.py:122 msgid "Wednesday" msgstr "Mittwoch" #: prewikka/localization.py:123 msgid "Thursday" msgstr "Donnerstag" #: prewikka/localization.py:124 msgid "Friday" msgstr "Freitag" #: prewikka/localization.py:125 msgid "Saturday" msgstr "Samstag" #: prewikka/localization.py:126 msgid "Sunday" msgstr "Sonntag" #: prewikka/Filter.py:78 #, python-format msgid "Invalid filter element '%s' referenced from filter formula" msgstr "Ungültiges Filterelement '%s' von Filterformel referenziert" #: prewikka/views/messagesummary.py:304 prewikka/views/messagesummary.py:461 #: prewikka/views/messagesummary.py:691 prewikka/views/messagesummary.py:708 #: prewikka/views/messagesummary.py:731 prewikka/views/messagesummary.py:789 #: prewikka/views/messagesummary.py:808 prewikka/views/messagesummary.py:844 #: prewikka/templates/SensorListing.py:412 msgid "Name" msgstr "Name" #: prewikka/views/messagesummary.py:305 prewikka/views/messagesummary.py:611 msgid "Code" msgstr "Code" #: prewikka/views/messagesummary.py:306 msgid "Data length" msgstr "Datenlänge" #: prewikka/views/messagesummary.py:307 msgid "Data" msgstr "Daten" #: prewikka/views/messagesummary.py:403 prewikka/views/messagesummary.py:846 msgid "Create time" msgstr "Erstellungszeit" #: prewikka/views/messagesummary.py:406 msgid "Detect time" msgstr "Detektionszeit" #: prewikka/views/messagesummary.py:411 msgid "Analyzer time" msgstr "Analyzer Zeit" #: prewikka/views/messagesummary.py:417 msgid "Process" msgstr "Process" #: prewikka/views/messagesummary.py:418 msgid "Process Path" msgstr "Prozess Pfad" #: prewikka/views/messagesummary.py:419 msgid "Process PID" msgstr "Prozess PID" #: prewikka/views/messagesummary.py:427 msgid "Node location" msgstr "Knoten Standort" #: prewikka/views/messagesummary.py:449 #: prewikka/templates/HeartbeatListing.py:126 msgid "Node name" msgstr "Knotenname" #: prewikka/views/messagesummary.py:452 #, fuzzy msgid "Node name (resolved)" msgstr "Knotenname" #: prewikka/views/messagesummary.py:454 #: prewikka/templates/HeartbeatListing.py:113 msgid "Node address" msgstr "Knotenadresse" #: prewikka/views/messagesummary.py:460 prewikka/views/stats.py:711 #: prewikka/templates/HeartbeatListing.py:139 #: prewikka/templates/SensorListing.py:418 msgid "Model" msgstr "Model" #: prewikka/views/messagesummary.py:462 msgid "Analyzerid" msgstr "Analyzer-ID" #: prewikka/views/messagesummary.py:463 prewikka/views/messagesummary.py:563 #: prewikka/templates/SensorListing.py:424 msgid "Version" msgstr "Version" #: prewikka/views/messagesummary.py:464 prewikka/views/stats.py:719 #: prewikka/templates/SensorListing.py:430 msgid "Class" msgstr "Klasse" #: prewikka/views/messagesummary.py:466 msgid "Manufacturer" msgstr "Hersteller" #: prewikka/views/messagesummary.py:474 msgid "Operating System" msgstr "Betriebssystem" #: prewikka/views/messagesummary.py:492 #, python-format msgid "Analyzer Path (%d not shown)" msgstr "Analyzer Pfad (%d nicht gezeigt)" #: prewikka/views/messagesummary.py:499 prewikka/views/messagesummary.py:1030 #: prewikka/views/messagesummary.py:1102 #, python-format msgid "Analyzer #%d" msgstr "Analyzer #%d" #: prewikka/views/messagesummary.py:509 msgid "Additional data" msgstr "Zusätzliche Daten" #: prewikka/views/messagesummary.py:512 prewikka/views/messagesummary.py:732 msgid "Meaning" msgstr "Bedeutung" #: prewikka/views/messagesummary.py:513 msgid "Value" msgstr "Wert" #: prewikka/views/messagesummary.py:564 prewikka/views/messagesummary.py:585 msgid "Header length" msgstr "Headerlänge" #: prewikka/views/messagesummary.py:565 msgid "TOS" msgstr "TOS" #: prewikka/views/messagesummary.py:566 prewikka/views/messagesummary.py:604 msgid "Length" msgstr "Länge" #: prewikka/views/messagesummary.py:567 prewikka/views/messagesummary.py:613 msgid "Id" msgstr "Id" #: prewikka/views/messagesummary.py:571 msgid "Ip offset" msgstr "Ip Offset" #: prewikka/views/messagesummary.py:572 msgid "TTL" msgstr "TTL" #: prewikka/views/messagesummary.py:573 prewikka/views/messagesummary.py:932 #: prewikka/views/messagesummary.py:935 prewikka/views/messagesummary.py:938 msgid "Protocol" msgstr "Protokoll" #: prewikka/views/messagesummary.py:574 prewikka/views/messagesummary.py:596 #: prewikka/views/messagesummary.py:605 prewikka/views/messagesummary.py:612 msgid "Checksum" msgstr "Prüfsumme" #: prewikka/views/messagesummary.py:575 msgid "Source address" msgstr "Quelladresse" #: prewikka/views/messagesummary.py:576 msgid "Target address" msgstr "Zieladresse" #: prewikka/views/messagesummary.py:581 prewikka/views/messagesummary.py:602 msgid "Source port" msgstr "Quellport" #: prewikka/views/messagesummary.py:582 prewikka/views/messagesummary.py:603 msgid "Target port" msgstr "Zielport" #: prewikka/views/messagesummary.py:586 msgid "Reserved" msgstr "Reserviert" #: prewikka/views/messagesummary.py:595 msgid "Window" msgstr "Fenster" #: prewikka/views/messagesummary.py:597 msgid "URP" msgstr "URP" #: prewikka/views/messagesummary.py:610 prewikka/views/messagesummary.py:755 #: prewikka/views/messagesummary.py:788 prewikka/views/messagesummary.py:807 msgid "Type" msgstr "Typ" #: prewikka/views/messagesummary.py:614 msgid "Seq #" msgstr "Seq #" #: prewikka/views/messagesummary.py:615 msgid "Mask" msgstr "Maske" #: prewikka/views/messagesummary.py:616 msgid "Gateway Address" msgstr "Gatewayadresse" #: prewikka/views/messagesummary.py:617 msgid "Num address" msgstr "Numadresse" #: prewikka/views/messagesummary.py:618 msgid "Wpa" msgstr "Wpa" #: prewikka/views/messagesummary.py:619 msgid "Lifetime" msgstr "Lifetime" #: prewikka/views/messagesummary.py:620 msgid "Otime" msgstr "OZeit" #: prewikka/views/messagesummary.py:621 msgid "Rtime" msgstr "RZeit" #: prewikka/views/messagesummary.py:622 msgid "Ttime" msgstr "TZeit" #: prewikka/views/messagesummary.py:628 prewikka/views/messagesummary.py:1077 msgid "Payload" msgstr "Payload" #: prewikka/views/messagesummary.py:675 #, python-format msgid "%d linked alerts missing (probably deleted)" msgstr "" #: prewikka/views/messagesummary.py:689 prewikka/views/messagesummary.py:985 #: prewikka/views/alertlisting.py:707 msgid "Correlation Alert" msgstr "Korrelations-Alarm" #: prewikka/views/messagesummary.py:695 msgid "Correlated Alert" msgstr "Korrelierter Alarm" #: prewikka/views/messagesummary.py:696 prewikka/views/messagesummary.py:713 msgid "Source Analyzer" msgstr "Quell Analyzer" #: prewikka/views/messagesummary.py:706 prewikka/views/messagesummary.py:988 #: prewikka/views/alertlisting.py:711 msgid "Tool Alert" msgstr "Tool-Alarme" #: prewikka/views/messagesummary.py:712 msgid "Linked Alert" msgstr "Linked Alarm" #: prewikka/views/messagesummary.py:723 msgid "Text" msgstr "Text" #: prewikka/views/messagesummary.py:725 msgid "Ident" msgstr "Ident" #: prewikka/views/messagesummary.py:730 msgid "Origin" msgstr "Ursprung" #: prewikka/views/messagesummary.py:749 prewikka/views/stats.py:448 msgid "Severity" msgstr "" #: prewikka/views/messagesummary.py:752 msgid "Completion" msgstr "Completion" #: prewikka/views/messagesummary.py:756 prewikka/views/messagesummary.py:762 msgid "Description" msgstr "Beschreibung" #: prewikka/views/messagesummary.py:761 msgid "Category" msgstr "Kategorie" #: prewikka/views/messagesummary.py:785 msgid "User category" msgstr "Benutzer Kategorie" #: prewikka/views/messagesummary.py:790 prewikka/views/messagesummary.py:809 msgid "Number" msgstr "Nummer" #: prewikka/views/messagesummary.py:791 msgid "Tty" msgstr "Tty" #: prewikka/views/messagesummary.py:810 msgid "Permission" msgstr "Rechte:" #: prewikka/views/messagesummary.py:832 msgid "Change time" msgstr "Änderungszeit" #: prewikka/views/messagesummary.py:833 msgid "Inode Number" msgstr "Inode Nummer" #: prewikka/views/messagesummary.py:834 msgid "Major device" msgstr "" #: prewikka/views/messagesummary.py:835 msgid "Minor device" msgstr "" #: prewikka/views/messagesummary.py:836 msgid "C Major device" msgstr "" #: prewikka/views/messagesummary.py:837 msgid "C Minor device" msgstr "" #: prewikka/views/messagesummary.py:841 #, python-format msgid "Target file %s" msgstr "Ziel-Datei %s" #: prewikka/views/messagesummary.py:845 msgid "Path" msgstr "Pfad" #: prewikka/views/messagesummary.py:847 msgid "Modify time" msgstr "Änderungsdatum" #: prewikka/views/messagesummary.py:848 msgid "Access time" msgstr "Zugriffsdatum" #: prewikka/views/messagesummary.py:849 msgid "Data size" msgstr "Datengröße" #: prewikka/views/messagesummary.py:850 msgid "Disk size" msgstr "Plattengröße" #: prewikka/views/messagesummary.py:869 msgid "Web Service" msgstr "Web Service" #: prewikka/views/messagesummary.py:872 msgid "Url" msgstr "Url" #: prewikka/views/messagesummary.py:873 msgid "Cgi" msgstr "Cgi" #: prewikka/views/messagesummary.py:874 msgid "Http Method" msgstr "Http Methode" #: prewikka/views/messagesummary.py:877 msgid "CGI Argument" msgstr "Cgi Argument" #: prewikka/views/messagesummary.py:886 msgid "SNMP Service" msgstr "SNMP Dienst" #: prewikka/views/messagesummary.py:889 msgid "oid" msgstr "oid" #: prewikka/views/messagesummary.py:890 msgid "messageProcessingModel" msgstr "" #: prewikka/views/messagesummary.py:891 msgid "securityModel" msgstr "Sicherheitsmodel" #: prewikka/views/messagesummary.py:892 msgid "securityName" msgstr "Sicherheitsname" #: prewikka/views/messagesummary.py:893 msgid "securityLevel" msgstr "Sicherheitslevel" #: prewikka/views/messagesummary.py:894 msgid "contextName" msgstr "KontextName" #: prewikka/views/messagesummary.py:895 msgid "contextEngineID" msgstr "" #: prewikka/views/messagesummary.py:896 msgid "command" msgstr "Kommando" #: prewikka/views/messagesummary.py:908 msgid "Port" msgstr "Port" #: prewikka/views/messagesummary.py:925 #, fuzzy msgid "PortList" msgstr "Port" #: prewikka/views/messagesummary.py:928 #, fuzzy msgid "ip_version" msgstr "Version" #: prewikka/views/messagesummary.py:961 #, python-format msgid "Source(%d)" msgstr "Quelle(%d)" #: prewikka/views/messagesummary.py:970 #, python-format msgid "Target(%d)" msgstr "Ziel(%d)" #: prewikka/views/messagesummary.py:991 msgid "Overflow Alert" msgstr "Overflow Alarm" #: prewikka/views/messagesummary.py:994 #: prewikka/templates/AlertListing.py:1149 msgid "Alert" msgstr "Alarm" #: prewikka/views/messagesummary.py:1013 msgid "MessageID" msgstr "" #: prewikka/views/messagesummary.py:1021 msgid "Actions" msgstr "Aktionen" #: prewikka/views/messagesummary.py:1060 msgid "Network centric information" msgstr "Netzwerkinformationen" #: prewikka/views/messagesummary.py:1080 msgid "ASCII Payload" msgstr "" #: prewikka/views/messagesummary.py:1099 msgid "Heartbeat" msgstr "Heartbeat" #: prewikka/views/__init__.py:45 msgid "Events" msgstr "Ereignisse" #: prewikka/views/__init__.py:45 prewikka/templates/SensorListing.py:547 msgid "Alerts" msgstr "Alarme" #: prewikka/views/__init__.py:46 msgid "CorrelationAlerts" msgstr "Korrelations-Alarme" #: prewikka/views/__init__.py:47 msgid "ToolAlerts" msgstr "Tool-Alarme" #: prewikka/views/__init__.py:50 msgid "Agents" msgstr "Agenten" #: prewikka/views/__init__.py:51 prewikka/templates/SensorListing.py:553 msgid "Heartbeats" msgstr "Heartbeats" #: prewikka/views/__init__.py:53 msgid "Statistics" msgstr "" #: prewikka/views/__init__.py:54 #, fuzzy msgid "Categorizations" msgstr "Kategorie" #: prewikka/views/__init__.py:55 #, fuzzy msgid "Sources" msgstr "Quelle" #: prewikka/views/__init__.py:56 #, fuzzy msgid "Targets" msgstr "Ziel" #: prewikka/views/__init__.py:57 #, fuzzy msgid "Analyzers" msgstr "Analyzer-ID" #: prewikka/views/__init__.py:58 #, fuzzy msgid "Timeline" msgstr "Zeitzone" #: prewikka/views/__init__.py:61 msgid "Settings" msgstr "Einstellungen" #: prewikka/views/__init__.py:62 msgid "Filters" msgstr "Filter" #: prewikka/views/__init__.py:64 msgid "My account" msgstr "Mein Konto" #: prewikka/views/__init__.py:67 #, fuzzy msgid "User listing" msgstr "Alarm-Liste" #: prewikka/views/__init__.py:71 msgid "About" msgstr "Über" #: prewikka/views/sensor.py:51 msgid "Offline" msgstr "" #: prewikka/views/sensor.py:54 msgid "Unknown" msgstr "Unbekannt" #: prewikka/views/sensor.py:57 msgid "Missing" msgstr "Vermisst" #: prewikka/views/sensor.py:59 msgid "Online" msgstr "" #: prewikka/views/sensor.py:158 msgid "Node location n/a" msgstr "Knoten Standort n/a" #: prewikka/views/sensor.py:159 msgid "Node name n/a" msgstr "Knotenname n/a" #: prewikka/views/sensor.py:160 msgid "OS version n/a" msgstr "Betriebssystem Version n/a" #: prewikka/views/sensor.py:161 msgid "OS type n/a" msgstr "Betriebssystem n/a" #: prewikka/views/filter.py:55 msgid "Example: (A AND B) OR (C AND D)" msgstr "Beispiel: (A AND B) OR (C AND D)" #: prewikka/views/filter.py:137 prewikka/templates/FilterEdition.py:221 msgid "Load" msgstr "Laden" #: prewikka/views/filter.py:139 prewikka/templates/FilterEdition.py:339 #: prewikka/templates/MessageListing.py:665 prewikka/templates/Stats.py:531 msgid "Save" msgstr "Sichern" #: prewikka/views/filter.py:141 prewikka/templates/FilterEdition.py:227 #: prewikka/templates/SensorListing.py:406 #: prewikka/templates/SensorListing.py:559 #: prewikka/templates/MessageListing.py:369 msgid "Delete" msgstr "Löschen" #: prewikka/views/messagelisting.py:231 prewikka/templates/AlertListing.py:327 #: prewikka/templates/AlertListing.py:349 #: prewikka/templates/AlertListing.py:1198 #: prewikka/templates/AlertListing.py:1227 msgid "n/a" msgstr "" #: prewikka/views/stats.py:425 #, fuzzy msgid "Top 10 Classifications" msgstr "klassifikation" #: prewikka/views/stats.py:425 prewikka/templates/AlertListing.py:1111 msgid "Classification" msgstr "klassifikation" #: prewikka/views/stats.py:433 msgid "Top 10 Alert References" msgstr "" #: prewikka/views/stats.py:433 #, fuzzy msgid "References" msgstr "Neu Laden" #: prewikka/views/stats.py:442 prewikka/views/stats.py:768 #, fuzzy msgid "High" msgstr "hoch" #: prewikka/views/stats.py:443 prewikka/views/stats.py:769 #, fuzzy msgid "Medium" msgstr "mittel" #: prewikka/views/stats.py:444 prewikka/views/stats.py:770 #, fuzzy msgid "Low" msgstr "niedrig" #: prewikka/views/stats.py:445 prewikka/views/stats.py:771 #, fuzzy msgid "Informational" msgstr "%s Information" #: prewikka/views/stats.py:446 prewikka/views/stats.py:772 msgid "N/a" msgstr "" #: prewikka/views/stats.py:448 msgid "Severities" msgstr "" #: prewikka/views/stats.py:455 msgid "Alert Impact Types" msgstr "" #: prewikka/views/stats.py:455 msgid "Impact Types" msgstr "" #: prewikka/views/stats.py:490 #, fuzzy msgid "Top Source Country" msgstr "Quellport" #: prewikka/views/stats.py:490 msgid "Country" msgstr "" #: prewikka/views/stats.py:542 #, fuzzy msgid "Top 10 Source Addresses" msgstr "Quelladresse" #: prewikka/views/stats.py:542 prewikka/views/stats.py:645 #: prewikka/views/stats.py:727 #, fuzzy msgid "Address" msgstr "Knotenadresse" #: prewikka/views/stats.py:550 msgid "Top 10 Source Users" msgstr "" #: prewikka/views/stats.py:550 prewikka/views/stats.py:653 #, fuzzy msgid "User" msgstr "Benutzer" #: prewikka/views/stats.py:645 #, fuzzy msgid "Top 10 Targeted Addresses" msgstr "Zieladresse" #: prewikka/views/stats.py:653 msgid "Top 10 Targeted Users" msgstr "" #: prewikka/views/stats.py:711 msgid "Top 10 Analyzer Models" msgstr "" #: prewikka/views/stats.py:719 msgid "Top 10 Analyzer Classes" msgstr "" #: prewikka/views/stats.py:727 msgid "Top 10 Analyzer Node Addresses" msgstr "" #: prewikka/views/stats.py:735 #, fuzzy msgid "Analyzer Locations" msgstr "Analyzer Zeit" #: prewikka/views/stats.py:735 #, fuzzy msgid "Location" msgstr "Knoten Standort" #: prewikka/templates/About.py:107 msgid "" "provides support to Large Accounts, Major Companies and Government Agencies " "around the world, to improve and strengthen the security of their systems " "and networks." msgstr "" "bietet Unterstützung für Großanbieter, Unternehmen und Regierungsbeörden " "weltweit, um System- und Netzsicherheit zu stärken und zu verbessern." #: prewikka/templates/About.py:125 msgid "Customizing Prelude" msgstr "Prelude anpassen" #: prewikka/templates/About.py:132 msgid "" "In keeping with the Open Source spirit, we encourage you to participate in " "the development of your application. You can order customized versions of " "Prelude to suit your needs: adapting, adding on functionality etc. Because " "they are carried out by PreludeIDS engineers, you know that any " "modifications made to the system will be integrated optimally and guaranteed " "by our technical support department. Additionally, the company can extend " "Prelude to handle yet unsupported sensors (including proprietary), ruleset " "extension to handle new devices and porting of Prelude to unsupported " "operating systems." msgstr "" "Im Geiste der Open Source Community ermuntern wir Sie, zu der Entwicklung " "unserer Anwendung beizutragen. Sie können individuelle Versionen von Prelude " "bestellen, um Ihren Ansprüchen gerecht zu werden: Anpassung, Hinzufügen von " "Funktionalitäten etc. Da die Änderungen von PreludeIDS Technikern ausgeführt " "werden, können Sie sich sicher sein, dass alle System-Modifikationen " "garantiert optimal von unserer technischen Supportabteilung integriert " "werden. Außerdem können wir Prelude erweitern, um auch bisher nicht " "unterstützte oder proprietäre Sensoren sowie Rulesetserweiterungen für neue " "Geräte zu implementieren oder Prelude auf bisher nicht unterstützte " "Betriebssysteme portieren. " #: prewikka/templates/About.py:141 msgid "Software Maintenance and Technical Support" msgstr "Software Wartung und Technischer Support" #: prewikka/templates/About.py:148 msgid "" "PreludeIDS maintenance and support services guarantee optimal operation of " "the Prelude platform on your infrastructure. There are five support packages " "that provide our customers with peace of mind, knowing that they are not " "only covered for all outcomes, but that our experts are at hand to provide " "rapid and reliable solutions." msgstr "" "Unser PreludeIDS Wartungs- und Support-Service garantiert den optimalen " "Betrieb der Prelude Plattform in Ihrer Infrastruktur. Mit unserem Support-" "Service profitieren Sie von priorisierter Hilfe und der Kompetenz unserer " "Techniker, während der Wartungs-Service Ihre Software auf dem aktuellsten " "Stand hält." #: prewikka/templates/About.py:157 msgid "Commercial licenses" msgstr "Kommerzielle Lizens" #: prewikka/templates/About.py:164 msgid "The Prelude framework is licensed under the" msgstr "Das Prelude Framework ist lizensiert unter der" #: prewikka/templates/About.py:170 msgid "" "PreludeIDS provides specific commercial licenses to allow proprietary " "systems based on Prelude to be developed and to interoperate." msgstr "" "PreludeIDS bietet spezifische kommerzielle Lizensen, um proprietäre auf " "Prelude basierende Systeme entwickeln und zwischen diesen interagieren zu " "können." #: prewikka/templates/About.py:179 msgid "Advice, Deployment and Training" msgstr "Beratung, Installation und Training" #: prewikka/templates/About.py:186 msgid "" "Through our partners, you have access to an array of top-of-the-line " "security services. By advising you on how to secure your infrastructure, " "deploying Prelude and training your users, we provide a turnkey solution to " "secure your infrastructure, delivered by specialists." msgstr "" "Durch unsere Partner haben Sie Zugang zu einer großen Anzahl überzeugender " "Sicherheitsdienste. Indem wir Ihnen mit Rat und Tat bei der Sicherung Ihrer " "Infrastruktur, der Implementierung von Prelude und dem Training Ihrer " "Benutzer zur Seite stehen, bieten wir Ihnen eine komplette Sicherheits-" "Lösung, geliefert von Spezialisten." #: prewikka/templates/About.py:205 msgid "Contact" msgstr "Kontakt" #: prewikka/templates/About.py:211 msgid "Office" msgstr "Büro" #: prewikka/templates/About.py:217 msgid "Website" msgstr "" #: prewikka/templates/About.py:230 msgid "Phone:" msgstr "Telefon" #: prewikka/templates/About.py:240 msgid "Fax:" msgstr "" #: prewikka/templates/HeartbeatListing.py:100 msgid "Agent" msgstr "Agent" #: prewikka/templates/HeartbeatListing.py:151 #: prewikka/templates/AlertListing.py:1348 msgid "Time" msgstr "Zeit" #: prewikka/templates/HeartbeatListing.py:199 msgid "Heartbeat summary" msgstr "Heartbeat Übersicht" #: prewikka/templates/HeartbeatListing.py:208 msgid "Filter on agent" msgstr "Nach Agent filtern" #: prewikka/templates/HeartbeatListing.py:229 #: prewikka/templates/SensorListing.py:316 msgid "Filter on address" msgstr "Nach Adresse filtern" #: prewikka/templates/FilterEdition.py:191 msgid "Available filters" msgstr "Verfügbare Filter" #: prewikka/templates/FilterEdition.py:242 msgid "Edition" msgstr "" #: prewikka/templates/FilterEdition.py:302 msgid "Formula:" msgstr "Formel:" #: prewikka/templates/FilterEdition.py:314 msgid "Name:" msgstr "Name" #: prewikka/templates/FilterEdition.py:326 msgid "Comment:" msgstr "Kommentar" #: prewikka/templates/UserListing.py:100 msgid "Login" msgstr "Login:" #: prewikka/templates/UserListing.py:156 msgid "Delete user" msgstr "Benutzer löschen" #: prewikka/templates/UserListing.py:169 msgid "Create user" msgstr "Benutzer erstellen" #: prewikka/templates/SensorListing.py:232 #, python-format msgid "%d Node" msgid_plural "%d Nodes" msgstr[0] "%d Knoten" msgstr[1] "%d Knoten" #: prewikka/templates/SensorListing.py:237 #, python-format msgid "%d Analyzer" msgid_plural "%d Analyzers" msgstr[0] "%d Analyzer" msgstr[1] "%d Analyzer" #: prewikka/templates/SensorListing.py:244 #, fuzzy, python-format msgid "%d Online" msgid_plural "%d Online" msgstr[0] "%d Online" msgstr[1] "%d Online" #: prewikka/templates/SensorListing.py:246 #, fuzzy, python-format msgid "%d Offline" msgid_plural "%d Offline" msgstr[0] "%d Offline" msgstr[1] "%d Offline" #: prewikka/templates/SensorListing.py:248 #, fuzzy, python-format msgid "%d Unknown" msgid_plural "%d Unknown" msgstr[0] "%d Unbekannt" msgstr[1] "%d Unbekannt" #: prewikka/templates/SensorListing.py:250 #, fuzzy, python-format msgid "%d Missing" msgid_plural "%d Missing" msgstr[0] "%d Vermisst" msgstr[1] "%d Vermisst" #: prewikka/templates/SensorListing.py:328 msgid "Address information" msgstr "Adress Informationen" #: prewikka/templates/SensorListing.py:362 msgid "Total:" msgstr "Total:" #: prewikka/templates/SensorListing.py:436 msgid "Last heartbeat" msgstr "Letzte Heartbeats" #: prewikka/templates/SensorListing.py:442 msgid "Status" msgstr "" #: prewikka/templates/SensorListing.py:481 msgid "Alert listing" msgstr "Alarm-Liste" #: prewikka/templates/SensorListing.py:490 msgid "Heartbeat listing" msgstr "Heartbeat-Liste" #: prewikka/templates/SensorListing.py:499 msgid "Heartbeat analysis" msgstr "Heartbeat-Analyse" #: prewikka/templates/ClassicLayout.py:231 msgid "logout" msgstr "Ausloggen" #: prewikka/templates/ClassicLayout.py:243 #, python-format msgid "%(username)s on %(date)s" msgstr "" #: prewikka/templates/UserSettings.py:157 msgid "Account information" msgstr "Kontoinformationen" #: prewikka/templates/UserSettings.py:168 msgid "Login:" msgstr "Login:" #: prewikka/templates/UserSettings.py:201 msgid "Language:" msgstr "Sprache" #: prewikka/templates/UserSettings.py:235 msgid "Permissions:" msgstr "Rechte:" #: prewikka/templates/UserSettings.py:298 msgid "Check All" msgstr "Alles wählen" #: prewikka/templates/UserSettings.py:324 msgid "Change password" msgstr "Passwort ändern" #: prewikka/templates/UserSettings.py:334 msgid "Current password:" msgstr "Aktuelles Passwort:" #: prewikka/templates/UserSettings.py:344 msgid "New password:" msgstr "Neues Passwort:" #: prewikka/templates/UserSettings.py:353 msgid "Confirm new password:" msgstr "Neues Passwort bestätigen:" #: prewikka/templates/UserSettings.py:366 msgid "Submit Changes" msgstr "Änderungen abschicken" #: prewikka/templates/MessageListing.py:478 msgid "Period" msgstr "Periode" #: prewikka/templates/MessageListing.py:493 msgid "Minutes" msgstr "Minuten" #: prewikka/templates/MessageListing.py:502 msgid "Hours" msgstr "Stunden" #: prewikka/templates/MessageListing.py:511 msgid "Days" msgstr "Tage" #: prewikka/templates/MessageListing.py:520 msgid "Months" msgstr "Monate" #: prewikka/templates/MessageListing.py:529 msgid "Years" msgstr "Jahre" #: prewikka/templates/MessageListing.py:538 msgid "Unlimited" msgstr "Unbegrenzt" #: prewikka/templates/MessageListing.py:549 msgid "Timezone" msgstr "Zeitzone" #: prewikka/templates/MessageListing.py:560 msgid "Frontend localtime" msgstr "Frontend Lokalzeit" #: prewikka/templates/MessageListing.py:569 msgid "Sensor localtime" msgstr "Sensor Lokalzeit" #: prewikka/templates/MessageListing.py:578 msgid "UTC" msgstr "" #: prewikka/templates/MessageListing.py:589 msgid "Limit" msgstr "Limit" #: prewikka/templates/MessageListing.py:613 msgid "Refresh" msgstr "Neu Laden" #: prewikka/templates/MessageListing.py:660 prewikka/templates/Stats.py:526 msgid "Apply" msgstr "Übernehmen" #: prewikka/templates/MessageListing.py:708 #: prewikka/templates/MessageListing.py:716 msgid "prev" msgstr "früher" #: prewikka/templates/MessageListing.py:729 #: prewikka/templates/MessageListing.py:737 msgid "current" msgstr "aktuell" #: prewikka/templates/MessageListing.py:750 #: prewikka/templates/MessageListing.py:758 msgid "next" msgstr "später" #: prewikka/templates/MessageListing.py:812 msgid "total" msgstr "Total" #: prewikka/templates/AlertListing.py:112 msgid "Equal" msgstr "Gleich" #: prewikka/templates/AlertListing.py:118 msgid "Not equal" msgstr "" #: prewikka/templates/AlertListing.py:124 msgid "Lesser than" msgstr "Weniger als" #: prewikka/templates/AlertListing.py:130 msgid "Greater than" msgstr "Größer als" #: prewikka/templates/AlertListing.py:136 msgid "Lesser or equal" msgstr "Kleiner oder gleich" #: prewikka/templates/AlertListing.py:142 msgid "Greater or equal" msgstr "Größer oder gleich" #: prewikka/templates/AlertListing.py:148 msgid "Substring" msgstr "Teilstring" #: prewikka/templates/AlertListing.py:154 msgid "Substring (case-insensitive)" msgstr "Teilstring (Groß-/Kleinschreibung egal)" #: prewikka/templates/AlertListing.py:160 msgid "Regular expression" msgstr "Regulärer Ausdruck" #: prewikka/templates/AlertListing.py:166 msgid "Regular expression (case-insensitive)" msgstr "Regulärer Ausdruck (Groß-/Kleinschreibung egal)" #: prewikka/templates/AlertListing.py:319 #: prewikka/templates/AlertListing.py:1190 msgid "info" msgstr "info" #: prewikka/templates/AlertListing.py:321 #: prewikka/templates/AlertListing.py:1192 msgid "low" msgstr "niedrig" #: prewikka/templates/AlertListing.py:323 #: prewikka/templates/AlertListing.py:1194 msgid "medium" msgstr "mittel" #: prewikka/templates/AlertListing.py:325 #: prewikka/templates/AlertListing.py:1196 msgid "high" msgstr "hoch" #: prewikka/templates/AlertListing.py:345 #: prewikka/templates/AlertListing.py:1223 msgid "succeeded" msgstr "erfolgreich" #: prewikka/templates/AlertListing.py:347 #: prewikka/templates/AlertListing.py:1225 msgid "failed" msgstr "fehlgeschlagen" #: prewikka/templates/AlertListing.py:843 #, fuzzy msgid "Filter on" msgstr "Filtern nach:" #: prewikka/templates/AlertListing.py:963 msgid "Group entry by:" msgstr "Eintrag gruppieren nach:" #: prewikka/templates/AlertListing.py:1027 #: prewikka/templates/AlertListing.py:1035 #, fuzzy msgid "filtered" msgstr "fehlgeschlagen" #: prewikka/templates/AlertListing.py:1136 msgid "Type:" msgstr "Typ" #: prewikka/templates/AlertListing.py:1151 msgid "CorrelationAlert" msgstr "Korrelations-Alarme" #: prewikka/templates/AlertListing.py:1153 msgid "OverflowAlert" msgstr "Overflow Alarm" #: prewikka/templates/AlertListing.py:1155 msgid "ToolAlert" msgstr "Tool-Alarme" #: prewikka/templates/AlertListing.py:1184 msgid "Severity:" msgstr "" #: prewikka/templates/AlertListing.py:1215 msgid "Completion:" msgstr "" #: prewikka/templates/AlertListing.py:1253 msgid "Source" msgstr "Quelle" #: prewikka/templates/AlertListing.py:1285 msgid "Target" msgstr "Ziel" #: prewikka/templates/AlertListing.py:1317 #, fuzzy msgid "Analyzer" msgstr "Analyzer-ID" #: prewikka/templates/AlertListing.py:1459 msgid "See alert detail" msgstr "" #: prewikka/templates/AlertListing.py:1468 #, fuzzy msgid "Filter on this classification.text" msgstr "Nach Adresse filtern" #: prewikka/templates/AlertListing.py:1522 #, fuzzy msgid "Filter on this port/protocol" msgstr "Nach Adresse filtern" #: prewikka/templates/AlertListing.py:1541 #: prewikka/templates/AlertListing.py:1549 #, fuzzy msgid "Port/protocol information" msgstr "Netzwerkinformationen" #: prewikka/templates/AlertListing.py:1598 msgid "alert" msgid_plural "alerts" msgstr[0] "Alarme" msgstr[1] "Alarme" #: prewikka/templates/AlertListing.py:1622 #, python-format msgid "%(hidden)d of %(total)d alerts not shown..." msgstr "%(hidden)d von %(total)d Alarmen nicht angezeigt..." #: prewikka/templates/AlertListing.py:1633 #: prewikka/templates/AlertListing.py:1825 msgid "expand" msgstr "aufklappen" #: prewikka/templates/AlertListing.py:1778 #, fuzzy msgid "Filter on this reference" msgstr "Nach Adresse filtern" #: prewikka/templates/AlertListing.py:1802 msgid "source" msgstr "Quelle" #: prewikka/templates/AlertListing.py:1804 msgid "target" msgstr "Ziel" #: prewikka/templates/AlertListing.py:1814 #, python-format msgid "%(hidden)d of %(total)d %(name)ss not shown..." msgstr "%(hidden)d von %(total)d %(name)ss nicht angezeigt..." #: prewikka/templates/AlertListing.py:1856 #, fuzzy, python-format msgid "Filter on this %s" msgstr "Nach Adresse filtern" #: prewikka/templates/AlertListing.py:1874 #, python-format msgid "%s information" msgstr "%s Information" #: prewikka/templates/AlertListing.py:2114 msgid "Filter" msgstr "Filter" #: prewikka/templates/LoginPasswordForm.py:130 msgid "Submit" msgstr "Abschicken" #: prewikka/templates/Stats.py:356 #, fuzzy msgid "Filter:" msgstr "Filter" #: prewikka/templates/Stats.py:386 #, fuzzy msgid "Time:" msgstr "Zeit" #: prewikka/templates/Stats.py:397 #, fuzzy msgid "Hour" msgstr "Stunden" #: prewikka/templates/Stats.py:406 #, fuzzy msgid "Day" msgstr "Tage" #: prewikka/templates/Stats.py:415 #, fuzzy msgid "Month" msgstr "Monate" #: prewikka/templates/Stats.py:424 msgid "Custom" msgstr "" #: prewikka/templates/Stats.py:434 #, fuzzy msgid "From:" msgstr "Formel:" #: prewikka/templates/Stats.py:477 #, fuzzy msgid "To:" msgstr "Total:" #: prewikka/modules/auth/cgi/cgi.py:41 msgid "CGI Authentication failed: no user specified." msgstr "CGI Authentifizierung fehlgeschlagen: Kein Benutzer angegeben." #~ msgid "Invalid 'analyzerid:messageid' pair, '%(analyzerid):%(messageid)'" #~ msgstr "" #~ "Ungültiges 'analyzerid:messageid' Paar, '%(analyzerid):%(messageid)'" #~ msgid "none" #~ msgstr "keine" #~ msgid "Sensor" #~ msgstr "Sensor" #~ msgid "The Prewikka database does not seem to have been created" #~ msgstr "Die Prewikka Datenbank wurde anscheinend noch nicht erstellt" #~ msgid "Session invalid" #~ msgstr "Session ungültig" #~ msgid "Username and password do not match." #~ msgstr "Benutzername und Passwort stimmen nicht überein." #~ msgid "anonymous" #~ msgstr "anonym" #~ msgid "SSLcert Authentication failed: Not in a SSL session." #~ msgstr "SSLcert Authentifizierung fehlgeschlagen: Keine SSL session." #~ msgid "SSLcert Authentication failed: no user specified in x509 CN." #~ msgstr "SSLcert Authentifizierung fehlgeschlagen: Kein Benutzer in x509 CN." #~ msgid "All analyzers online" #~ msgstr "Alle Analyzer online" #~ msgid "on" #~ msgstr "auf" #~ msgid "Node Name" #~ msgstr "Knotenname" #~ msgid "No agent available" #~ msgstr "Kein Agent verfügbar" #~ msgid "Step" #~ msgstr "Schritt" #~ msgid "Tz" #~ msgstr "Tz" prewikka-1.0.0/po/pt_BR.po0000664000076400007640000010510311340777332014364 0ustar yoannyoann# Brazilian Portuguese Translation for Prewikka # Copyright (C) 2007 PreludeIDS Technologies # This file is distributed under the same license as the prewikka package. # edeunix@edeunix.com, 2007. # msgid "" msgstr "" "Project-Id-Version: Prewikka 0.99\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2010-02-10 13:34+0100\n" "PO-Revision-Date: 2008-02-26 13:12-0300\n" "Last-Translator: Edelberto Franco Silva \n" "Language-Team: Portuguese\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Portuguese\n" "X-Poedit-Country: BRAZIL\n" "X-Poedit-SourceCharset: utf-8\n" #: prewikka/User.py:41 msgid "Permission Denied" msgstr "Permissão Negada" #: prewikka/User.py:42 #, python-format msgid "Access to view '%s' forbidden" msgstr "A visualização de '%s' está proibida" #: prewikka/Auth.py:29 msgid "Authentication failed" msgstr "A auntenticação falhou" #: prewikka/Auth.py:35 msgid "Invalid session" msgstr "Sessão inválida" #: prewikka/Auth.py:41 msgid "Session expired" msgstr "Sessão expirada" #: prewikka/Auth.py:138 msgid "Logged out" msgstr "Deslogado" #: prewikka/Log.py:65 #, python-format msgid "Unknown logtype specified: '%s'" msgstr "Tipo de log especificado é desconhecido: '%s'" #: prewikka/view.py:29 prewikka/view.py:35 prewikka/view.py:41 msgid "Parameters Normalization failed" msgstr "A normalização dos parâmetros falhou" #: prewikka/Database.py:98 #, python-format msgid "" "Database schema version %(version)s found when %(reqversion)s was required" msgstr "" "Versão do esquema de banco de dados %(version)s encontrada quando %" "(reqversion)s foi requerida" #: prewikka/localization.py:107 msgid "January" msgstr "Janeiro" #: prewikka/localization.py:108 msgid "February" msgstr "Fevereiro" #: prewikka/localization.py:109 msgid "March" msgstr "Março" #: prewikka/localization.py:110 msgid "April" msgstr "Abril" #: prewikka/localization.py:111 msgid "May" msgstr "Maio" #: prewikka/localization.py:112 msgid "June" msgstr "Junho" #: prewikka/localization.py:113 msgid "July" msgstr "Julho" #: prewikka/localization.py:114 msgid "August" msgstr "Agosto" #: prewikka/localization.py:115 msgid "September" msgstr "Setembro" #: prewikka/localization.py:116 msgid "November" msgstr "Novembro" #: prewikka/localization.py:117 msgid "October" msgstr "Outubro" #: prewikka/localization.py:118 msgid "December" msgstr "dezembro" #: prewikka/localization.py:120 msgid "Monday" msgstr "Segunda-feira" #: prewikka/localization.py:121 msgid "Tuesday" msgstr "Terça-feira" #: prewikka/localization.py:122 msgid "Wednesday" msgstr "Quarta-feira" #: prewikka/localization.py:123 msgid "Thursday" msgstr "Quinta-feira" #: prewikka/localization.py:124 msgid "Friday" msgstr "Sexta" #: prewikka/localization.py:125 msgid "Saturday" msgstr "Sábado" #: prewikka/localization.py:126 msgid "Sunday" msgstr "Domingo" #: prewikka/Filter.py:78 #, python-format msgid "Invalid filter element '%s' referenced from filter formula" msgstr "Elemento de filtro '%s' inválido, referenciado pela fórmula do filtro" #: prewikka/views/messagesummary.py:304 prewikka/views/messagesummary.py:461 #: prewikka/views/messagesummary.py:691 prewikka/views/messagesummary.py:708 #: prewikka/views/messagesummary.py:731 prewikka/views/messagesummary.py:789 #: prewikka/views/messagesummary.py:808 prewikka/views/messagesummary.py:844 #: prewikka/templates/SensorListing.py:412 #, fuzzy msgid "Name" msgstr "Nome do nó" #: prewikka/views/messagesummary.py:305 prewikka/views/messagesummary.py:611 msgid "Code" msgstr "Código" #: prewikka/views/messagesummary.py:306 msgid "Data length" msgstr "Tamanho dos dados" #: prewikka/views/messagesummary.py:307 msgid "Data" msgstr "Dados" #: prewikka/views/messagesummary.py:403 prewikka/views/messagesummary.py:846 #, fuzzy msgid "Create time" msgstr "Criar usuário" #: prewikka/views/messagesummary.py:406 msgid "Detect time" msgstr "Tempo de descobrimento" #: prewikka/views/messagesummary.py:411 msgid "Analyzer time" msgstr "Tempo de análise" #: prewikka/views/messagesummary.py:417 msgid "Process" msgstr "Processo" #: prewikka/views/messagesummary.py:418 msgid "Process Path" msgstr "Caminho do processo" #: prewikka/views/messagesummary.py:419 msgid "Process PID" msgstr "PID do processo" #: prewikka/views/messagesummary.py:427 msgid "Node location" msgstr "Localização do nó" #: prewikka/views/messagesummary.py:449 #: prewikka/templates/HeartbeatListing.py:126 #, fuzzy msgid "Node name" msgstr "Nome do nó" #: prewikka/views/messagesummary.py:452 #, fuzzy msgid "Node name (resolved)" msgstr "Nome do nó" #: prewikka/views/messagesummary.py:454 #: prewikka/templates/HeartbeatListing.py:113 #, fuzzy msgid "Node address" msgstr "Endereço do nó" #: prewikka/views/messagesummary.py:460 prewikka/views/stats.py:711 #: prewikka/templates/HeartbeatListing.py:139 #: prewikka/templates/SensorListing.py:418 msgid "Model" msgstr "Modelo" #: prewikka/views/messagesummary.py:462 msgid "Analyzerid" msgstr "Analisador id" #: prewikka/views/messagesummary.py:463 prewikka/views/messagesummary.py:563 #: prewikka/templates/SensorListing.py:424 #, fuzzy msgid "Version" msgstr "Permissões:" #: prewikka/views/messagesummary.py:464 prewikka/views/stats.py:719 #: prewikka/templates/SensorListing.py:430 msgid "Class" msgstr "Classe" #: prewikka/views/messagesummary.py:466 msgid "Manufacturer" msgstr "Fabricante" #: prewikka/views/messagesummary.py:474 msgid "Operating System" msgstr "Sistema Operacional" #: prewikka/views/messagesummary.py:492 #, python-format msgid "Analyzer Path (%d not shown)" msgstr "Caminho do analisador (%d não mostrado)" #: prewikka/views/messagesummary.py:499 prewikka/views/messagesummary.py:1030 #: prewikka/views/messagesummary.py:1102 #, python-format msgid "Analyzer #%d" msgstr "Analisador #%d" #: prewikka/views/messagesummary.py:509 msgid "Additional data" msgstr "Dados adicionais" #: prewikka/views/messagesummary.py:512 prewikka/views/messagesummary.py:732 msgid "Meaning" msgstr "Querendo dizer" #: prewikka/views/messagesummary.py:513 #, fuzzy msgid "Value" msgstr "Alertas" #: prewikka/views/messagesummary.py:564 prewikka/views/messagesummary.py:585 msgid "Header length" msgstr "Compimento do cabeçalho" #: prewikka/views/messagesummary.py:565 msgid "TOS" msgstr "TOS" #: prewikka/views/messagesummary.py:566 prewikka/views/messagesummary.py:604 msgid "Length" msgstr "Comprimento" #: prewikka/views/messagesummary.py:567 prewikka/views/messagesummary.py:613 msgid "Id" msgstr "Id" #: prewikka/views/messagesummary.py:571 msgid "Ip offset" msgstr "Ip offset" #: prewikka/views/messagesummary.py:572 msgid "TTL" msgstr "TTL" #: prewikka/views/messagesummary.py:573 prewikka/views/messagesummary.py:932 #: prewikka/views/messagesummary.py:935 prewikka/views/messagesummary.py:938 msgid "Protocol" msgstr "Protocolo" #: prewikka/views/messagesummary.py:574 prewikka/views/messagesummary.py:596 #: prewikka/views/messagesummary.py:605 prewikka/views/messagesummary.py:612 msgid "Checksum" msgstr "Checksum" #: prewikka/views/messagesummary.py:575 #, fuzzy msgid "Source address" msgstr "Endereço do nó" #: prewikka/views/messagesummary.py:576 #, fuzzy msgid "Target address" msgstr "Endereço do nó" #: prewikka/views/messagesummary.py:581 prewikka/views/messagesummary.py:602 #, fuzzy msgid "Source port" msgstr "Fonte" #: prewikka/views/messagesummary.py:582 prewikka/views/messagesummary.py:603 #, fuzzy msgid "Target port" msgstr "Alvo" #: prewikka/views/messagesummary.py:586 msgid "Reserved" msgstr "Reservado" #: prewikka/views/messagesummary.py:595 msgid "Window" msgstr "Janela" #: prewikka/views/messagesummary.py:597 msgid "URP" msgstr "URP" #: prewikka/views/messagesummary.py:610 prewikka/views/messagesummary.py:755 #: prewikka/views/messagesummary.py:788 prewikka/views/messagesummary.py:807 msgid "Type" msgstr "Tipo" #: prewikka/views/messagesummary.py:614 msgid "Seq #" msgstr "Seq #" #: prewikka/views/messagesummary.py:615 msgid "Mask" msgstr "Máscara" #: prewikka/views/messagesummary.py:616 #, fuzzy msgid "Gateway Address" msgstr "Endereço do nó" #: prewikka/views/messagesummary.py:617 #, fuzzy msgid "Num address" msgstr "Endereço do nó" #: prewikka/views/messagesummary.py:618 msgid "Wpa" msgstr "Wpa" #: prewikka/views/messagesummary.py:619 msgid "Lifetime" msgstr "Tempo de vida" #: prewikka/views/messagesummary.py:620 #, fuzzy msgid "Otime" msgstr "Tempo" #: prewikka/views/messagesummary.py:621 #, fuzzy msgid "Rtime" msgstr "Tempo" #: prewikka/views/messagesummary.py:622 #, fuzzy msgid "Ttime" msgstr "Tempo" #: prewikka/views/messagesummary.py:628 prewikka/views/messagesummary.py:1077 msgid "Payload" msgstr "Carga exigida" #: prewikka/views/messagesummary.py:675 #, python-format msgid "%d linked alerts missing (probably deleted)" msgstr "" #: prewikka/views/messagesummary.py:689 prewikka/views/messagesummary.py:985 #: prewikka/views/alertlisting.py:707 #, fuzzy msgid "Correlation Alert" msgstr "AlertasDeCorreção" #: prewikka/views/messagesummary.py:695 #, fuzzy msgid "Correlated Alert" msgstr "AlertasDeCorreção" #: prewikka/views/messagesummary.py:696 prewikka/views/messagesummary.py:713 msgid "Source Analyzer" msgstr "Analisador da fonte" #: prewikka/views/messagesummary.py:706 prewikka/views/messagesummary.py:988 #: prewikka/views/alertlisting.py:711 #, fuzzy msgid "Tool Alert" msgstr "AlertasDasFerramentas" #: prewikka/views/messagesummary.py:712 msgid "Linked Alert" msgstr "Alerta ligado" #: prewikka/views/messagesummary.py:723 #, fuzzy msgid "Text" msgstr "próximo" #: prewikka/views/messagesummary.py:725 #, fuzzy msgid "Ident" msgstr "Agente" #: prewikka/views/messagesummary.py:730 msgid "Origin" msgstr "Origem" #: prewikka/views/messagesummary.py:749 prewikka/views/stats.py:448 msgid "Severity" msgstr "Severidade" #: prewikka/views/messagesummary.py:752 msgid "Completion" msgstr "Conclusão" #: prewikka/views/messagesummary.py:756 prewikka/views/messagesummary.py:762 msgid "Description" msgstr "Descrição" #: prewikka/views/messagesummary.py:761 msgid "Category" msgstr "Categoria" #: prewikka/views/messagesummary.py:785 msgid "User category" msgstr "Categoria do usuário" #: prewikka/views/messagesummary.py:790 prewikka/views/messagesummary.py:809 #, fuzzy msgid "Number" msgstr "Novembro" #: prewikka/views/messagesummary.py:791 msgid "Tty" msgstr "Tty" #: prewikka/views/messagesummary.py:810 #, fuzzy msgid "Permission" msgstr "Permissões:" #: prewikka/views/messagesummary.py:832 msgid "Change time" msgstr "Mudar o tempo" #: prewikka/views/messagesummary.py:833 #, fuzzy msgid "Inode Number" msgstr "Nome do nó" #: prewikka/views/messagesummary.py:834 msgid "Major device" msgstr "Dispositivo importante" #: prewikka/views/messagesummary.py:835 msgid "Minor device" msgstr "Dispositivo secundário" #: prewikka/views/messagesummary.py:836 msgid "C Major device" msgstr "C Dispositivo importante" #: prewikka/views/messagesummary.py:837 msgid "C Minor device" msgstr "C Dispositivo secundário" #: prewikka/views/messagesummary.py:841 #, fuzzy, python-format msgid "Target file %s" msgstr "Alvo" #: prewikka/views/messagesummary.py:845 msgid "Path" msgstr "Caminho" #: prewikka/views/messagesummary.py:847 msgid "Modify time" msgstr "Tempo modificado" #: prewikka/views/messagesummary.py:848 msgid "Access time" msgstr "Tempo de acesso" #: prewikka/views/messagesummary.py:849 msgid "Data size" msgstr "Tamanho dos dados" #: prewikka/views/messagesummary.py:850 msgid "Disk size" msgstr "Tamanho do disco" #: prewikka/views/messagesummary.py:869 msgid "Web Service" msgstr "Serviço da WEB" #: prewikka/views/messagesummary.py:872 msgid "Url" msgstr "Url" #: prewikka/views/messagesummary.py:873 msgid "Cgi" msgstr "Cgi" #: prewikka/views/messagesummary.py:874 msgid "Http Method" msgstr "Método HTTP" #: prewikka/views/messagesummary.py:877 msgid "CGI Argument" msgstr "Argumento CGI" #: prewikka/views/messagesummary.py:886 msgid "SNMP Service" msgstr "Serviço SNMP" #: prewikka/views/messagesummary.py:889 msgid "oid" msgstr "oid" #: prewikka/views/messagesummary.py:890 msgid "messageProcessingModel" msgstr "messageProcessingModel" #: prewikka/views/messagesummary.py:891 msgid "securityModel" msgstr "securityModel" #: prewikka/views/messagesummary.py:892 msgid "securityName" msgstr "securityName" #: prewikka/views/messagesummary.py:893 msgid "securityLevel" msgstr "securityLevel" #: prewikka/views/messagesummary.py:894 #, fuzzy msgid "contextName" msgstr "Nome do nó" #: prewikka/views/messagesummary.py:895 msgid "contextEngineID" msgstr "contextEngineID" #: prewikka/views/messagesummary.py:896 msgid "command" msgstr "Comando" #: prewikka/views/messagesummary.py:908 msgid "Port" msgstr "Porta" #: prewikka/views/messagesummary.py:925 #, fuzzy msgid "PortList" msgstr "Porta" #: prewikka/views/messagesummary.py:928 #, fuzzy msgid "ip_version" msgstr "Permissões:" #: prewikka/views/messagesummary.py:961 #, fuzzy, python-format msgid "Source(%d)" msgstr "Fonte" #: prewikka/views/messagesummary.py:970 #, fuzzy, python-format msgid "Target(%d)" msgstr "Alvo" #: prewikka/views/messagesummary.py:991 msgid "Overflow Alert" msgstr "Estouro de alerta" #: prewikka/views/messagesummary.py:994 #: prewikka/templates/AlertListing.py:1149 #, fuzzy msgid "Alert" msgstr "Alertas" #: prewikka/views/messagesummary.py:1013 msgid "MessageID" msgstr "" #: prewikka/views/messagesummary.py:1021 msgid "Actions" msgstr "Ações" #: prewikka/views/messagesummary.py:1060 #, fuzzy msgid "Network centric information" msgstr "Informações sobre a conta" #: prewikka/views/messagesummary.py:1080 msgid "ASCII Payload" msgstr "Carga gasta ASCII" #: prewikka/views/messagesummary.py:1099 #, fuzzy msgid "Heartbeat" msgstr "Heartbeats" #: prewikka/views/__init__.py:45 msgid "Events" msgstr "Eventos" #: prewikka/views/__init__.py:45 prewikka/templates/SensorListing.py:547 msgid "Alerts" msgstr "Alertas" #: prewikka/views/__init__.py:46 msgid "CorrelationAlerts" msgstr "AlertasDeCorreção" #: prewikka/views/__init__.py:47 msgid "ToolAlerts" msgstr "AlertasDasFerramentas" #: prewikka/views/__init__.py:50 msgid "Agents" msgstr "Agentes" #: prewikka/views/__init__.py:51 prewikka/templates/SensorListing.py:553 msgid "Heartbeats" msgstr "Heartbeats" #: prewikka/views/__init__.py:53 #, fuzzy msgid "Statistics" msgstr "Status" #: prewikka/views/__init__.py:54 #, fuzzy msgid "Categorizations" msgstr "Categoria" #: prewikka/views/__init__.py:55 #, fuzzy msgid "Sources" msgstr "Fonte" #: prewikka/views/__init__.py:56 #, fuzzy msgid "Targets" msgstr "Alvo" #: prewikka/views/__init__.py:57 #, fuzzy msgid "Analyzers" msgstr "Analisador id" #: prewikka/views/__init__.py:58 #, fuzzy msgid "Timeline" msgstr "Tempo" #: prewikka/views/__init__.py:61 msgid "Settings" msgstr "Ajustes" #: prewikka/views/__init__.py:62 msgid "Filters" msgstr "Filtros" #: prewikka/views/__init__.py:64 msgid "My account" msgstr "Minha conta" #: prewikka/views/__init__.py:67 #, fuzzy msgid "User listing" msgstr "Lista de alertas" #: prewikka/views/__init__.py:71 msgid "About" msgstr "Sobre" #: prewikka/views/sensor.py:51 #, fuzzy msgid "Offline" msgstr "em" #: prewikka/views/sensor.py:54 msgid "Unknown" msgstr "Desconhecido" #: prewikka/views/sensor.py:57 msgid "Missing" msgstr "Perdido" #: prewikka/views/sensor.py:59 #, fuzzy msgid "Online" msgstr "em" #: prewikka/views/sensor.py:158 msgid "Node location n/a" msgstr "Localização do nó n/a" #: prewikka/views/sensor.py:159 #, fuzzy msgid "Node name n/a" msgstr "Nome do nó" #: prewikka/views/sensor.py:160 #, fuzzy msgid "OS version n/a" msgstr "Sessão inválida" #: prewikka/views/sensor.py:161 msgid "OS type n/a" msgstr "Sistema Operacional n/a" #: prewikka/views/filter.py:55 msgid "Example: (A AND B) OR (C AND D)" msgstr "Exemplo: (A AND B) OR (C AND D)" #: prewikka/views/filter.py:137 prewikka/templates/FilterEdition.py:221 msgid "Load" msgstr "Carregar" #: prewikka/views/filter.py:139 prewikka/templates/FilterEdition.py:339 #: prewikka/templates/MessageListing.py:665 prewikka/templates/Stats.py:531 msgid "Save" msgstr "Salvar" #: prewikka/views/filter.py:141 prewikka/templates/FilterEdition.py:227 #: prewikka/templates/SensorListing.py:406 #: prewikka/templates/SensorListing.py:559 #: prewikka/templates/MessageListing.py:369 msgid "Delete" msgstr "Apagar" #: prewikka/views/messagelisting.py:231 prewikka/templates/AlertListing.py:327 #: prewikka/templates/AlertListing.py:349 #: prewikka/templates/AlertListing.py:1198 #: prewikka/templates/AlertListing.py:1227 msgid "n/a" msgstr "" #: prewikka/views/stats.py:425 #, fuzzy msgid "Top 10 Classifications" msgstr "Classificação" #: prewikka/views/stats.py:425 prewikka/templates/AlertListing.py:1111 msgid "Classification" msgstr "Classificação" #: prewikka/views/stats.py:433 msgid "Top 10 Alert References" msgstr "" #: prewikka/views/stats.py:433 #, fuzzy msgid "References" msgstr "Atualizar" #: prewikka/views/stats.py:442 prewikka/views/stats.py:768 #, fuzzy msgid "High" msgstr "alta" #: prewikka/views/stats.py:443 prewikka/views/stats.py:769 #, fuzzy msgid "Medium" msgstr "média" #: prewikka/views/stats.py:444 prewikka/views/stats.py:770 #, fuzzy msgid "Low" msgstr "baixa" #: prewikka/views/stats.py:445 prewikka/views/stats.py:771 #, fuzzy msgid "Informational" msgstr "Endereço da informação" #: prewikka/views/stats.py:446 prewikka/views/stats.py:772 msgid "N/a" msgstr "" #: prewikka/views/stats.py:448 #, fuzzy msgid "Severities" msgstr "Severidade" #: prewikka/views/stats.py:455 msgid "Alert Impact Types" msgstr "" #: prewikka/views/stats.py:455 msgid "Impact Types" msgstr "" #: prewikka/views/stats.py:490 #, fuzzy msgid "Top Source Country" msgstr "Fonte" #: prewikka/views/stats.py:490 msgid "Country" msgstr "" #: prewikka/views/stats.py:542 #, fuzzy msgid "Top 10 Source Addresses" msgstr "Endereço do nó" #: prewikka/views/stats.py:542 prewikka/views/stats.py:645 #: prewikka/views/stats.py:727 #, fuzzy msgid "Address" msgstr "Endereço do nó" #: prewikka/views/stats.py:550 msgid "Top 10 Source Users" msgstr "" #: prewikka/views/stats.py:550 prewikka/views/stats.py:653 #, fuzzy msgid "User" msgstr "Usuários" #: prewikka/views/stats.py:645 #, fuzzy msgid "Top 10 Targeted Addresses" msgstr "Endereço do nó" #: prewikka/views/stats.py:653 msgid "Top 10 Targeted Users" msgstr "" #: prewikka/views/stats.py:711 msgid "Top 10 Analyzer Models" msgstr "" #: prewikka/views/stats.py:719 msgid "Top 10 Analyzer Classes" msgstr "" #: prewikka/views/stats.py:727 msgid "Top 10 Analyzer Node Addresses" msgstr "" #: prewikka/views/stats.py:735 #, fuzzy msgid "Analyzer Locations" msgstr "Tempo de análise" #: prewikka/views/stats.py:735 #, fuzzy msgid "Location" msgstr "Usuário:" #: prewikka/templates/About.py:107 msgid "" "provides support to Large Accounts, Major Companies and Government Agencies " "around the world, to improve and strengthen the security of their systems " "and networks." msgstr "" "ornece suporte a grandes clientes, grandes companhias e agências do governo " "ao redor do mundo, a fim de melhorar a segurança dos sistemas e das redes." #: prewikka/templates/About.py:125 msgid "Customizing Prelude" msgstr "Customizando o Prelude" #: prewikka/templates/About.py:132 msgid "" "In keeping with the Open Source spirit, we encourage you to participate in " "the development of your application. You can order customized versions of " "Prelude to suit your needs: adapting, adding on functionality etc. Because " "they are carried out by PreludeIDS engineers, you know that any " "modifications made to the system will be integrated optimally and guaranteed " "by our technical support department. Additionally, the company can extend " "Prelude to handle yet unsupported sensors (including proprietary), ruleset " "extension to handle new devices and porting of Prelude to unsupported " "operating systems." msgstr "" "De acordo com a filosofia do Código Aberto, nós o incentivamos a participar " "do desenvolvimento de sua aplicação. Você pode ter versões customizadas do " "Preludepara suprir suas necessidade: adaptando, adicionando funcionalidades, " "etc. Porque são realizados por coordenadores do PreludeIDS, você sabe que " "algumas modificações feitas no sistema estarão integradas otimizadamente e " "garantidas por nosso departamento de suporte técnico. Adicionalmente, a " "companhia pode estender o Prelude para integrar sensores não suportados " "(incluindo os proprietários), extensões de regras para integrar novos " "dispositivos e portas de outros sistemas operacionais que o Prelude não " "suportava também podem ser integrados." #: prewikka/templates/About.py:141 msgid "Software Maintenance and Technical Support" msgstr "Manutenção do software e Suporte Técnico" #: prewikka/templates/About.py:148 #, fuzzy msgid "" "PreludeIDS maintenance and support services guarantee optimal operation of " "the Prelude platform on your infrastructure. There are five support packages " "that provide our customers with peace of mind, knowing that they are not " "only covered for all outcomes, but that our experts are at hand to provide " "rapid and reliable solutions." msgstr "" "PreludeIDS serviços de manutenção e suporte garantem a ótima operação da " "plataforma Prelude em sua infraestrutura. Com nossos serviços de suporte, " "você será beneficiado com a assistência prioritária e a perícia de nossos " "engenheiros, enquanto os serviço de manutenção compreenderão a atualização " "de seu software." #: prewikka/templates/About.py:157 msgid "Commercial licenses" msgstr "Licenças comerciais" #: prewikka/templates/About.py:164 msgid "The Prelude framework is licensed under the" msgstr "A estrutura do Prelude é licenciada sob" #: prewikka/templates/About.py:170 msgid "" "PreludeIDS provides specific commercial licenses to allow proprietary " "systems based on Prelude to be developed and to interoperate." msgstr "" "PreludeIDS fornece licenças comerciais específicas para aceitar sistemas " "proprietários baseados no Prelude a serem desenvolvidos e interoperantes." #: prewikka/templates/About.py:179 msgid "Advice, Deployment and Training" msgstr "Conselho, desenvolvimento e treinamento" #: prewikka/templates/About.py:186 msgid "" "Through our partners, you have access to an array of top-of-the-line " "security services. By advising you on how to secure your infrastructure, " "deploying Prelude and training your users, we provide a turnkey solution to " "secure your infrastructure, delivered by specialists." msgstr "" "Como sócio, você tem acesso a serviços de segurança tops de linha. " "Recomendado para criar sua infraestrutura com segurança, instalando o " "Preludee treinando seus usuários. Nós forneceremos soluções de segurança " "turnkey, ou seja, uma solução empacotada para sua infraestrutura e estregue " "por especialistas." #: prewikka/templates/About.py:205 msgid "Contact" msgstr "Contato" #: prewikka/templates/About.py:211 #, fuzzy msgid "Office" msgstr "em" #: prewikka/templates/About.py:217 msgid "Website" msgstr "Site na WEB" #: prewikka/templates/About.py:230 #, fuzzy msgid "Phone:" msgstr "em" #: prewikka/templates/About.py:240 msgid "Fax:" msgstr "Fax:" #: prewikka/templates/HeartbeatListing.py:100 msgid "Agent" msgstr "Agente" #: prewikka/templates/HeartbeatListing.py:151 #: prewikka/templates/AlertListing.py:1348 msgid "Time" msgstr "Tempo" #: prewikka/templates/HeartbeatListing.py:199 msgid "Heartbeat summary" msgstr "Heartbeat sumário" #: prewikka/templates/HeartbeatListing.py:208 msgid "Filter on agent" msgstr "Filtro no agente" #: prewikka/templates/HeartbeatListing.py:229 #: prewikka/templates/SensorListing.py:316 msgid "Filter on address" msgstr "Filtro no endereço" #: prewikka/templates/FilterEdition.py:191 msgid "Available filters" msgstr "Filtros disponíveis" #: prewikka/templates/FilterEdition.py:242 msgid "Edition" msgstr "Edição" #: prewikka/templates/FilterEdition.py:302 msgid "Formula:" msgstr "Fórmula:" #: prewikka/templates/FilterEdition.py:314 #, fuzzy msgid "Name:" msgstr "Nome do nó" #: prewikka/templates/FilterEdition.py:326 msgid "Comment:" msgstr "Comentário" #: prewikka/templates/UserListing.py:100 #, fuzzy msgid "Login" msgstr "Usuário:" #: prewikka/templates/UserListing.py:156 msgid "Delete user" msgstr "Apagar usuário" #: prewikka/templates/UserListing.py:169 msgid "Create user" msgstr "Criar usuário" #: prewikka/templates/SensorListing.py:232 #, python-format msgid "%d Node" msgid_plural "%d Nodes" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:237 #, python-format msgid "%d Analyzer" msgid_plural "%d Analyzers" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:244 #, fuzzy, python-format msgid "%d Online" msgid_plural "%d Online" msgstr[0] "em" msgstr[1] "em" #: prewikka/templates/SensorListing.py:246 #, fuzzy, python-format msgid "%d Offline" msgid_plural "%d Offline" msgstr[0] "em" msgstr[1] "em" #: prewikka/templates/SensorListing.py:248 #, python-format msgid "%d Unknown" msgid_plural "%d Unknown" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:250 #, python-format msgid "%d Missing" msgid_plural "%d Missing" msgstr[0] "" msgstr[1] "" #: prewikka/templates/SensorListing.py:328 msgid "Address information" msgstr "Endereço da informação" #: prewikka/templates/SensorListing.py:362 #, fuzzy msgid "Total:" msgstr "total" #: prewikka/templates/SensorListing.py:436 #, fuzzy msgid "Last heartbeat" msgstr "Heartbeats" #: prewikka/templates/SensorListing.py:442 msgid "Status" msgstr "Status" #: prewikka/templates/SensorListing.py:481 msgid "Alert listing" msgstr "Lista de alertas" #: prewikka/templates/SensorListing.py:490 msgid "Heartbeat listing" msgstr "Lista de Heartbeats" #: prewikka/templates/SensorListing.py:499 msgid "Heartbeat analysis" msgstr "Análise de Heartbeats" #: prewikka/templates/ClassicLayout.py:231 msgid "logout" msgstr "sair" #: prewikka/templates/ClassicLayout.py:243 #, python-format msgid "%(username)s on %(date)s" msgstr "%(username)s em %(date)s" #: prewikka/templates/UserSettings.py:157 #, fuzzy msgid "Account information" msgstr "Informações sobre a conta" #: prewikka/templates/UserSettings.py:168 msgid "Login:" msgstr "Usuário:" #: prewikka/templates/UserSettings.py:201 msgid "Language:" msgstr "Idioma:" #: prewikka/templates/UserSettings.py:235 msgid "Permissions:" msgstr "Permissões:" #: prewikka/templates/UserSettings.py:298 msgid "Check All" msgstr "Checar todos" #: prewikka/templates/UserSettings.py:324 msgid "Change password" msgstr "Mudar a senha" #: prewikka/templates/UserSettings.py:334 msgid "Current password:" msgstr "Senha atual:" #: prewikka/templates/UserSettings.py:344 msgid "New password:" msgstr "Nova senha:" #: prewikka/templates/UserSettings.py:353 msgid "Confirm new password:" msgstr "Confirmação da nova senha:" #: prewikka/templates/UserSettings.py:366 msgid "Submit Changes" msgstr "Confirmar mudanças" #: prewikka/templates/MessageListing.py:478 #, fuzzy msgid "Period" msgstr "Permissões:" #: prewikka/templates/MessageListing.py:493 msgid "Minutes" msgstr "Minutos" #: prewikka/templates/MessageListing.py:502 msgid "Hours" msgstr "Horas" #: prewikka/templates/MessageListing.py:511 msgid "Days" msgstr "Dias" #: prewikka/templates/MessageListing.py:520 msgid "Months" msgstr "Meses" #: prewikka/templates/MessageListing.py:529 msgid "Years" msgstr "Anos" #: prewikka/templates/MessageListing.py:538 msgid "Unlimited" msgstr "Ilimitado" #: prewikka/templates/MessageListing.py:549 #, fuzzy msgid "Timezone" msgstr "Tempo" #: prewikka/templates/MessageListing.py:560 msgid "Frontend localtime" msgstr "Hora do frontend" #: prewikka/templates/MessageListing.py:569 msgid "Sensor localtime" msgstr "Hora do sensor" #: prewikka/templates/MessageListing.py:578 msgid "UTC" msgstr "UTC" #: prewikka/templates/MessageListing.py:589 #, fuzzy msgid "Limit" msgstr "Limite" #: prewikka/templates/MessageListing.py:613 msgid "Refresh" msgstr "Atualizar" #: prewikka/templates/MessageListing.py:660 prewikka/templates/Stats.py:526 msgid "Apply" msgstr "Aplicar" #: prewikka/templates/MessageListing.py:708 #: prewikka/templates/MessageListing.py:716 msgid "prev" msgstr "anterior" #: prewikka/templates/MessageListing.py:729 #: prewikka/templates/MessageListing.py:737 msgid "current" msgstr "atual" #: prewikka/templates/MessageListing.py:750 #: prewikka/templates/MessageListing.py:758 msgid "next" msgstr "próximo" #: prewikka/templates/MessageListing.py:812 msgid "total" msgstr "total" #: prewikka/templates/AlertListing.py:112 msgid "Equal" msgstr "Igual" #: prewikka/templates/AlertListing.py:118 msgid "Not equal" msgstr "" #: prewikka/templates/AlertListing.py:124 msgid "Lesser than" msgstr "Menor que" #: prewikka/templates/AlertListing.py:130 #, fuzzy msgid "Greater than" msgstr "Criar usuário" #: prewikka/templates/AlertListing.py:136 msgid "Lesser or equal" msgstr "Menor ou igual" #: prewikka/templates/AlertListing.py:142 msgid "Greater or equal" msgstr "Maior ou igual" #: prewikka/templates/AlertListing.py:148 msgid "Substring" msgstr "Substring" #: prewikka/templates/AlertListing.py:154 msgid "Substring (case-insensitive)" msgstr "Substring (case-insensitive)" #: prewikka/templates/AlertListing.py:160 msgid "Regular expression" msgstr "Expressão regular" #: prewikka/templates/AlertListing.py:166 msgid "Regular expression (case-insensitive)" msgstr "Expressão regular (case-insensitive)" #: prewikka/templates/AlertListing.py:319 #: prewikka/templates/AlertListing.py:1190 msgid "info" msgstr "informações" #: prewikka/templates/AlertListing.py:321 #: prewikka/templates/AlertListing.py:1192 msgid "low" msgstr "baixa" #: prewikka/templates/AlertListing.py:323 #: prewikka/templates/AlertListing.py:1194 msgid "medium" msgstr "média" #: prewikka/templates/AlertListing.py:325 #: prewikka/templates/AlertListing.py:1196 msgid "high" msgstr "alta" #: prewikka/templates/AlertListing.py:345 #: prewikka/templates/AlertListing.py:1223 msgid "succeeded" msgstr "sucesso" #: prewikka/templates/AlertListing.py:347 #: prewikka/templates/AlertListing.py:1225 msgid "failed" msgstr "falhou" #: prewikka/templates/AlertListing.py:843 #, fuzzy msgid "Filter on" msgstr "Filtro em:" #: prewikka/templates/AlertListing.py:963 msgid "Group entry by:" msgstr "Entrada do grupo em:" #: prewikka/templates/AlertListing.py:1027 #: prewikka/templates/AlertListing.py:1035 #, fuzzy msgid "filtered" msgstr "falhou" #: prewikka/templates/AlertListing.py:1136 #, fuzzy msgid "Type:" msgstr "Tipo" #: prewikka/templates/AlertListing.py:1151 #, fuzzy msgid "CorrelationAlert" msgstr "AlertasDeCorreção" #: prewikka/templates/AlertListing.py:1153 msgid "OverflowAlert" msgstr "OverflowAlert" #: prewikka/templates/AlertListing.py:1155 #, fuzzy msgid "ToolAlert" msgstr "AlertasDasFerramentas" #: prewikka/templates/AlertListing.py:1184 msgid "Severity:" msgstr "Severidade:" #: prewikka/templates/AlertListing.py:1215 msgid "Completion:" msgstr "Conclusão:" #: prewikka/templates/AlertListing.py:1253 msgid "Source" msgstr "Fonte" #: prewikka/templates/AlertListing.py:1285 msgid "Target" msgstr "Alvo" #: prewikka/templates/AlertListing.py:1317 #, fuzzy msgid "Analyzer" msgstr "Analisador id" #: prewikka/templates/AlertListing.py:1459 msgid "See alert detail" msgstr "" #: prewikka/templates/AlertListing.py:1468 #, fuzzy msgid "Filter on this classification.text" msgstr "Filtro no agente" #: prewikka/templates/AlertListing.py:1522 #, fuzzy msgid "Filter on this port/protocol" msgstr "Filtro no agente" #: prewikka/templates/AlertListing.py:1541 #: prewikka/templates/AlertListing.py:1549 #, fuzzy msgid "Port/protocol information" msgstr "Informações sobre a conta" #: prewikka/templates/AlertListing.py:1598 #, fuzzy msgid "alert" msgid_plural "alerts" msgstr[0] "Alertas" msgstr[1] "Alertas" #: prewikka/templates/AlertListing.py:1622 #, python-format msgid "%(hidden)d of %(total)d alerts not shown..." msgstr "%(hidden)d of %(total)d alertas não exibidas.." #: prewikka/templates/AlertListing.py:1633 #: prewikka/templates/AlertListing.py:1825 msgid "expand" msgstr "expandir" #: prewikka/templates/AlertListing.py:1778 #, fuzzy msgid "Filter on this reference" msgstr "Filtro no agente" #: prewikka/templates/AlertListing.py:1802 #, fuzzy msgid "source" msgstr "Fonte" #: prewikka/templates/AlertListing.py:1804 #, fuzzy msgid "target" msgstr "Alvo" #: prewikka/templates/AlertListing.py:1814 #, python-format msgid "%(hidden)d of %(total)d %(name)ss not shown..." msgstr "%(hidden)d of %(total)d %(name)ss não exibido..." #: prewikka/templates/AlertListing.py:1856 #, fuzzy, python-format msgid "Filter on this %s" msgstr "Filtro no agente" #: prewikka/templates/AlertListing.py:1874 #, fuzzy, python-format msgid "%s information" msgstr "Endereço da informação" #: prewikka/templates/AlertListing.py:2114 #, fuzzy msgid "Filter" msgstr "Filtros" #: prewikka/templates/LoginPasswordForm.py:130 msgid "Submit" msgstr "Enviar" #: prewikka/templates/Stats.py:356 #, fuzzy msgid "Filter:" msgstr "Filtros" #: prewikka/templates/Stats.py:386 #, fuzzy msgid "Time:" msgstr "Tempo" #: prewikka/templates/Stats.py:397 #, fuzzy msgid "Hour" msgstr "Horas" #: prewikka/templates/Stats.py:406 #, fuzzy msgid "Day" msgstr "Dias" #: prewikka/templates/Stats.py:415 #, fuzzy msgid "Month" msgstr "Meses" #: prewikka/templates/Stats.py:424 msgid "Custom" msgstr "" #: prewikka/templates/Stats.py:434 #, fuzzy msgid "From:" msgstr "Fórmula:" #: prewikka/templates/Stats.py:477 #, fuzzy msgid "To:" msgstr "total" #: prewikka/modules/auth/cgi/cgi.py:41 msgid "CGI Authentication failed: no user specified." msgstr "Autenticação CGI falhou: usuário não especificado" #~ msgid "Invalid 'analyzerid:messageid' pair, '%(analyzerid):%(messageid)'" #~ msgstr "Inválido 'analyzerid:messageid' pair, '%(analyzerid):%(messageid)'" #, fuzzy #~ msgid "none" #~ msgstr "em" #~ msgid "Sensor" #~ msgstr "Sensor" #~ msgid "Session invalid" #~ msgstr "Sessão inválida" #~ msgid "Username and password do not match." #~ msgstr "Usuário e senha não conferem" #, fuzzy #~ msgid "SSLcert Authentication failed: Not in a SSL session." #~ msgstr "Autenticação CGI falhou: usuário não especificado" #, fuzzy #~ msgid "SSLcert Authentication failed: no user specified in x509 CN." #~ msgstr "Autenticação CGI falhou: usuário não especificado" #~ msgid "on" #~ msgstr "em" #, fuzzy #~ msgid "Node Address" #~ msgstr "Endereço do nó" #~ msgid "Node Name" #~ msgstr "Nome do nó" #~ msgid "No agent available" #~ msgstr "Nenhum agente disponível" #~ msgid "French" #~ msgstr "Français" #, fuzzy #~ msgid "Step:" #~ msgstr "Etapa" #, fuzzy #~ msgid "Tz:" #~ msgstr "Tz" #, fuzzy #~ msgid "IDMEF Correlation Alert" #~ msgstr "AlertasDeCorreção" #, fuzzy #~ msgid "IDMEF Tool Alert" #~ msgstr "AlertasDasFerramentas" #, fuzzy #~ msgid "IDMEF Alert" #~ msgstr "Alertas" prewikka-1.0.0/HACKING.README0000664000076400007640000000141211200051577014310 0ustar yoannyoannThis directory and its children contain the Prewikka software. Changes: if you wish to contribute a change which is a significant one in terms of the amount of code changes, please be aware that PreludeIDS Technologies SARL wishes to retain copyright of the Prewikka software. Therefore you will have to sign over copyright ownership of your code to PreludeIDS Technologies SARL before we can include your changes in the main source tree. Before you start modifying anything for real, you should probably join the prelude-devel mailing list and send a mail describing what you want to do and how you want to do it so you don't waste time working on something we can't integrate. This also allows us to keep track of what's being worked on so efforts aren't duplicated. prewikka-1.0.0/database/0000775000076400007640000000000011347720623014142 5ustar yoannyoannprewikka-1.0.0/database/mysql2sqlite.sh0000775000076400007640000000040711200051577017144 0ustar yoannyoann#!/bin/sh sed \ -e 's/#.*//' \ -e '/^DROP /d' \ -e 's/[a-zA-Z]*INT /INTEGER /' \ -e 's/UNSIGNED //' \ -e 's/ENUM([^)]\+)/TEXT/' \ -e 's/VARCHAR([^)]\+)/TEXT/' \ -e 's/AUTO_INCREMENT/AUTOINCREMENT/' \ -e 's/TYPE=InnoDB//' \ -e 's/([0-9]\+)//g' \ $1 prewikka-1.0.0/database/mysql2pgsql.sh0000775000076400007640000000155411200051577016775 0ustar yoannyoann#!/bin/sh sed \ -e 's/#.*//' \ -e 's/ INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT/ SERIAL PRIMARY KEY/' \ -e 's/BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT/BIGSERIAL PRIMARY KEY/' \ -e 's/DROP TABLE IF EXISTS/DROP TABLE/' \ -e 's/BLOB/BYTEA/' \ -e 's/ TINYINT UNSIGNED / INT4 /g' \ -e 's/ TINYINT / INT2 /g' \ -e 's/ SMALLINT UNSIGNED / INT8 /g' \ -e 's/ SMALLINT / INT4 /g' \ -e 's/ BIGINT UNSIGNED / NUMERIC(20) /g' \ -e 's/ BIGINT / INT8 /g' \ -e 's/ INT\(EGER\)\? UNSIGNED / INT8 /g' \ -e 's/ INT\(EGER\)\? / INT4 /g' \ -e 's/DATETIME/TIMESTAMP/' \ -e 's/TYPE=InnoDB//' \ -e "s/\"\([^\"]*\)\"/'\1'/g" \ -e 's/\_parent_type ENUM(\(.*\))/_parent_type VARCHAR(1) CHECK \(_parent_type IN \(\1\)\)/' \ -e 's/\(.*\) ENUM(\(.*\))/\1 VARCHAR(32) CHECK \(\1 IN \(\2\)\)/' \ -e 's/\([[:lower:]_]\+\)([0-9]\+)/\1/g' \ $1 prewikka-1.0.0/database/sqlite-update-0.9.11.sql0000664000076400007640000000062211200051577020161 0ustar yoannyoannBEGIN; ALTER TABLE Prewikka_User RENAME TO Prewikka_UserOld; CREATE TABLE Prewikka_User ( login TEXT NOT NULL PRIMARY KEY, lang TEXT NULL, password TEXT NULL, email TEXT NULL ); INSERT INTO Prewikka_User(login, password, email) SELECT login, password, email FROM Prewikka_UserOld; DROP TABLE Prewikka_UserOld; UPDATE Prewikka_Version SET version='0.9.11'; COMMIT; prewikka-1.0.0/database/mysql.sql0000664000076400007640000000337611340774431016040 0ustar yoannyoannDROP TABLE IF EXISTS Prewikka_Version; CREATE TABLE Prewikka_Version ( version VARCHAR(255) NOT NULL ); INSERT INTO Prewikka_Version (version) VALUES('0.9.11'); DROP TABLE IF EXISTS Prewikka_User; CREATE TABLE Prewikka_User ( login VARCHAR(32) NOT NULL PRIMARY KEY, lang VARCHAR(32) NULL, password VARCHAR(32) NULL, email VARCHAR(64) NULL ); DROP TABLE IF EXISTS Prewikka_Permission; CREATE TABLE Prewikka_Permission ( login VARCHAR(32) NOT NULL, permission VARCHAR(32) NOT NULL ); CREATE INDEX prewikka_permission_index_login ON Prewikka_Permission (login); DROP TABLE IF EXISTS Prewikka_Session; CREATE TABLE Prewikka_Session ( sessionid VARCHAR(128) NOT NULL PRIMARY KEY, login VARCHAR(32) NOT NULL, time DATETIME NOT NULL ); CREATE INDEX prewikka_session_index_login ON Prewikka_Session (login); DROP TABLE IF EXISTS Prewikka_Filter; CREATE TABLE Prewikka_Filter ( id BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, login VARCHAR(32) NOT NULL, name VARCHAR(64) NOT NULL, comment VARCHAR(255) NULL, formula VARCHAR(255) NOT NULL ); CREATE UNIQUE INDEX prewikka_filter_index_login_name ON Prewikka_Filter (login, name); DROP TABLE IF EXISTS Prewikka_Filter_Criterion; CREATE TABLE Prewikka_Filter_Criterion ( id BIGINT UNSIGNED NOT NULL, name VARCHAR(16) NOT NULL, path VARCHAR(255) NOT NULL, operator VARCHAR(8) NULL, value VARCHAR(255) NULL ); CREATE INDEX prewikka_filter_criterion_index_id ON Prewikka_Filter_Criterion (id); DROP TABLE IF EXISTS Prewikka_User_Configuration; CREATE TABLE Prewikka_User_Configuration ( login VARCHAR(32) NOT NULL, view VARCHAR(32) NOT NULL, name VARCHAR(255) NOT NULL, value VARCHAR(255) NULL ); CREATE INDEX prewikka_user_configuration_index ON Prewikka_User_Configuration (name, login, view); prewikka-1.0.0/database/pgsql.sql0000664000076400007640000000322611347720623016014 0ustar yoannyoannDROP TABLE Prewikka_Version; CREATE TABLE Prewikka_Version ( version VARCHAR(255) NOT NULL ); INSERT INTO Prewikka_Version (version) VALUES('0.9.11'); DROP TABLE Prewikka_User; CREATE TABLE Prewikka_User ( login VARCHAR(32) NOT NULL PRIMARY KEY, lang VARCHAR(32) NULL, password VARCHAR(32) NULL, email VARCHAR(64) NULL ); DROP TABLE Prewikka_Permission; CREATE TABLE Prewikka_Permission ( login VARCHAR(32) NOT NULL, permission VARCHAR(32) NOT NULL ); CREATE INDEX prewikka_permission_index_login ON Prewikka_Permission (login); DROP TABLE Prewikka_Session; CREATE TABLE Prewikka_Session ( sessionid VARCHAR(128) NOT NULL PRIMARY KEY, login VARCHAR(32) NOT NULL, time TIMESTAMP NOT NULL ); CREATE INDEX prewikka_session_index_login ON Prewikka_Session (login); DROP TABLE Prewikka_Filter; CREATE TABLE Prewikka_Filter ( id BIGSERIAL PRIMARY KEY, login VARCHAR(32) NOT NULL, name VARCHAR(64) NOT NULL, comment VARCHAR(255) NULL, formula VARCHAR(255) NOT NULL ); CREATE UNIQUE INDEX prewikka_filter_index_login_name ON Prewikka_Filter (login, name); DROP TABLE Prewikka_Filter_Criterion; CREATE TABLE Prewikka_Filter_Criterion ( id NUMERIC(20) NOT NULL, name VARCHAR(16) NOT NULL, path VARCHAR(255) NOT NULL, operator VARCHAR(8) NULL, value VARCHAR(255) NULL ); CREATE INDEX prewikka_filter_criterion_index_id ON Prewikka_Filter_Criterion (id); DROP TABLE Prewikka_User_Configuration; CREATE TABLE Prewikka_User_Configuration ( login VARCHAR(32) NOT NULL, view VARCHAR(32) NOT NULL, name VARCHAR(255) NOT NULL, value VARCHAR(255) NULL ); CREATE INDEX prewikka_user_configuration_index ON Prewikka_User_Configuration (name, login, view); prewikka-1.0.0/database/pgsql-update-0.9.11.sql0000664000076400007640000000015211200051577020004 0ustar yoannyoannUPDATE Prewikka_Version SET version='0.9.11'; ALTER TABLE Prewikka_User ADD COLUMN lang VARCHAR(32) NULL; prewikka-1.0.0/database/mysql-update-0.9.11.sql0000664000076400007640000000015211200051577020023 0ustar yoannyoannUPDATE Prewikka_Version SET version="0.9.11"; ALTER TABLE Prewikka_User ADD COLUMN lang VARCHAR(32) NULL; prewikka-1.0.0/database/pgsql-update-0.9.1.sql0000664000076400007640000000053011200051577017723 0ustar yoannyoannUPDATE Prewikka_Version SET version='0.9.1'; DROP TABLE Prewikka_User_Configuration; CREATE TABLE Prewikka_User_Configuration ( login VARCHAR(32) NOT NULL, view VARCHAR(32) NOT NULL, name VARCHAR(255) NOT NULL, value VARCHAR(255) NULL ); CREATE INDEX prewikka_user_configuration_index ON Prewikka_User_Configuration (name, login, view);prewikka-1.0.0/database/mysql-update-0.9.1.sql0000664000076400007640000000054311200051577017746 0ustar yoannyoannUPDATE Prewikka_Version SET version="0.9.1"; DROP TABLE IF EXISTS Prewikka_User_Configuration; CREATE TABLE Prewikka_User_Configuration ( login VARCHAR(32) NOT NULL, view VARCHAR(32) NOT NULL, name VARCHAR(255) NOT NULL, value VARCHAR(255) NULL ); CREATE INDEX prewikka_user_configuration_index ON Prewikka_User_Configuration (name, login, view); prewikka-1.0.0/database/sqlite.sql0000664000076400007640000000245611347720623016173 0ustar yoannyoann CREATE TABLE Prewikka_Version ( version TEXT NOT NULL ); INSERT INTO Prewikka_Version (version) VALUES('0.9.11'); CREATE TABLE Prewikka_User ( login TEXT NOT NULL PRIMARY KEY, lang TEXT NULL, password TEXT NULL, email TEXT NULL ); CREATE TABLE Prewikka_Permission ( login TEXT NOT NULL, permission TEXT NOT NULL ); CREATE INDEX prewikka_permission_index_login ON Prewikka_Permission (login); CREATE TABLE Prewikka_Session ( sessionid TEXT NOT NULL PRIMARY KEY, login TEXT NOT NULL, time DATETIME NOT NULL ); CREATE INDEX prewikka_session_index_login ON Prewikka_Session (login); CREATE TABLE Prewikka_Filter ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, login TEXT NOT NULL, name TEXT NOT NULL, comment TEXT NULL, formula TEXT NOT NULL ); CREATE UNIQUE INDEX prewikka_filter_index_login_name ON Prewikka_Filter (login, name); CREATE TABLE Prewikka_Filter_Criterion ( id INTEGER NOT NULL, name TEXT NOT NULL, path TEXT NOT NULL, operator TEXT NULL, value TEXT NULL ); CREATE INDEX prewikka_filter_criterion_index_id ON Prewikka_Filter_Criterion (id); CREATE TABLE Prewikka_User_Configuration ( login TEXT NOT NULL, view TEXT NOT NULL, name TEXT NOT NULL, value TEXT NULL ); CREATE INDEX prewikka_user_configuration_index ON Prewikka_User_Configuration (name, login, view); prewikka-1.0.0/htdocs/0000775000076400007640000000000011347720623013662 5ustar yoannyoannprewikka-1.0.0/htdocs/css/0000775000076400007640000000000011347720623014452 5ustar yoannyoannprewikka-1.0.0/htdocs/css/jquery-ui.css0000664000076400007640000006536011337277373017140 0ustar yoannyoann/* * jQuery UI CSS Framework * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. */ /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } .ui-helper-hidden-accessible { position: absolute; left: -99999999px; } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .ui-helper-clearfix { display: inline-block; } /* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix { height:1%; } .ui-helper-clearfix { display:block; } /* end clearfix */ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } /* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } /* Misc visuals ----------------------------------*/ /* Overlays */ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* * jQuery UI CSS Framework * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=02_glass.png&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=02_glass.png&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px */ /* Component containers ----------------------------------*/ .ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #222222; } .ui-widget-content a { color: #222222; } .ui-widget-header { border: 1px solid #aaaaaa; background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; } .ui-widget-header a { color: #222222; } /* Interaction states ----------------------------------*/ .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d3d3d3; background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #555555; outline: none; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; outline: none; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #999999; background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; } .ui-state-hover a, .ui-state-hover a:hover { color: #212121; text-decoration: none; outline: none; } .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #212121; outline: none; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; outline: none; text-decoration: none; } /* Interaction Cues ----------------------------------*/ .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcefa1; background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; color: #363636; } .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } .ui-state-error a, .ui-widget-content .ui-state-error a { color: #cd0a0a; } .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #cd0a0a; } .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png); } .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png); } .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); } .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png); } /* positioning */ .ui-icon-carat-1-n { background-position: 0 0; } .ui-icon-carat-1-ne { background-position: -16px 0; } .ui-icon-carat-1-e { background-position: -32px 0; } .ui-icon-carat-1-se { background-position: -48px 0; } .ui-icon-carat-1-s { background-position: -64px 0; } .ui-icon-carat-1-sw { background-position: -80px 0; } .ui-icon-carat-1-w { background-position: -96px 0; } .ui-icon-carat-1-nw { background-position: -112px 0; } .ui-icon-carat-2-n-s { background-position: -128px 0; } .ui-icon-carat-2-e-w { background-position: -144px 0; } .ui-icon-triangle-1-n { background-position: 0 -16px; } .ui-icon-triangle-1-ne { background-position: -16px -16px; } .ui-icon-triangle-1-e { background-position: -32px -16px; } .ui-icon-triangle-1-se { background-position: -48px -16px; } .ui-icon-triangle-1-s { background-position: -64px -16px; } .ui-icon-triangle-1-sw { background-position: -80px -16px; } .ui-icon-triangle-1-w { background-position: -96px -16px; } .ui-icon-triangle-1-nw { background-position: -112px -16px; } .ui-icon-triangle-2-n-s { background-position: -128px -16px; } .ui-icon-triangle-2-e-w { background-position: -144px -16px; } .ui-icon-arrow-1-n { background-position: 0 -32px; } .ui-icon-arrow-1-ne { background-position: -16px -32px; } .ui-icon-arrow-1-e { background-position: -32px -32px; } .ui-icon-arrow-1-se { background-position: -48px -32px; } .ui-icon-arrow-1-s { background-position: -64px -32px; } .ui-icon-arrow-1-sw { background-position: -80px -32px; } .ui-icon-arrow-1-w { background-position: -96px -32px; } .ui-icon-arrow-1-nw { background-position: -112px -32px; } .ui-icon-arrow-2-n-s { background-position: -128px -32px; } .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } .ui-icon-arrow-2-e-w { background-position: -160px -32px; } .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } .ui-icon-arrowstop-1-n { background-position: -192px -32px; } .ui-icon-arrowstop-1-e { background-position: -208px -32px; } .ui-icon-arrowstop-1-s { background-position: -224px -32px; } .ui-icon-arrowstop-1-w { background-position: -240px -32px; } .ui-icon-arrowthick-1-n { background-position: 0 -48px; } .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } .ui-icon-arrowthick-1-e { background-position: -32px -48px; } .ui-icon-arrowthick-1-se { background-position: -48px -48px; } .ui-icon-arrowthick-1-s { background-position: -64px -48px; } .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } .ui-icon-arrowthick-1-w { background-position: -96px -48px; } .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } .ui-icon-arrow-4 { background-position: 0 -80px; } .ui-icon-arrow-4-diag { background-position: -16px -80px; } .ui-icon-extlink { background-position: -32px -80px; } .ui-icon-newwin { background-position: -48px -80px; } .ui-icon-refresh { background-position: -64px -80px; } .ui-icon-shuffle { background-position: -80px -80px; } .ui-icon-transfer-e-w { background-position: -96px -80px; } .ui-icon-transferthick-e-w { background-position: -112px -80px; } .ui-icon-folder-collapsed { background-position: 0 -96px; } .ui-icon-folder-open { background-position: -16px -96px; } .ui-icon-document { background-position: -32px -96px; } .ui-icon-document-b { background-position: -48px -96px; } .ui-icon-note { background-position: -64px -96px; } .ui-icon-mail-closed { background-position: -80px -96px; } .ui-icon-mail-open { background-position: -96px -96px; } .ui-icon-suitcase { background-position: -112px -96px; } .ui-icon-comment { background-position: -128px -96px; } .ui-icon-person { background-position: -144px -96px; } .ui-icon-print { background-position: -160px -96px; } .ui-icon-trash { background-position: -176px -96px; } .ui-icon-locked { background-position: -192px -96px; } .ui-icon-unlocked { background-position: -208px -96px; } .ui-icon-bookmark { background-position: -224px -96px; } .ui-icon-tag { background-position: -240px -96px; } .ui-icon-home { background-position: 0 -112px; } .ui-icon-flag { background-position: -16px -112px; } .ui-icon-calendar { background-position: -32px -112px; } .ui-icon-cart { background-position: -48px -112px; } .ui-icon-pencil { background-position: -64px -112px; } .ui-icon-clock { background-position: -80px -112px; } .ui-icon-disk { background-position: -96px -112px; } .ui-icon-calculator { background-position: -112px -112px; } .ui-icon-zoomin { background-position: -128px -112px; } .ui-icon-zoomout { background-position: -144px -112px; } .ui-icon-search { background-position: -160px -112px; } .ui-icon-wrench { background-position: -176px -112px; } .ui-icon-gear { background-position: -192px -112px; } .ui-icon-heart { background-position: -208px -112px; } .ui-icon-star { background-position: -224px -112px; } .ui-icon-link { background-position: -240px -112px; } .ui-icon-cancel { background-position: 0 -128px; } .ui-icon-plus { background-position: -16px -128px; } .ui-icon-plusthick { background-position: -32px -128px; } .ui-icon-minus { background-position: -48px -128px; } .ui-icon-minusthick { background-position: -64px -128px; } .ui-icon-close { background-position: -80px -128px; } .ui-icon-closethick { background-position: -96px -128px; } .ui-icon-key { background-position: -112px -128px; } .ui-icon-lightbulb { background-position: -128px -128px; } .ui-icon-scissors { background-position: -144px -128px; } .ui-icon-clipboard { background-position: -160px -128px; } .ui-icon-copy { background-position: -176px -128px; } .ui-icon-contact { background-position: -192px -128px; } .ui-icon-image { background-position: -208px -128px; } .ui-icon-video { background-position: -224px -128px; } .ui-icon-script { background-position: -240px -128px; } .ui-icon-alert { background-position: 0 -144px; } .ui-icon-info { background-position: -16px -144px; } .ui-icon-notice { background-position: -32px -144px; } .ui-icon-help { background-position: -48px -144px; } .ui-icon-check { background-position: -64px -144px; } .ui-icon-bullet { background-position: -80px -144px; } .ui-icon-radio-off { background-position: -96px -144px; } .ui-icon-radio-on { background-position: -112px -144px; } .ui-icon-pin-w { background-position: -128px -144px; } .ui-icon-pin-s { background-position: -144px -144px; } .ui-icon-play { background-position: 0 -160px; } .ui-icon-pause { background-position: -16px -160px; } .ui-icon-seek-next { background-position: -32px -160px; } .ui-icon-seek-prev { background-position: -48px -160px; } .ui-icon-seek-end { background-position: -64px -160px; } .ui-icon-seek-first { background-position: -80px -160px; } .ui-icon-stop { background-position: -96px -160px; } .ui-icon-eject { background-position: -112px -160px; } .ui-icon-volume-off { background-position: -128px -160px; } .ui-icon-volume-on { background-position: -144px -160px; } .ui-icon-power { background-position: 0 -176px; } .ui-icon-signal-diag { background-position: -16px -176px; } .ui-icon-signal { background-position: -32px -176px; } .ui-icon-battery-0 { background-position: -48px -176px; } .ui-icon-battery-1 { background-position: -64px -176px; } .ui-icon-battery-2 { background-position: -80px -176px; } .ui-icon-battery-3 { background-position: -96px -176px; } .ui-icon-circle-plus { background-position: 0 -192px; } .ui-icon-circle-minus { background-position: -16px -192px; } .ui-icon-circle-close { background-position: -32px -192px; } .ui-icon-circle-triangle-e { background-position: -48px -192px; } .ui-icon-circle-triangle-s { background-position: -64px -192px; } .ui-icon-circle-triangle-w { background-position: -80px -192px; } .ui-icon-circle-triangle-n { background-position: -96px -192px; } .ui-icon-circle-arrow-e { background-position: -112px -192px; } .ui-icon-circle-arrow-s { background-position: -128px -192px; } .ui-icon-circle-arrow-w { background-position: -144px -192px; } .ui-icon-circle-arrow-n { background-position: -160px -192px; } .ui-icon-circle-zoomin { background-position: -176px -192px; } .ui-icon-circle-zoomout { background-position: -192px -192px; } .ui-icon-circle-check { background-position: -208px -192px; } .ui-icon-circlesmall-plus { background-position: 0 -208px; } .ui-icon-circlesmall-minus { background-position: -16px -208px; } .ui-icon-circlesmall-close { background-position: -32px -208px; } .ui-icon-squaresmall-plus { background-position: -48px -208px; } .ui-icon-squaresmall-minus { background-position: -64px -208px; } .ui-icon-squaresmall-close { background-position: -80px -208px; } .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } .ui-icon-grip-solid-vertical { background-position: -32px -224px; } .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } .ui-icon-grip-diagonal-se { background-position: -80px -224px; } /* Misc visuals ----------------------------------*/ /* Corner radius */ .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; } .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; } .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; } .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; } .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; } /* Overlays */ .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion ----------------------------------*/ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } .ui-accordion .ui-accordion-li-fix { display: inline; } .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } .ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker ----------------------------------*/ .ui-datepicker { width: 17em; padding: .2em .2em 0; } .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } .ui-datepicker .ui-datepicker-prev { left:2px; } .ui-datepicker .ui-datepicker-next { right:2px; } .ui-datepicker .ui-datepicker-prev-hover { left:1px; } .ui-datepicker .ui-datepicker-next-hover { right:1px; } .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%;} .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } .ui-datepicker td { border: 0; padding: 1px; } .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } /* with multiple calendars */ .ui-datepicker.ui-datepicker-multi { width:auto; } .ui-datepicker-multi .ui-datepicker-group { float:left; } .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } .ui-datepicker-row-break { clear:both; width:100%; } /* RTL support */ .ui-datepicker-rtl { direction: rtl; } .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } .ui-datepicker-rtl .ui-datepicker-group { float:right; } .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ .ui-datepicker-cover { display: none; /*sorry for IE5*/ display/**/: block; /*sorry for IE5*/ position: absolute; /*must have*/ z-index: -1; /*must have*/ filter: mask(); /*must have*/ top: -4px; /*must have*/ left: -4px; /*must have*/ width: 200px; /*must have*/ height: 200px; /*must have*/ }/* Dialog ----------------------------------*/ .ui-dialog { position: relative; padding: .2em; width: 300px; } .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } .ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } .ui-draggable .ui-dialog-titlebar { cursor: move; } /* Progressbar ----------------------------------*/ .ui-progressbar { height:2em; text-align: left; } .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable ----------------------------------*/ .ui-resizable { position: relative;} .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider ----------------------------------*/ .ui-slider { position: relative; text-align: left; } .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } .ui-slider-horizontal { height: .8em; } .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } .ui-slider-horizontal .ui-slider-range-min { left: 0; } .ui-slider-horizontal .ui-slider-range-max { right: 0; } .ui-slider-vertical { width: .8em; height: 100px; } .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } .ui-slider-vertical .ui-slider-range-min { bottom: 0; } .ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs ----------------------------------*/ .ui-tabs { padding: .2em; zoom: 1; } .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } .ui-tabs .ui-tabs-hide { display: none !important; } prewikka-1.0.0/htdocs/css/style.css0000775000076400007640000004444611340777332016345 0ustar yoannyoann/* * global */ html { margin : 0; padding : 0; width : 100%; height : 100%; _overflow: hidden; _overflow: auto; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #333333; background-color: #d6d6d6; position: absolute; width: 100%; height: 100%; _overflow-y: hidden; _overflow-x: hidden; top: 0; left: 0; right: 0; } a { color: #6865a6; cursor: pointer; text-decoration: none; } a:hover { text-decoration: underline; } img { border:0; } h1 { font-size: 20px; margin: 0px; padding-bottom: 10px; color: #000000; } h2 { font-size: 16px; margin: 0px; } table { border-spacing: 3px 2px; } textarea, input, select { padding: 0px; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; border: 1px solid black; border-top-color: #b5b5b5; border-left-color: #b5b5b5; } textarea { overflow: auto; } input[type="checkbox"] { border: none; vertical-align: sub; } form { display: inline; } thead { font-weight: bold; background-color: #E2EBF5; } fieldset { position: relative; top: 1em; border: 1px solid black; border-top-color: #b5b5b5; border-left-color: #b5b5b5; padding: 0 0.5em 1em 0.5em; _margin-bottom: 15px; } html>body fieldset { padding-top: 1em; top: 0; } legend { position: relative; _top: -1em; padding: 0.4em; color: #333333; } p { margin: 0; padding: 0; } .fixed { font-family: Courier, monospace; font-size: 9px; } /* * banner */ #top_view_header_picture { float: left; display: inline; width: 30px; border: 1px solid black; vertical-align: middle; } #top_view_header { z-index: 3; position: fixed; top: 0px; left: 0px; right: 0px; height: 56px; padding-top: 10px; padding-left: 10px; padding-right: 10px; padding-bottom: 10px; background: #4D535C; border-top: 4px; border-right: 0; border-left: 0; border-bottom: 0; border-style: solid; border-color: #D2312A; } #top_view_header_software, #top_view_header_title, #top_view_header_place { float: left; font-size: 18px; font-weight: bold; color: #ffffff; display: inline; vertical-align: middle; } #top_view_header_title { text-align: left; float: right; } #top_view_header_place { padding-left: 10px; font-weight: normal; color: #CCCCCC; } /* * top menu */ #topmenu { z-index: 3; position: fixed; _position: absolute; top: 58px; left: 160px; right: 0px; background: #999999; height: 21px; border: 1px white solid; font-size: 13px; font-weight: bold; text-align: center; text-decoration: none; } #topmenu p { line-height: 18px; } .topmenu_item_active a:visited, .topmenu_item_active a:link, .topmenu_item_special a:visited, .topmenu_item_special a:link { color: #333333; text-decoration: none; } .topmenu_item_inactive a:visited, .topmenu_item_inactive a:link { color: white; text-decoration: none; } .topmenu_item_inactive a:hover, .topmenu_item_special a:hover { color: #999999; text-decoration: none; } .topmenu_item_info { margin: 0; padding: 0 10px 0 0; height: 21px; min-width: 45px; float: right; font-size: 11px; font-style: italic; font-weight: normal; vertical-align: middle; color: white; } .topmenu_item_inactive { margin: 0; padding: 0 10px 0 10px; height: 21px; min-width: 45px; float: left; border-right: 1px white solid; background: #4D535C; } .topmenu_item_active { margin: 0; padding: 0 10px 0 10px; height: 22px; _height: 21px; min-width: 45px; float: left; border-right: 1px white solid; background-color: #d6d6d6; text-decoration: none; color: #333333; } .topmenu_item_special { margin: 0; padding: 0 10px 0 10px; float: right; min-width: 45px; height: 21px; border-left: 1px solid white; background-color: #b5cba0; } /* * menu */ #menu { width: 160px; margin-top: 80px; top: 0px; bottom: 0px; z-index: 1; position: fixed; _position: absolute; border-width: 0 1px 0 0; border-color: white; border-style: solid; background: #acacac; height: 100%; _height: expression((document.body.clientHeight - 80) + 'px'); } #menu a { /* color: black; */ text-decoration: none; } #menu a:hover { color: #333333; background: #d6d6d6; text-decoration: none; } .menu_item_active, .menu_item_inactive, .menu_item_special { margin-top: 0; margin-bottom: 0; border-width: 1px 0 0 0; border-color: #acacac; border-style: solid; text-align: center; font-weight: bold; width: 100%; display: block; height: 22px; font-size: 13px; } .menu_item_inactive { background: #999999; text-decoration: none; color: white; } .menu_item_inactive a:link, .menu_item_inactive a:visited { text-decoration: none; font-weight: bold; } .menu_item_active { color: #333333; background-color: #d6d6d6; } /* menu timeline control */ #timeline { background: #999999; border: 1px solid black; font-size: 10px; width: 154px; color: white; position: fixed; _position: absolute; left: 3px; bottom: 43px; height: 163px; } #timeline tr { } #timeline td { padding: 0; margin: 0; } #timeline th { padding: 0; margin: 0; text-align: left; font-size: 8px; font-weight: bold; } #timeline select { border: 1px solid black; vertical-align: middle; width: 100%; } #timeline input[type=text] { padding-bottom: 1px; padding-top: 1px; margin: 0px; vertical-align: middle; border: 1px solid black; } #timeline img { height: 15px; border: 1px solid black; margin: 0px; padding: 0px; } #timeline .auto_apply_current { float: left; border: 1px solid black; border-right: 0; height: 15px; width: 28px; text-align: center; vertical-align: middle; } #timeline .auto_apply_button { float: right; padding: 0; margin: 0; } #timeline input[name="auto_apply_value"] { float: left; border: 1px solid black; border-left: 0; width: 28px; height: 15px; text-align: center; vertical-align: bottom; padding: 0; margin: 0; } #timeline input[name="timeline_value"] { float: left; } #timeline select[name="timeline_unit"] { float: right; width: 62px; } #timeline .timeline_range { font-size: 9px; text-align: center; border-spacing: 0; padding: 0; margin: 0; } .timeline_control_prev, .timeline_control_cur, .timeline_control_next { background: #E2EBF5; width: 53px; height: 20px; padding: 0px; border: 1px black solid; text-align: center; } .timeline_control_inactive, .timeline_control_cur_inactive { background: #d6d6d6; width: 53px; height: 20px; color: black; border: 1px solid black; padding: 0px; text-align: center; } .timeline_control_cur_inactive { width: 54px; } .timeline_control_cur { width: 54px; } .timeline_control_prev a:link, .timeline_control_prev a:visited, .timeline_control_prev a:hover, .timeline_control_cur a:link, .timeline_control_cur a:visited, .timeline_control_cur a:hover, .timeline_control_next a:link, .timeline_control_next a:visited, .timeline_control_next a:hover { color:black; } .popup_operator_select { width: 46px; max-width: 46px; } .popup_select_field { width: 100px; max-width: 100px; } .popup_input_field { width: 150px; max-width: 150px; } /* menu message nav */ #message_list_nav { position: fixed; _position: absolute; bottom: 0px; left: 0px; height: 43px; width: 160px; } #message_list_nav a:visited, #message_list_nav a:link, #message_list_nav a:hover { color: black; text-decoration: none; width: 100%; display: block; } #message_list_nav td { text-align: center; font-size: 10px; /*font-weight: bold;*/ } .message_list_nav_infos { background: #E2EBF5; border: 1px solid black; } .message_list_nav_button { width: 50px; height: 15px; background: #E2EBF5; border: 1px solid black; } .message_list_nav_button_empty { width: 50px; height: 15px; background: #d6d6d6; border: 1px solid black; } /* * main screen */ #main { font-size: 100%; _position: absolute; _top: 0px; _left: 0px; padding-top: 10px; margin-top: 80px; padding-left: 170px; padding-right: 10px; _padding-right: 25px; _bottom: 0px; _overflow-x: hidden; _overflow-y: auto; _width: expression((document.body.clientWidth - 195) + 'px'); _height: expression((document.body.clientHeight - 90) + 'px'); } /* #main a { color: #333333; color: #635f68; text-decoration: none; } #main a:hover { color: black; text-decoration: underline; } */ /* * random class */ .login_password { position: relative; margin: 0px auto; margin-top: 150px; width: 300px; border-style: solid; border-width: 2px; padding: 10px; } .login_password table { width: 100%; } .authentication_error { color: red; font-weight: bold; text-align: right; } .properties_change_table td { text-align: center; } .user_list_table td { text-align: center; } .table_row_even { background-color: #ffffff; } .table_row_odd { background-color: #eeeeee; } .static_content_column { background-color: #eeeeee; } .impact_severity_high, .impact_completion_succeeded { text-decoration: none; font-weight: bold; color: #d02a2a; } .impact_severity_medium { text-decoration: none; color: #ff8e33; } .impact_severity_low, .impact_completion_failed { text-decoration: none; color: #418c3d; } .impact_severity_info { text-decoration: none; color: blue; } .alert_field_value { text-decoration: none; color: inherit; } .alert_field_value:hover { text-decoration: underline; } #message_list_result { width: 100%; } #message_list_edition { border: 1px; border-style: solid; border-color: #4D535C; padding-right: 5px; padding-left: 5px; padding-top: 5px; padding-bottom: 5px; margin-bottom: 20px; height: 65px; } .section_alert { margin-bottom: 20px; } .section_alert_title { float: left; } .section_alert_title { width: 15%; } .section_alert_entries { width: 80%; } .section_alert_title { text-align: right; font-size: 130%; font-style: italic; font-weight: bold; /*padding-top: 5px;*/ padding-right: 10px; } .section_alert_entry_name { width: 25%; } .section_alert_entry_value_emphasis { font-weight: bold; } .message_details { padding-left: 0px; } .message_details_title { background-color: #E2EBF5; font-weight: bold; /*border: 0px; border-right: 2px; border-bottom: 2px; border-style: solid;*/ border: 0px; border-bottom: 1px; border-style: solid; } .message_details_title a { text-decoration: none; color: #333333; } .message_details_content { padding-left: 40px; } .message_details_entries { padding-top: 1px; } .message_details_entry { padding-bottom: 2px; } .message_details_entry_name { float: left; width: 15%; margin-right: 5px; background-color: #E2EBF5; border: 0px; border-bottom: 1px; border-style: solid; } .message_details_entry_value { padding-left: 10px; /*border: 0px; border-bottom: 1px; border-style: solid;*/ background-color: white; } .hearbeat_analyze { font-size: 120%; width: 100%; } .heartbeat_analyzer_event_start, .heartbeat_analyzer_event_normal_stop, .heartbeat_analyzer_event_no_anomaly { color: green; } .heartbeat_analyzer_event_unexpected_restart, .heartbeat_analyzer_event_abnormal_heartbeat_interval { color: rgb(255,165,0); } .heartbeat_analyzer_event_down { color: red; } .heartbeat_analyze_sensor_status_offline { background-color: #e4e4e4; text-align: center; } .heartbeat_analyze_sensor_status_missing { text-align: center; background-color: #e77070; } .heartbeat_analyze_sensor_status_unknown { background-color: #ffb063; } .heartbeat_analyze_sensor_status_online { text-align: center; background-color: #b5cba0; } .heartbeat_analyze_sensor_info { font-weight: bold; border-top: 10px; } /* * Settings view */ .settings_label { font-weight: bold; display: inline; } /* * Error view */ .error_name, .error_message, .error_links { position: relative; margin: 0px auto; margin-top: 50px; text-align: center; width:90%; } .error_name { font-size:60px; color: red; } .error_message { font-size: 20px; color: black; } .error_links { font-size: 16px; } /* * popup */ .popup_menu { border: 1px solid red; background: #E2EBF5; z-index: 1; display: none; position: absolute; padding: 5px; margin: 0px; _width: 150px; text-align: left; } /* * Filter popup */ .filter_popup_link { float: left; } .filter_popup div { display: none; margin-top: 15px; padding: 3px; border: dotted black; border-width: 1px 1px 1px 1px; background: #E2EBF5; text-align: left; white-space: nowrap; position: absolute; z-index: 2; } .filtered_column div { float: left; } .filtered_column span { float: right; display: inline; } /* * Stats */ .stats_infos h1, .stats_infos h2 { padding-left: 10px; } .stats_infos { margin-left: 10px; border: 0px; border-left: 5px; border-color: #4D535C; border-style: solid; background: #eeeeee; } /* * About */ #about { display: table; height: 100%; min-height: 100%; text-align: justify; margin: 0px; padding: 0px; } #about_contact { vertical-align: bottom; border-spacing: 0px; text-align: center; width: 80%; background: #999999; color: white; border: 1px solid #D2312A; } #about li p { color: black; font-weight: normal; margin-bottom: 10px; } /* * misc */ .fieldset_heading { background: #E2EBF5; } .fieldset_heading .description_title { font-size: 13px; font-weight: bold; padding-bottom: 5px; } .fieldset_heading .description { } .fieldset_heading h1, .fieldset_heading h2 { margin: 0 } .fieldset_heading h2 { font-weight: normal; font-size: 150%; margin-bottom: 1em } .fieldset_heading .date { color: #996; font-size: 130%; float: right; position: relative } #classification { } #target { margin-left: -100px; } #analyzer { margin-left: -222px; } .inline_filter_content { width: 100%; } .inline_filter_content td { width: 100%; text-align: right; font-size: 8px; padding: 1px 5px 1px; margin: 0; border-spacing: 0; border-bottom: 1px dashed white; } .inline_filter_content td input[type="text"] { height: 15px; } .inline_filter_content th { font-size: 9px; color: #950; font-weight: normal; text-align: left; border-bottom: 1px dashed white; } #classification table, #source table, #target table, #analyzer table { border-collapse: collapse; vertical-align: top; border-spacing: 0; } .fieldset_heading table { border-collapse: collapse; width: 100%; } .fieldset_heading tr { border-bottom: 1px dashed white; } .fieldset_heading .nodash { border-bottom: 0px; } .fieldset_heading td, .fieldset_heading th { font-size: 9px; padding: .5em 1em; vertical-align: top; border-bottom: 1px dashed white; } .fieldset_heading th { color: #950; font-weight: normal; text-align: left; } .fieldset_heading hr { color: #999999; background: #999999; border: 0; height: 1px; } #fieldset_page { max-width: 700px; width:expression(document.body.clientWidth > 700 ? "700px": "auto" ); } #fieldset_page legend { font-size: 13px; font-weight: bold; } .not_available { background-color: #e0e0e0; } .filter_enabled_marker { font-weight: bold; color: red; display: inline; } span.filter_enabled_marker { float: right; } .message_summary_no_border, .message_summary_no_border tr, .message_summary_no_border td, .message_summary_no_border th { border: 0px; } .message_summary, .message_summary tr { border: 1px solid black; } .message_summary th, .message_summary td { padding: 3px; border: 1px solid black; } prewikka-1.0.0/htdocs/images/0000775000076400007640000000000011347720623015127 5ustar yoannyoannprewikka-1.0.0/htdocs/images/prelude-logo.gif0000664000076400007640000005246411200051577020220 0ustar yoannyoannGIF89au$&$%   4,4EDE %\\] {~+,.  $$\ed,40   %+8$-n9L^(,/$Zd0FL,ySe\`Bؖ\mpN ð|/-)& 86)dT3.$ ($RJ8$ K4 \ kD ,<,WUR\d<T^J5TLz\X4M b< cTp$iG}W'ݮuQMHTLl<ZzD4T tB );$ iaXDt<d4H&T L l< $xI, D,4$<,ΛeiWE۾~|zutsDW7t8zX9vM}kL|<l4HD d4 `@&MjL3iL<t4V <D |< G& L,b4dDJ8*zk`@<9LD<|4L L X(< ,l4 Th74 T)<$LDL t4 VE_)|G&D,D4<L i+D < |4 JGx9D4u,<ID D 4K<< W,D$)D 4 L,9,&, <4 4$:f+N$ $x,, 5<#4 D$$ < L$ fdd655mll !,u H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH.@>PWvsbEjC?tu*׳+DXj]@RR3bLmZP|,X !_||zE6jġÅb g:y5c+[L'hGx|ނ *ʕ="3W1X)GvH,`Ţ1WX?£U/p b //TP AdJ.tSOAApXP@%c=: 5< *c>ʄcJ0T#9d.=.='04O&fL qG-DYLS*c./R #L7@b 0PQ RΆO=H .&E "N*tS?I.ŀ#; R&ـsH@ъ!ӊ8 Q=< $(&D0pjSw]Kѵt$D"In PU3A(4Fb!D9L7Q6T3F( #XP]+I$b@=CPt8d3ힴ {GS,GE( \S ,LI9#'rԳEH8"@ف:cHB F4Q9hE5Nt?@": <`6`G\!%h. 62*Ƒ ,`B!,ц8!1P!2<@B$LP va?ꁊTCk1Y  P5 ه<aB,p=ሹ8!HE7;pLȅ@ahс ,|nbA$p,xHD(> CQ`$qMoX"zzT$S( HUPbZ$ gGxZQnIpcV1`<J(kEN@YX~k AƐ$|DL=A$dl (T$j@[`D@!;1o ((I|3E*Wy hG$ 1Ĉ7zD`SadkG6` $$qWxD!Qj; AĂ?f,Aa!<2@!sIDG.Q Vp4^ABCxA(,Ս H' ج-N_@*jq[6 4Z%X@?ΑB`4ja Z4CE1Q p"0s UIݿ/DA SPݦ%xA N⾠D-= V% PHHy-(! /,MQ Z /L\(UƒP5RpׂoNS"7)amHa( PRxě1qJ(kE'uS<XFuQ#:<hrS _9%u?7D* v##%UsJLQoڍO|hD/P[ =As&=y^,\rwӛpŧ2;)zQ _-!rg|rg @~/px 7 ` ѐ  0 }c .1 ^݀P s7yg p 0 @ Ġ p 8 8  Ww_Uv9@L/D-X slpq- H~h@ 0 N 7G 7  5$õ Pc< j w0 @^7 np9ׂ nvV7q@ 0x 0 psͨs ʀ F`cP@2`x7 @AV`tPV@Sr M+lf|W @ HE p ͘u pV785,40 2 aVpu^P`k WWP`eGmpr0uz p`k [sP  F.X*@H*ɒ=p0З04JpV kIVeWJj Z@ P 36 P[90H Ѱ 8sW S `{6c@,9)`}DpFp0JP-OMmJ i>\-lpzW H ``c kp Sx`VS!070'0=  :G.,+`d+-(-z@kI Q9w,|  9 p`ZN 0i ʠ v3302c4`"cpy'*٢v+ؙl q P 0'! PPYD P V 8 aBi@ { 4003`I,'?P?' #xZ  p h 7@ "p!@]( kY v00@.0@ Dpp3@*26@6P.`d1) ?8   PwW 0`**I:ԃ ! ʠ0aHbH`P063д MP.` P@r0G ^z PJ#  gU׈ ȳP 2k<6p0 2JR[[۴701@fv @pDc1L0 ̀ y۠ 3&( 07 07@4`k(0 ' Pp8P " z࠵+:̀ ~#p/E }߈*kW۴+= ;H 0˕|da 簷p`c#?c  pJˋU{ 0 x@ sP\ir rP  5(@7"P0n@GP@2 c*#`M{-MI8@  Hp ) pmp(xXHp@04@'p s,4*' l(p ^j7 r UP Ҁɵk۠ \ģG7xFpGp` |DЗ2j˖;(,4p  !9L <ͨ q" ,p",XsDoj&* +`" %]@ ] ƃaG/k"@P+P0)-0  ?@0տj@ P /} @6] ;MpS0 1''p@0+ "UZM)12>[8.pӦ` @@; py ?GV '/سI1pr|.0"`՞-ݰ3p,4jҺJ б !4`,ϰϰлS,q)-7@L)(, 3rZ} FsMG h5 p?F0RA$0=/04LZܺ*+00[}8  x F`< ,y vwuM!4 >a 0Z.[(  Zov0p@hmL zpX]F )~G 2)! Hc F0pz#p?6qʫE : )q'w/` 0>/@mpҼ Yr@/۞-'0#0꩎)3" pҴ s0 Pؠ`p pBmC @ '!c0``ÚFxP nvP8F` 0 ar0="q` 8' h y0i~kK &mP' 01P ZP ɰzr7 s@V πv0L#5|pK} q F2nsoPΩɠ(wn| .s ʛ; `̐ ^x?+<dppP P pp0u7q3{h jx[ @ 0 ?H q#  pq` ^rଵ ߐǩo x$XMqڄ@]!\$6*44_(%4JlKbR,)*UQCe˖Rr2OA%ZўhQ@ #"Rt O4 Ff_+aV)dq` 9}0[ p _%R E1lUfPJNo?ZTƈZ eϦ]$LX!4oD FÆo|v9T|UZ)<~ 1mԵߎHH`yGпP)\!Ql(Ɨ)^.[e_cldQ'|*beIB 3iܔd?y%6LE*SJyėk8}gZYfuGC"LO6 t1$CJ\̘d9em bʞO4ewb H6 j DEĢopEW YgP1mAh`0a7+(rC $GIڑzA\ǘ;*a8%H<gK {FbXOy/@2+1V"y% bAvXvݴ.>qczǕCV \y]ЧdyX?Z!iqYJX].|)-D !WIIֹgGyD18Hi>oGedQ <'厳m{$h A (k珛 b^DhhhQ6JQ&alFcg D3k  YL[ g"\8t'?8)gpa*qQFWEŇQfoEÈbYWs *X@Y@r D^cݝ2CbІ쑁OC dPh0laUH Jl\`DeP$:n 7ìr aQ Zx*E1Qih5a e{: FH Iz ]Ch1`HG hِF0q0Ȁ\(3HM4- e"ͣ6(F2!}I  dCР! hBXtЅ$\pi\+ha o`cFI)K 44>ƀ*a c H -] //+D%ah"h)jACNE/V2 h73!9iHy YP(% (B0%\4!|)hA \@O0H@S *;b{/՜ A,X<H ^ h ĠHF09US4E&` 5*` ̓0-Cx:zX @ `;0E1 V@c8h nL4#@,oaCvJ͠?xq 9 -zG ;#1t^oĨ $A3(<@e(Cv(B8)H Gi@%0A ,A \΀4jot+m@8QDeK _S%LH?̽ f! S J  0G P()\˷C\\,cx h1 mx(B" @̽yp0 d*D}ԣys|rZ![n&*C6֩0x '8zrc +@P8m4ijoB zcAk2l8+, h+pWˆ* M wE%F 6c8Jg -Q LNH8<2XA `ȇHH nE8){h86]`hDY 0@Fp23 ^Q|F/PQ"v* 1x[A F0*0 d: WpGF1pVlq4J+7,q;a '0FgW@ * ^(NF\ pB? b n$ ^(7<'K'ZNw@+pb`#5G?\5('5N`?ں/P3c eK5W:;p59$ Yxk:xS5@y`1HPBW@Vh0bFPR3ࠬ#)vE7\FL0AZ(H%8N%$2@tƊBeRr+#~ȆW@-0( C7?x3-h#0Z`h0]$ 3Str*"Mha0 RHT#@"syH0ȓ Kdp0k2D#Lk*bH1W3E/ghV]aHG0U#t pF5<eԐ{0=/h~z`qZoЅg [¦ ,b[HR cxB AЇh*(2(.0G6hN)ۂ4 8+% bVJōLXhpkpP7$jI*.bfЅi \B|/ V"vT.#x#8X1$ 8C0.`'(@HqVblTЅ%hpSЄib,P&gHJc (:hI4H*.(?00t`PJSfP3T\k gpMAyyXy f^ik B͆=nH@HV5xL =;pj-\0>O0hHȆlb O.(i-B< 3C0H8lx'`|HDЅs8Sރ]XlTJhGM0ZgLx2hw8\iȶi`4oodO(@eh@8p IC8jב*CNtn' dpcI9@7HXe af:CsiaM'`$sv8snP㩾茞hpP4l-h8 p~Nk oz^ ꑹ(k ȆO؅6H#͆tȆsjU=4@ aȦ>iMa) w(k們5oX\g4D?m!j*phno.ra(kXjώk8P<'M`NQL(6skAI0 mF  }^$eC-e$؂2Ⱥ2@9G b9^C|Qk֔E"\xGV~8",^=hSpϘ'xlGTp`@^H2j[MSP,(w+~H(l..]=@e /sRi-qNlG]+QPapnd>ldwN8lHt hn`=KPa<(0iqT &bFRo^b, ^(@lXPour@a.wΆZfh elGܬRgzm!-fhI p'yc {r_r=M  SpB2/8P4p`)RspzPGҶ*)HIuC.+U؄<,=Ѓ]`TUP;^B TOX2 + 3pNM A* kH" x|ޡ3Iy_lU(Bqp#U27LPnhzxti9O^1%Ll5<US|SaXiU@i8nH+pZ9~WmeղonHQQ"H -SD9+H@^rEm7r#Ȑ"G,icrݪP/S)Ѣy**TP=2M:̘J -WjG~\5a’m%ŕ)_Μ53r1efЬE$ɼz1vn],[Z6[n/jȐ%&0͛+K!rV)% l[*)_LICSNԇʗ'.f,ڴ*\:L-?dG2Ѡq3 SVTRuMFJ2ot/SC Ԑ3-c$}DZ `@PM K%]Dae,Rha;w{?IkWDː 0FFZc!ȂׅYjy7F+An&DbHYzh,Gr h6 )Y0KB -73T݈, "Hг%~4D&pHJ4ȀdXhhaF# z+8@?"Q_}UW%/. 7^Q cg2X.ԓJN5 Fu^")Fak8njH!8͟R-ˈ}pd350v3,Sn5 $;X@$e!*ar)2/|NQbR? Lc0`*'L/F&Vq O)ļ"$\"Hfg8($sF{ƽpNqfCY{߮C^f_8P=$",G,0Q/ T?ZD+ E ѳ0V{sAfŦr2'<&0;|JМ0*A_" DK~Dbc ?@+4pWJ1#$|8l'3!Djp`Os4e #Hd2Í`("W|e`A Hl;wƾ\FkkgѮ( vH:[w֯XdQP"pDgEQS`m$)0V)7 Nm 7ޭWm( @8vW9+@pt7 h+XF.$)l-*Oˬ3W)D`9H b`@5&sUQ㿂~ MX{1<1."k{*%^ C|"ѶE'g$q&p ?rWe Lj|BhoH .뀊h@`0XltϢ 'Pz.NJhoK]T! M: rN+lXL|#+ cɖ0_otAe'L.0A#+;@b f4TPqU_ЅT&cH#q ,D1^lBP{qh]e&o Pj52휌hlX$ltG`a-laUChE+ Q{hY@a//jCx1p e*=g5hAw,P/}&%Vb0QJF*a |#`QUQ@ "nUк;f_ޕ : p@MO^B(#3(G:ځa >|(  x@n/*aʔ=щJ(wAB9C@?<F)60t24`_7|4B,` OvɈJAA<_<%;VVhA:,@>d"?L8tFC\"&@!p3,Ԋm`}0B7l<IhVܾ; ܔTcLB'h#&ā&3\Z^!:~* ==$J8 Pp9BH0ш4؁T?h4 l ҃?HY0Y(:@a8$& S CC+HTlBUB+.!e9ZH&A5"$h@88rb|8A5A9ܖO d't@A? r@!:,P@8`LP֮HH!>>=C1zf^?jANJ98,Cx4!xnA8U?r"%>xv܋(C!+hwz,"'{\AxܢOY Fʂ(Si,B5C}t4HC5.ph`nw쭀*6,IL< B4pBCP "8B )'0`a)|? 'B'H:AȡA!4HEfuyHNp:<#i6+&¦eÄ0xxp tCr,oT pDˁ2@l)R_[+ppBp0'P:FAh6,>C߱u9Š<'t:D&! 8\F9p(,,8dcG!'XA GAnV91GC6lG@?oV128hC%@sG.H,N"Fl< T:8$Ogbs6{/ގG(t9'5oD>lt>,VA+0G@590DGЃ9LhI 'E$5H k0,T4>\.F C‹= $1(HR'(X+d@SCW o.UOB.B2Iw1̃t4C!@,`B,Dl0L9Fr +vu^O187AhFC:̣G9t5!4<` |,PCwv~ 9C"2,BhFjes:C'$AQ 6Tyo8A_Ab{?AgC'xCX3TG,h0&U:* >-XB2G@q'ذ$x0́ @qt/kOFk='#0CEfGt@ |6C ` odB?50AC{ &6,B {d!*e'*98,dqzH$#,Be hFt+0Cu6.6BU{B܁4A(XktCv!Š.0Ê&@F8nDnV4W tB'`B" @(}7,+4Ct(} Bƒ 9,AI1{,97$|k0(TA!6,L+|k Ā!lnA8ԃVxwx'qsDdx"A80ld s@:<}|$$`B?Ƞp-:3|Bq@ `*\A?1.'nqr9$Bl><e9o!2ϑ*H 0+3  ͭ0F|Bnc((8d>LYh8܃B!`TA/>9@2с Qun3p6'Ķ9?$(dȔ@6rʼnMUxcF9vdH#7泷 CgQt̚4Ygg<\Mӳɕ*$y@ZŊ7hAÈAkV[vͨO.g IIMz Z)HJy\jC-"jǼ6vHa9"%Y7F6<9&MܠEb~ƌXٰMȻyF'6I ۓMҠf@W79Nr2˓G>ٷ׈/Xjn^Ǫj)ihjYm/Ȱb7AK W >tyœ.*#c7j6K4in2ʈcxi^$<<ɮ :K?T =9L+aA,+|&=6|ΐc,@# 4 Ďڐ&W0Ǎ!2 Bjt8-4$GA ʀ73bK+ =\"z^X)$@lx&D.|T6'(7nUi " ^F * YIkr @y9j2ވÉw5=TGPh)+(lz(@=8܈g{YW@CA4, I衇N 'M`! N$ޙwxEcIhy% ^#ezmX5cSy!'{ C;рևA s#jM c9Œpd'AHy!Nsb#(F# {xx!gc1u I/~!X(-YyХ0A{:GXӨ"| 218yx|ŒFA<I`xƚЇzCX`@@ W"+g$P Y!VGA B F#."=)Ta|8$ܢr"AB@a DvOء'B+jd,/Da@@?cF`rB$A"."t00C??@A!_YqDDp>@P6,@ G"{VQ dX=! _b0$XYzY0CƻH sH,PH1,|@`>&T $* #!{ "@B'i%l3# &Mnң:1$#S`xAg~ %Q<@Y 64%,n#&q6^q0$YЄOB'E?Q+hEaTU#W?E[dvITJBq~ ?cg4AP8<&;xAGh(UtcNź^Ƃ/u y|"QP$@`9ɁɆ S($nXq>@!sԤ;3>F($84BlDbȂ.>~?>LX@?uuq֋•m(gBQ.a pP8A<,Nh TT9,a=b^ O! J< X,@f| QbӰf= A} n6φm!ч!(W,a 9 XV6zC8}}xEA*{tJb@ cl : tB́r @!OkʁU" 0C/oBa#ɮ< #X/9!ā<0q=O ʠ "A!e:\36 @G@8azvA4xCA|HGHFPNV#C /L .B=D ]a>8a4-RM`A(ad-&D4*>a #a4-! 2+vE ~a|va^D܂a"㩐 "@ Ja`@aƩ6$gaAhr+V$ Ԁ @`Nc.\","4 H@a S:` 0 T!R@l+v -& 6W$nN !0!2"&AGfrZdr\zda`2 FG 89o09J@va6` 10#d` !hn2s3$A$)  |B"\-?! 45A@B(jC n$ AT+ ` vA8@^#ה`#AzB+T @SE1" tA Ja>90#`"  !4K;L `:hT>AѶ@ $o !Ҩ!E`@Ky ~!]`#Q9vJއ8`YE`aT 'BE.vP>$*@  `  ڀK`1>c JI L}`1S00.# x1rt!&!\ rG x# m @T#`08a"U@(!!PA6r :)R 䀱aδ1r5L+$C7" '@'|P v ,`tiot!aI] X >v1A >A( |-Ҁԁh !v&"!J!wp͟7 @@&$>3?af Uai4.{ma5w7vdHEl(wArXNTֶNH#oP:!aa 6m pS+ Ѐ v,G"$a!B`$ :!4AAaV  `zc  5$%\%wpARdaTMnnb/Ԯ0$b/@ !!hXP 4 !`!fwΌ+ 3 hŊ V.hPށ7D:a@z0ez#5@gf-$!ANZa@ar##0T7rG @ +::"v@"r 2A&A " Pa d4 :cP1e!1QAaz usA}&PA>!x@6 ܠ!ee8b7zA iTe_DOba1@Ao{aJaڌA6a a"4ebR"CA3=!|@3w,Z!a!az>vzbfsXa8:9g $!F!! ' +$aHwQH$J; vA۠  JB!IyI \'+/3\7;?C\GKOS\W[_";prewikka-1.0.0/htdocs/images/favicon.ico0000664000076400007640000000047611200051577017250 0ustar yoannyoann(( ]oe6Q*[f`KU,P!33^Fm˒  } //prewikka-1.0.0/htdocs/images/prelude-logo.png0000664000076400007640000016174511200051577020242 0ustar yoannyoannPNG  IHDRu{bKGD pHYs  tIME   IDATxw]U?kS9v{B$@hP"bXut,CEPZ @!!z{Z?nX zs掍XOZ5@z`3`h6e>Ȼ^i .[EW+/k/=ѷ?/+Éc4f$eJy7 Ulں7XXoӞ^=M̭P~sIn_}eK~pEWiߵqù}dWoh_tI oϟ[WS7R=3̆"|hml{o߿l)Sh0>ķKt. o'l;7]Tַ*S̙r]tu햬eYY寷o߱y+N_OH3*tᄀ}򷜄Oo۹G]^Wla\eukVk4MnP9_~DRW^i8/cx}rmdE^7|6Ͽ+?` \4V25XnOLVIwy]44ATz*g:;;Nݰk_5=/ٶ/MJ=j[K!W\Q?sسO=jF?&<&8ޜ/ZܺUx'na,\t6cG\=I0/uҏ|n~7p}u|a/1̽4mڭZ7ξ8sn٠e/XdW%Gg]dFc٩ )'C+cuo ~;s+n[s-o&6u]1u+~8-ս7V|5cvH"x?"@lgIwߎ~pmߘ)hsWgOWpI %=9#R$zY9hG_Qp+;ƍn<]ttvBlܜϼ++Q4mݱ3ʏtxM9mqF?a=mqm[~hrm0==-K}SI|&{wybz- uUݵuD@XZ|qN\t^dm;ƕ+z [6Ͼݸ_F4>NψESrޑ-᭛`+;lv|_{[Ü9G<(Ayr_P?@ƍuG}לP7qNk3˞xʩ545_t3^x_L n>iL&d^q4_y1IѸk~ "dey۷'ޮp.*~3>]?izǿG:nBuZr֡+x9 {vsl_\ģY< ClŖX3ҕ>v u7!r䳾_|DBXWm)_Q- sNݽf^>Y>e¶`e߮/aYot~w15b9G֟^#xl۟gSݻ^􊧗 'S 7yiY}}ZT"]̶o<bX GDw:#O |C=sˇϜ9&ƻN wCߟszzzqQ}O:ٱF?}}VL7Iܶp귳%Kݻ<@^jT5&|*Oy/vNdqg2͝,1Z~(+!cGh =VR?oHsdMMU{{YB}3 nx]ͬo3zXՖT~}ߖwkW?N+pk6j'O3gWIs--ygLډa{Fp8)yyx?Z~f~@Tf1gu+rqcǻyef3DzQS=kA$nᭋW|SS%_}0zY׵[>cE~+'˽"GW~+_+ׄaΆߔߥE'.?+2{q/>l3nDoFp0Nsqey'f$)^ɪ=&g>tK~^#f_kw_vzǷ7QޘKxS]Em}l d_hMGwϱ%=ȏcj߸uw]~<cl])^U7MUM׿*.9w>y'Q^zm;)o5h2{{7\ފz./aׯ4qqnї3z\K慩^c_fA:gMz+}gqzp0DEyb~S]Ȧxv0?wt*nW5ty)!?Ύ5^[ZPi|kY0o)[6|ϩ++Rع f+FYCK_2!jg6;\vlÓoH>*о. :"`(s"Mmߣ wYW4 >?cj d,W㾧6J-v^$^2&?{x9̻}_~}ʹlCJm.ӾsI>/j5iYkϖhȅ\ٰnݯ/|B1DfNeof٪.F|վ{Rf͘mSG"2}$k ~Op􂅷o8s#`0ڈݽ/Z<ܿ{7\|rO\b{M SNkN?\9`7{|}:֌?0՗WKO:di*pSE~rBuSVZ_k"Ƃze*Zpp"Z^ƺkK9}efϜ:]=5cWۺ?՗e_9-SV)]7㯙™\׺1?xrMWxOv,DCTDc4TX^H^M_u̿,= HuўT|ռs%_ؓyvwóG=o{Gyv!iWT[Phr_G:$ b ÉD͙X_gc3ls]+xԍiԢ{۷0iFXgMg~eDA˱S'OFhl{m친wᅙSNYx/Xu} %@e./3ᚓsǝ?8oc駟d"Isڲ-_Nj;[U;+fGp܌+KM{e}T$3])|F:`SG9gbIʅ-݉vmd~oջHEG0J=H i zѹ…|, |/ݍh=a.`&\3U<ʬgg. >?JjQz}9-qfwsqgu֎ғ) ] T 5|3E3Atǰخ븘B*4 Bp4_\ڠdpUeHT!L~_|CE~UY >WzB :N2X?XH `f P M ͥi%n)4\0 ( bKt>}EG's AFxg[ҢX@+ta DtDPI Db1Ȓ4p.V7G8\FH K .P(a0$i!Sgl(H?E y+ɹ <|8KE4«y/0kxhT"_¿~j׾PG_s\66l?p?nd0EH: tP BCcdIJ (! !$aBCaS'`خ"gIl)t /* seFʎS9y$VH%YqBNT;-Սı#ГةD+v]4RhCDVJޖYuӐI2/eٙvr &9S_wq9 S|]v1e6oZ|* 3:ѣG7oXƗ훽'w",p^g7F-\p2{vK' Ǎd\T/ e(#b$x(<4e@8H4}y#p`pE\|۾4s$y^=aPqYs˟Q\82NĔx82DJN @q< B ϬcC޼ ÅuR  SQc' ;MzG)H)q<#E7@I'=47@qο[J{A G=={Nijjn(8B)I"׻MJFcéT6͛T{:^pNCEE IDAT'`krGU9!چ]:x.<铻:xaonoC,ry+yo>~N{ʹnk|,!i[ع /PB) MIE&)_c]m,I\'!=2卌 2=g5HsDa GxhCS`I퉑FB6H O[-2ؙ3i8իW_Ta,K.;k8/btfmIē6@uQ̨KN.5GBFYSiYRBOȆ"*s3ضU[1h*_wls!sǎ亗Vs"1c;؅±jĒJɰ:xB1YcOZig/L_'H &<۲mױn01f7Ws܄(S{I0p ؞R:QxRb:v<r ˂~#eolZ$sI{4ʪх@S0PB#5p,ʢP\ lh5Y/ eqxJ8Yj&;;HU#ˆ훨2w,{_+=,S[/%oӟ}^sUbql@Zy!j7BH\]u*m&  Y'Q u)ꂢP؀'mB]*":-9H?WOrMy3j,eB9{^uqcf8q?\dBE[ tC9ba2): Gc 9ә\Hu.Ö0]o:99b|^JQבVY!J(%蠖e}lݾbD""DQ~χiH^y#4ضR@y-5䈨,$(aK- G Wȑ=p\EQLFgˋV$L O{T{{uգi󦡤k<:~Ǩ64˥2زoѺ'I.e^6z|$B&:{r; 0{t2f{|] ؎ǘ)ct/CX؄%B+NUB2bȎeӾnRGy2bhH0M]yJ=ò, ҸJIT8RÑ(+5\9RFz G4,d <#"uCχ88%^S&}tI+y G!9hAWvHL5nB i1/،N#@|3/aٲmJL$,x)@PMfNJWpnhx9_#XQFN#( ;TĪǡHeu%~Λ5j˧+$h]uJ?H~"D)+p "`0(ض}cx뺇B-ӕF<<\O)\'AS\I>{Ϯ]%FsZB ɦ>+Ƿ}ƹl\O:)'ggOhTFFM1NoY,3E.6`Rgvػm{}4hEDw°Ih2rUImEǡX,bxTq)a?$I5ٛ52I:h)xQ Ws}}CS]a$桉/6MOhFMM ~h-2o֑x!UIEu=W^u5wVCs@&q\İMyƳQA@ )9#B)JXL&\! &bhJb&٠K,\@}r*1(P:"JґR"A/y|T*CBJIP89(E44mDp@b(mQ4>H 0GVj$aw$x-g|taAcAG2?_0 )="a "] s|3q4ƌO>Gi rqAyf 4DGYj$:S) @#Aaݳ1*RȺM@BP7≯)8k~(mn|G, PJTСgq]P84 4%fXV=;AFT"] t!1|)G?1:Sf*(IF<JIL?Nz<k6m#haױ"BSH< K΃%q+H x< 4gHƳ 'HfI9Rx" 0hTE(}0ME8h<J!qH0f\@QXlɺl 4 4%HbOj!yO<'L2<)0 wŢ?TV3404RnI'r>ӦL|H޲qxA+䨯'f۶Ne "41@ʥwH%sDcaB!?U, a)u$k 45jkkKӛ!"M լO\(Wr8"Y{eYXiyWBRH1VJEPY ޼D75˕xJa)*>SaAAtz$97 :MPJBl6O$娣>> UElAb]OuwҐBJ\<#O(k -pP;{p> ݁;UGlADN=)=]z &\L&C*"HH$fxxD"A:>$j:8e=z~087X`2B#NTH I#"y\P% 5>ֽ%r Dt!7}}456J Ril67B,f\Jbh#7z(0]4iM64B7ԐHu=F"G,1qr8mqaHYh4 ,lBd<\̡I:P(di:Ɓ I dN 4LeƬ3~_vYgoY.ф%d:JijmI<.bl|WR 8|rB1 )A d3@41юA,V&<ҙH57GX ċx:t0Gzx_ HN,J&bE3$"MߗF"tafjdD50AYT6*qQyM:m 3t+Fh#Go/~DItfj&h*99R(5Rx`y` ˑXr.DL:5q睷D\ 3|wTeEBDMbX_ xrCz@Pɤ(>2k[B#Vdjk2LY8B˄:<͗s&k^4#u|HA3$nA|(öƶ=qv%*? 4t%1C6WL܂JɛMЄ@I%  S QfЕ8Pl(J`yPt <$.ǻa*V^6JfE"z$"2(/! "~\W;ȢgaZFk0ģPfp(N 8O9oqBH"^ 6E+GYISs#6#A3VQ!n \I UY;:Iz.>X@Gl }$4ҐEX=m~sߝ|>˩)9"*\`dz` f(G+4)iTfR!sD,&#SjUc~pl]_{?%q0443侽e3سłɪW^Ysc#(䋸6 }_ e HCFB-4fP#qr6`T՘R֚(sx4 3EX:Ef֔s8.$զCĐ EȈ&ByQ6M0%F(<=?IJlN8R?&+ƴ yLRkK{k!|8”gP"?GxD,֛dɒSM>[3`0PHI@PDz  r-@6Ƕma?D,${uUYZ{z9:,ɒmdゅ1ƀK!LrrS~P$r! B1 Ⴑ $K#*sa~)&\~o&5מ1c'2!`R8cvNV:>ơBЌ X$0^ay`6Ф#] QgPBqyI0N(.}2C6kF+bH`DU¤t Z!fGND֑8I:"VϿͿOL6o~AuO_7'80<O_$/oy Q~[ >$q(O3j+dؐӤi: l+ =M[ٵ 8i)Fۀ $ zD"p 574 6m$I>dB."Jj39&s3] Sc,ϾgCh0~_s9JpNWFt#fzh%[wwnMJQe!8Q96w8rqBg@Z;[p;M5d2s *V8A#56Al!I&uXX"uRJDD\BJ0jY>7+?x/tیAX? /%xxlXhur%Kz/>>Zv87pիC@G)8\xF¢󟺝+/Ἶov (=šB1JHF9KK>|5r:2>Utwj'~!9q)## 6UD!J u8XXoGÏLy˾qz.X{>v>|DwR%Hcmc ˏzmmc&!`qan߱cdW[y'dq1li˗PNZ͠㴕T@E$b\O4i#%R7`-Ϸ eۮ~͛>uCN,^/|07t(#H%X_szh>͵cU IDATMc,NM3tD*! `yO/Ko:}\ܑ+vϽ.Gs} _ؼ۾Xe1D,&3K/}ն=J{y6ElhIy^ )oh%}AP(!,ʥ{(BjTmFd7#eu6a69íǨɕ\9X3 ?\ŻwᄑFstB@Uo|rd6A~~<`an~CK{yClSL.VMaX%_-cs:dA G|{cm2рokAV?u>bX2M|O09挦com3mlmtВ;Ŗ-g6?9ӈp]|oTO5f5(advd$}K4~sϔd`f-棏>{(ѷr+_7]w?gMJGb2>>/{iPc^Po}Z78S0;wUW}S ''99Ȳ%4N_[nֿN'FLdY/ Q@fLϓM34L㝯}_MU` )e$ggG^&6pb}xC>C\oFTk_/tvrxtOȣ}7=sM_kO̖Yuby1QK.litb'O<oݷuyu"g.~{|jUמ <Ń?|suH &\Q`uQҜ;ߢ2kh?/on C>[/x(&07VIE/o޾c qroƯхBFmaVИ^dug\eh~@?ONE8=P?g>w>7vf_m6ٛ_;rW5\}eg'zٵ6eSS ?t )#<鈅c&ʳ=2Y7" Wu烯|3g>Oo5ޱ}΋.|~~m_rm=ȳP(P.QA@,;)~Wz٥aϞ}׬Vqݙ3nz?]i%}9!uw!CA\_x;^ps}QjS僼d0KhJTGǓ_1~̓;uvD#H"`"5bZ\ eP-=e>t/t |}#.zR;pГu>w>66A~Rf3xrb9ĩ܍;K__]6#_bknخ'ꯚ9= Ca㪵3Y>@ev~%/rZ _x%\\rk,Z%nUfkoQkrWcGdkFYΒŅ*cJ6zYE%!:5h e5ӬstOW?zw>vu9fOX0}_=Oi^7sbh.kңfi!T:mbʥGX5| do[12E&-jR'B1JJDR(nCMoN2=>^y tqǟ7Ƀ˳W`o`o/,|kw,KgKgNOW FGGn~Vҿ_;Pc03V@+72q@,B;2,٤X66AA(o>i5W_uzα2ڋk|/U?<3`zCg'зvSV8}൯zk/;:Jp_}rhگ<1ͩqs ~ʾV-^D?w/;hY_J9Z䰅vVjhNmJc$RɨbIGHOV )HBK:54dLNF(dHS% $8 YD˴ͽMV^Mih `c| ][%s7=۽}_̰}%oVe;wm%{F%EͽT DPR%U(b{"k%D`0Hun|HLɊEOcIVS#"5iq%p/@*4ؖis`j?qǷͽM/_N5J<h\%_]xѶU?xΝŚU[^w?z/?n6yA neDžgmpr~W.;N#CGUJ_`{wQA. 6`\<tSX5= U'c@Pj((G^S~*H UPdgjdCXQM-JNY֩Qѧ&K."Ǐ $/?xGg;:ok/k?9/1y?['J6mXy˻1rqa9U%yJ3\Ѭꠣ(9 R/,ϰMPROHRTX!Rci Z]U8R =1JR:E>ض6AZxы^ʕzulPpd`3o5^{?Q"6;-M yGq8/cRȲ>e VYFYwYzmM)><8삭, zNs)e¡N]R tD Jpx2R72!Z92[wX@rl'l7Mն\i`$XZ9 ^~o~pC=r|+[.~-۴Y-r&+[ ְR%!d V:ؼ'jD^ 6&#k'H#-],qzISJ|EjݳC9hYYIB|Sut&DRcƀs!;S)%YF:ySlhWp r-\ <𻫱clv-%KXׯsӿZ_=}r3f]n㧒rA__Ur2ͦx6s`Q6Aks>{Gj̗:Y98ґ,k3UȆ[:x_/!q&E&ٖH-$Hg%MZ'/DDAǬtζ;M6n@Z%@`Β ɲ‹6L>ov w 5( gѾ#U+0XҗDdљQt7p;2BB|rpFB=yUQZ@6[gYaYt +Ɔ0Pٰ ťm-)[XdI)r pɸ;NVsd ټi7F[8y;x{GIb}VSd:wO71,m{c!V6(%RH)qCKE&h-h6f ^Xhy U;M.]̭3uiIuB J*a :uKH %!Mf<5z.B<lzw| p"u,f.zxj^2!kIȇ>(ӯYX"\+x>sV22_ $Q:w8VA{ B)NL!LY\66>w +P (y\ ƒ2ơUKEa|F{O9@WlJQͥQ9Uo3stkNOC :KFD*$}y :mE b E3%3*MKG>$8p`EKZpVE4YGA vz8|hK>=k4<k-A ERF8(5OMJMjfpCC(0 1N!O<.(f10uzCdはb{˶>pM\B_OVJLK BéL)(5!OaBgXX82  r t =T_>8|.{L.{wd:C*Ea.B ;i;t=z{C:7|*:Z{O`?gGpe 2Xr!U1!X {vyeEJq ֡t0Zӌbr9P+CQb&QZU (I QRJRX'\z3m <=}߼V: 3~a ƶtC``ľ)W'NQZ+"bʦ3cj^>:H!(f6&2HkpCRař d!kk"zHPΒHR  ԍzLKjz&Q* uJ RD+~hS9L60=qC r@Xq̥EdmOtvtt_|Ie7Ab$glkpdvUk6Qz$&ZZgY5. .I#?s9eQs:JOz89φ;Wџ3nƶ;sj&f:71"t!-m < oxYac204CgОRM .M׿DmڸJy`bqXaO[V6܎:|Z%9m0lqKZaY+ yjL-l$9O <<%,F^siW+y5T=eMaR,(!4(d=Vu6i 9 XÒl/MYۏ[zZ6[n1  DEq su 9#3tQM#]%Nd@Ĕ`gߤ\ ZD—'#|qy鄥?t{ͳ=䙽bߥYS5"qlfپO=vTxz\5g`6E=#xd+g ,YjFj[&Qy":erL.mR0m׮]}+xGs!睷'v z8=3c#%F?o?1T|]@7,4 XJy!ҥ)bKYf Oϱ{;q@ +dE"RD+8>gn% ZTќZ\Ux{ّ9N P0YK'iʃ>ȉ'Zh{V>uoﯱ)D M=ᵯeR'v fe1`F!dDK(K!<5VWM!:/[ D͈{|&sTcVrb!¨l;ѓ81dq~׼F_t8MTaW\V"0$IgEb9<СC%sA''^X& ]e+/O3vg+ʗؽfYj$\O&4" =Z#$2)"`KM96Sl+6/7CcupcjfI+mwp8c(' P~̵/{+W  IDATK-( J$q'N޾[siJC3yûoXrW_Si֝F, "*NY ǂ5 F huMByժmYNU#>~˜$aV:x.BbpHLU!y.޶?-g7WٮƱYCT#(|HchՆtӡq!VY 1?o}V{ףOExڤfo8나rOTx`Z\Xr&üNiu5u-ބÿN eU$NbR*R S5K Tf[lr)oYR>: H$3XVo z{{i~zNUP첸|79|OYHLJ!p*Lp!m"Գj KYYI32kؔP7RV Tj7ef`M Αh ʲ['τO^M6~j [&~L.T4gR:-dR0ؙJG6}ag.ƹ& ؘ7ؤP,BV͇RԝG8ŕ7\dyE]{ )%W]lQ(9wXـ6d/|9(l 3{L6m>'"Nсw@: ISC֦ 2yG&l<1H$%+g*dE(g[+`qjcއ+qOD(R޳g_թ7H]a鈐zfqΑ$mO6 'N8lZe`^fr,YctH`4[jQJ$|'ZK‰VɬlLYvxƂ1HgX-8i4.|R'l4u]7{l{p޳795uj3=SBKL;~U+igB6d ) 8!Ɓ$Z㥐Z(]ⲤX4*pqEHr BrX$3(a_Y C J!4MNY3{|+^?8JcQJ}RcV@0>֬^bgDze#"tP$BVu"g[3l )8$klթ+LAb%IRBeؙwDR!cH90U<4lu#;9~mR&)ON{*i<݅,gst5fէ 9 ^Ž ؼ~||ܽ2+Wu7jw7zyb[OX'ܮrBj( R:RH>H2TpytzD"d+,h #Ɠ jЎzu ެD\@qr~A,3=~xY<3O #3!ع#E<1-BþҴBGA ,< ;#ç6wzS y`֭ ~yv‘/draJkL6DfA:|-s /A3`V|gd}3N)p6EY ZލIGT]`mް.k#ģIh29KWJTs'=s,_)N+3$1,)*z3 \ Xg QN7AgplQE E7C!e]㼡AV/[UҒJmܶvzD&/0=Jaɖc~AGWLC^6L@GM4Ylg/^O {Fg;;^k H!0Va&2 ;3ZR 5 J0.SV(qDxhk8]ŖQd]$bUON&(D+: `SޛYv}sjZz߄HHc<ۘ ]%,-=KoNHW{ۖz$8&IP**ੌ',32B%;xgm((>WOOrK?vo~w~z[оh}䑟ɤ&Zdi,cbrىNVD0xG`D)NbGF_)ʍ cb %qKYgU$Y^Q&A2/pAg+V|80 ;<(Vxփw>\P<`aR Tj4I%`QhLPTdaȵ\h5W?7n./| o!k6/ \ !W]Bi\nQs8HF!%_%74B іFh(Ԟ<)@$u|ʅw($g:mQ:A*w>~՝FpށR({u/{tt 8 f& i FHb = ğ)$x*IB4Bo#K@p(WU1"K:YBm6[뮺ꚗ^;N;,~_d+do[k9qshjGi#Rj#D<}>1lllpckk'-mU%#$N q% ©esX0h(-()mtS1;"4R*zn9sվ QNɽ[8raH J;Rp#h@ 4UW#g#v}`|Ky؃<;YWז/['`8IH A큤V!$Zc'Ri[w:ZIJOF Q \xXwo2w}EC%)GW-m [HKܱ~hV#=DG5@\  U_#İLx^Nt&!%)@5B!Ͻ S G_];rn B ϼ}>g6җ^WHiKuJW1dZ0*sƊG ATkS \%,N,DNi9!(HT"Ǒtuf g;wn}k};wu*e(rچTdD'0grkSKf \gM7CMF"q%SnYBLc]zA4jp~CN= {;n5!64%\ :(BE@ 4}. ~µHӔPqyN׾|jq}x g?xK_v7Nqcm(J並4əO+Ohj^xnPRSíiR^P J}ptsdp ܽg Jx)Rf2uM5:8 hБ!6aR;3aoW0ɓ{^D=ы=!ĺ@\8ȴ P*nXn%1{ǻOa gm[k##jwŏ/'DdGz,SGyյBw_6ȳ&tyہ ^ɣgݚ (R @(.0XW^ yō٦lMQd$ŢIz8oɔG(kR**k1l8у;;苜Eũ [ZBMCAð(eЗL!7r0,=.:ʣ=OxQ.\d *Vxjj;@"C+,N@JIXy6b@b;x(_"!PeH d`E[ŗz?83^]Zϵ鮞Bu٣|{6S4$ (WCDcE+Z.p)7j˯nV8ퟟ3geD&^ F+.oUʨDe/}.F`mmQQR1$֫P/i ȭÆPˢ%٧Hd,s!aCe`P =UU ll:,`+P*MB@l&9~屝s63^ Muqx kwz?w馳ΐS!A4F }%O!owk_ s4mD`A^<Xs)>&)rkz岍yߚ+Y"X.`9{AkDK $+g]*/krG?c ry4k/: ?G҉=DRREnN R*:Mèr(2$>Jװ2|bS&#UQUQăҊ@=L߇x|D#Me`T??iC :5Z=Jl Cæy)gpP7Z]flg?م1@a|Dc7bfM^U !wdJqjs֝R"Xt"9WE8KqB?֖8=69 CiFUhc UӃyEh:AK .Oi,r ,>FBYUl (`to__+0?vGh)طk|FxW9&'u7x5χ^4e䠕*C.v8"" u^c8WeZSيv{Up=H?DUySEw'@D ; IDATE%:Y0HxQb_hCt9R̔9׷fcGx؃ΛS{*ԔJ<9]{'`%c3tp^aTTLbHl2nu' ଧr4Jyhϡ4}stCc<?b12?BlēK}F|T](\p 1Ў7vz6&+CEP n.枪G^Jb2Ux㔢R !QZr35يv/(E A >VQ]%r!8\H(pXdF'RJ)5ꪝ{(.$Ta$'QQL#>0`vt1@供3 sSZ֋E%UaֽBY<~.{z*\{K &UUc}OHm46E)EOHI!]4:MJtcQ 6P)и@Y%ahY)yc0RvAQRܲ;a?y g0=1n]th'upLjȄ\YGY9󬬬cK Y#@x GqH63Z͌ @'-/Ik:FI:޼j2) (.;<ơՊxþEo9[9~bEY0q7&;ltpy\RTU1<΃8s(*(lrҴK\"ZkFyN Z+X:F2%,k57ʇH#oP+?Ib\i0)N Z!uDZN1af)E(E'A A jKC }n:8?u_xwLM:_l.#sUZ24kD].f]Ʋ*)˒"Ϸ \AH`8nGk$I.qY"V (S A((CYAskUj>67QRY015ֻ|1@@PUG Pـ}PQ&(tpJH/􂐈e8<ȹr6H-$(TP61@ !v+$zDwl#=p {Nu+fX;m\G & A[D\}5u_G)8ra'.q8]&XRc6$.񵜄TXrc?WʙgVU3M`[E…^FUTK3i6zCt z@ [A%qHkI\(lS[BOE|!&\߁j{z" ςA x_rm2>TM$T%XL)Bt7rY}Y\<Ǫ1@9ER%mzw=\ȡ%,#g))J|bhBUrGtyŀDA),ݡVNdU 2qbdksDYt;vffvEڞ>kU}Ϲÿ=JzgidmLbyx\n'/$&Jy6M#ef fHY$[Vi!1fFw8iL3Jy/&s#EE"MF r 58sTeQk%ANJAj/ [,)IN.,ݱqmٹ_;}msW_Yc7wLbaBIy*{^b̈P(i4hs#Cըd_2!M8EBMe(G)KȚFj1hABrda2l DpctKRMC+)*9$8|Lvp,ĉQD +>C9fef^S>߿ywOg>}Kc}LƀaIȅ-#U; TGpA5$5hԋqJX{vM1QAC+G!8᷒"0qV)lU1B3Jfo5Vv"ǙAٴM-o-)/x1??x^_;c8+|#sz[c}lvvno hS8ą>lB#pQ%:$)xC;+LԊ;}k:%Dk4l$V.6; J+GB3 * f-:z5EY!ua.!^I]BB,Aپ5^]w?/瓟䵈ksz~6{ogNw|szsްbtuIܣ|d| 3-ZrJ4[4 ŵ!_#|ǭנ)˨%1JXzrI1C3muda_p\Ng}!XT XKi52bDZG1[OɅYEud+BPqj]7?;ӏor|]wγ Ơu a]ԙ 龀&ΌxGRrL={giڈ44g]tσT(tB!#)1Oy-ۤO*쟁{/J& dMqSMtB&ZB9IŠKoo}_s+h݇4To#&EF)+mmu_x4`-sk/fFmQ#emCCy%/Y>Dwc$6B`5+ǠD4r@FEr3`dRX/4sfd^}Û{_~އ~Kc\A;xMVֆi`L2M8]wλUڢK,vNiYt';h2∏`;4 Ži4gie"i2j^h7Ҕ͍ &ȹP:eH*vu$ B4U(RaW],s TƠbF_p-q~G6Ξc+ЧSc4-*ܒQ$8Ahw1#fP%uv17]$Clp8o 28{߉$ZUhO@:PkK45 g ف!DqhQ hpTkVn Hn\š^ϟh8ˡ"`z" 1G1Q1@ve-K?P`8oIJ4ӓqCT'e}};'bѭ4L4&gq&pAЕ ̪cT( !ڿnrleDc0&ۄZ.Jǹ{=MvԱY:6&jPg%EnT}I*U,`vzTA6Ux} %䛻vL4YhnM 1O_*3&&vz9B> MEe-#p)H9;u=uQrhRt)~9 c=5H>nUt? :&VzD+%/rgX_[T}w>z⮓K G~➓JŻ+s #&-;'F;B)d:`u!30m,s0YJ_zWzTѯ6(R} RZI|bb =-/8|*GđWn/с\H-zE`eXz: : y{r▷]~w,4(iHRN:RmI2]kE'ⱶ*(?z'= c{_2:Xl@¹s?=s걟Km$m2X+s@wP033)Q̞w~cIתS9$YB@f >֞sNT]kM%Qڣq9渊5ٮ>|uҭ8y>$a'\{ 7|%<,Jf&,*t(03f8,X]^'ӳgI_{>aWwU֒(ms/d +>#&kL={o{3c9vMf3LNNP=Iun/**i&LD,QvNA3KQUι1@]_{'R\.w=(e_ʔg#暊zvN$B#,DL(DHc>}@w8緗D'hBYUc]kvuq &4TLvO"/Hj鏀²o.z9IR|`=;))Vԁlc;?Z@RU9r1@Yȇ޻SnY.SRc'Dyp~i,3tZ){=i/|Z=]C&P1a*ad~vEwΗZ[;LE4nci `iІ늠͵'}o~׾蕿iN 1Z!8x۞칷~wGod hC, D(+_ѣML|&L[Mo#'Vȴt!055x~S/xcˆf9 sSk<^ ƤuK#0pͿ~ c/~Wf7wGvZ\?Y0 Ϳ5rZ 1 Z&ސZR?7󧎜Q MbLSR. ^6g>RhfwLa;g2Б_1@v%iNܹ{;*t'm~}Ooyӛ^OwqZ}]tAEAijFM~Dc4S4vaDQQ*˲,[^oF~9ޝ{AT IDAT3w np>-~l{KzvtnM(:(g+{7q&{3vl6a0sIھKmGw$i6p"\_Iy>S? X͖ut[SšdU_!A J%$SIi.ߺ+~rBICutd B0V-_+ y~pmm4ȁ=!Z3Ш5"ψr 5PPya<.*++κ2.2' v"A I֭9 I'*t:aD 1֞K%gOunAd1 GEhK-?ohnK@^7⑖/]g5+ZGہHΉb7GmgϷ=?6LiLh*(0- !;iwJ~oxs4YiA՜߹;P?ܹú$)͠$ Bд{DŽλ R'|F͡ʰ,"ZA"رqյG EA`IX4{ lfFUvmʑ_߾t0P؂prMgJҋ}&o,RN"v#cZD%Z/k?{)2$% PhŠйȅnQL.2M ,sUA'Owt(-8q4 ARd+.wpIn]k1i0P1 4UCU-7LԮߐbT9ѳG%l#́3t ɶz…v0ƌAII)<> TUiv9sbl/H_/(++ٴ-^DmOj.>Xu)?7E‚,."̢,F<áۛwplNo߱}Ihn/t=5hg39V->_/<-LnPPȜ6*I,Y8wEUAA0*!L@KBItx]Z5;H¢wc&4*PSAйTcpû9a%D&w c? 9㼋MכQ2 Ɍٞ 4 }[~?t(DS qH2Bt "#մ;l"Sd"$u4Gph2J޹}@A`|g9f6"F I4M8e2nj0#!C@0ACδtI^7 t{ld,2Ĭb:L((,PRaG;ai]&!ck>CC6C2$& N^TA C%6d@U>;}rG=z idF(p+flxeRPP^C4⋷6?5?[6滢m@upP«PGıuӶU’2n.ʰ?#Ӑ3se:5;zyCfII\˽pCvB"6AH{eZBBJx4U.Ͼ/w}^g2"H ea%Ncjv=;Lѥ@("PE};0ӑ1iV е؃p@%!p"2y?0>z#m>2Nݰ 8!-HBِGPS5k֔*r:>Wݥ+voGE? #*) Tp/*?x㍭SuTF 2dYlX̆F '!bS:@--ԡgpy< ,DDi)y% >'ضe/7S4?jKUHb *d'ΠКpHN )tz%+?insIt(l.@@ `fNUIE0P`_Ke^$mU'%ݻv[{$ &( P84CḾ$A¢:)x2 ±4$ÂwO0h Jc1P P $$2S@=Sym톍OY TJJ|H6T‘L=0*H8.%,I2.F2j0 wi ]3x>9bX)yPڏs$"aղ'L& )*>)$9Z6555z=PEAQ!4B-Ɓ@(w9DR` !PI"嵎;n#|:4E|%h<ʲ֭[; y7'xn "`BR P0s,נsrܕ ,H}Qigil_[²'`-$SX63>`3A @! Fnۿ_H.[,A# CND6A[%PJepK43].K.;0rl$3ltX m` R{=*mB2)S/I8p'2B!9[P rB~𡇏;Hö́ (((fUTT$K"#6!`()HYgwҽjG]BрiC$f ҭ7өe IAl (l \je7O~qN7<*CK" ?X40z/!??>f\S]a3\8,IA[,$2bhdCx;soF(dUXЉnH-wʹ 8Yws3d9ĭB6೔W_rɂiߢЃa8k$wb̙9s&ԭ{AǪY^a!d؆*Ɉ XCpz<4 QGKJJh~qO py[YQ4[shP@S,'izݘS('OUVVqD$ @ nT)l"዁ώm)ÂBK4Y3ر5'~3z(w<ߚp8yӦM UZVRΝu:UB6lu @AazzK0 ?~ggr$L ^H2E`%!7mA;~=w?s.O0nZT)Ҧ@d0X\}b[cͱ,:yu%""ɋХKq{?o+Aݻv aN ð)(Ee`T$t{L<YކLa1o#a[x@OпO>G o5y-x] &Er% =ֆsm#k Q*,C`^QiBEwvS7ܩp8{aMeC׏jW]GSʄGս8W9UE~566VJaDٖ1&A`I a5[va_8r={yчO4iҬ{*Vhx .9 =ƺ ~v}b}?z

o$'xh…޽{g~i4 5 6JѧT[ُ3=8dCL=lRV ;tEe’N޻1p1ÿʾ7B&i@U(dWzo57;ɡdS TžݻN̏ ycaɹ)GGןl]U.VS C@NXLnԭgzU޶ok915}$ dB"7pG/S`WC05bm? ?ط<^UY&dJA'ؼe#.x~+"f 6 8H{.@$ D 5~^xeeeY݆6l|#HoͶmۢk1ۡH 8J_^p뇲JTUUaȐ!***;v}(A2 +nX$ `r@g?Ըg.% N HC(L-;xqzD859a҉/?r>EjYC 8; y>otVATWW= 5r08'B3)"f.W ` B!O"poq8ޞzaV)2[:u|Kee]gDR .kzMTgR$w*ՐG1H ]4M{rRTkv_YYY4H0 h@ IVǵG,氉 3ɀ0gëXo,kٳg|tX n[ n߼cg1)'Kzd| OT5dI!2JKQoZ䶝&r)<TUmtl~=ϋo<D͵ys vضt:=޲,eڵD"qȶx3.?+̖M$ mmYzֹO;+Qqn`UUU۷\s[{eWF܊B\ ~@+/**,qCy]e'͹g7vee=9 I07l!iǛ 0tģ.=y;v`?nٵrLpG Jƌ<eeep 7CPT U2d20u˳CnO, y|py:oKf-]C6T[/OF~\hgM6o߾s>l\a2^CԐa-EL. =iпg>$SLݻwöOi(+*zRPziPyEvgKղ tGG[[\.N'N'n7&NHNޞ:uy֔4uN>a|C^|wXnݭH€ߋ>`> IDATh,PfKu&QP-7BN ]{VN&_)@5Ez uO'p Y% ݶPe'4-zW\pbDzȝN)+/,A|_2Щ={t򌩯k?~? _WRqu1nq}$Y0 lkhI۾ŋ+V1e/kׯ.PȤt(j5>0lh8Rʷt(kjnY~ʪ "4*%eRCG8 }\?}NN8q˖_?ḣk sd9=o{[ tTA% BP;^zM4`n yGq~{DgCjzn" Tg T[oСCmF*=S4gΜ['M ݻw_-k0| 8ѶW?ݙ(`T1 A=(#n6An @jpi2u*nS Z[[Xv0={t.&PYXW;ƼV 2,R)d "g2/Cup EgҩS֬范ɸ='T D㩊뮹/6mCcclf2s֤I_B($P+Vqϸ)VoDV5I#ts3An45fR-D082 }yo~St:ۮ76l@. uI64mKcX컼 @ !TY>+ܱ{O]믿ܳ>ԩSgyƟNڶ+kW#OSNJ~re0%+W>zLTXp* 6"Iw6 c7K]^~=BTPc:x B6t_sKÎxcǎO<3-]ʏ ?.T6 )*@@P]U vchЭg-(ލ}衇6cƌh޽7VdJ`euS~_5ҎCN?ˡ`u83&U!}{3aD"m߾$ϗIP^kXO~vM8AMM>޼%e;6>2o84F 2D,zG0~L =k`YE8rINJضOOc<j&"`̆(p{5_7 f @~{_|vGqUW]JHvZF@@CO1c o*mYk&w0oϒMVwoh;&PI/1\ A9$^ܾs\]tѾw')D .dYc}ѳn<\. nB4#oy#s]^ &Ls%$Pj%54ChOpPI'ﭫ{v6,\sxn#Qʫ^t޶,KܿyӆeezU6qW>ɚ%$ aH<}{\s]WG֮4Lc}ҲCUZm!s%()Qh<)k?0p뭷lmf 8a.%#J4I&sVךߝEf:* dƾ8L;s܈=JG646M (۲`CA4@嗿սgO;[oò> ˺nf&-QuTO] fu|ӇCblH$Nj-wʤa&$D2mC0XBU(,BHgut&/I?)S$~ B~}g=ԆU! ,#i KJ" l&0,,! ++T`6{JWڶ|18.rBdcQ LC(l!CXY#B8&A$E+p\s)PAZҀ f[Jזhh$| Alwccò@*.*DuPan_},'l§ys[W^3@"8Coz= X1uGy?W'/h5%"Tc v΄4(TELX2d +Ԙť%7z>}zo0|,4/wuhɢ^>޽{7wGo~ؑ##ې^Ȕ" #ܷ^,].uxXCC̔GA_C$j(lZTQt2BxW_}݊l.|R\\qOysք!* 3_=HaC# R"Q0-W/pXҜ/ {l۲qӲ}ӹa@(gt:i-5:+X,(APѱP¾H!H 5KЖHwoذnT ~f,i[0;ϐ'_DmYkiӦ͛7jժUK *4X4b w iD8ڂl*Ar9n6Jyp_S7A7j;xUW?}?'72[D0l6`sh0\]_M@֜ػ}voNi躎C.9Sįj#.AΆ6T-BDcqTВ6! "]nE6De9y3 UoېoY^߿JȾğ}㡻_/ _ye{`Pg 5R;4"7)Rx: jFY)#׹x|t׽}{5!A4iaGsze펗їe%ePGB(+p+6R PR 7t0N  H  DpPX5czuADLڳu?9|B޿˷6]m]2eTxs۸ڥ qR[Sb;(z8nnh˥CE?nzvK?Y{Cܵ}cܣ˩vRFl.- g&W~df>rI鲒B1zաL&Xu`wF a(:W"P^ hK8`lC7)2(3'80wkoI|pڜ{Q>Zx{;vWSnބl:}qWR|FwE;"Xx<fB1Hlff@8'..!б/zSM]vs9nb*IȄ6l&ty޿m^ԏhh/t/j֬]WA#:6n"E|He,؆Pl~&nYu.C޳SǏ^Ѻ?T+?[K/?uLkΞ8fyv,c4֮Ak4V ]wYڣ 6A* @2af L 6`DF$[N 5s+*+&2G4H6A ,!T"?>89(() :~0/J릯͐vP)eA dBˢYK "6( a%]uC~ݿ[l+X#htY5k#)rYa\HĒs6 F@eǀ9`BEV&tbg_ՠo/|ģ2+}6LAHZ{8{"GO>qu_t- ( nHrxf6SKdcƎ/=bkΫߙػbeޝGQqnɲ!+r%HBBTÑ ^`smfwtFxHVh,>u޽O;t^ÛFUZp\BB$ (R`d=<Y0h: %BX@LP(z "&P5 b7B{?,m+Yzυ9` !4 LB ״FX.]ɣqiv&k|MG$ّۧ,B.v:'䬹̚^_qmIϯy+;+ǝٿ r%ACE!.hd{T1:oZ %!n Ⓙ={f|HU:=ʙ(|NHU?,_pO~Į-zfA{8B} <^7z̞<\."ìCTHI6"5(֓ >#wGkW>n9u"\%Ef q?l܂gH=㉉H4"-!Q)Db RD]sTbw5?z"۶cXj؈Qs<2~ׄ%Kגt%VZOoN3Ǽj=O7MywQv6;# 0Qu#%l}mK&˷}:$f9DPBe[b]y]r?$ݽoۊ!}Qe$IH>N'8p>,,uM@Y3󪫪ܮO|uE'_wkl/߼3uU7z?0q:vhSΚ _g2i8 uW8z;L,LqX\xœz ÀҒ1?RD>36& aV f$K>d9 O &(r4 IR!M;܅/A:D|q$"Ү]_Zyuyl\q᭍g fniCiѤaR{@+ xTÆ>awtY6VĂ͠4 aEW.qRIYK#;L=+٠o[dDqm]\fNcܰLYl)v`K44 fE=k yls/W%Ait_GO8zl 8nYIa-hz@N7X QyK[6Z&b虾~件-^3oiժF75~;p7oLK2;A鐙QR6a+&CF^\l $%oGABSiЂQ1T+$ F- ֤d F}[I[M~`,I-~f]{#59#rN-$#bĕ^n                {]#jk̖CIENDB`prewikka-1.0.0/htdocs/images/led_N.gif0000664000076400007640000000115511200051577016632 0ustar yoannyoannGIF89a~~~}}}|||{{{zzzyyyxxxuuutttsssrrrqqqooonnnmmmlllhhhgggeeecccbbb___\\\[[[YYYWWW!,ʀ+-" ",-.05;- )&+18@>#-  -5>G:0, $1>!,gnRRgYxE*l"~D}JYD# G1~"8=ƃE$dIENDB`prewikka-1.0.0/htdocs/images/table_order_down.gif0000664000076400007640000000016211200051577021117 0ustar yoannyoannGIF89a e_JD1*!, 7xTNC#1l@(F*Bsmt꼖BR4vJ;prewikka-1.0.0/htdocs/images/calendar.gif0000664000076400007640000000041511214425713017362 0ustar yoannyoannGIF89a9qZ1ise^c\mesl^Yzs[W}wSQ!,e5<Ҿn1q]UEQR=d[nI)*u/8p8kH ]H @w@b~Chff]nprxX^`Gi`G !;prewikka-1.0.0/htdocs/images/table_order_up.gif0000664000076400007640000000016211200051577020574 0ustar yoannyoannGIF89a e_JD1*!, 7xTNC#1l@( IBL"F:򑐌$'IJZ̤&7Nz (GIRL*WV򕰌,gIZ̥.w^ 0IbL2f:Ќ4IjZ̦6nz 8IrL:v~ @JЂMBІ:D'JъZͨF7юz HGJҒ(MJWҖ ;prewikka-1.0.0/htdocs/images/bg2.gif0000775000076400007640000000467011200051577016273 0ustar yoannyoannGIF89a@d˹ʺƽľ!,@d %dihAC,4ܷ;I?bh$dœDT¨2Xa-xX@.sen|N~r+/.23589;>?ADEGJKMPQSVWY\]_bcedii~ࣦ-1;II ˾\LӨS^ͺ,JGHCJBerjV`9ȓ+_μ9rG@NUMs׵{ K\ӫ_Ͼ{hѣO7VmcMoo^yށ& 6\|͇T}]\cfՙ>|]E9h(,&!l"e7~v矇xgLDiH&d/#i]~ d%.)di5ؓ'h];j ܏^yh矀*kjŦ nfn9bY\$$9襘f馜 UZS}S蕽gY鐝*무:맠VY#rfcze?d6О+QZG*tሪwF kM;T>ȂUKE3^I쇬iF,W ۫w;ܞZl(r llSm:_Ȓ:hˮ@Mqh%kB#TWmDct,P,hbf2naw0|͖!4-ـG.䔗&8шWI]oُ]騧W7^{/:=zޥϴ?s܊iw# G//˻y7Z7xsԗo#b {³3ٸ;ozqB][t(=+|K WzPr VOi[7}0Bh vkTDּ{L@ EÌ OF& H;o~>$H*b9b`Dx1Q~!f2bGX8QmofKBǼdEхḥX$5ܣtHG |L" ?Rp xA̤&7GBRn\WޏL*II-FD1R̥.w)VQs3 eEo /fė/+OnzS'OYSt$8vFȞ8搒+eԸ~󟚀'9ir\!//:U@7B`&^!-F i&*M2i`>mO\0)I ڮzJRcGӞ3xed[(PPE6V{"\*ǹ<=d'NӠcu*XuR՟eߊٱ7wůL.ݨmw[;8زrvh7<(֯=/V8v%iz $>gL&U5HH6fqv{UHN[jw̰L0v{*{J/#8:16u2պx& b4xkγ-=S^(HF;:(fX ј8V]4?5MREѤuR-CY 6gmH{zҠp2i^֙%kY)f?9Ɏl?\mLTrcr[P}e9fMoA|~m]~ k~wC|Tx| x|MV[<žG^#zؕ5Wo:Ķ4YNd0O9qkm\9_pgM35`;]HwNا[Q1^{]YϷù=aE!;prewikka-1.0.0/htdocs/images/search.png0000664000076400007640000000150311200051577017072 0ustar yoannyoannPNG  IHDRĴl; pHYs  tIME* XLIDATxڵ]HSa;;;;<әPaT]Det%EuMMBAE^(>cfn0ub{s8L+x7Bz"p[BR@+p(.G1zᓫUv;l,Љ{n Օ; ̪Bgp XLVrUSYSG ϚP%7"%Ϧ۾`/4 |Pl*X`8J`Td#L j)-c0^>x\Sb?{D]E(6a^uuٔn/ i^˻Έf˳5DC0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* * jQuery UI Draggable 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Draggables * * Depends: * ui.core.js */ (function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.leftthis.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y=p&&n<=k)||(m>=p&&m<=k)||(nk))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(ec));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidthk.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/* * jQuery UI Selectable 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Selectables * * Depends: * ui.core.js */ (function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.rightg||j.bottomd&&j.righth&&j.bottom=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)f&&(e+h)m[this.floating?"width":"height"])){return g}else{return(f0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/* * jQuery UI Accordion 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Accordion * * Depends: * ui.core.js */ (function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/* * jQuery UI Dialog 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Dialog * * Depends: * ui.core.js * ui.draggable.js * ui.resizable.js */ (function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||" ",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("

")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("
")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("
").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||" ");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("
").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e
");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("
")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('
').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(cthis._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/* * jQuery UI Tabs 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Tabs * * Depends: * ui.core.js */ (function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"
",spinner:"Loading…",tabTemplate:'
  • #{label}
  • '}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('
    '))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$(''+appendText+"");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDatenew Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)0&&iValue="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j0&&iValue-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormatmaxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?''+prevText+"":(hideIfNoPrevNext?"":''+prevText+""));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?''+nextText+"":(hideIfNoPrevNext?"":''+nextText+""));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'":"");var buttonPanel=(showButtonPanel)?'
    '+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'":"")+(isRTL?"":controls)+"
    ":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="=5?' class="ui-datepicker-week-end"':"")+'>'+dayNamesMin[day]+""}calender+=thead+"";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDatemaxDate);tbody+='";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
    =currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?''+printDate.getDate()+"":'=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+""))+"
    "+(isMultiMonth?""+((numMonths[0]>0&&col==numMonths[1]-1)?'
    ':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?" ":"")}if(secondary||!changeYear){html+=''+drawYear+""}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/* * jQuery UI Progressbar 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Progressbar * * Depends: * ui.core.js */ (function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('
    ').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/* * jQuery UI Effects 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Effects/ */ jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/* * jQuery UI Effects Fold 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Effects/Fold * * Depends: * effects.core.js */ (function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/* * jQuery UI Effects Highlight 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Effects/Highlight * * Depends: * effects.core.js */ (function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/* * jQuery UI Effects Pulsate 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Effects/Pulsate * * Depends: * effects.core.js */ (function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);;prewikka-1.0.0/htdocs/js/jquery.js0000664000076400007640000015764611340776573016206 0ustar yoannyoann/* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
    "]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
    ","
    "]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); /* * Sizzle CSS Selector Engine - v0.9.3 * Copyright 2009, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

    ";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
    ";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
    ").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
    ';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();prewikka-1.0.0/htdocs/js/functions.js0000664000076400007640000000137611341167176016655 0ustar yoannyoannvar autorefresh_possible = true; $(document).ready(function(){ var $cache = null; var $cachef = null; $.fn.popupUnique = function(animshow, animhide) { if ( this.is(':visible') ) { $cachef($cache); $cache = null; autorefresh_possible = true; } else { autorefresh_possible = false; animshow(this); if ( $cache ) $cachef($cache); $cachef = animhide; $cache = this; } return false; }; $.fn.check = function(mode){ return this.each(function() { this.checked = mode; } ); }; $(".popup_menu_toggle").click(function(){ $(this).next().popupUnique(function(data){data.show('fast')}, function(data){data.hide('fast')}); }); if ( navigator.userAgent.indexOf("Konqueror") != -1 ) $(".popup_menu").hide(); }); prewikka-1.0.0/NEWS0000664000076400007640000006033611347720164013105 0ustar yoannyoann* 2010-03-16, prewikka-1.0.0: - Fix logout link from the Statistics view. - Fix inline filtering problem for events name with start/ending space. - Fix possible inline filter null reset button. - Other, minor fixes. * 2010-02-12, prewikka-1.0.0rc3: - Make sure we always use a replacement ("n/a") when we get a nil value from the database. Fix exception since the underlying chart backend didn't support nil value (#370). - If the requested timeline range is lower or equal 1 minute, use a 1 second step. Fix an exception using the Cairoplot backend, and allow to get meaningful by minute statistics (#370). * 2010-02-10, prewikka-1.0.0rc2: - The link to the logged-in user settings, when accessed through the Statistics subpages, contained an invalid parameters which triggered an exception. - An exception could be raised in case we were generating a distribution Chart containing empty values. This close #369. - Upgrade old database fields values to fit latest Prewikka changes. Fix a possible exception in the Events listing. - Fix possible exception with username/charts name containing unicode. - Correctly handle the setup.py installation 'root' argument. * 2010-01-21, prewikka-1.0.0rc1: - OpenSource Graphical Statistics implementation: implement a set of basic statistics for Prewikka, based on the (provided) Cairoplot rendering engine. This initial implementation provides Categorizations, Sources, Targets, Analyzers, and Timeline statistics. - Only use analyzerid/messageid pair when linking to a set of correlated alerts. This fixes a problem where clicking on the link to expand the CorrelatedAlert list would bring an empty alert view, since previous filters where preserved. - The link used to expand a list of sources/target was always broken. It now point to the detailed view for CorrelationAlert, or the detailed event for alert. - Allow filtering empty value, by providing a new "Is Null" operator. - Improve non aggregated delete, by providing a precise deletion scheme. - Correctly provide the analyzer_time information. - Various bug fixes. * 2009-09-07, prewikka-0.9.17.1: - Fix possible encoding error in the message summary view (#360). * 2009-07-07, prewikka-0.9.17: - Do not provide an exhaustive list of unreachable linked alert, rather, tell the user how many linked alert are not reachable any more. - String encoding fixes, do not mix unicode and bytestring, and more generally, use unicode for internal string storage. This fixes a lot of possible exception with particular specific user input, or with localization enabled. - Inline filter didn't work as expected when viewing events starting with a specific offset, because the offset keyword wasn't removed from the generated link. - Error handling improvement (back / retry button weren't always working as expected). - Fix exception when no protocol was available. - Improve navigation button link (make the link cover the whole button). * 2009-06-30, prewikka-0.9.16: - Multiples advanced filter within the same column wouldn't display correctly. - Correctly restore input field when switching between advanced/simple filter mode. - Fix multiple bug that would results in inconsistant filtered "state" and reset button. - Using the classification simple filter now also trigger a search on impact.completion. - Fix multiple alert deletion checkbox, (#357). - Various bug fixes. * 2009-06-08, prewikka-0.9.15: - Make it obvious when a column is filtered by replacing the old sober star with a big "[filtered]" red marker. If the column filter is saved, then the marker color will go from red to black. - Once the user filtered a given field by clicking on it, deny further click so that it is clear that the filter is currently active. - Re-write the inline filter implementation using Cheetah + Jquery, in place of generating an enormous amount of javascript code. This drastically reduce the size of the events listing HTML page, and will allow for much easier modification of the inline-filters. - Only propose filter operator relevant to the selected path. - Inline filter now present a single input field (with no path and operator selection). Using this field, the user can filter on what is seen in the associated column. For example, in the classification column, the filter will trigger a search on classification.text, classification.reference.name and classification.reference.origin. There is also an [advanced] button allowing the user to specify both the path and the operator. - Implement a reset button in each inline filter column, that allow to switch between different version of the filter: last saved filters, default filters, or current filters. - The user can now click an alert completion to set an inline filter on the completion value. - Clicking on a port / protocol now trigger a CSS menu allowing to filter on the port and protocol information, or to get information concerning this port / protocol. - Clicking on a classification reference now trigger a CSS menu which allow to filter on the reference, or to get more information concerning it. - Clicking on classification now add a filter on the selected classification (previously, it would have unfolded aggregated alerts for the selected entry, which is now done clicking the alert count). - Until now, the default user that was automatically created by Prewikka if there was no administrative user was "admin". As of now you can define the initial administrative username and password from the configuration file. (fix #289). - Fix escaping for reference details URI parameters. - Fix ModPython content-type handling. - Invalid variable name, fix #339. - Update to JQuery 1.3.2, and fit small JQuery API change. - If the installed libprelude or libpreludedb version is too old, Prewikka will require the user to upgrade. Currently, Prewikka depend on libpreludedb 0.9.12, and libprelude 0.9.23. - Fix IDMEFDatabase exception on empty criteria string (fixes #346). - Analyzer retrieval fixes and speedup (fixes #350). * 2008-03-27, prewikka-0.9.14: - Let the user choose the type of sorting (default to time descending, available: time asc/desc, count asc/desc). - Implement Prewikka Asynchronous DNS resolution in alert view as well as message summary (require twisted.names and twisted.internet), see the additional dns_max_delay settings parameters in prewikka.conf. - In the alert summary view, handle portlist and ip_version service fields, and show alert messageid. - Fix exception when rendering ToolAlert. - Fix double classification escaping (could result in non working link for alert with classification containing escaped character). - Improvement to heartbeat retrieval (heartbeat view speedup). - Correct typo (fix #275), thanks Scott Olihovki for pointing this out. - Polish translation, by Konrad Kosmowski . - Update to pt_BR translation, by Edelberto Franco Silva - Various bug fixes and cleanup. * 2007-10-18, prewikka-0.9.13: - Only perform additional database request when using Sensor localtime: this bring a performance improvement of about 36% on aggregated query, when using either frontend localtime (the default), or UTC time. - JQuery support: Port most of the javascript code to make use of JQuery. Add show/hide effect to CSS popup. More filtering functionality in the SensorListing view. - Cleanup the Authentication class, so that uper Prewikka layer can act depending whether the backend support user creation / deletion. Anonymous authentication is nowa plugin. - Better integration of CGI authentication allowing user listing and deletion. - Report template exception directly to the user. - Fix exception if an alert analyzer name is empty. - Fix problem when adding new Prewikka users (#262). - Fix exception when user has no permission set. - When changing password, we didn't try to match an empty 'current password' (which is a minor issue since the user is already authenticated). Thanks to Helmut Azbest for the fix. - Fix a typo making mod_python use the parent method (patch from Helmut Azbest ). - In the configuration file, recognize section even if there are whitespace at the beginning of the line. - Localization fixes, by Sebastien Tricaud , and Bjoern Weiland. * 2007-08-02, prewikka-0.9.12.1: - Fix a template compilation problem with certain version of Cheetah (Giandomenico De Tullio ) * 2007-08-01, prewikka-0.9.12: - Implement an Auto-Refresh system (fix #231). (including code from Paul Robert Marino ). - Ability to filter on missing/offline/online/unknown agents. Make more easier to read each agent status in collapsed mode. - Fix filter load/save/delete issue with translation. - New 'My account' tabs, under the Settings section (fix #241). - New messageid and analyzerid parameters, allowing link to a Prewikka alert from an external tool (previously required a database query in order to retrieve the database event id). - Don't redirect to user listing once an user preference are recorded. Fix changing of another user language by an user with PERM_USER_MANAGEMENT. Display target user language rather than current user language. - Improve the timeline control table layout. - Fix translation of string possibly using plural. * 2007-06-11, prewikka-0.9.11.4: - Fix PostgreSQL user deletion error. * 2007-05-29, prewikka-0.9.11.3: - Fix database schema version. * 2007-05-26, prewikka-0.9.11.2: - In case a database schema upgrade is required, or the Prewikka database does not exist, make the error available from the Prewikka console, rather than exiting badly (which previously required the user to parse its web server log in order to find out the problem). * 2007-05-25, prewikka-0.9.11.1: - Fix Apache CGI authentication. (Robin Gruyters) - Fix incorrect locale switch when accessing certain pages. * 2007-05-21, prewikka-0.9.11: - Prewikka has been internationalized: user might choose the language used in their settings tabs. Additionally, you might specify a default locale using the "default_locale" configuration keyword. - Brazilian Portuguese translation, by Edelberto Franco Silva. - French translation, by Sebastien Tricaud . - German translation, by Bjoern Weiland . - Russian translation, by Valentin Bogdanov . - Spanish translation, by Carlo G. Añez M. . - New powerfull and scalable agent view, grouping agent together by Location and Node. - In the Alert/Heartbeat summary view, number analyzers backward so that it reflect the ordering in the analyzer list. - Improved support for resizing menu. - Fix a konqueror rendering bug with the inline filter. - Various bug fixes. * 2007-04-05, prewikka-0.9.10: - Don't show all source and target when they reach a predefined limit, instead provide an expansion link. - Add two new view in the Events section: CorrelationAlert and ToolAlert. - Ability to filter and aggregate on all IDMEF path. If the filtered path is an enumeration, automatically provide the list of possible value. - Add a combo box for the user to choose which criteria operator to use. - Provide an enumeration filter for the type of alert (Alert, CorrelationAlert, ToolAlert, OverflowAlert). - Prewikka can now aggregate by analyzer. - When a session expire and the user login, the user is redirected to the page he attempted to access when the session expired. - When an error occur, the default Prewikka layout is now preserved. - Correct handling of empty value for hash key generation. Fix #204. - Use new libpreludedb function that return the results as well as the number of results. This avoid using COUNT() in some places (namely, this speedup non aggregated view by ~50%). - Avoid iterating the list of database result more than needed. - Support IDMEF Action, SNMPService, and WebService class. - Improved support for small screen resolution. * 2007-02-06, prewikka-0.9.9: - Improve database performance by reducing the number of query. (Paul Robert Marino) - Activate CleanOutput filtering (lot of escaping fixes). - More action logging. - Bug fixes with the error pages Back/Retry buttons. - Fix error on group by user (#191). - Fix template compilation error with Cheetah version 2 (#184). * 2006-11-23, prewikka-0.9.8: - Save/load user configuration when using CGI authentication mode (#181). - Show Prewikka version in the About page (#177). - Use Python logging facility (available backend: stderr, file, smtp, syslog), multiple simultaneous handler supported (#113). - Fix anonymous authentication. - Fix external process going into zombie state (#178). - Fix sqlite schema (#180). - Display correct alertident for invalid CorrelationAlert analyzerid/messageid pair. - prewikka-httpd should now log the source address. - Thread safety fixes. * 2006-08-18, prewikka-0.9.7.1: - Fix filter interface bug introduced in 0.9.7. - Improved error reporting on filter creation. - Rename command configuration section to host_commands. * 2006-08-16, prewikka-0.9.7: - Use preludedb_delete_(alert|heartbeat)_from_list(). Require libpreludedb 0.9.9. Provide a deletion performance improvement of around 3000%. - Handle multiple listed source/target properly. Separate source/target in the message listing. - Make host command/Information link available from the Sensor listing. - Always take care of the "external_link_new_window" configuration parameter. - Make external command handling more generic. Allow to specify command line arguments. - Allow to define unlimited number of external commands rather than only a defined subset (fix #134). - Avoid toggling several popup at once in the HeartbeatListing. - Only provide lookup capability for known network address type (fix #76). - New address and node name lookup provided through prelude-ids.com service. - Link to new prelude-ids.com port lookup instead of broken portsdb database (fix #162). - Various bug fixes. * 2006-07-27, prewikka-0.9.6: - CGI authentication module, from Tilman Baumann . - Correct libpreludedb runtime version check. - Show multiple source/target in message listing/summary. - Fix invalid use of socket.inet_ntoa() to read ICMP Gateway Address, which is stored as string (#156). - Fix aggregation on IDMEF-Path that are not string. - Fix setup.py --root option (#166). * 2006-05-04, prewikka-0.9.5: - Fix 'Filter on Target' link (fix #148). - Fix alert summary exception with alert including file permission (fix #149). - Fix creation of an empty __init__.py file in lib/site-packages (#147). - Print currently installed version on libpreludedb requirement error. - Make sure /usr/bin/env is expanded. * 2006-04-13, prewikka-0.9.4: - Intelligent display for CorrelationAlert. Include correlated alert information in the alert listing. - Intelligent printing of Network centric information. - Fix Cheetah compilation for the heartbeat page. - Correct handling of AdditionalData containing an integer 0. - Handle ignore_atomic_event AdditionalData key (used by CorrelationAlert to hide linked-in alert). - Fix aggregation when done simultaneously on multiple fields. - Aggregation on fields other than "address" was not working well. * 2005-01-10, prewikka-0.9.3: - Distribute SQLite schema. - Fix exception in the heartbeat analysis view when the heartbeat_count or heartbeat_error_margin settings are explicitly set (#124). - Fix Cheetah 1.0 heartbeat listing exception (#119). - Open external link in new windows by default. Add a configuration option to disable opening external link in new window (#61). - Provide the ability to specify the configuration file that Prewikka use (#117). - Sanitize the limit parameter in case the input value is not correct instead of triggering an exception (#118). - Handle the preludeDB "file" setting (for use with SQLite like database). - Fix filter saving issue in the heartbeat listing. - Fix unlimited timeline option in heartbeat listing. - Various bug fixes. * 2005-12-07, prewikka-0.9.2: - Correct Analyzer path when unwiding aggregated alert. - Add an "Unlimited" timeline option. - Fix classification escaping problem that could lead to empty listing when unwiding alert with classification text containing backslash. - Don't print un-necessary separator when the protocol field is empty in the alert listing. - Improve Correlation Alert display. Allow focus both on the Correlation Alert summary and on the correlated alert listing. - Don't propagate the "save" parameter, so that the user don't end up saving settings without knowing about it. * 2005-11-30, prewikka-0.9.1: - Resolve the protocol number from the message summary view. - Separate port and protocol value, so that we don't end up linking the protocol to portdb if there is no port. - Ability to setup IDMEF filter using iana_protocol_name and iana_protocol_number. - Sanitize timeline years value on system which does not support time exceeding 2^31-1. Fix #104. - Mark CorrelationAlert explicitly in the AlertListing. - Make inline filter mark more visible. - Ability for the user to save settings for the current view. - New --address and --port option to prewikka-httpd. - Fix a bug where clicking the IP address popup would cause Firefox to go back to the top of the page. Fix #112. - Don't hardcode path to /usr/bin/python, but resort to /usr/bin/env to find it. * 2005-09-20, prewikka-0.9.0: - 0.9.0 final. - Minor rendering fix. - Handle service.iana_protocol_name / service.iana_protocol_number as well as service.protocol. * 2005-09-05, prewikka-0.9.0-rc12: - Correct Konqueror rendering. - Minor bugfix with timeline selection. - Minor UI tweak. * 2005-08-25, prewikka-0.9.0-rc11: - The Summary view now support showing CorrelationAlert. - Avoid mangling URL query string on form input. - Handle possibly null AdditionalData properly. - Don't default to 'low' severity. - Allow the user to set analyzerID inline filter. - Make sure we keep aggregation in per analyzer view. - Keep inline filter object sorted, and merge them if there are duplicate. - When the same object is specified more than once, OR both. - Various cleanup, bugfix. * 2005-08-17, prewikka-0.9.0-rc10: - Allow configuration entry without space after the ':' separator. - More operator (case insensitive operator, regex operator). - Show target file in the message listing. - Much more information in the alert summary view. Especially useful for users of integrity checker. * 2005-08-02, prewikka-0.9.0-rc9: - New experimental mod_python handler. - Use the same template for user creation as for user modification. The interface is much cleaner, and more consistant. - Fix Invalid parameters exception on 'delete all'. - Print all analyzer, whether they have an analyzerID or not. This provide more analyzer information. - Show Analyzer Node location, Classification Ident, and Process path in the MessageSummary view. - Correct SNMP/Web Service, and some other Process/File filter path. - Allow for correct '\' escaping when creating filters. - Internet Explorer rendering tweak. - Various bugfix. * 2005-06-17, prewikka-0.9.0-rc8: - Use relative path everywhere. - Some escaping fixes. - Fix Filter formula check. - Ability to filter on alert.classification.ident. - Fix aggregated classification link in expanded list entry. - Various bugfix, English typo. * 2005-06-16, prewikka-0.9.0-rc7: - Prewikka now work and render perfectly with IE 6.0. - XHTML conformance in most of the code. - Fix possible exception with filtered classification text. - Allow filtering on heartbeat.analyzer.name. * 2005-06-01, prewikka-0.9.0-rc6: - Implement alert/heartbeat select all for deletion. - Fix handling of alert without classification. - Fix HTML code problem. Try to make the W3C validator happy. Fix Javascript warnings. Correct URL escaping. Make it work better in Apple's Safari browser. - More error checking when saving custom filter. Error out in case a filter reference non existing criteria. Add the substr operator. - Fix bug in the whole alert/heartbeat navigation system, simplify and cleanup the code, always report the current filtered field 'action' to the user. - Make the mouse pointer behave like it does for javascript links on Alert listing table head. - Fix alert mixup when expanding an aggregated classification with different severity. - Fix low/mid/high/none severity filtering. - Fix a bug where agents with multiple address would disappear. - Avoid Authentication Failed message when the user didn't try to authenticate (the session does not exist). - UI tweak for the detailed alert/heartbeat view. - Link source and destination port to portdb. - Add an heartbeat_error_margin configuration keyword. - Saving modification to an existing filter now work. - Make prewikka.cgi catch exceptions that are raised during the prewikka initialization step and display an error screen to the user instead of a server internal error. - Don't display message checkbox and delete button if the user don't have the PERM_IDMEF_ALTER permission - Fix module importation on MacOSX. - Various bugfix. * 2005-04-17, prewikka-0.9.0-rc5: - Fix classification filters in the alert listing. - Let the user provide the path to external command (whois, traceroute). - Fix prewikka exception on 'info' severity. - Fix broken installation permission. - Fix bad template variable initialization resulting in an exception with Cheetah 0.9.16. - Fix alert deletion in un-agreggated mode. - Fix GMT offset calculation. - Fix a problem when appending more filters in the alert list view. - Update Auth cookie expiration time. - Fix escaping issue. * 2005-04-05, prewikka-0.9.0-rc4: - Minor UI tweak. - Fix a problem when changing password. - Remove trailling space from config entry. - Display all analyzer address in agent listing. - Fix some bug in the authentication system, that would refuse login for no appearent reasons. - Set default session expiration time to 60 minutes. * 2005-03-31, prewikka-0.9.0-rc3: - Installation cleanup / bugfix. - Fix database authentication failure. - Fix error page. * 2005-03-31, prewikka-0.9.0-rc2 - Fix a loading problem when the database is not created. * 2005-03-29, prewikka-0.9.0-rc1: - Initial release prewikka-1.0.0/prewikka/0000775000076400007640000000000011347720623014213 5ustar yoannyoannprewikka-1.0.0/prewikka/MyConfigParser.py0000664000076400007640000001017311340777332017461 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import re from prewikka import utils class Error(Exception): pass class ParseError(Error): def __init__(self, filename, lineno, line): self.filename = filename self.lineno = lineno self.line = line def __str__(self): return "parse error in \"%s\" at %s line %d" % (self.line.rstrip(), self.filename, self.lineno) class ConfigParserSection(utils.OrderedDict): def __init__(self, name): utils.OrderedDict.__init__(self) self.name = name def __nonzero__(self): return True def getOption(self, name): return self[name] def getOptionValue(self, key, value=None): try: return self[key].value except KeyError: return value def getOptions(self): return self.values() class ConfigParserOption: def __init__(self, name, value, lineno, line): self.name = utils.toUnicode(name) self.value = utils.toUnicode(value) self.lineno = lineno self.line = line class MyConfigParser: """ A config parser class ala ConfigParser.ConfigParser (only read operations are (will be) supported). ConfigParser.ConfigParser did not feed all our needs: - we need the '= value' part of option to be optionnal - we need to support special characters (like ':') in option name (for urls) - we need to keep the right order of options in sections (this is done via the OrderedDict class that subclass dict) """ EMPTY_LINE_REGEXP = re.compile("^\s*(\#.*)?$") SECTION_REGEXP = re.compile("^\s*\[(?P.+)]") OPTION_REGEXP = re.compile("^\s*(?P[\s]*[^:]+)(\:\s*(?P.+))?$") def __init__(self, filename): self.filename = filename self._sections = utils.OrderedDict() self._root_section = utils.OrderedDict() self._current_section = self._root_section def load(self): lineno = 0 for line in open(self.filename).readlines(): lineno += 1 result = self.EMPTY_LINE_REGEXP.match(line) if result: continue else: result = self.SECTION_REGEXP.match(line) if result: name = result.group("name") name = name.strip() self._current_section = self._sections[name] = ConfigParserSection(name) else: result = self.OPTION_REGEXP.match(line) if result: name, value = result.group("name", "value") name = name.strip() if value: value = value.strip() self._current_section[name] = ConfigParserOption(name, value, lineno, line) else: raise ParseError(file.name, lineno, line) def getSection(self, name): return self._sections[name] def getSections(self): return self._sections.values() def __str__(self): content = "" for section in self.getSections(): content += "[%s]\n" % section.name for option in section.getOptions(): content += "%s: %s\n" % (option.name, option.value) content += "\n" return content prewikka-1.0.0/prewikka/Request.py0000664000076400007640000000576111200051577016217 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import sys import os, os.path, time import copy import Cookie class Request: def init(self): # all of this should be done in constructor __init__, but the way # BaseHTTPServer.BaseHTTPRequestHandler is designed forbid us to do so self.arguments = { } self.input_headers = { } self.output_headers = [ ("Content-type", "text/html"), ("Last-Modified", time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime())), ("Expires", "Fri, 01 Jan 1999 00:00:00 GMT"), ("Cache-control", "no-store, no-cache, must-revalidate"), ("Cache-control", "post-check=0, pre-check=0"), ("Pragma", "no-cache") ] cookie = Cookie.SimpleCookie(self.getCookieString()) self.input_cookie = { } for key, value in cookie.items(): self.input_cookie[key] = value self.output_cookie = None self.content = None self.user = None def addCookie(self, param, value, expires): if not self.output_cookie: self.output_cookie = Cookie.SimpleCookie() self.output_cookie[param] = value self.output_cookie[param]["expires"] = expires def read(self, *args): pass def write(self, data): pass def sendHeader(self, name, value): self.write("%s: %s\r\n" % (name, value)) def endHeaders(self): self.write("\r\n") def sendResponse(self): for name, value in self.output_headers: self.sendHeader(name, value) if self.output_cookie: self.write(self.output_cookie.output() + "\r\n") self.endHeaders() if self.content: self.write(self.content) def getView(self): return self.arguments.get("view", "alert_listing") def getQueryString(self): pass def getRemoteUser(self): pass def getClientAddr(self): pass def getClientPort(self): pass def getServerAddr(self): pass def getServerPort(self): pass def getUserAgent(self): pass def getMethod(self): pass def getURI(self): pass prewikka-1.0.0/prewikka/User.py0000664000076400007640000000725211340777332015513 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import Error, Log, localization PERM_IDMEF_VIEW = "IDMEF_VIEW" PERM_IDMEF_ALTER = "IDMEF_ALTER" PERM_USER_MANAGEMENT = "USER_MANAGEMENT" PERM_COMMAND = "COMMAND" PERM_INTRUSIVE_COMMAND = "INTRUSIVE_COMMAND" ALL_PERMISSIONS = [ PERM_IDMEF_VIEW, PERM_IDMEF_ALTER, PERM_USER_MANAGEMENT, PERM_COMMAND, PERM_INTRUSIVE_COMMAND ] ADMIN_LOGIN = "admin" class PermissionDeniedError(Error.PrewikkaUserError): def __init__(self, action_name): Error.PrewikkaUserError.__init__(self, _("Permission Denied"), _("Access to view '%s' forbidden") % action_name, log=Log.WARNING) class User: def __init__(self, db, login, language, permissions, configuration): self._db = db self.login = login self.permissions = permissions self.configuration = configuration self.setLanguage(language) def setLanguage(self, lang): self.language = lang localization.setLocale(lang) def delConfigValue(self, view, key=None): login = self._db.escape(self.login) if key != None: qstr = " AND name = %s" % (self._db.escape(key)) else: qstr = "" self._db.query("DELETE FROM Prewikka_User_Configuration WHERE view = %s AND login = %s%s" % (self._db.escape(view), login, qstr)) try: self.configuration[view].pop(key) except KeyError: pass def delConfigValueMatch(self, view, key): login = self._db.escape(self.login) for k in self.configuration[view].keys(): if k.find(key) != -1: self.delConfigValue(view, k) def getConfigValue(self, view, key): return self.configuration[view][key] def setConfigValue(self, view, key, value): k = self._db.escape(key) v = self._db.escape(view) login = self._db.escape(self.login) self._db.query("DELETE FROM Prewikka_User_Configuration WHERE view = %s AND login = %s AND name = %s" % (v, login, k)) if not type(value) is list: self._db.query("INSERT INTO Prewikka_User_Configuration (view, login, name, value) VALUES (%s,%s,%s,%s)" % (v, login, k, self._db.escape(unicode(value)))) else: for val in value: self._db.query("INSERT INTO Prewikka_User_Configuration (view, login, name, value) VALUES (%s, %s,%s,%s)" % (v, login, k, self._db.escape(val))) if not self.configuration.has_key(view): self.configuration[view] = { } self.configuration[view][key] = value def has(self, perm): if type(perm) in (list, tuple): return filter(lambda p: self.has(p), perm) == perm return perm in self.permissions prewikka-1.0.0/prewikka/utils.py0000664000076400007640000001247511340777332015740 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import time, calendar import struct import urllib import re from prewikka import DataSet from prewikka.templates import ErrorTemplate port_dict = {} read_done = False def _load_protocol(): global port_dict global read_done if read_done: return port_dict read_done = True sreg = re.compile("^\s*(?P[^#]\w+)\s*(?P\d+)\s*(?P\w+)") try: fd = open("/etc/protocols", "r") except IOError: return port_dict for line in fd.readlines(): ret = sreg.match(line) if not ret: continue name, number, alias = ret.group("name", "number", "alias") port_dict[int(number)] = (name, alias) return port_dict def protocol_number_to_name(num): port_dict = _load_protocol() if port_dict.has_key(num): return port_dict[num][0] return None def escape_attribute(value): # Escape '\' since it's a valid js escape. return value.replace("\\", "\\\\").replace("\"", "\\\"").replace("/", "\\/") def escape_criteria(criteria): return criteria.replace("\\", "\\\\").replace("'", "\\'") def time_to_hms(t): return time.strftime("%H:%M:%S", t) def time_to_ymdhms(t): return time.strftime("%Y-%m-%d %H:%M:%S", t) def get_gmt_offset(): utc = int(time.time()) tm = time.localtime(utc) local = calendar.timegm(tm) offset = local - utc return (offset / 3600, offset % 3600 / 60) def urlencode(parameters, doseq=False): return urllib.urlencode(parameters, doseq).replace('&', '&') def create_link(action_name, parameters=None): link = "?view=%s" % action_name if parameters: for k in parameters.keys(): if isinstance(parameters[k], unicode): parameters[k] = parameters[k].encode("utf8") link += "&%s" % urllib.urlencode(parameters, doseq=True) return link def property(type, name, parameter, value=None): return { "type": type, "name": name, "parameter": parameter, "value": value } def text_property(name, parameter, value=None): return property("text", name, parameter, value) def password_property(name, parameter): return property("password", name, parameter) def boolean_property(name, parameter, value=False): return property("checkbox", name, parameter, value) def escape_html_string(s): if not isinstance(s, str) and not isinstance(s, unicode): s = toUnicode(s) s = s.replace("&", "&") s = s.replace("<", "<") s = s.replace(">", ">") s = s.replace("\"", """) s = s.replace("'", "'") return s def hexdump(content): decoded = struct.unpack("B" * len(content), content) content = "" i = 0 while i < len(decoded): chunk = decoded[i:i+16] content += "%.4x: " % i content += " ".join(map(lambda b: "%02x" % b, chunk)) content += " " * (16 - len(chunk)) content += " " for b in chunk: if b >= 32 and b < 127: content += chr(b) else: content += "." content += "\n" i += 16 return content def isUTF8(text): try: text = unicode(text, 'UTF-8', 'strict') return True except UnicodeDecodeError: return False def toUnicode(text): r""" >>> toUnicode('ascii') u'ascii' >>> toUnicode(u'utf\xe9'.encode('UTF-8')) u'utf\xe9' >>> toUnicode(u'unicode') u'unicode' """ if isinstance(text, dict): for k in text.keys(): text[k] = toUnicode(text[k]) return text elif isinstance(text, list): return [ toUnicode(i) for i in text ] if isinstance(text, unicode): return text if not isinstance(text, str): text = str(text) try: return unicode(text, "utf8") except UnicodeError: pass return unicode(text, "ISO-8859-1") class OrderedDict(dict): def __init__(self, *args, **kwargs): dict.__init__(self, *args, **kwargs) self._order = dict.keys(self) def __setitem__(self, key, value): dict.__setitem__(self, key, value) if key in self._order: self._order.remove(key) self._order.append(key) def __delitem__(self, key): dict.__delitem__(self, key) self._order.remove(key) def keys(self): return self._order[:] def items(self): return [(key,self[key]) for key in self._order] def values(self): return [ self[key] for key in self._order] prewikka-1.0.0/prewikka/Auth.py0000664000076400007640000001060411340777332015471 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import time import md5 import random from prewikka.Error import PrewikkaError, PrewikkaUserError from prewikka import DataSet, Database, Log, User, utils class AuthError(PrewikkaUserError): def __init__(self, arguments={}, message=_("Authentication failed"), log=Log.ERROR, log_user=None): PrewikkaUserError.__init__(self, None, message, log=log, log_user=log_user) self.template = "LoginPasswordForm" class AuthSessionInvalid(AuthError): def __init__(self, arguments={}, message=_("Invalid session"), login=None, log=None): AuthError.__init__(self, arguments, message, log=log, log_user=login) class AuthSessionExpired(AuthError): def __init__(self, login, arguments={}, message=_("Session expired")): AuthError.__init__(self, arguments, message, log=Log.ERROR, log_user=login) class Session: def __init__(self, expiration): self._expiration = expiration def setSession(self, request, sessionid): request.addCookie("sessionid", sessionid, self._expiration * 3) def checkSession(self, request): if not request.input_cookie.has_key("sessionid"): raise AuthSessionInvalid() sessionid = request.input_cookie["sessionid"].value try: login, t = self.db.getSession(sessionid) except Database.DatabaseInvalidSessionError: raise AuthSessionInvalid(log=Log.ERROR) now = int(time.time()) if now - t > self._expiration: self.db.deleteSession(sessionid) raise AuthSessionExpired(login) self.db.updateSession(sessionid, now) self.setSession(request, sessionid) return login def createSession(self, request, login): t = int(time.time()) self.db.deleteExpiredSessions(t - self._expiration) sessionid = md5.new(str(t * random.random())).hexdigest() self.db.createSession(sessionid, login, t) self.setSession(request, sessionid) def deleteSession(self, request): self.db.deleteSession(request.input_cookie["sessionid"].value) class Auth: def __init__(self, env): self.db = env.db self.log = env.log def canCreateUser(self): return hasattr(self, "createUser") def canDeleteUser(self): return hasattr(self, "deleteUser") def canSetPassword(self): return hasattr(self, "setPassword") def canLogout(self): return hasattr(self, "logout") def getUserLogins(self): return self.db.getUserLogins() def getUser(self, request): pass class LoginPasswordAuth(Auth, Session): def __init__(self, env, session_expiration): Auth.__init__(self, env) Session.__init__(self, session_expiration) def getUser(self, request): login = request.arguments.get("_login", None) if not login: login = utils.toUnicode(self.checkSession(request)) else: del request.arguments["_login"] password = utils.toUnicode(request.arguments.get("_password", "")) try: del request.arguments["_password"] except KeyError: pass login = utils.toUnicode(login) self.checkPassword(login, password) self.createSession(request, login) self.log.info("User login", request, login) return self.db.getUser(login) def logout(self, request): login = self.checkSession(request) self.deleteSession(request) raise AuthSessionInvalid(message=_("Logged out"), login=login, log=Log.INFO) prewikka-1.0.0/prewikka/ModPythonHandler.py0000664000076400007640000000467311340776573020026 0ustar yoannyoann# Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. # Author: Yoann Vandoorselaere # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import Core, Request, localization from mod_python import apache, util, Cookie class ModPythonRequest(Request.Request): def init(self, req): self._req = req Request.Request.init(self) fs = util.FieldStorage(req) for key in fs.keys(): self.arguments[key] = fs[key] def write(self, data): self._req.write(data) def sendHeader(self, name, value): self._req.headers_out[name] = value def endHeaders(self): if self._req.headers_out.has_key("Content-type"): self._req.content_type = self._req.headers_out["Content-type"] self._req.send_http_header() def addCookie(self, param, value, expires): c = Cookie.Cookie(param, value) Cookie.add_cookie(self._req, c, expires) def getRemoteUser(self): self._req.get_basic_auth_pw() user = self._req.user if user: user.strip() return user def getQueryString(self): return self._req.unparsed_uri def getCookieString(self): return self._req.headers_in.get('cookie', '') def getReferer(self): return self._req.headers_in.get('Referer', '') def getClientAddr(self): return self._req.get_remote_host(apache.REMOTE_NOLOOKUP) def handler(req): options = req.get_options() request = ModPythonRequest() if "PrewikkaConfig" in options: config = options["PrewikkaConfig"] else: config = None core = Core.get_core_from_config(config, threaded=True) request.init(req) core.process(request) return apache.OK prewikka-1.0.0/prewikka/Chart.py0000664000076400007640000002677511340777332015651 0ustar yoannyoann# Copyright (C) 2005-2009 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # Author: Yoann Vandoorselaere # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import stat import time import base64 import urllib import os, os.path import glob, tempfile from prewikka import utils, siteconfig, cairoplot from preludedb import PreludeDBError from xml.dom.minidom import parse, parseString RED_STD = "c1292e" ORANGE_STD = "F29324" YELLOW_STD = "f8e930" GREEN_STD = "7ab41d" BLUE_STD = "528fc8" COLOR_MAP = "528fc8", "7ab41d", "f8e930", "F29324", "c1292e", "874b94", "212483", \ "487118", "ea752c", "8C0A14", "5F3269", "196d38" def userToHex(user): if not user: return "" hval = "" for i in user: hval += hex(ord(i)).replace("0x", "") return hval class ChartCommon: def __init__(self, user, width=800, height=450): self._user = user self._filename = None self._values = [ ] self._labels = [ ] self._has_title = False self._support_link = False self._width = width self._height = height self._color_map = COLOR_MAP self._names_map = {} self._color_map_idx = 0 def hex2rgb(self, color): r = int(color[0:2], 16) g = int(color[2:4], 16) b = int(color[4:6], 16) return (r/255.0, g/255.0, b/255.0) def getWidth(self): return self._width def getHeight(self): return self._height def _colorMap2str(self): if type(self._color_map) not in (list, tuple): return None str = "" for color in self._color_map: if len(str): str += "," str += color return str def getItemColor(self, str): if isinstance(self._color_map, dict): return self._color_map[str] color = self._color_map[self._color_map_idx % len(self._color_map)] self._color_map_idx += 1 return color def setColorMap(self, plist): self._color_map = plist def getFilename(self): return self._filename def getHref(self): return self._href def setTitle(self, title): self.addTitle(title, "", 14) self._has_title = True def setValues(self, values): self._values = values def setLabels(self, labels): self._labels = labels def addLabelValuePair(self, label, value, link=None): self._labels.append(label) if self._support_link: self._values.append((value, utils.escape_html_string(link))) else: self._values.append(value) def _remove_old_chart_files(self, pathname, expire): directory = pathname + "_*" files = glob.glob(directory) used = None prev = None for f in files: mtime = os.stat(f)[stat.ST_MTIME] now = time.time() if not expire or (now - mtime) > (2 * expire): os.remove(f) def _getFilename(self, name, expire = None, uid=None, gid=None, suffix=".png"): old_mask = os.umask(0) basename = base64.urlsafe_b64encode(name.encode("utf-8")) pathname = os.path.join(siteconfig.htdocs_dir, "generated_images") user = base64.urlsafe_b64encode(self._user.login.encode("utf-8")) pathname = os.path.normpath(os.path.join(pathname, user)) try: os.mkdir(pathname, 0755) except: pass if uid != None and gid != None: os.lchown(pathname, uid, gid) self._remove_old_chart_files(os.path.join(pathname, basename), expire) fd, self._filename = tempfile.mkstemp(prefix = basename + "_", suffix = suffix, dir = pathname) if uid != None and gid != None: os.lchown(self._filename, uid, gid) os.chmod(self._filename, 0644) self._href = urllib.quote("prewikka/generated_images/%s" % (user or "") + "/" + os.path.basename(self._filename)) os.umask(old_mask) return self._filename class TimelineChartCommon(ChartCommon): def getType(self): return "None" def __init__(self, user, width, height): ChartCommon.__init__(self, user, width, height) self._got_value = False self._color_map_idx = 0 self._assigned_colors = {} self._multiple_values = False self._total = [] def enableMultipleValues(self, names_and_colors={}): self._multiple_values = True self._names_and_colors = names_and_colors self._values = utils.OrderedDict() for name in self._names_and_colors.keys(): self._values[name] = [] def getItemColor(self, name): if not self._multiple_values: return ChartCommon.getItemColor(self, name) if self._names_and_colors.has_key(name): return self._names_and_colors[name] if self._assigned_colors.has_key(name): return self._assigned_colors[name] color = self._assigned_colors[name] = ChartCommon.getItemColor(self, name) return color def _itemFromValue(self, value): if isinstance(value, tuple): return value return value, None if self._support_link: return value[0], utils.escape_html_string(value[1]) else: return value[0] def addLabelValuesPair(self, label, values, total_link): empty = True for i in values.values(): if i != 0: empty = False break if not self._got_value and empty: # do not add 0 only values at the beginning of the chart return if self._support_link and total_link: total_link = utils.escape_html_string(total_link) self._labels.append(label) clen = 0 if self._values: clen = len(self._values.values()[0]) total = 0 for name in values.keys(): if not self._values.has_key(name): if clen > 0: self._values[name] = [(0, None) for i in range(0, clen)] else: self._values[name] = [] value = self._itemFromValue(values[name]) self._values[name].append(value) total += value[0] self._total.append((total, total_link)) for name in self._values.keys(): if not values.has_key(name): self._values[name].append(self._itemFromValue(0)) self._got_value = True def addLabelValuePair(self, label, values, link=None): if self._multiple_values or isinstance(values, dict): if not isinstance(self._values, dict): self._values = utils.OrderedDict() self.addLabelValuesPair(label, values, link) else: ChartCommon.addLabelValuePair(self, label, values, link) class CairoDistributionChart(ChartCommon): def getType(self): return "None" def render(self, name, expire=None, suffix=".png", uid=None, gid=None): fname = self._getFilename(name, expire, uid, gid); color = [] data = utils.OrderedDict() total = 0 lv = zip(self._labels, self._values) lv.sort(lambda x, y: int(x[1] - y[1])) for l, v in lv: total += v if total: share = 100.0 / total for l, v in lv: l = str(l) data["%s (%d, %.2f%%)" % (l, v, share * v)] = v color.append(self.hex2rgb(self.getItemColor(l))) cairoplot.pie_plot(fname, data, self._width, self._height, gradient = True, shadow = True, colors=color) class CairoTimelineChart(TimelineChartCommon): def render(self, name, expire=None, suffix=".png", uid=None, gid=None): fname = self._getFilename(name, expire, uid, gid); colors = [] values = utils.OrderedDict() for name in self._values.keys(): nname = name[0:min(len(name), 25)] if not values.has_key(nname): values[nname] = [] for item in self._values[name]: values[nname].append(item[0]) colors.append(self.hex2rgb(self.getItemColor(name))) cairoplot.dot_line_plot(fname, values, self._width, self._height, border=0, axis=True, grid=True, x_labels = self._labels, series_legend=True, series_colors=colors) class CairoStackedTimelineChart(TimelineChartCommon): def render(self, name, expire=None, suffix=".png", uid=None, gid=None): fname = self._getFilename(name, expire, uid, gid); colors = [] legend = [] labels = [] data = [] minval = 0 maxval = 0 values_items = self._values.items() for i in xrange(0, len(self._labels)): l = [] total = 0 for name, values in values_items: l.append(values[i]) total += values[i] minval = min(minval, total) maxval = max(maxval, total) data.append(l) l = minval increment = maxval / 20.0 for i in xrange(0, 20+1): labels.append("%.1f" % l) l += increment idx = 0 for name, color in self._names_and_colors.values(): if self._values.has_key(name): if color: colors.append(self.hex2rgb(color)) else: colors.append(self.hex2rgb(COLOR_MAP[idx % len(COLOR_MAP)])) idx += 1 legend.append(name) cairoplot.vertical_bar_plot(fname, data, self._width, self._height, border=0, series_labels=legend, display_values=True, grid=True, rounded_corners=False, stack=True, three_dimension=False, y_labels=labels, x_labels = self._labels, colors=colors) class CairoWorldChart(CairoDistributionChart): def needCountryCode(self): return False class TimelineChart(object): def __new__(cls, user, width, height): o = CairoTimelineChart(user, width, height) o.isFlash = False return o class StackedTimelineChart(object): def __new__(cls, user, width, height): o = CairoStackedTimelineChart(user, width, height) o.isFlash = False return o class WorldChart(object): def __new__(cls, user, width, height): o = CairoWorldChart(user, width, height) o.isFlash = False return o class DistributionChart(object): def __new__(cls, user, width, height): o = CairoDistributionChart(user, width, height) o.isFlash = True return o prewikka-1.0.0/prewikka/IDMEFDatabase.py0000664000076400007640000004143511340777332017047 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import time, types from prelude import * from preludedb import * from prewikka.utils import escape_html_string, time_to_ymdhms, toUnicode def escape_value(value): if type(value) is str: return escape_html_string(value) return value class IDMEFTime(object): def __init__(self, res): self._res = res def __del__(self): idmef_time_destroy(self._res) def __str__(self): return idmef_time_to_string(self._res) def __int__(self): return idmef_time_get_sec(self._res) def __float__(self): return float(idmef_time_get_sec(self._res)) + float(idmef_time_get_usec(self._res)) / 10 ** 6 def toYMDHMS(self): return time_to_ymdhms(time.localtime(idmef_time_get_sec(self._res))) def __getattribute__(self, name): if name is "sec": return idmef_time_get_sec(self._res) if name is "usec": return idmef_time_get_usec(self._res) if name is "gmt_offset": return idmef_time_get_gmt_offset(self._res) return object.__getattribute__(self, name) def convert_idmef_value(value): def get_time(value): time = idmef_value_get_time(value) if not time: return None return IDMEFTime(idmef_time_clone(time)) def get_enum(value): return idmef_class_enum_to_string(idmef_value_get_class(value), idmef_value_get_enum(value)) try: ret = { IDMEF_VALUE_TYPE_INT8: idmef_value_get_int8, IDMEF_VALUE_TYPE_UINT8: idmef_value_get_uint8, IDMEF_VALUE_TYPE_INT16: idmef_value_get_int16, IDMEF_VALUE_TYPE_UINT16: idmef_value_get_uint16, IDMEF_VALUE_TYPE_INT32: idmef_value_get_int32, IDMEF_VALUE_TYPE_UINT32: idmef_value_get_uint32, IDMEF_VALUE_TYPE_INT64: idmef_value_get_int64, IDMEF_VALUE_TYPE_UINT64: idmef_value_get_uint64, IDMEF_VALUE_TYPE_FLOAT: idmef_value_get_float, IDMEF_VALUE_TYPE_DOUBLE: idmef_value_get_double, IDMEF_VALUE_TYPE_STRING: idmef_value_get_string, IDMEF_VALUE_TYPE_DATA: idmef_value_get_data, IDMEF_VALUE_TYPE_CLASS: idmef_value_get_object, IDMEF_VALUE_TYPE_ENUM: get_enum, IDMEF_VALUE_TYPE_TIME: get_time }[idmef_value_get_type(value)](value) except KeyError: return None if idmef_value_get_type(value) == IDMEF_VALUE_TYPE_STRING and isinstance(ret, str): ret = toUnicode(ret) return ret class Message: def __init__(self, res, htmlsafe): self._res = res self._value_list = None self._htmlsafe = htmlsafe def __del__(self): idmef_message_destroy(self._res) if self._value_list: idmef_value_destroy(self._value_list) def __iter__(self): if not self._value_list: raise TypeError, "iteration over a non-sequence" self._list_iterator = 0 return self def __len__(self): if self._value_list: return idmef_value_get_count(self._value_list) return 1 def next(self): next = idmef_value_get_nth(self._value_list, self._list_iterate) if not next: raise StopIteration value = self._convert_value(next, self._root + "(%d)" % self._list_iterate) self._list_iterate += 1 return value def _convert_value(self, idmef_value, key): if idmef_value_get_type(idmef_value) == IDMEF_VALUE_TYPE_LIST: value = Message(idmef_message_ref(self._res), self._htmlsafe) value._root = key value._list_iterate = 0 value._value_list = idmef_value if self._value_list: idmef_value_ref(idmef_value) elif idmef_value_get_type(idmef_value) != IDMEF_VALUE_TYPE_CLASS: value = convert_idmef_value(idmef_value) if not self._value_list: idmef_value_destroy(idmef_value) else: if not self._value_list: idmef_value_destroy(idmef_value) value = Message(idmef_message_ref(self._res), self._htmlsafe) value._root = key return value def _get_raw_value(self, key): path = idmef_path_new_fast(key.encode("utf8")) idmef_value = idmef_path_get(path, self._res) if idmef_value: ret = self._convert_value(idmef_value, key) else: if idmef_path_is_ambiguous(path): ret = [] else: ret = None idmef_path_destroy(path) return ret def __getitem__(self, key): if key.find("%s." % self._root) != 0: key = "%s." % self._root + key if self._htmlsafe: return escape_value(self._get_raw_value(key)) else: return self._get_raw_value(key) def match(self, criteria): if type(criteria) is list: criteria = " && ".join(criteria) criteria = idmef_criteria_new_from_string(criteria.encode("utf8")) ret = idmef_criteria_match(criteria, self._res) idmef_criteria_destroy(criteria) return ret def get(self, key, default=None, htmlsafe=None): if htmlsafe != None: htmlsafe_bkp = self._htmlsafe self._htmlsafe = htmlsafe val = self[key] if val == None: val = default if htmlsafe != None: self._htmlsafe = htmlsafe_bkp return val def getAdditionalData(self, searched, many_values=False): values = [ ] i = 0 while True: meaning = self["%s.additional_data(%d).meaning" % (self._root, i)] if meaning is None: break if meaning == searched: value = self["%s.additional_data(%d).data" % (self._root, i)] if not many_values: return value values.append(value) i += 1 if many_values: return values return None def getMessageID(self): return self["%s.messageid" % self._root] def getAnalyzerID(self): return self["%s.analyzer.analyzerid" % self._root] class Alert(Message): _root = "alert" class Heartbeat(Message): _root = "heartbeat" class DbResult: def __init__(self, results): self._rows = [ ] self._has_cache = False self._res, self._len = results def __iter__(self): if self._has_cache: return iter(self._rows) else: return self def __len__(self): return self._len def __del__(self): if self._res: self._db_delete(self._res) def __getitem__(self, key): if isinstance(key, types.SliceType): start, stop, step = key.start, key.stop, key.step index = start + stop else: index = key if not self._has_cache: for r in self: if len(self._rows) >= index: break return self._rows[key] def next(self): if self._res == None: raise StopIteration values = self._db_get_next() if values is None: self._has_cache = True self._db_delete(self._res) self._res = None raise StopIteration row = self._db_convert_row(values) self._rows.append(row) return row class DbResultValues(DbResult): def __init__(self, selection, results): self._selection = selection DbResult.__init__(self, results) def _db_get_next(self): return preludedb_result_values_get_next(self._res) def _db_delete(self, result): if self._selection: preludedb_path_selection_destroy(self._selection) if result: preludedb_result_values_destroy(result) def _db_convert_row(self, values): row = [] for value in values: if value is None: row.append(None) else: row.append(convert_idmef_value(value)) idmef_value_destroy(value) return row class DbResultIdents(DbResult): def _db_get_next(self): return preludedb_result_idents_get_next(self._res) def _db_delete(self, result): if result: preludedb_result_idents_destroy(result) def _db_convert_row(self, value): return value class IDMEFDatabase: _db_destroy = preludedb_destroy _db = None def __init__(self, config): settings = preludedb_sql_settings_new() for param in "file", "host", "port", "name", "user", "pass": value = config.getOptionValue(param) if value: preludedb_sql_settings_set(settings, param, value.encode("utf8")) sql = preludedb_sql_new(config.getOptionValue("type", "mysql").encode("utf8"), settings) if config.getOptionValue("log"): preludedb_sql_enable_query_logging(sql, config.getOptionValue("log").encode("utf8")) cur = ver = None wanted_version = "0.9.12" try: cur = preludedb_check_version(None) ver = preludedb_check_version(wanted_version) if not ver: raise except: if cur: raise "libpreludedb %s or higher is required (%s found)." % (wanted_version, cur) else: raise "libpreludedb %s or higher is required." % wanted_version self._db = preludedb_new(sql, None) def __del__(self): if self._db: self._db_destroy(self._db) def _getMessageIdents(self, get_message_idents, criteria, limit, offset, order_by): if len(criteria) == 0: criteria = None if type(criteria) is list: criteria = " && ".join(criteria) if criteria: criteria = idmef_criteria_new_from_string(criteria.encode("utf8")) idents = [ ] if order_by == "time_asc": order_by = PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_ASC else: order_by = PRELUDEDB_RESULT_IDENTS_ORDER_BY_CREATE_TIME_DESC try: result = get_message_idents(self._db, criteria, limit, offset, order_by) except: self._freeDbParams(criteria=criteria) raise if criteria: idmef_criteria_destroy(criteria) if not result: return [ ] return DbResultIdents(result) def getAlertIdents(self, criteria=None, limit=-1, offset=-1, order_by="time_desc"): return self._getMessageIdents(preludedb_get_alert_idents2, criteria, limit, offset, order_by) def getHeartbeatIdents(self, criteria=None, limit=-1, offset=-1, order_by="time_desc"): return self._getMessageIdents(preludedb_get_heartbeat_idents2, criteria, limit, offset, order_by) def _getLastMessageIdent(self, type, get_message_idents, analyzerid): criteria = None if analyzerid is not False: if analyzerid is None: criteria = "! %s.analyzer(-1).analyzerid" % (type) else: criteria = "%s.analyzer(-1).analyzerid == '%s'" % (type, unicode(analyzerid)) idents = get_message_idents(criteria, limit=1) return idents[0] def getLastAlertIdent(self, analyzer=False): return self._getLastMessageIdent("alert", self.getAlertIdents, analyzer) def getLastHeartbeatIdent(self, analyzer=False): return self._getLastMessageIdent("heartbeat", self.getHeartbeatIdents, analyzer) def getAlert(self, ident, htmlsafe=False): return Alert(preludedb_get_alert(self._db, ident), htmlsafe) def deleteAlert(self, identlst): # we need to cast the value to list since we might get # a DbResultIdent() class as input. preludedb_transaction_start(self._db) preludedb_delete_alert_from_list(self._db, list(identlst)) preludedb_transaction_end(self._db) def getHeartbeat(self, ident, htmlsafe=False): return Heartbeat(preludedb_get_heartbeat(self._db, ident), htmlsafe) def deleteHeartbeat(self, identlst): # we need to cast the value to list since we might get # a DbResultIdent() class as input. preludedb_transaction_start(self._db) preludedb_delete_heartbeat_from_list(self._db, list(identlst)) preludedb_transaction_end(self._db) def _freeDbParams(self, selection=None, criteria=None): if selection: preludedb_path_selection_destroy(selection) if criteria: idmef_criteria_destroy(criteria) def getValues(self, selection, criteria=None, distinct=0, limit=-1, offset=-1): if type(criteria) is list: if len(criteria) == 0: criteria = None else: criteria = " && ".join([ "(" + c + ")" for c in criteria ]) if criteria: criteria = idmef_criteria_new_from_string(criteria.encode("utf8")) my_selection = preludedb_path_selection_new() for selected in selection: my_selected = preludedb_selected_path_new_string(selected.encode("utf8")) preludedb_path_selection_add(my_selection, my_selected) try: result = preludedb_get_values2(self._db, my_selection, criteria, distinct, limit, offset) except: self._freeDbParams(my_selection, criteria) raise if criteria: idmef_criteria_destroy(criteria) if not result: preludedb_path_selection_destroy(my_selection) return [ ] return DbResultValues(my_selection, result) def _countMessages(self, root, criteria): return self.getValues(["count(%s.create_time)" % root], criteria)[0][0] def countAlerts(self, criteria=None): return self._countMessages("alert", criteria) def countHeartbeats(self, criteria=None): return self._countMessages("heartbeat", criteria) def getAnalyzerids(self): analyzerids = [ ] rows = self.getValues([ "heartbeat.analyzer(-1).analyzerid/group_by" ]) for row in rows: analyzerid = row[0] analyzerids.append(analyzerid) return analyzerids def getAnalyzerPaths(self, criteria=None): analyzer_paths = [ ] for analyzerid in self.getAnalyzerids(): ident = self.getLastHeartbeatIdent(analyzerid) heartbeat = self.getHeartbeat(ident) if criteria and not heartbeat.match(criteria): continue path = [ ] index = 0 while True: analyzerid = heartbeat["heartbeat.analyzer(%d).analyzerid" % index] if not analyzerid: break path.append(analyzerid) index += 1 analyzer_paths.append(path) return analyzer_paths def getAnalyzer(self, analyzerid): ident = self.getLastHeartbeatIdent(analyzerid) heartbeat = self.getHeartbeat(ident) path = [] analyzer = {} analyzerd = { "path": path, "node_addresses": [], "node_name": None, "node_location": None } for a in heartbeat["analyzer"]: path.append(a["analyzerid"]) analyzer = a for column in "analyzerid", "name", "model", "version", "class", "ostype", "osversion": analyzerd[column] = analyzer.get(column, None) analyzerd["node_name"] = analyzer.get("node.name") analyzerd["node_location"] = analyzer.get("node.location") for addr in analyzer.get("node.address.address", []): analyzerd["node_addresses"].append(addr) analyzerd["last_heartbeat_time"] = heartbeat.get("heartbeat.create_time") analyzerd["last_heartbeat_interval"] = heartbeat.get("heartbeat.heartbeat_interval") analyzerd["last_heartbeat_status"] = heartbeat.getAdditionalData("Analyzer status") return analyzerd prewikka-1.0.0/prewikka/Error.py0000664000076400007640000000330411223363770015655 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import traceback import StringIO from prewikka import DataSet from prewikka.templates import ErrorTemplate class PrewikkaError(Exception): pass class PrewikkaUserError(PrewikkaError): def __init__(self, name, message, display_traceback=False, log=None, log_user=None): self.dataset = DataSet.DataSet() self.template = "ErrorTemplate" self.dataset["message"] = message self.dataset["name"] = name self._log_priority = log self._log_user = log_user if display_traceback: output = StringIO.StringIO() traceback.print_exc(file=output) output.seek(0) tmp = output.read() self.dataset["traceback"] = tmp else: self.dataset["traceback"] = None def __str__(self): return self.dataset["message"] prewikka-1.0.0/prewikka/CheetahFilters.py0000664000076400007640000000211711223112271017443 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Rob Holland # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import Cheetah import prelude from Cheetah.Filters import * from prewikka import utils class CleanOutput(Cheetah.Filters.Filter): def filter(self, val, **kw): s = Filter.filter(self, val, **kw) return utils.escape_html_string(s) prewikka-1.0.0/prewikka/Log.py0000664000076400007640000001070011340776573015314 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Yoann Vandoorselaere # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import logging, logging.handlers, sys DEBUG = logging.DEBUG INFO = logging.INFO ERROR = logging.ERROR WARNING = logging.WARNING CRITICAL = logging.CRITICAL class Log: def __init__(self, conf): self._logger = None for logconf in conf.logs: logtype = logconf.keys()[0] config = { } for key in logconf[logtype].keys(): config[key] = logconf[logtype].getOptionValue(key) self._logger = logging.getLogger() self._logger.setLevel(logging.NOTSET) self._logger.addHandler(self._getHandler(config, logtype)) def _getHandler(self, config, logtype='syslog'): logtype = logtype.lower() level = config.get("level", "") if logtype == 'file': hdlr = logging.FileHandler(config["file"]) elif logtype == 'nteventlog': hdlr = logging.handlers.NTEventLogHandler(logid, logtype='Application') elif logtype in ['syslog', 'unix']: hdlr = logging.handlers.SysLogHandler('/dev/log') elif logtype in ['smtp']: hdlr = logging.handlers.SMTPHandler(config["host"], config["from"], config["to"].split(", "), config["subject"]) elif logtype in ['stderr']: hdlr = logging.StreamHandler(sys.stderr) else: raise _("Unknown logtype specified: '%s'") % logtype format = 'Prewikka %(levelname)s: %(message)s' if logtype in ['file', 'stderr']: format = '%(asctime)s ' + format datefmt = '' if logtype == 'stderr': datefmt = '%X' level = level.upper() if level in ['DEBUG', 'ALL']: hdlr.setLevel(logging.DEBUG) elif level == 'INFO': hdlr.setLevel(logging.INFO) elif level == 'ERROR': hdlr.setLevel(logging.ERROR) elif level == 'CRITICAL': hdlr.setLevel(logging.CRITICAL) else: hdlr.setLevel(logging.WARNING) formatter = logging.Formatter(format, datefmt) hdlr.setFormatter(formatter) return hdlr def _getLog(self, request, login, details): if not request: return details message = "[" addr = request.getClientAddr() message += "%s" % (addr) port = request.getClientPort() if port: message += ":%d" % port if login: message += " %s@" % (login) else: message += " " message += "%s]" % (request.getView()) if details: message += " " + details return message def debug(self, message, request=None, user=None): if self._logger: self._logger.debug(self._getLog(request, user, message)) def info(self, message, request=None, user=None): if self._logger: self._logger.info(self._getLog(request, user, message)) def warning(self, message, request=None, user=None): if self._logger: self._logger.warning(self._getLog(request, user, message)) def error(self, message, request=None, user=None): if self._logger: self._logger.error(self._getLog(request, user, message)) def critical(self, message, request=None, user=None): if self._logger: self._logger.critical(self._getLog(request, user, message)) def log(self, priority, message, request=None, user=None): return { DEBUG: self.debug, INFO: self.info, WARNING: self.warning, ERROR: self.error, CRITICAL: self.critical }[priority](message, request, user) prewikka-1.0.0/prewikka/__init__.py0000664000076400007640000000000011200051324016271 0ustar yoannyoannprewikka-1.0.0/prewikka/views/0000775000076400007640000000000011347720623015350 5ustar yoannyoannprewikka-1.0.0/prewikka/views/messagedetails.py0000664000076400007640000002117511200051577020713 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import view, User, utils from prewikka.views.messagesummary import MessageParameters class _Element: id = 1 is_list = False check_field = None top_element = False def _humanizeField(self, field): return field.replace("_", " ").capitalize() def _renderNormal(self, root, field): name = self._humanizeField(field) field = "%s.%s" % (root, field) value = self._alert[field] if value is None: return None value = str(value) if value == "": value = "n/a" return { "name": name, "value": value } def _renderElement(self, root, field, idx=None): element = field() element._alert = self._alert if idx is None: name = element.name else: name = "%s(%d)" % (element.name, idx) if element.check_field: if self._alert["%s.%s.%s" % (root, name, element.check_field)] is None: return humanized = self._humanizeField(element.name) id = _Element.id _Element.id += 1 entries = element.render("%s.%s" % (root, name)) return { "name": humanized, "value": { "name": humanized, "id": id, "hidden": True, "entries": entries } } def _renderList(self, root, field): elements = [ ] count = 0 while True: element = self._renderElement(root, field, count) if not element: break elements.append(element) count += 1 return elements def render(self, root=None): entries = [ ] for field in self.fields: if type(field) is str: field = self._renderNormal(root, field) if field: entries.append(field) else: if field.is_list: entries += self._renderList(root, field) else: element = self._renderElement(root, field) if element: entries.append(element) return entries class WebService(_Element): name = "web_service" fields = "url", "cgi", "http_method", "arg(" check_field = "url" class SNMPService(_Element): name = "snmp_service" fields = "oid", "community", "security_name", "context_name", "context_engine_id", "command" check_field = "oid" class Service(_Element): name = "service" fields = "ident", "ip_version", "name", "port", "iana_protocol_number", "iana_protocol_name", "portlist", \ "protocol", WebService, SNMPService check_field = "ident" class UserID(_Element): name = "user_id" fields = "ident", "type", "name", "number" check_field = "ident" is_list = True class User_(_Element): name = "user" fields = "ident", "category", UserID check_field = "ident" class Address(_Element): name = "address" fields = "ident", "category", "vlan_name", "vlan_num", "address", "netmask" is_list = True check_field = "ident" class Node(_Element): name = "node" fields = "ident", "category", "location", "name", Address check_field = "ident" class Process(_Element): name = "process" fields = "ident", "name", "pid", "path", "arg(", "env(" check_field = "ident" class FileAccess(_Element): name = "file_access" fields = "userid", "permission(" check_field = "userid" is_list = True class Linkage(_Element): name = "linkage" fields = "category", "name", "path" check_field = "category" is_list = True class Inode(_Element): name = "inode" fields = "change_time", "number", "major_device", "minor_device", "c_major_device", "c_minor_device" check_field = "change_time" class Checksum(_Element): name = "checksum" fields = "value", "key", "algorithm" check_field = "value" is_list = True class File(_Element): name = "file" fields = "ident", "category", "fstype", "name", "path", "create_time", "modify_time", \ "access_time", "data_size", "disk_size", FileAccess, Linkage, Inode, Checksum check_field = "ident" is_list = True class Target(_Element): name = "target" fields = "ident", "decoy", "interface", Node, User_, Process, Service, File check_field = "ident" is_list = True class Source(_Element): name = "source" fields = "ident", "spoofed", "interface", Node, User_, Process, Service check_field = "ident" is_list = True class Confidence(_Element): name = "confidence" fields = "rating", "confidence" check_field = "confidence" class Action_(_Element): name = "action" fields = "category", "description" is_list = True check_field = "description" class Impact(_Element): name = "impact" fields = "severity", "completion", "type", "description" class Reference(_Element): name = "reference" fields = "origin", "name", "url", "meaning" is_list = True check_field = "origin" class Classification(_Element): name = "classification" fields = "ident", "text", Reference check_field = "ident" class AdditionalData(_Element): name = "additional_data" fields = "type", "meaning" is_list = True check_field = "type" def render(self, root): entries = _Element.render(self, root) value = self._alert.get("%s.data" % root, escape=False) if self._alert["%s.type" % root] == "byte-string": value = utils.hexdump(value) entries.append({"name": "Data", "value": value}) return entries class Assessment(_Element): name = "assessment" fields = Impact, Action_, Confidence class Analyzer(_Element): name = "analyzer" fields = [ "analyzerid", "manufacturer", "model", "version", "class", "ostype", "osversion", \ Node, Process ] check_field = "analyzerid" def __init__(self): if not Analyzer in Analyzer.fields: Analyzer.fields.append(Analyzer) class AlertIdent(_Element): name = "alertident" fields = "alertident", "analyzerid" is_list = True check_field = "alertident" class ToolAlert(_Element): name = "tool_alert" fields = "name", "command", AlertIdent check_field = "name" class CorrelationAlert(_Element): name = "correlation_alert" fields = "name", AlertIdent check_field = "name" class OverflowAlert(_Element): name = "overflow_alert" fields = "program", "size", "buffer" check_field = "program" class AlertDetails(_Element, view.View): view_name = "alert_details" view_parameters = MessageParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "MessageDetails" name = "alert" fields = "messageid", Assessment, Analyzer, "create_time", "detect_time", "analyzer_time", \ Source, Target, Classification, AdditionalData, ToolAlert, CorrelationAlert, \ OverflowAlert top_element = True def render(self): self._alert = self.env.idmef_db.getAlert(self.parameters["ident"]) self.dataset["node"] = { "name": "Alert", "id": 0, "hidden": False, "entries": _Element.render(self, "alert") } class HeartbeatDetails(_Element, view.View): view_name = "heartbeat_details" view_parameters = MessageParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "MessageDetails" name = "heartbeat" fields = "messageid", Analyzer, "create_time", "analyzer_time", AdditionalData top_element = True def render(self): self._alert = self.env.idmef_db.getHeartbeat(self.parameters["ident"]) self.dataset["node"] = { "name": "Heartbeat", "id": 0, "hidden": False, "entries": _Element.render(self, "heartbeat") } prewikka-1.0.0/prewikka/views/messagesummary.py0000664000076400007640000011205111340777332020766 0ustar yoannyoann# Copyright (C) 2004,2005,2006,2007 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # Author: Yoann Vandoorselaere # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import re import time import struct import socket import urllib from prewikka import view, User, utils, resolve def getUriCriteria(parameters): if not parameters.has_key("messageid"): return None if parameters.has_key("analyzerid"): criteria = "alert.analyzer(-1).analyzerid = '%s' &&" % utils.escape_criteria(parameters["analyzerid"]) else: criteria = "" criteria += "alert.messageid = '%s'" % utils.escape_criteria(parameters["messageid"]) return criteria class Table: def __init__(self): self._current_table = None self._current_section = None def getCurrentSection(self): return self._current_section def beginSection(self, title, display="block"): _current_section = { } _current_section["title"] = title _current_section["entries"] = [ ] _current_section["tables"] = [ ] _current_section["display"] = display _current_section["sections"] = [] _current_section["parent"] = self._current_section self._current_section = _current_section def endSection(self): parent = self._current_section["parent"] if len(self._current_section["tables"]) == 0 and \ len(self._current_section["sections"]) == 0 and \ len(self._current_section["entries"]) == 0: self._current_section = parent return if not parent: self.dataset["sections"].append(self._current_section) self._current_section = None else: parent["sections"].append(self._current_section) self._current_section = parent def newSectionEntry(self, name, value, emphase=False): if value is None or value == "": return self._current_section["entries"].append({ "name": name, "value": value, "emphase": emphase }) def beginTable(self, cl="message_summary", style="", odd_even=False): table = {} table["rows"] = [] table["odd_even"] = odd_even table["class"] = cl table["style"] = style table["parent"] = self._current_table or self._current_section self._current_table = table def endTable(self): parent = self._current_table["parent"] has_data = False if len(self._current_table["rows"]) <= 1 : if not parent or not parent.has_key("rows"): self._current_table = None else: self._current_table = parent return if not parent: self._current_section["tables"].append(self._current_table) self._current_table = None else: if parent.has_key("rows"): col = { "name": None, "header": None, "emphase": None, "tables": [ self._current_table ] } if len(parent["rows"]): parent["rows"][-1] += [col] else: parent["rows"].append([col]) self._current_table = parent else: parent["tables"].append(self._current_table) self._current_table = None def newTableRow(self): if len(self._current_table["rows"]) and self._current_table["rows"][-1] != []: self._current_table["rows"].append([]) return len(self._current_table["rows"]) def newTableCol(self, row_index, name, cl="", header=False, emphase=None): col = { "name": name, "header": header, "class": cl, "tables": [], "emphase": None } if row_index == -1: self._current_table["rows"].append([col]) elif len(self._current_table["rows"]) <= row_index: self._current_table["rows"].insert(row_index, [col]) else: self._current_table["rows"][row_index] += [col] def newTableEntry(self, name, value, cl="", emphase=False): if value == None: return self.newTableCol(0, name, cl=cl, header=True) self.newTableCol(1, value, cl=cl, header=False, emphase=emphase) class HeaderTable(Table): def __init__(self): self.field_list = [ ] def register_static(self, name, static): self.field_list.append((None, name, static, None, None)) def register(self, name, field, func=None, arguments=()): self.field_list.append((field, name, None, func, arguments)) def render_table(self, section, name, dataset): self._current_section = section._current_section self._current_table = section._current_table from_dataset = False self.newTableRow() self.newTableCol(-1, name, header=True) self.beginTable() for field in self.field_list: if not dataset.has_key(field[0]) and not field[2]: continue if field[2]: # static s = field[2] else: value = dataset[field[0]] if field[3]: # use func s = field[3](value, *field[4]) else: from_dataset = True s = value self.newTableEntry(field[1], s) if not from_dataset: section._current_table["rows"].pop() self._current_table = section._current_table else: self.endTable() class TcpIpOptions(Table): def _isFlagSet(self, bits, flag, shift=0): if (bits & flag) >> shift: return "X" else: return " " def _decodeOption8(self, data): return str(struct.unpack(">B", data)[0]) def _decodeOption16(self, data): return str(struct.unpack(">H", data)[0]) def _decodeOption32(self, data): return str(struct.unpack(">L", data)[0]) def _decodeOptionTimestamp(self, data): x = struct.unpack(">LL", data) return "TS Value (%d)
    TS Echo Reply (%d)" % (x[0], x[1]) def _decodeOptionSack(self, data): x = struct.unpack(">" + "L" * (len(data) / 4), data) s = "" for i in x: if len(s): s += "
    " s += str(i) return s def _decodeOptionMd5(self, data): md = md5.md5(struct.unpack(">B" * 16, data)[0]) return md.hexdigest() def _decodeOptionPartialOrderProfile(self, data): x = struct.unpack(">B", data) return "Start_Flags=%d End_Flags=%d" % (data & 0x80, data & 0x40) def _decodeOptionTcpAltChecksumRequest(self, data): x = struct.unpack(">B", data) if x == 0: return "TCP checksum" elif x == 1: return "8-bit Fletcher's algorithm" elif x == 2: return "16-bit Fletcher's algorithm" else: return "%d (Invalid)" % x def _tcpOptionToName(self, opt): h = {} h[0] = ("End of Option List", 0) h[1] = ("No-Option", 0) h[2] = ("Maximum Segment Size", 2, self._decodeOption16) h[3] = ("Window Scaling", 1, self._decodeOption8) h[4] = ("Sack Permitted", 0) h[5] = ("Sack", -1, self._decodeOptionSack) h[6] = ("Echo", 4, self._decodeOption32) h[7] = ("Echo Reply", 4, self._decodeOption32) h[8] = ("Timestamp", 8, self._decodeOptionTimestamp) h[9] = ("Partial Order Permitted", 0) h[10] = ("Partial Order Profile", 1, self._decodeOptionPartialOrderProfile) h[11] = ("Connection Count", 4, self._decodeOption32) h[12] = ("Connection Count New", 4, self._decodeOption32) h[13] = ("Connection Count Echo", 4, self._decodeOption32) h[14] = ("TCP Alternate Checksum Request", 1, self._decodeOptionTcpAltChecksumRequest) h[15] = ("TCP Alternate Checksum",) h[16] = ("Skeeter",) h[17] = ("Bubba",) h[18] = ("Trailer Checksum",) h[19] = ("MD5 Signature", 16, self._decodeOptionMd5) h[20] = ("Capabilities",) h[21] = ("Selective Negative Acknowledgements",) h[22] = ("Record Boundaries",) h[23] = ("Corruption experienced",) h[24] = ("Snap",) h[25] = ("Unassigned",) h[26] = ("TCP Compression Filter",) return h.get(opt, ("Unknown",)) def _ipOptionToName(self, opt): h = {} h[0] = ("End of Option List", 0) h[1] = ("No-Option", 0) h[7] = ("RR",) h[20] = ("RTRALT",) h[68] = ("Timestamp",) h[130] = ("Security", ) h[131] = ("LSRR", 0) h[132] = ("LSRR_E", 0) h[136] = ("SATID", 0) h[137] = ("SSRR", 0) return h.get(opt, ("Unknown",)) def _optionRender(self, options, to_name_func): self.beginTable() self.newTableCol(0, _("Name"), header=True) self.newTableCol(0, _("Code"), header=True) self.newTableCol(0, _("Data length"), header=True) self.newTableCol(0, _("Data"), header=True) for option in options: dec = to_name_func(option[0]) idx = self.newTableRow() self.newTableCol(idx, dec[0]) self.newTableCol(idx, option[0]) if len(dec) == 2 and dec[1] != -1 and dec[1] != option[1]: self.newTableCol(idx, "%d (expected %d)" % (option[1], dec[1])) else: self.newTableCol(idx, "%d" % option[1]) if len(dec) == 3 and (dec[1] == -1 or dec[1] == option[1]): self.newTableCol(idx, "%s" % dec[2](option[2])) else: self.newTableCol(idx, " ") self.endTable() def ipOptionRender(self, ip_options): if not ip_options: return self.newTableRow() self.newTableCol(-1, "IP options", header=True) self._optionRender(ip_options, self._ipOptionToName) def tcpOptionRender(self, tcp_options): if not tcp_options: return self.newTableRow() self.newTableCol(-1, "TCP options", header=True) self._optionRender(tcp_options, self._tcpOptionToName) class MessageParameters(view.RelativeViewParameters): def register(self): view.RelativeViewParameters.register(self) self.optional("ident", long) self.optional("analyzerid", str) self.optional("messageid", str) class MessageSummary(Table): view_parameters = MessageParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "MessageSummary" def getUrlLink(self, name, url=None): if not name: return None if not url: if name.find("http://") != -1: url = name elif re.compile("\.[^\s]+\.[^\s+]").search(name): url = "http://" + name else: return name external_link_new_window = self.env.config.general.getOptionValue("external_link_new_window", "true") if (not external_link_new_window and self.env.config.general.has_key("external_link_new_window")) or \ (external_link_new_window == None or external_link_new_window.lower() in [ "true", "yes" ]): target = "_blank" else: target = "_self" return "%s" % (target, url, name) def getTime(self, t): if not t: return None s = t.toYMDHMS() if t.usec: s += ".%d" % t.usec if t.gmt_offset: s += " %+.2d:00" % (t.gmt_offset / (60 * 60)) return s def buildTime(self, msg): self.beginTable() self.newTableEntry(_("Create time"), self.getTime(msg["create_time"])) try: self.newTableEntry(_("Detect time"), self.getTime(msg["detect_time"]), cl="section_alert_entry_value_emphasis") except: pass if msg["analyzer_time"]: self.newTableEntry(_("Analyzer time"), self.getTime(msg["analyzer_time"])) self.endTable() def buildProcess(self, process): self.beginTable() self.newTableEntry(_("Process"), process["name"]) self.newTableEntry(_("Process Path"), process["path"]) self.newTableEntry(_("Process PID"), process["pid"]) self.endTable() def buildNode(self, node): if not node: return self.newTableEntry(_("Node location"), node["location"]) addr_list = None node_name = None for addr in node["address"]: address = addr["address"] if not address: continue node_name = resolve.AddressResolve(address) if addr_list: addr_list += "
    " else: addr_list = "" if addr["category"] in ("ipv4-addr", "ipv6-addr", "ipv4-net", "ipv6-net"): addr_list += self.getUrlLink(address, "https://www.prelude-ids.com/host_details.php?host=%s" % address) else: addr_list += address if node["name"]: self.newTableEntry(_("Node name"), node["name"]) elif node_name.resolveSucceed(): self.newTableEntry(_("Node name (resolved)"), node_name) self.newTableEntry(_("Node address"), addr_list) def buildAnalyzer(self, analyzer): self.beginTable(cl="message_summary_no_border") self.beginTable() self.newTableEntry(_("Model"), analyzer["model"], cl="section_alert_entry_value_emphasis") self.newTableEntry(_("Name"), analyzer["name"], cl="section_alert_entry_value_emphasis") self.newTableEntry(_("Analyzerid"), analyzer["analyzerid"]) self.newTableEntry(_("Version"), analyzer["version"]) self.newTableEntry(_("Class"), analyzer["class"]) self.newTableEntry(_("Manufacturer"), self.getUrlLink(analyzer["manufacturer"])) self.endTable() self.newTableRow() self.beginTable() self.buildNode(analyzer["node"]) if analyzer["ostype"] or analyzer["osversion"]: self.newTableEntry(_("Operating System"), "%s %s" % (analyzer["ostype"] or "", analyzer["osversion"] or "")) self.endTable() self.newTableRow() if analyzer["process"]: self.buildProcess(analyzer["process"]) self.newTableRow() self.endTable() def buildAnalyzerList(self, alert): l = [] for analyzer in alert["analyzer"]: l.insert(0, analyzer) l.pop(0) self.beginSection(_("Analyzer Path (%d not shown)") % len(l), display="none") self.beginTable(cl="message_summary_no_border") i = 1 index = len(l) - 1 for analyzer in l: self.newTableCol(i - 1, _("Analyzer #%d") % index, None, header=True) self.buildAnalyzer(analyzer) self.newTableRow() i += 1 index -= 1 self.endTable() self.endSection() def buildAdditionalData(self, alert, ignore=[], ignored={}, ip_options=[], tcp_options=[]): self.beginSection(_("Additional data")) self.beginTable() self.newTableCol(0, _("Meaning"), header=True) self.newTableCol(0, _("Value"), header=True) index = 1 for ad in alert["additional_data"]: value = None meaning = ad["meaning"] if meaning == "ip_option_code": ip_options.append((ad["data"], 0, None)) ignored[meaning] = "" if meaning == "ip_option_data": data = ad["data"] ip_options[-1] = (ip_options[-1][0], len(data), data) ignored[meaning] = "" if meaning == "tcp_option_code": tcp_options.append((ad["data"], 0, None)) ignored[meaning] = "" if meaning == "tcp_option_data": data = ad["data"] tcp_options[-1] = (tcp_options[-1][0], len(data), data) ignored[meaning] = "" if ad["data"] != None: if ad["type"] == "byte-string": value = ad.get("data", htmlsafe=False) if meaning != "payload": value = utils.hexdump(value) else: value = ad.get("data") if isinstance(value, str): value = utils.toUnicode(value) for field in ignore: if meaning != None and meaning == field[0]: ignored[meaning] = value break if not ignored.has_key(meaning): self.newTableCol(index, meaning or "Data content") self.newTableCol(index, value) index += 1 self.endTable() self.endSection() def buildIpHeaderTable(self, alert): ip = HeaderTable() ip.register(_("Version"), "ip_ver") ip.register(_("Header length"), "ip_hlen") ip.register(_("TOS"), "ip_tos") ip.register(_("Length"), "ip_len") ip.register(_("Id"), "ip_id") ip.register("R
    F", "ip_off", self._isFlagSet, (0x8000, 15)) ip.register("D
    F", "ip_off", self._isFlagSet, (0x4000, 14)) ip.register("M
    F", "ip_off", self._isFlagSet, (0x2000, 13)) ip.register(_("Ip offset"), "ip_off", (lambda x: x & 0x1fff)) ip.register(_("TTL"), "ip_ttl") ip.register(_("Protocol"), "ip_proto") ip.register(_("Checksum"), "ip_sum") ip.register_static(_("Source address"), alert["source(0).node.address(0).address"]) ip.register_static(_("Target address"), alert["target(0).node.address(0).address"]) return ip def buildTcpHeaderTable(self, alert): tcp = HeaderTable() tcp.register_static(_("Source port"), alert["source(0).service.port"]) tcp.register_static(_("Target port"), alert["target(0).service.port"]) tcp.register("Seq #", "tcp_seq") tcp.register("Ack #", "tcp_ack") tcp.register(_("Header length"), "tcp_off") tcp.register(_("Reserved"), "tcp_res") tcp.register("R
    1", "tcp_flags", self._isFlagSet, (0x80,)) tcp.register("R
    2", "tcp_flags", self._isFlagSet, (0x40,)) tcp.register("U
    R
    G", "tcp_flags", self._isFlagSet, (0x20,)) tcp.register("A
    C
    K", "tcp_flags", self._isFlagSet, (0x10,)) tcp.register("P
    S
    H", "tcp_flags", self._isFlagSet, (0x08,)) tcp.register("R
    S
    T", "tcp_flags", self._isFlagSet, (0x04,)) tcp.register("S
    Y
    N", "tcp_flags", self._isFlagSet, (0x02,)) tcp.register("F
    I
    N", "tcp_flags", self._isFlagSet, (0x01,)) tcp.register(_("Window"), "tcp_win") tcp.register(_("Checksum"), "tcp_sum") tcp.register(_("URP"), "tcp_urp") return tcp def buildUdpHeaderTable(self, alert): udp = HeaderTable() udp.register_static(_("Source port"), alert["source(0).service.port"]) udp.register_static(_("Target port"), alert["target(0).service.port"]) udp.register(_("Length"), "udp_len") udp.register(_("Checksum"), "udp_sum") return udp def buildIcmpHeaderTable(self, alert): icmp = HeaderTable() icmp.register(_("Type"), "icmp_type") icmp.register(_("Code"), "icmp_code") icmp.register(_("Checksum"), "icmp_sum") icmp.register(_("Id"), "icmp_id") icmp.register(_("Seq #"), "icmp_seq") icmp.register(_("Mask"), "icmp_mask"); icmp.register(_("Gateway Address"), "icmp_gwaddr") icmp.register(_("Num address"), "icmp_num_addrs") icmp.register(_("Wpa"), "icmp_wpa") icmp.register(_("Lifetime"), "icmp_lifetime") icmp.register(_("Otime"), "icmp_otime") icmp.register(_("Rtime"), "icmp_rtime") icmp.register(_("Ttime"), "icmp_ttime") return icmp def buildPayloadTable(self, alert): data = HeaderTable() data.register(_("Payload"), "payload") #data.register("ASCII Payload", "payload", utils.escape_html_string) return data class AlertSummary(TcpIpOptions, MessageSummary, view.View): view_name = "alert_summary" def buildAlertIdent(self, alert, parent): calist = { } for alertident in parent["alertident"]: # IDMEF draft 14 page 27 # If the "analyzerid" is not provided, the alert is assumed to have come # from the same analyzer that is sending the Alert. analyzerid = alertident["analyzerid"] if not analyzerid: for a in alert["analyzer"]: if a["analyzerid"]: analyzerid = a["analyzerid"] break if not calist.has_key(analyzerid): calist[analyzerid] = [] calist[analyzerid].append(alertident["alertident"]) idx = 1 for analyzerid in calist.keys(): content = "" missing = 0 for ident in calist[analyzerid]: criteria = "alert.analyzer.analyzerid = '%s' && alert.messageid = '%s'" % (analyzerid, ident) results = self.env.idmef_db.getAlertIdents(criteria) if len(results) == 0: missing += 1 #content += "
  • " + _("Invalid 'analyzerid:messageid' pair, '%(analyzerid):%(messageid)'") % { "analyzerid": analyzerid, "messageid": ident } + "
  • " else: alert = self.env.idmef_db.getAlert(results[0], htmlsafe=True) link = utils.create_link("alert_summary", { "origin": self.parameters["origin"], "ident": results[0] }) content += "
  • %s
  • " % (link, alert["classification.text"]) if missing > 0: content += "
  • " + (_("%d linked alerts missing (probably deleted)") % missing) + "
  • " self.newTableCol(idx, "
      %s
    " % content) self.buildAnalyzer(alert["analyzer(-1)"]) self.newTableRow() idx += 1 def buildCorrelationAlert(self, alert): ca = alert["correlation_alert"] if not ca: return self.beginSection(_("Correlation Alert")) self.beginTable() self.newTableEntry(_("Name"), ca["alert.correlation_alert.name"]) self.endTable() self.beginTable() self.newTableCol(0, _("Correlated Alert"), header=True) self.newTableCol(0, _("Source Analyzer"), header=True) self.buildAlertIdent(alert, ca) self.endTable() self.endSection() def buildToolAlert(self, alert): ta = alert["tool_alert"] if not ta: return self.beginSection(_("Tool Alert")) self.beginTable() self.newTableEntry(_("Name"), ta["alert.tool_alert.name"]) self.endTable() self.beginTable() self.newTableCol(0, _("Linked Alert"), header=True) self.newTableCol(0, _("Source Analyzer"), header=True) self.buildAlertIdent(alert, ta) self.endTable() self.endSection() def buildClassification(self, alert): if not alert["classification.text"]: return self.newTableEntry(_("Text"), alert["classification.text"], cl="section_alert_entry_value_emphasis impact_severity_%s" % alert["assessment.impact.severity"]) self.newTableEntry(_("Ident"), alert["classification.ident"]) def buildReference(self, alert): self.beginTable() self.newTableCol(0, _("Origin"), header=True) self.newTableCol(0, _("Name"), header=True) self.newTableCol(0, _("Meaning"), header=True) index = 1 for reference in alert["classification.reference"]: self.newTableCol(index, reference["origin"]) if reference["origin"] in ("user-specific", "vendor-specific"): urlstr="&url=" + urllib.quote(reference["url"], safe="") else: urlstr="" self.newTableCol(index, self.getUrlLink(reference["name"], "http://www.prelude-ids.com/reference_details.php?origin=%s&name=%s%s" % (urllib.quote(reference["origin"]), urllib.quote(reference["name"]), urlstr))) self.newTableCol(index, reference["meaning"]) index += 1 self.endTable() def buildImpact(self, alert): self.newTableEntry(_("Severity"), alert["assessment.impact.severity"], cl="impact_severity_%s" % alert["assessment.impact.severity"]) self.newTableEntry(_("Completion"), alert["assessment.impact.completion"], cl="impact_completion_%s" % alert["assessment.impact.completion"]) self.newTableEntry(_("Type"), alert["assessment.impact.type"]) self.newTableEntry(_("Description"), alert["assessment.impact.description"]) def buildAction(self, action): self.beginTable() self.newTableEntry(_("Category"), action["category"]) self.newTableEntry(_("Description"), action["description"]) self.endTable() def buildChecksum(self, checksum): self.newTableEntry(checksum["algorithm"], checksum["value"]) self.newTableEntry("%s key" % checksum["algorithm"], checksum["key"]) def _joinUserInfos(self, user, number, tty=None): user_str = user or "" if user != None and number != None: user_str += "(%d)" % number elif number: user_str = str(number) if tty: user_str += " on tty " + tty return user_str def buildUser(self, user): self.beginTable() self.newTableEntry(_("User category"), user["category"]) self.beginTable() self.newTableCol(0, _("Type"), header=True) self.newTableCol(0, _("Name"), header=True) self.newTableCol(0, _("Number"), header=True) self.newTableCol(0, _("Tty"), header=True) index = 1 for user_id in user["user_id"]: #user_str = self._joinUserInfos(user_id["name"], user_id["number"], user_id["tty"]) self.newTableCol(index, user_id["type"]) self.newTableCol(index, user_id["name"]) self.newTableCol(index, user_id["number"]) self.newTableCol(index, user_id["tty"]) index += 1 self.endTable() self.endTable() def buildFileAccess(self, file): self.beginTable() self.newTableCol(0, _("Type"), header=True) self.newTableCol(0, _("Name"), header=True) self.newTableCol(0, _("Number"), header=True) self.newTableCol(0, _("Permission"), header=True) index = 1 for fa in file["file_access"]: pstr = "" for perm in fa["permission"]: if pstr: pstr += ", " pstr += perm self.newTableCol(index, fa["user_id.type"]) self.newTableCol(index, fa["user_id.name"]) self.newTableCol(index, fa["user_id.number"]) self.newTableCol(index, pstr) index += 1 self.endTable() def buildInode(self, inode): self.beginTable() self.newTableEntry(_("Change time"), self.getTime(inode["change_time"])) self.newTableEntry(_("Inode Number"), inode["number"]) self.newTableEntry(_("Major device"), inode["major_device"]) self.newTableEntry(_("Minor device"), inode["minor_device"]) self.newTableEntry(_("C Major device"), inode["c_major_device"]) self.newTableEntry(_("C Minor device"), inode["c_minor_device"]) self.endTable() def buildFile(self, file): self.beginSection(_("Target file %s") % file["category"]) self.beginTable() self.newTableEntry(_("Name"), file["name"]) self.newTableEntry(_("Path"), file["path"]) self.newTableEntry(_("Create time"), self.getTime(file["create_time"])) self.newTableEntry(_("Modify time"), self.getTime(file["modify_time"])) self.newTableEntry(_("Access time"), self.getTime(file["access_time"])) self.newTableEntry(_("Data size"), file["data_size"]) self.newTableEntry(_("Disk size"), file["disk_size"]) self.endTable() self.beginTable() for checksum in file["checksum"]: self.buildChecksum(checksum) self.endTable() self.buildFileAccess(file) if file["inode"]: self.buildInode(file["inode"]) self.endSection() def buildWebService(self, webservice): if not webservice: return self.beginSection(_("Web Service")) self.beginTable() self.newTableEntry(_("Url"), webservice["url"]) self.newTableEntry(_("Cgi"), webservice["cgi"]) self.newTableEntry(_("Http Method"), webservice["http_method"]) for arg in webservice["arg"]: self.newTableEntry(_("CGI Argument"), arg) self.endTable() self.endSection() def buildSnmpService(self, service): if not service: return self.beginSection(_("SNMP Service")) self.beginTable() self.newTableEntry(_("oid"), service["oid"]) self.newTableEntry(_("messageProcessingModel"), service["message_processing_model"]) self.newTableEntry(_("securityModel"), service["security_model"]) self.newTableEntry(_("securityName"), service["security_name"]) self.newTableEntry(_("securityLevel"), service["security_level"]) self.newTableEntry(_("contextName"), service["context_name"]) self.newTableEntry(_("contextEngineID"), service["context_engine_id"]) self.newTableEntry(_("command"), service["command"]) self.endTable() self.endSection() def buildService(self, service): if not service: return if service["port"]: port = str(service["port"]) self.newTableEntry(_("Port"), self.getUrlLink(port, "https://www.prelude-ids.com/port_details.php?port=%s" % port)) portlist = service["portlist"] if portlist: out = "" for port in portlist.replace(" ", "").split(","): if len(out) > 0: out += ", " if port.find("-") != -1: left, right = port.split("-") out += self.getUrlLink(left, "https://www.prelude-ids.com/port_details.php?port=%s" % left) out += " - " out += self.getUrlLink(right, "https://www.prelude-ids.com/port_details.php?port=%s" % right) else: out += self.getUrlLink(port, "https://www.prelude-ids.com/port_details.php?port=%s" % port) self.newTableEntry(_("PortList"), out) if service["ip_version"]: self.newTableEntry(_("ip_version"), service["ip_version"]) ipn = service["iana_protocol_number"] if ipn and utils.protocol_number_to_name(ipn) != None: self.newTableEntry(_("Protocol"), utils.protocol_number_to_name(ipn)) elif service["iana_protocol_name"]: self.newTableEntry(_("Protocol"), service["iana_protocol_name"]) elif service["protocol"]: self.newTableEntry(_("Protocol"), service["protocol"]) def buildDirection(self, direction): self.beginTable() self.buildNode(direction["node"]) self.buildService(direction["service"]) self.endTable() user = direction["user"] if user: self.buildUser(user) process = direction["process"] if process: self.buildProcess(process) self.buildWebService(direction["service.web_service"]) self.buildSnmpService(direction["service.snmp_service"]) def buildSource(self, alert): i = 0 for source in alert["source"]: self.beginSection(_("Source(%d)") % i) self.buildDirection(source) self.endSection() i += 1 def buildTarget(self, alert): i = 0 for target in alert["target"]: self.beginSection(_("Target(%d)") % i) self.buildDirection(target) for f in target["file"]: self.buildFile(f) self.endSection() i += 1 def buildSourceTarget(self, alert): self.buildSource(alert) self.buildTarget(alert) def getSectionName(self, alert): if alert["correlation_alert"]: section = _("Correlation Alert") elif alert["tool_alert"]: section = _("Tool Alert") elif alert["overflow_alert"]: section = _("Overflow Alert") else: section = _("Alert") return section def render(self): criteria = getUriCriteria(self.parameters) if criteria is not None: ident = self.env.idmef_db.getAlertIdents(criteria)[0] else: ident = self.parameters["ident"] alert = self.env.idmef_db.getAlert(ident, htmlsafe=True) self.dataset["sections"] = [ ] self.beginSection(self.getSectionName(alert)) self.buildTime(alert) self.beginTable() self.newTableEntry(_("MessageID"), alert["messageid"]) self.endTable() self.beginTable() self.buildClassification(alert) self.buildImpact(alert) self.endTable() self.beginSection(_("Actions")) for action in alert["assessment.action"]: self.buildAction(action) self.endSection() self.buildCorrelationAlert(alert) self.buildToolAlert(alert) self.buildReference(alert) self.beginSection(_("Analyzer #%d") % (len(alert["analyzer"]) - 1)) self.buildAnalyzer(alert["analyzer(-1)"]) self.buildAnalyzerList(alert) self.endSection() self.endSection() self.buildSourceTarget(alert) ip = self.buildIpHeaderTable(alert) tcp = self.buildTcpHeaderTable(alert) udp = self.buildUdpHeaderTable(alert) icmp = self.buildIcmpHeaderTable(alert) data = self.buildPayloadTable(alert) ignored_value = {} ip_options = [] tcp_options = [] group = ip.field_list + tcp.field_list + udp.field_list + icmp.field_list + data.field_list self.buildAdditionalData(alert, ignore=group, ignored=ignored_value, ip_options=ip_options, tcp_options=tcp_options) if len(ignored_value.keys()) > 0: def blah(b): if b >= 32 and b < 127: return chr(b) else: return "." self.beginSection(_("Network centric information")) self.beginTable(cl="message_summary_no_border") ip.render_table(self, "IP", ignored_value) self.ipOptionRender(ip_options) tcp.render_table(self, "TCP", ignored_value) self.tcpOptionRender(tcp_options) udp.render_table(self, "UDP", ignored_value) icmp.render_table(self, "ICMP", ignored_value) if ignored_value.has_key("payload"): val = {} payload = utils.escape_html_string(utils.hexdump(ignored_value["payload"])).replace(" ", " ") val["payload"] = "%s" % payload data.render_table(self, _("Payload"), val) val["payload"] = "
    %s
    " % utils.escape_html_string(utils.toUnicode(ignored_value["payload"])).replace("\n", "
    ") data.render_table(self, _("ASCII Payload"), val) self.endTable() self.endSection() class HeartbeatSummary(MessageSummary, view.View): view_name = "heartbeat_summary" def render(self): criteria = getUriCriteria(self.parameters) if criteria is not None: ident = self.env.idmef_db.getHeartbeatIdents(criteria)[0] else: ident = self.parameters["ident"] heartbeat = self.env.idmef_db.getHeartbeat(ident, htmlsafe=True) self.dataset["sections"] = [ ] self.beginSection(_("Heartbeat")) self.buildTime(heartbeat) self.beginSection(_("Analyzer #%d") % (len(heartbeat["analyzer"]) - 1)) self.buildAnalyzer(heartbeat["analyzer(-1)"]) self.buildAnalyzerList(heartbeat) self.endSection() self.endSection() self.buildAdditionalData(heartbeat) prewikka-1.0.0/prewikka/views/__init__.py0000664000076400007640000000700711340777332017467 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka.views import \ messagelisting, alertlisting, heartbeatlisting, messagesummary, messagedetails, sensor, \ commands, filter, usermanagement, stats, misc objects = alertlisting.AlertListing(), \ alertlisting.CorrelationAlertListing(), \ alertlisting.ToolAlertListing(), \ alertlisting.SensorAlertListing(), \ heartbeatlisting.HeartbeatListing(), \ heartbeatlisting.SensorHeartbeatListing(), \ sensor.SensorListing(), sensor.HeartbeatAnalyze(), sensor.SensorMessagesDelete(), \ messagesummary.AlertSummary(), messagesummary.HeartbeatSummary(), \ messagedetails.AlertDetails(), messagedetails.HeartbeatDetails(), \ commands.Command(), \ filter.AlertFilterEdition(), \ usermanagement.UserListing(), \ usermanagement.UserAddForm(), usermanagement.UserDelete(), \ usermanagement.UserSettingsDisplay(), usermanagement.UserSettingsModify(), usermanagement.UserSettingsAdd(), \ misc.About(), \ stats.StatsSummary(), stats.CategorizationStats(), stats.SourceStats(), stats.TargetStats(), stats.AnalyzerStats(), \ stats.TimelineStats() events_section = (_("Events"), [(_("Alerts"), ["alert_listing", "sensor_alert_listing"]), (_("CorrelationAlerts"), ["correlation_alert_listing"]), (_("ToolAlerts"), ["tool_alert_listing"])]) agents_section = (_("Agents"), [(_("Agents"), ["sensor_listing", "sensor_messages_delete", "heartbeat_analyze"]), (_("Heartbeats"), ["heartbeat_listing", "sensor_heartbeat_listing"] )]) stats_section = (_("Statistics"), [ (_("Categorizations"), ["stats_categorization" ]), (_("Sources"), [ "stats_source" ]), (_("Targets"), [ "stats_target" ]), (_("Analyzers"), [ "stats_analyzer" ]), (_("Timeline"), [ "stats_timeline" ])]) settings_section = (_("Settings"), [ (_("Filters"), ["filter_edition"]), (_("My account"), ["user_settings_display", "user_password_change_form", "user_password_change", "user_settings_display", "user_settings_modify", "user_permissions_change_form", "user_permissions_change"]), (_("User listing"), ["user_listing", "user_add_form", "user_add", "user_delete"]), ]) about_section = (_("About"), [(_("About"), ["about"])]) prewikka-1.0.0/prewikka/views/sensor.py0000664000076400007640000003067211341167202017233 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import time from prewikka import view, User, utils class SensorListingParameters(view.Parameters): def register(self): self.optional("filter_path", str) self.optional("filter_value", str) class HeartbeatAnalyzeParameters(view.Parameters): def register(self): self.mandatory("analyzerid", str) class SensorMessagesDelete(SensorListingParameters): def register(self): SensorListingParameters.register(self) self.optional("analyzerid", list, default=[]) self.optional("alerts", str, default=None) self.optional("heartbeats", str, default=None) def get_analyzer_status_from_latest_heartbeat(heartbeat_status, heartbeat_time, heartbeat_interval, error_margin): if heartbeat_status == "exiting": return "offline", _("Offline") if heartbeat_interval is None: return "unknown", _("Unknown") if time.time() - int(heartbeat_time) > int(heartbeat_interval) + error_margin: return "missing", _("Missing") return "online", _("Online") def analyzer_cmp(x, y): xmiss = x["status"] == "missing" ymiss = y["status"] == "missing" if xmiss and ymiss: return cmp(x["name"], y["name"]) elif xmiss or ymiss: return ymiss - xmiss else: return cmp(x["name"], y["name"]) def node_cmp(x, y): xmiss = x["missing"] ymiss = y["missing"] if xmiss or ymiss: return ymiss - xmiss else: return cmp(x["node_name"], y["node_name"]) def getDominantStatus(d): if d["missing"] > 0 or d["unknown"] > 0: return "missing" return "online" class SensorListing(view.View): view_name = "sensor_listing" view_parameters = SensorListingParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "SensorListing" def init(self, env): self._heartbeat_count = int(env.config.general.getOptionValue("heartbeat_count", 30)) self._heartbeat_error_margin = int(env.config.general.getOptionValue("heartbeat_error_margin", 3)) def render(self): analyzers = { } criteria = None if self.parameters.has_key("filter_path"): criteria = "%s == '%s'" % (self.parameters["filter_path"], utils.escape_criteria(self.parameters["filter_value"])) locations = { } nodes = { } for analyzerid in self.env.idmef_db.getAnalyzerids(): analyzer = self.env.idmef_db.getAnalyzer(analyzerid) parameters = { "analyzerid": analyzer["analyzerid"] } analyzer["alert_listing"] = utils.create_link("sensor_alert_listing", parameters) analyzer["heartbeat_listing"] = utils.create_link("sensor_heartbeat_listing", parameters) analyzer["heartbeat_analyze"] = utils.create_link("heartbeat_analyze", parameters) if analyzer["node_name"]: analyzer["node_name_link"] = utils.create_link(self.view_name, { "filter_path": "heartbeat.analyzer(-1).node.name", "filter_value": analyzer["node_name"] }) if analyzer["node_location"]: analyzer["node_location_link"] = utils.create_link(self.view_name, { "filter_path": "heartbeat.analyzer(-1).node.location", "filter_value": analyzer["node_location"] }) node_key = "" for i in range(len(analyzer["node_addresses"])): addr = analyzer["node_addresses"][i] node_key += addr analyzer["node_addresses"][i] = {} analyzer["node_addresses"][i]["value"] = addr analyzer["node_addresses"][i]["inline_filter"] = utils.create_link(self.view_name, { "filter_path": "heartbeat.analyzer(-1).node.address.address", "filter_value": addr }) analyzer["node_addresses"][i]["host_commands"] = [] for command in self.env.host_commands.keys(): analyzer["node_addresses"][i]["host_commands"].append((command.capitalize(), utils.create_link("Command", { "origin": self.view_name, "command": command, "host": addr }))) analyzer["status"], analyzer["status_meaning"] = \ get_analyzer_status_from_latest_heartbeat(analyzer["last_heartbeat_status"], analyzer["last_heartbeat_time"], analyzer["last_heartbeat_interval"], self._heartbeat_error_margin) analyzer["last_heartbeat_time"] = utils.time_to_ymdhms(time.localtime(int(analyzer["last_heartbeat_time"]))) + \ " %+.2d:%.2d" % utils.get_gmt_offset() node_location = analyzer["node_location"] or _("Node location n/a") node_name = analyzer.get("node_name") or _("Node name n/a") osversion = analyzer["osversion"] or _("OS version n/a") ostype = analyzer["ostype"] or _("OS type n/a") addresses = analyzer["node_addresses"] node_key = node_name + osversion + ostype if not locations.has_key(node_location): locations[node_location] = { "total": 1, "missing": 0, "unknown": 0, "offline": 0, "online": 0, "nodes": { } } else: locations[node_location]["total"] += 1 if not locations[node_location]["nodes"].has_key(node_key): locations[node_location]["nodes"][node_key] = { "total": 1, "missing": 0, "unknown": 0, "offline": 0, "online": 0, "analyzers": [ ], "node_name": node_name, "node_location": node_location, "ostype": ostype, "osversion": osversion, "node_addresses": addresses, "node_key": node_key } else: locations[node_location]["nodes"][node_key]["total"] += 1 status = analyzer["status"] locations[node_location][status] += 1 locations[node_location]["nodes"][node_key][status] += 1 if status == "missing" or status == "unknown": locations[node_location]["nodes"][node_key]["analyzers"].insert(0, analyzer) else: locations[node_location]["nodes"][node_key]["analyzers"].append(analyzer) self.dataset["locations"] = locations class SensorMessagesDelete(SensorListing): view_name = "sensor_messages_delete" view_parameters = SensorMessagesDelete view_permissions = [ User.PERM_IDMEF_VIEW, User.PERM_IDMEF_ALTER ] def render(self): for analyzerid in self.parameters["analyzerid"]: if self.parameters.has_key("alerts"): criteria = "alert.analyzer.analyzerid == '%s'" % utils.escape_criteria(analyzerid) self.env.idmef_db.deleteAlert(self.env.idmef_db.getAlertIdents(criteria)) if self.parameters.has_key("heartbeats"): criteria = "heartbeat.analyzer(-1).analyzerid == '%s'" % utils.escape_criteria(analyzerid) self.env.idmef_db.deleteHeartbeat(self.env.idmef_db.getHeartbeatIdents(criteria)) SensorListing.render(self) class HeartbeatAnalyze(view.View): view_name = "heartbeat_analyze" view_parameters = HeartbeatAnalyzeParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "HeartbeatAnalyze" def init(self, env): self._heartbeat_count = int(env.config.general.getOptionValue("heartbeat_count", 30)) self._heartbeat_error_margin = int(env.config.general.getOptionValue("heartbeat_error_margin", 3)) def render(self): analyzerid = self.parameters["analyzerid"] analyzer = self.env.idmef_db.getAnalyzer(analyzerid) analyzer["last_heartbeat_time"] = unicode(analyzer["last_heartbeat_time"]) analyzer["events"] = [ ] analyzer["status"] = "abnormal_offline" analyzer["status_meaning"] = "abnormal offline" start = time.time() idents = self.env.idmef_db.getHeartbeatIdents(criteria="heartbeat.analyzer(-1).analyzerid == %d" % analyzerid, limit=self._heartbeat_count) newer = None latest = True total_interval = 0 for ident in idents: older = self.env.idmef_db.getHeartbeat(ident) older_status = older.getAdditionalData("Analyzer status") older_interval = older["heartbeat.heartbeat_interval"] if not older_status or not older_interval: continue older_time = older["heartbeat.create_time"] total_interval += int(older_interval) if latest: latest = False analyzer["status"], analyzer["status_meaning"] = \ get_analyzer_status_from_latest_heartbeat(older_status, older_time, older_interval, self._heartbeat_error_margin) if analyzer["status"] == "abnormal_offline": analyzer["events"].append({ "value": "sensor is down since %s" % older_time, "type": "down"}) if newer: event = None if newer_status == "starting": if older_status == "exiting": event = { "value": "normal sensor start at %s" % str(newer_time), "type": "start" } else: event = { "value": "unexpected sensor restart at %s" % str(newer_time), "type": "unexpected_restart" } if newer_status == "running": if abs(int(newer_time) - int(older_time) - int(older_interval)) > self._heartbeat_error_margin: event = { "value": "abnormal heartbeat interval between %s and %s" % (str(older_time), str(newer_time)), "type": "abnormal_heartbeat_interval" } if newer_status == "exiting": event = { "value": "normal sensor stop at %s" % str(newer_time), "type": "normal_stop" } if event: analyzer["events"].append(event) newer = older newer_status = older_status newer_interval = older_interval newer_time = older_time if not analyzer["events"]: analyzer["events"].append({ "value": "No anomaly in the last %d heartbeats (1 heartbeat every %d s average)" % (self._heartbeat_count, total_interval / self._heartbeat_count), "type": "no_anomaly" }) self.dataset["analyzer"] = analyzer prewikka-1.0.0/prewikka/views/filter.py0000664000076400007640000001357211223376774017226 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import view, Filter, Error, User class AlertFilterEditionParameters(view.Parameters): allow_extra_parameters = True def register(self): self.optional("mode", str) self.optional("filter_name", str) self.optional("filter_comment", str, default="") self.optional("formula", str, default="") self.optional("save_as", str) def normalize(self, view_name, user): view.Parameters.normalize(self, view_name, user) self["elements"] = [ ] for parameter in self.keys(): idx = parameter.find("object_") if idx == -1: continue name = parameter.replace("object_", "", 1) self["elements"].append((name, self["object_%s" % name], self["operator_%s" % name], self.get("value_%s" % name, ""))) class AlertFilterEdition(view.View): view_name = "filter_edition" view_parameters = AlertFilterEditionParameters view_template = "FilterEdition" view_permissions = [ User.PERM_IDMEF_VIEW ] example_formula = N_("Example: (A AND B) OR (C AND D)") def _setCommon(self): self.dataset["filters"] = self.env.db.getAlertFilterNames(self.user.login) self.dataset["objects"] = ",".join(map(lambda x: '"%s"' % x, Filter.AlertFilterList)) self.dataset["operators"] = ",".join(map(lambda x: '"%s"' % x, ("=", "=*", "!=", "!=*", "~", "~*", "!~", "!~*", "<", "<=", ">", ">=", "<>", "<>*", "!<>", "!<>*"))) self.dataset["elements"] = [ ] self.dataset["fltr.name"] = "" self.dataset["fltr.comment"] = "" self.dataset["formula"] = _(self.example_formula) def _reload(self): for name, obj, operator, value in self.parameters.get("elements", [ ]): self.dataset["elements"].append(self._element(name, obj, operator, value)) self.dataset["fltr.name"] = self.parameters.get("save_as", "") self.dataset["fltr.comment"] = self.parameters.get("filter_comment", "") self.dataset["formula"] = self.parameters["formula"] def _element(self, name, obj="", operator="", value=""): return { "name": name, "object": obj, "operator": operator, "value": value } def render_alert_filter_load(self): self._setCommon() if self.parameters.has_key("filter_name"): filter = self.env.db.getAlertFilter(self.user.login, self.parameters["filter_name"]) self.dataset["fltr.name"] = filter.name self.dataset["fltr.comment"] = filter.comment self.dataset["formula"] = filter.formula names = filter.elements.keys() names.sort() for name in names: obj, operator, value = filter.elements[name] self.dataset["elements"].append(self._element(name, obj, operator, value)) else: self.dataset["elements"].append(self._element("A")) self.dataset["fltr.name"] = "" self.dataset["fltr.comment"] = "" def render_alert_filter_delete(self): if self.parameters.has_key("filter_name"): self.env.db.deleteFilter(self.user.login, self.parameters["filter_name"]) self._setCommon() self.dataset["elements"].append(self._element("A")) self.dataset["fltr.name"] = "" self.dataset["fltr.comment"] = "" def render_alert_filter_save(self): elements = { } for name, obj, operator, value in self.parameters["elements"]: elements[name] = (obj, operator, value) if name not in self.parameters["formula"]: raise Error.PrewikkaUserError("Could not save Filter", "No valid filter formula provided") if not self.parameters.has_key("save_as"): raise Error.PrewikkaUserError("Could not save Filter", "No name for this filter was provided") if self.parameters["formula"] == _(self.example_formula): raise Error.PrewikkaUserError("Could not save Filter", "No valid filter formula provided") filter = Filter.Filter(self.parameters["save_as"], self.parameters.get("filter_comment", ""), elements, self.parameters["formula"]) self.env.db.setFilter(self.user.login, filter) self._setCommon() self._reload() def render(self): if self.parameters.get("mode", _("Load")) == _("Load"): self.render_alert_filter_load() elif self.parameters["mode"] == _("Save"): self.render_alert_filter_save() elif self.parameters["mode"] == _("Delete"): self.render_alert_filter_delete() prewikka-1.0.0/prewikka/views/messagelisting.py0000664000076400007640000003567711340777332020764 0ustar yoannyoann# Copyright (C) 2004,2005,2006 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import copy, time, urllib from prewikka import view, User, utils, resolve class _MyTime: def __init__(self, t=None): self._t = t or time.time() self._index = 5 # second index def __getitem__(self, key): try: self._index = [ "year", "month", "day", "hour", "min", "sec" ].index(key) except ValueError: raise KeyError(key) return self def round(self, unit): t = list(time.localtime(self._t)) if unit != "sec": t[5] = 0 if unit != "min": t[4] = 0 if unit != "hour": t[3] = 0 if unit != "day": t[2] = 1 if unit != "month": t[1] = 1 t[0] += 1 else: t[1] += 1 else: t[2] += 1 else: t[3] += 1 else: t[4] += 1 else: t[5] += 1 self._t = time.mktime(t) def __add__(self, value): t = time.localtime(self._t) t = list(t) t[self._index] += value try: t = time.mktime(t) # Implementation specific: mktime might trigger an OverflowError # or a ValueError exception if the year member is out of range. # If this happen, we adjust the setting to a year known to work. except (OverflowError, ValueError): if t[0] >= 2038: # 2 ^ 31 - 1 t = time.mktime(time.gmtime(2147483647)) elif t[0] <= 1970: # Some implementation will fail with negative integer, we thus # set the minimum value to be the Epoch. t = time.mktime(time.gmtime(0)) else: raise OverflowError return _MyTime(t) def __sub__(self, value): return self + (-value) def __str__(self): return utils.time_to_ymdhms(time.localtime(self._t)) def __int__(self): return int(self._t) class MessageListingParameters(view.Parameters): def register(self): self.optional("timeline_value", int, default=1, save=True) self.optional("timeline_unit", str, default="hour", save=True) self.optional("timeline_end", long) self.optional("timeline_start", long) self.optional("orderby", str, "time_desc", save=True) self.optional("offset", int, default=0) self.optional("limit", int, default=50, save=True) self.optional("timezone", str, "frontend_localtime", save=True) self.optional("delete", list, [ ]) self.optional("apply", str) self.optional("auto_apply_value", str, default="1:00", save=True) self.optional("auto_apply_enable", str, default="false", save=True) # submit with an image passes the x and y coordinate values # where the image was clicked self.optional("x", int) self.optional("y", int) def normalize(self, view_name, user): do_save = self.has_key("_save") # Filter out invalid limit which would trigger an exception. if self.has_key("limit") and int(self["limit"]) <= 0: self.pop("limit") do_load = view.Parameters.normalize(self, view_name, user) if not self.has_key("filter") and do_save: user.delConfigValue(view_name, "filter") if self.has_key("timeline_value") ^ self.has_key("timeline_unit"): raise view.MissingParameterError(self.has_key("timeline_value") and "timeline_value" or "timeline_unit") if not self["timezone"] in ("frontend_localtime", "sensor_localtime", "utc"): raise view.InvalidValueError("timezone", self["timezone"]) if self["orderby"] not in ("time_desc", "time_asc", "count_desc", "count_asc"): raise view.InvalidParameterValueError("orderby", self["orderby"]) if not self.has_key("auto_apply_enable"): user.delConfigValue(view_name, "auto_apply_enable") return do_load class ListedMessage(dict): def __init__(self, view_name, env, parameters): self.env = env self.parameters = parameters self.timezone = parameters["timezone"] self.view_name = view_name def _isAlreadyFiltered(self, column, path, criterion, value): if not self.parameters.has_key(column): return False return (path, criterion, value) in self.parameters[column] def createInlineFilteredField(self, path, value, direction=None, real_value=None): if type(path) is not list and type(path) is not tuple: path = [ path ] else: if not path: return { "value": None, "inline_filter": None, "already_filtered": False } if type(value) is not list and type(value) is not tuple: if not real_value: real_value = value value = [ value ] extra = { } alreadyf = None for p, v in zip(path, value): if direction: if v is not None: operator = "=" else: operator = "!" if alreadyf is not False: alreadyf = self._isAlreadyFiltered(direction, p, operator, v or "") index = self.parameters.max_index extra["%s_object_%d" % (direction, index)] = p extra["%s_operator_%d" % (direction, index)] = operator extra["%s_value_%d" % (direction, index)] = v or "" self.parameters.max_index += 1 else: if alreadyf is not False and (self.parameters.has_key(p) and self.parameters[p] == [v]): alreadyf = True extra[p] = v or "" link = utils.create_link(self.view_name, self.parameters + extra - [ "offset" ]) return { "value": real_value, "inline_filter": link, "already_filtered": alreadyf } def createTimeField(self, t, timezone=None): if t: if timezone == "utc": t = time.gmtime(t) elif timezone == "sensor_localtime": t = time.gmtime(int(t) + t.gmt_offset) else: # timezone == "frontend_localtime" t = time.localtime(t) current = time.localtime() if t[:3] == current[:3]: # message time is today t = utils.time_to_hms(t) else: t = utils.time_to_ymdhms(t) else: t = "n/a" return { "value": t } def createHostField(self, object, value, category=None, direction=None, dns=True): field = self.createInlineFilteredField(object, value, direction) field["host_commands"] = [ ] field["category"] = category if value and dns is True: field["hostname"] = resolve.AddressResolve(value) else: field["hostname"] = value or _("n/a") if not value: return field for command in self.env.host_commands.keys(): field["host_commands"].append((command.capitalize(), utils.create_link("Command", { "origin": self.view_name, "command": command, "host": value }))) return field def createMessageIdentLink(self, messageid, view): return utils.create_link(view, { "origin": self.view_name, "messageid": messageid }) def createMessageLink(self, ident, view): return utils.create_link(view, { "origin": self.view_name, "ident": ident }) class MessageListing: def _adjustCriteria(self, criteria): pass def render(self): self.dataset["auto_apply_value"] = self.parameters["auto_apply_value"] self.dataset["auto_apply_enable"] = self.parameters["auto_apply_enable"] # We need to remove x/y from parameters, so that they aren't used for link. self.dataset["hidden_parameters"] = [ ] if self.parameters.has_key("x"): self.dataset["hidden_parameters"].append( ("x", self.parameters.pop("x")) ) else: self.dataset["hidden_parameters"].append( ("x", "") ) if self.parameters.has_key("y"): self.dataset["hidden_parameters"].append( ("y", self.parameters.pop("y")) ) else: self.dataset["hidden_parameters"].append( ("y", "") ) def _setHiddenParameters(self): self.dataset["hidden_parameters"].append( ("view", self.view_name) ) if self.parameters.has_key("timeline_end"): self.dataset["hidden_parameters"].append(("timeline_end", self.parameters["timeline_end"])) def _setTimelineNext(self, next): parameters = self.parameters - [ "offset" ] + { "timeline_end": int(next) } self.dataset["timeline.next"] = utils.create_link(self.view_name, parameters) def _setTimelinePrev(self, prev): parameters = self.parameters - [ "offset" ] + { "timeline_end": int(prev) } self.dataset["timeline.prev"] = utils.create_link(self.view_name, parameters) def _getTimelineRange(self): if self.parameters.has_key("timeline_start"): start = _MyTime(self.parameters["timeline_start"]) end = start[self.parameters["timeline_unit"]] + self.parameters["timeline_value"] elif self.parameters.has_key("timeline_end"): end = _MyTime(self.parameters["timeline_end"]) start = end[self.parameters["timeline_unit"]] - self.parameters["timeline_value"] else: end = _MyTime() if not self.parameters["timeline_unit"] in ("min", "hour"): end.round(self.parameters["timeline_unit"]) start = end[self.parameters["timeline_unit"]] - self.parameters["timeline_value"] return start, end def _setTimeline(self, start, end): for t in "time_desc", "time_asc", "count_desc", "count_asc": self.dataset["timeline.%s_selected" % t] = "" self.dataset["timeline.%s_selected" % self.parameters["orderby"]] = "selected='selected'" for unit in "min", "hour", "day", "month", "year", "unlimited": self.dataset["timeline.%s_selected" % unit] = "" self.dataset["timeline.value"] = self.parameters["timeline_value"] self.dataset["timeline.%s_selected" % self.parameters["timeline_unit"]] = "selected='selected'" if self.parameters["timezone"] == "utc": func = time.gmtime self.dataset["timeline.range_timezone"] = "UTC" else: func = time.localtime self.dataset["timeline.range_timezone"] = "%+.2d:%.2d" % utils.get_gmt_offset() if not start and not end: return self.dataset["timeline.start"] = utils.time_to_ymdhms(func(int(start))) self.dataset["timeline.end"] = utils.time_to_ymdhms(func(int(end))) self.dataset["timeline.current"] = utils.create_link(self.view_name, self.parameters - ["timeline_end"]) if not self.parameters.has_key("timeline_end") and self.parameters["timeline_unit"] in ("min", "hour"): tmp = copy.copy(end) tmp.round(self.parameters["timeline_unit"]) tmp = tmp[self.parameters["timeline_unit"]] - 1 self._setTimelineNext(tmp[self.parameters["timeline_unit"]] + self.parameters["timeline_value"]) self._setTimelinePrev(tmp[self.parameters["timeline_unit"]] - (self.parameters["timeline_value"] - 1)) else: self._setTimelineNext(end[self.parameters["timeline_unit"]] + self.parameters["timeline_value"]) self._setTimelinePrev(end[self.parameters["timeline_unit"]] - self.parameters["timeline_value"]) def _setNavPrev(self, offset): if offset: self.dataset["nav.first"] = utils.create_link(self.view_name, self.parameters - [ "offset" ]) self.dataset["nav.prev"] = utils.create_link(self.view_name, self.parameters + { "offset": offset - self.parameters["limit"] }) else: self.dataset["nav.prev"] = None def _setNavNext(self, offset, count): if count > offset + self.parameters["limit"]: offset = offset + self.parameters["limit"] self.dataset["nav.next"] = utils.create_link(self.view_name, self.parameters + { "offset": offset }) offset = count - ((count % self.parameters["limit"]) or self.parameters["limit"]) self.dataset["nav.last"] = utils.create_link(self.view_name, self.parameters + { "offset": offset }) else: self.dataset["nav.next"] = None def _setTimezone(self): for timezone in "utc", "sensor_localtime", "frontend_localtime": if timezone == self.parameters["timezone"]: self.dataset["timeline.%s_selected" % timezone] = "selected='selected'" else: self.dataset["timeline.%s_selected" % timezone] = "" def _getInlineFilter(self, name): return name, self.parameters.get(name) def _setMessages(self, criteria): self.dataset["messages"] = [ ] results = self._getMessageIdents(criteria, order_by=self.parameters["orderby"]) for ident in results[self.parameters["offset"] : self.parameters["offset"] + self.parameters["limit"]]: message = self._fetchMessage(ident) dataset = self._setMessage(message, ident) self.dataset["messages"].append(dataset) return len(results) def _deleteMessages(self): if len(self.parameters["delete"]) == 0: return if not self.user.has(User.PERM_IDMEF_ALTER): raise User.PermissionDeniedError(self.current_view) idents = [ ] for delete in self.parameters["delete"]: if delete.isdigit(): idents += [ long(delete) ] else: criteria = urllib.unquote_plus(delete) idents += self._getMessageIdents(criteria) self._deleteMessage(idents) del self.parameters["delete"] prewikka-1.0.0/prewikka/views/alertlisting.py0000664000076400007640000015737411341167176020446 0ustar yoannyoann# Copyright (C) 2004,2005,2006 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import copy, re, urllib, time, prelude, preludedb, operator from prewikka import view, User, utils from prewikka.views.messagelisting import MessageListingParameters, MessageListing, ListedMessage def cmp_severities(x, y): d = { None: 0, "info": 1, "low": 2, "medium": 3, "high": 4 } return d[y] - d[x] def _normalizeName(name): return "".join([ i.capitalize() for i in name.split("_") ]) def _getEnumValue(class_id): i = 0 nlist = [ ] while True: value = prelude.idmef_class_enum_to_string(class_id, i) i += 1 if value == None: if i == 1: continue break nlist += [ value ] return nlist def _getOperatorList(type): if type == prelude.IDMEF_VALUE_TYPE_STRING: return ["<>*", "<>", "=", "~*", "~", "!" ] elif type == prelude.IDMEF_VALUE_TYPE_DATA: return ["<>*", "<>", "~", "~*", "=", "<", ">", "!" ] else: return ["=", "<", ">", "<=", ">=" ] def _getPathList(class_id, path, add_index=None, depth=0): plist = [] if depth == 0: if not add_index: path = path.replace("(0)", "").replace("(-1)", "") tmp = path[path.rfind(".") + 1:] elen = tmp.find("(") if elen == -1: plist += [( _normalizeName(tmp), None, None, None) ] else: plist += [( _normalizeName(tmp[:elen]), None, None, None) ] depth += 1 i = 0 child_list = [] while True: name = prelude.idmef_class_get_child_name(class_id, i) if not name or (name == "file" and class_id == prelude.IDMEF_CLASS_ID_LINKAGE): break vtype = prelude.idmef_class_get_child_value_type(class_id, i) space = " " * depth if vtype == prelude.IDMEF_VALUE_TYPE_CLASS: if add_index and prelude.idmef_class_is_child_list(class_id, i): index = add_index else: index = "" child_list += [ (space + _normalizeName(name), None, None, None) ] child_list += _getPathList(prelude.idmef_class_get_child_class(class_id, i), path + "." + name + index, add_index, depth + 1) else: if vtype == prelude.IDMEF_VALUE_TYPE_ENUM: pval = _getEnumValue(prelude.idmef_class_get_child_class(class_id, i)) else: pval = None plist += [( space + name, path + "." + name, _getOperatorList(vtype), pval) ] i += 1 return plist + child_list def _getClassificationPath(add_empty=False, add_index=None): empty = [ ] if add_empty: empty += [("", "none", None, None)] return empty + \ [("messageid", "alert.messageid", _getOperatorList(prelude.IDMEF_VALUE_TYPE_STRING), None)] + \ _getPathList(prelude.IDMEF_CLASS_ID_CLASSIFICATION, "alert.classification", add_index=add_index) + \ _getPathList(prelude.IDMEF_CLASS_ID_ASSESSMENT, "alert.assessment", add_index=add_index) + \ _getPathList(prelude.IDMEF_CLASS_ID_OVERFLOW_ALERT, "alert.overflow_alert", add_index=add_index) + \ _getPathList(prelude.IDMEF_CLASS_ID_CORRELATION_ALERT, "alert.correlation_alert", add_index=add_index) + \ _getPathList(prelude.IDMEF_CLASS_ID_TOOL_ALERT, "alert.tool_alert", add_index=add_index) + \ _getPathList(prelude.IDMEF_CLASS_ID_ADDITIONAL_DATA, "alert.additional_data", add_index=add_index) def _getSourcePath(add_empty=False, add_index=None): empty = [ ] if add_empty: empty += [("", "none", None, None)] return empty + _getPathList(prelude.IDMEF_CLASS_ID_SOURCE, "alert.source(0)", add_index=add_index) def _getTargetPath(add_empty=False, add_index=None): empty = [ ] if add_empty: empty += [("", "none", None, None)] return empty + _getPathList(prelude.IDMEF_CLASS_ID_TARGET, "alert.target(0)", add_index=add_index) def _getAnalyzerPath(add_empty=False, add_index=None): empty = [ ] if add_empty: empty += [("", "none", None, None)] return empty + _getPathList(prelude.IDMEF_CLASS_ID_ANALYZER, "alert.analyzer(-1)", add_index=add_index) COLUMN_LIST = [ "classification", "source", "target", "analyzer" ] CLASSIFICATION_FILTERS = _getClassificationPath() CLASSIFICATION_AGGREGATIONS = _getClassificationPath(add_empty=True, add_index="(0)") CLASSIFICATION_GENERIC_SEARCH_FIELDS = [ "alert.classification.text", "alert.classification.reference.name", "alert.classification.reference.origin", "alert.assessment.impact.completion" ] SOURCE_FILTERS = _getSourcePath() SOURCE_AGGREGATIONS = _getSourcePath(add_empty=True, add_index="(0)") SOURCE_GENERIC_SEARCH_FIELDS = [ "alert.source.node.address.address", "alert.source.user.user_id.name", "alert.source.user.user_id.number", "alert.source.process.name", "alert.source.process.pid", "alert.source.service.protocol", "alert.source.service.iana_protocol_name", "alert.source.service.iana_protocol_number", "alert.source.service.port" ] TARGET_FILTERS = _getTargetPath() TARGET_AGGREGATIONS = _getTargetPath(add_empty=True, add_index="(0)") TARGET_GENERIC_SEARCH_FIELDS = [ "alert.target.node.address.address", "alert.target.user.user_id.name", "alert.target.user.user_id.number", "alert.target.process.name", "alert.target.process.pid", "alert.target.service.protocol", "alert.target.service.iana_protocol_name", "alert.target.service.iana_protocol_number", "alert.target.service.port" ] ANALYZER_FILTERS = _getAnalyzerPath() ANALYZER_AGGREGATIONS = _getAnalyzerPath(add_empty=True, add_index="(0)") ANALYZER_GENERIC_SEARCH_FIELDS = [ "alert.analyzer.name", "alert.analyzer.node.name" ] GENERIC_SEARCH_TABLE = { "classification": CLASSIFICATION_GENERIC_SEARCH_FIELDS, "source": SOURCE_GENERIC_SEARCH_FIELDS, "target": TARGET_GENERIC_SEARCH_FIELDS, "analyzer": ANALYZER_GENERIC_SEARCH_FIELDS } class AlertListingParameters(MessageListingParameters): allow_extra_parameters = True def __init__(self, *args, **kwargs): apply(MessageListingParameters.__init__, (self, ) + args, kwargs) MessageListingParameters.__init__(self) self._dynamic_param = { "classification": {}, "source": {}, "target": {}, "analyzer": {} } self._default_param = { "classification": {}, "source": {}, "target": {}, "analyzer": {} } self._saved = { "classification": [], "source": [], "target": [], "analyzer": [] } def register(self): self.max_index = 0 MessageListingParameters.register(self) self.optional("aggregated_source", list, [ "alert.source(0).node.address(0).address" ], save=True) self.optional("aggregated_target", list, [ "alert.target(0).node.address(0).address" ], save=True) self.optional("aggregated_classification", list, [ "none" ], save=True) self.optional("aggregated_analyzer", list, [ "none" ], save=True) self.optional("filter", str, save=True) self.optional("alert.assessment.impact.severity", list, [ "info", "low", "medium", "high", "n/a" ], save=True) self.optional("alert.assessment.impact.completion", list, [ "succeeded", "failed", "n/a" ], save=True) self.optional("alert.type", list, ["alert.create_time", "alert.correlation_alert.name", "alert.overflow_alert.program", "alert.tool_alert.name"], save=True) def _checkOperator(self, operator): if not operator in ("=", "<", ">", "<=", ">=", "~", "~*", "<>", "<>*", "!"): raise view.InvalidParameterValueError("operator", operator) def _setParam(self, view_name, user, column, param, value, is_default=False): self._dynamic_param[column][param] = value if is_default: self._default_param[column][param] = value user.setConfigValue(view_name, param, value) elif user.configuration.has_key(view_name) and user.configuration[view_name].has_key(param) and user.configuration[view_name][param] != value: self._default_param[column][param] = value if not self.has_key(param): # the parameter is loaded from config self[param] = value def _paramDictToList(self, params_dict, column): sorted = [] ret = False for parameter, object in params_dict.items(): idx = parameter.find(column + "_object_") if idx == -1: continue num = int(parameter.replace(column + "_object_", "", 1)) if num >= self.max_index: self.max_index = num + 1 ret = True operator = params_dict.get(column + "_operator_" + str(num), "=") self._checkOperator(operator) try: value = params_dict[column + "_value_" + str(num)] except KeyError: if operator != "!": continue value = "" do_append = True for tmp in sorted: if tmp[1] == object and tmp[2] == operator and tmp[3] == value: do_append = False break if do_append: sorted.append((num, object, operator, value)) sorted.sort() return ret, sorted def _loadColumnParam(self, view_name, user, paramlist, column, do_save): is_saved = False if do_save: paramlist = copy.copy(paramlist) user.delConfigValueMatch(view_name, "%s_object_" % (column)) user.delConfigValueMatch(view_name, "%s_operator_" % (column)) user.delConfigValueMatch(view_name, "%s_value_" % (column)) self[column] = [] ret, sorted = self._paramDictToList(paramlist, column) for i in sorted: self._setParam(view_name, user, column, "%s_object_%d" % (column, i[0]), i[1], is_default=do_save) self._setParam(view_name, user, column, "%s_operator_%d" % (column, i[0]), i[2], is_default=do_save) self._setParam(view_name, user, column, "%s_value_%d" % (column, i[0]), i[3], is_default=do_save) self[column].append(i[1:]); return ret def normalize(self, view_name, user): do_save = self.has_key("_save") do_load = MessageListingParameters.normalize(self, view_name, user) for severity in self["alert.assessment.impact.severity"]: if not severity in ("info", "low", "medium", "high", "n/a"): raise view.InvalidParameterValueError("alert.assessment.impact.severity", severity) for completion in self["alert.assessment.impact.completion"]: if not completion in ("succeeded", "failed", "n/a"): raise view.InvalidParameterValueError("alert.assessment.impact.completion", completion) for type in self["alert.type"]: if not type in ("alert.create_time", "alert.correlation_alert.name", "alert.overflow_alert.program", "alert.tool_alert.name"): raise view.InvalidParameterValueError("alert.type", type) load_saved = True for column in "classification", "source", "target", "analyzer": ret = self._loadColumnParam(view_name, user, self, column, do_save) if ret: load_saved = False if load_saved and do_load and user.configuration.has_key(view_name): for column in "classification", "source", "target", "analyzer": self._loadColumnParam(view_name, user, user.configuration[view_name], column, do_save) for column in COLUMN_LIST: if user.configuration.has_key(view_name): for i in self._paramDictToList(user.configuration[view_name], column)[1]: self._saved[column].append(i[1:]) for i in user.configuration[view_name].keys(): if i.find(column + "_object_") != -1 or i.find(column + "_operator_") != -1 or i.find(column + "_value_") != -1: self._default_param[column][i] = user.configuration[view_name][i] i = 0 for path in self["aggregated_%s" % column]: if self["aggregated_%s" % column].count(path) > 1: self["aggregated_%s" % column].remove(path) if path[0] == "!": self["aggregated_%s" % column][i] = path[1:] i += 1 def getDefaultParams(self, column): return self._default_param[column] def getDynamicParams(self, column): return self._dynamic_param[column] def _isSaved(self, column, param): if not self._default_param[column].has_key(param): return False if not self.has_key(param): return False if self._default_param[column][param] == self[param]: return True return False def isSaved(self, column, param): if self._isSaved(column, param): return True return MessageListingParameters.isSaved(self, param) class SensorAlertListingParameters(AlertListingParameters): def register(self): AlertListingParameters.register(self) self.mandatory("analyzerid", str) def normalize(self, view_name, user): AlertListingParameters.normalize(self, view_name, user) self["analyzer"].insert(0, ("alert.analyzer.analyzerid", "=", unicode(self["analyzerid"]))) class CorrelationAlertListingParameters(AlertListingParameters): def register(self): AlertListingParameters.register(self) self.optional("aggregated_source", list, [ "none" ], save=True) self.optional("aggregated_target", list, [ "none" ], save=True) self.optional("alert.type", list, ["alert.correlation_alert.name"], save=True) def normalize(self, view_name, user): AlertListingParameters.normalize(self, view_name, user) class ToolAlertListingParameters(AlertListingParameters): def register(self): AlertListingParameters.register(self) self.optional("aggregated_source", list, [ "none" ], save=True) self.optional("aggregated_target", list, [ "none" ], save=True) self.optional("alert.type", list, ["alert.tool_alert.name"], save=True) def normalize(self, view_name, user): AlertListingParameters.normalize(self, view_name, user) class ListedAlert(ListedMessage): def __init__(self, *args, **kwargs): apply(ListedMessage.__init__, (self, ) + args, kwargs) self.reset() def _getKnownValue(self, direction, key): return { "alert.%s.service.port" % direction: ("service", None), "alert.%s.node.address.address" % direction: ("addresses", self._setMessageDirectionAddress), "alert.%s.node.name" % direction: ("addresses", self._setMessageDirectionNodeName), }[key] def _initValue(self, dataset, name, value): dataset[name] = value def _initDirection(self, dataset): self._initValue(dataset, "port", { "value": None }) self._initValue(dataset, "protocol", { "value": None }) self._initValue(dataset, "service", { "value": None, "inline_filter": None, "already_filtered": False }) self._initValue(dataset, "addresses", [ ]) self._initValue(dataset, "listed_values", [ ]) self._initValue(dataset, "aggregated_hidden", 0) return dataset def _initDirectionIfNeeded(self, direction): if len(self[direction]) == 0: self[direction].append(self._initDirection({ })) def _setMainAndExtraValues(self, dataset, name, object_main, object_extra): if object_main != None: dataset[name] = { "value": object_main } dataset[name + "_extra"] = { "value": object_extra } else: dataset[name] = { "value": object_extra } dataset[name + "_extra"] = { "value": None } def _guessAddressCategory(self, address): if re.compile("\d\.\d\.\d\.\d").match(address): return "ipv4-addr" elif re.compile(".*@.*").match(address): return "e-mail" elif address.count(":") > 1: return "ipv6-addr" return None def _setMessageDirectionAddress(self, dataset, direction, address, category=None): if category == None and address: category = self._guessAddressCategory(address) if dataset.has_key("no_dns"): dns = False else: dns = True hfield = self.createHostField("alert.%s.node.address.address" % direction, address, category=category, direction=direction, dns=dns) dataset["addresses"].append(hfield) def _setMessageDirectionNodeName(self, dataset, direction, name): dataset["no_dns"] = True dataset["addresses"].append(self.createHostField("alert.%s.node.name" % direction, name, direction=direction)) def _setMessageDirectionOther(self, dataset, direction, path, value, extra_path=None, extra=None, allow_empty_value=False): if path == "__all__": return if value == None: if allow_empty_value is False and extra is None: return if extra is not None: value = extra path = extra_path extra = extra_path = None l = path.split(".") l[-2] = l[-2].replace("(0)", "") if l[-2] != direction: name = _normalizeName(l[-2]) + " " else: name = "" name += l[-1] item = (name, self.createInlineFilteredField(path, value, direction, real_value=value or "n/a"), extra) if not item in dataset["listed_values"]: dataset["listed_values"].append(item) def _setMessageDirection(self, dataset, direction, obj): dataset["interface"] = { "value": obj["interface"] } for userid in obj["user.user_id"]: self._setMessageDirectionOther(dataset, direction, "alert.%s.user.user_id.name" % direction, userid["name"], "alert.%s.user.user_id.number" % direction, userid["number"]) name = obj["node.name"] if name != None: self._setMessageDirectionNodeName(dataset, direction, name) for addr in obj["node.address"]: self._setMessageDirectionAddress(dataset, direction, addr["address"], addr["category"]) self._setMessageDirectionOther(dataset, direction, "alert.%s.process.name" % direction, obj["process.name"], "alert.%s.process.pid" % direction, extra=obj["process.pid"]) pl = [] vl = [] proto = None if obj["service.iana_protocol_name"]: proto = obj["service.iana_protocol_name"] ppath = "alert.%s.service.iana_protocol_name" % direction pl.append("alert.%s.service.iana_protocol_name" % direction) vl.append(proto) elif obj["service.iana_protocol_number"]: num = obj["service.iana_protocol_number"] proto = utils.protocol_number_to_name(num) pl.append("alert.%s.service.iana_protocol_number" % direction) vl.append(num) if not proto and obj["service.protocol"]: proto = obj["service.protocol"] pl.append("alert.%s.service.protocol" % direction) vl.append(proto) pstr = None if proto or obj["service.port"]: if obj["service.port"]: pl.append("alert.%s.service.port" % direction) vl.append(obj["service.port"]) pstr = str(obj["service.port"]) if proto: pstr += "/" + proto elif proto: pstr = proto dataset["service"] = self.createInlineFilteredField(pl, vl, direction, real_value=pstr) self._setMainAndExtraValues(dataset, "protocol", proto, None) self._setMainAndExtraValues(dataset, "port", obj["service.port"], None) dataset["files"] = [] def _lookupDataset(self, dlist, dataset): for dset in dlist: if dset.items() == dataset.items(): return dset return None def _setMessageSource(self, message, ident): total = 0 index = 0 for source in message["alert.source"]: dataset = { } self._initDirection(dataset) self._setMessageDirection(dataset, "source", source) if not self._lookupDataset(self["source"], dataset): total += 1 if self._source_index == self.env.max_aggregated_source: continue index += 1 self._source_index += 1 self["source"].append(dataset) if total == 0: self._initDirectionIfNeeded("source") self._setMessageDirectionAddress(self["source"][-1], "source", None) self["aggregated_source_total"] += total self["aggregated_source_hidden"] += (total - index) if message["alert.correlation_alert.name"]: self["aggregated_source_expand"] = self["sub_alert_display"] else: self["aggregated_source_expand"] = self.createMessageLink(ident, "alert_summary") def _setMessageTarget(self, message, ident): index = 0 total = 0 for target in message["alert.target"]: dataset = { } self._initDirection(dataset) self._setMessageDirection(dataset, "target", target) flist = [] for f in target["file"]: if f["path"] in flist: continue flist.append(f["path"]) self._setMessageDirectionOther(dataset, "target", "alert.target.file.path", f["path"]) if not self._lookupDataset(self["target"], dataset): total += 1 if self._target_index == self.env.max_aggregated_target: continue index += 1 self._target_index += 1 self["target"].append(dataset) if total == 0: self._initDirectionIfNeeded("target") self._setMessageDirectionAddress(self["target"][-1], "target", None) self["aggregated_target_total"] += total self["aggregated_target_hidden"] += (total - index) if message["alert.correlation_alert.name"]: self["aggregated_target_expand"] = self["sub_alert_display"] else: self["aggregated_source_expand"] = self.createMessageLink(ident, "alert_summary") def _setMessageClassificationReferences(self, dataset, message): dataset["classification_references"] = [ ] for ref in message["alert.classification.reference"]: pl = [] vl = [] fstr = "" origin = ref["origin"] if origin: pl.append("alert.classification.reference.origin") vl.append(origin) fstr += origin name = ref["name"] if name: pl.append("alert.classification.reference.name") vl.append(name) fstr += ":" + name urlstr = "https://www.prelude-ids.com/reference_details.php?origin=%s&name=%s" % (urllib.quote(ref["origin"]), urllib.quote(ref["name"])) if ref["origin"] in ("vendor-specific", "user-specific"): urlstr += "&url=" + urllib.quote(ref["url"], safe="") fstr = self.createInlineFilteredField(pl, vl, "classification", fstr) dataset["classification_references"].append((urlstr, fstr)) def _setMessageClassification(self, dataset, message): self._setMessageClassificationReferences(dataset, message) dataset["classification"] = self.createInlineFilteredField("alert.classification.text", message["alert.classification.text"], "classification") def _setMessageAlertIdentInfo(self, message, alert, ident): fetch_classification_info = fetch_source_info = fetch_target_info = True i = 0 params = { } criteria = [ ] source_analyzer = None for alertident in alert["alertident"]: i += 1 # IDMEF draft 14 page 27 # If the "analyzerid" is not provided, the alert is assumed to have come # from the same analyzer that is sending the Alert. analyzerid = alertident["analyzerid"] if not analyzerid: if source_analyzer: analyzerid = source_analyzer else: for a in message["analyzer"]: if a["analyzerid"]: source_analyzer = analyzerid = a["analyzerid"] break params["analyzer_object_%d" % i] = "alert.analyzer.analyzerid" params["analyzer_value_%d" % i] = analyzerid params["classification_object_%d" % i] = "alert.messageid" params["classification_value_%d" % i] = alertident["alertident"] criteria.append("(alert.messageid = '%s' && alert.analyzer.analyzerid = '%s')" % (utils.escape_criteria(alertident["alertident"]), utils.escape_criteria(analyzerid))) self["sub_alert_number"] = i self["sub_alert_name"] = alert["name"] self["sub_alert_link"] = self.createMessageLink(ident, "alert_summary") params["timeline_unit"] = "unlimited" params["aggregated_source"] = params["aggregated_target"] = params["aggregated_classification"] = params["aggregated_analyzer"] = "none" self["sub_alert_display"] = utils.create_link("alert_listing", params) def _setClassificationInfos(self, dataset, message, ident): dataset["count"] = 1 dataset["display"] = self.createMessageLink(ident, "alert_summary") dataset["severity"] = { "value": message["alert.assessment.impact.severity"] } dataset["completion"] = self.createInlineFilteredField("alert.assessment.impact.completion", message["alert.assessment.impact.completion"]) def _setMessageTime(self, message): self["time"] = self.createTimeField(message["alert.create_time"], self.timezone) if (message["alert.analyzer_time"] != None and abs(int(message["alert.create_time"]) - int(message["alert.analyzer_time"])) > 60): self["analyzer_time"] = self.createTimeField(message["alert.analyzer_time"], self.timezone) else: self["analyzer_time"] = { "value": None } def addSensor(self, message): sensor = { } self["sensors"].append(sensor) for path in ("alert.analyzer(-1).name", "alert.analyzer(-1).model"): val = message[path] if val: sensor["name"] = self.createInlineFilteredField(path, val, direction="analyzer") break if not val: sensor["name"] = self.createInlineFilteredField("alert.analyzer(-1).name", val, direction="analyzer") sensor["node_name"] = self.createInlineFilteredField("alert.analyzer(-1).node.name", message["alert.analyzer(-1).node.name"], direction="analyzer") def setMessage(self, message, ident): self["infos"] = [ { } ] self["aggregated"] = False self["delete"] = ident self.addSensor(message) self._setMessageTime(message) dataset = self["infos"][0] self._setClassificationInfos(dataset, message, ident) self._setMessageClassification(dataset, message) if message["alert.correlation_alert"]: self["sub_alert_type"] = _("Correlation Alert") self._setMessageAlertIdentInfo(message, message["alert.correlation_alert"], ident) elif message["alert.tool_alert"]: self["sub_alert_type"] = _("Tool Alert") self._setMessageAlertIdentInfo(message, message["alert.tool_alert"], ident) if not self["source"]: self._setMessageSource(message, ident) if not self["target"]: self._setMessageTarget(message, ident) def setMessageDirectionGeneric(self, direction, object, value, allow_empty_value=True): self._initDirectionIfNeeded(direction) dataset = self[direction][-1] try: dset_name, function = self._getKnownValue(direction, object.replace("(0)", "")) except KeyError: return self._setMessageDirectionOther(dataset, direction, object, value, allow_empty_value=allow_empty_value) if function: function(dataset, direction, value) else: if type(dataset[dset_name]) is list: dataset[dset_name].append({ "value": value }) else: dataset[dset_name]["value"] = value def reset(self): self["sensors"] = [ ] self["source"] = [ ] self["target"] = [ ] self["sub_alert_name"] = None self["aggregated_source_total"] = 0 self["aggregated_source_hidden"] = 0 self["aggregated_source_expand"] = 0 self["aggregated_target_total"] = 0 self["aggregated_target_hidden"] = 0 self["aggregated_target_expand"] = 0 self._source_index = 0 self._target_index = 0 class ListedAggregatedAlert(ListedAlert): def __init__(self, *args, **kwargs): apply(ListedAlert.__init__, (self,) + args, kwargs) self["aggregated"] = True self["aggregated_classification_hidden"] = 0 self["infos"] = [ ] self["source"] = [ ] self["target"] = [ ] def setTime(self, time_min, time_max): self["time_min"] = self.createTimeField(time_min, self.parameters["timezone"]) self["time_max"] = self.createTimeField(time_max, self.parameters["timezone"]) def setCriteriaForDeletion(self, delete_criteria): self["delete"] = urllib.quote_plus(" && ".join(delete_criteria)) def setInfos(self, count, classification, severity, completion): infos = { "classification_references": "", "count": count, "classification": self.createInlineFilteredField("alert.classification.text", classification, direction="classification"), "severity": { "value": severity }, "completion": self.createInlineFilteredField("alert.assessment.impact.completion", completion) } self["infos"].append(infos) return infos class AlertListing(MessageListing, view.View): view_name = "alert_listing" view_parameters = AlertListingParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "AlertListing" root = "alert" summary_view = "alert_summary" details_view = "alert_details" listed_alert = ListedAlert listed_aggregated_alert = ListedAggregatedAlert alert_type_default = ["alert.create_time", "alert.correlation_alert.name", "alert.overflow_alert.program", "alert.tool_alert.name"] def init(self, env): self._max_aggregated_classifications = int(env.config.general.getOptionValue("max_aggregated_classifications", 10)) def _getMessageIdents(self, criteria, limit=-1, offset=-1, order_by="time_desc"): return self.env.idmef_db.getAlertIdents(criteria, limit, offset, order_by) def _fetchMessage(self, ident): return self.env.idmef_db.getAlert(ident) def _setMessage(self, message, ident): msg = self.listed_alert(self.view_name, self.env, self.parameters) msg.setMessage(message, ident) msg["aggregated"] = False msg["delete"] = ident return msg def _deleteMessage(self, ident): self.env.idmef_db.deleteAlert(ident) def _lists_have_same_content(self, l1, l2): l1 = copy.copy(l1) l2 = copy.copy(l2) l1.sort() l2.sort() return l1 == l2 def _applyOptionalEnumFilter(self, criteria, column, object, values): if ( self.parameters.has_key(object) and not self._lists_have_same_content(self.parameters[object], values) ): new = [ ] for value in values: if value in self.parameters[object]: if value == "n/a": new.append("!%s" % (object)) else: new.append("%s = '%s'" % (object, utils.escape_criteria(value))) criteria.append("(" + " || ".join(new) + ")") self.dataset[object] = self.parameters[object] else: self.dataset[object] = values def _applyAlertTypeFilters(self, criteria): if "alert.create_time" in self.parameters["alert.type"]: have_base = True else: have_base = False new = [ ] for param in ["alert.correlation_alert.name", "alert.overflow_alert.program", "alert.tool_alert.name"]: if not have_base: if param in self.parameters["alert.type"]: new.append("%s" % param) else: if not param in self.parameters["alert.type"]: new.append("!%s" % param) self.dataset["alert.type"] = self.parameters["alert.type"] if len(new) == 0: return if not have_base: criteria.append("(" + " || ".join(new) + ")") else: criteria.append("(" + " && ".join(new) + ")") def _applyClassificationFilters(self, criteria): self._applyAlertTypeFilters(criteria) self._applyOptionalEnumFilter(criteria, "classification", "alert.assessment.impact.severity", ["info", "low", "medium", "high", "n/a"]) self._applyOptionalEnumFilter(criteria, "classification", "alert.assessment.impact.completion", ["failed", "succeeded", "n/a"]) def _criteriaValueFind(self, str, clist=[]): out="" found = False escaped = False for c in str: if escaped: escaped = False else: if c in clist: found = True if c == '\\': escaped = True out += c return out, found def _adjustFilterValue(self, op, value): if op != "<>*" and op != "<>": return value value = value.strip() value, has_wildcard = self._criteriaValueFind(value, ["*"]) if has_wildcard: return value return "*" + value + "*" def _filterTupleToString(self, (object, operator, value)): if operator == "!": return "!%s" % (object) return "%s %s '%s'" % (object, operator, utils.escape_criteria(self._adjustFilterValue(operator, value))) def _getOperatorForPath(self, path, value): path = path.encode("utf8") value = value.encode("utf8") # Check whether the path can handle substring comparison # this need to be done first, since enum check with * won't work with "=" operator. try: c = prelude.idmef_criteria_new_from_string(path + " <>* '" + utils.escape_criteria(value) + "'") except: # Check whether this path can handle the provided value. try: c = prelude.idmef_criteria_new_from_string(path + " = '" + utils.escape_criteria(value) + "'") except: return None prelude.idmef_criteria_destroy(c) return "=" prelude.idmef_criteria_destroy(c) return "<>*" def _applyFiltersForCategory(self, criteria, type): if not self.parameters[type]: self.dataset[type] = [ ("__all__", "", "") ] return # If one object is specified more than one time, and since this object # can not have two different value, we want to apply an OR operator. # # We apply an AND operator between the different objects. merge = { } newcrit = "" for obj in self.parameters[type]: if obj[0] == "__all__": # We want to lookup the value in our set of predefined path, but also in aggregated # value (which the user can see in the filtered columns). for path in GENERIC_SEARCH_TABLE[type] + self.parameters.get("aggregated_%s" % type): op = self._getOperatorForPath(path, obj[2]) if op: if len(newcrit) > 0: newcrit += " || " newcrit += self._filterTupleToString((path, op, obj[2])) else: if merge.has_key(obj[0]): merge[obj[0]] += [ obj ] else: merge[obj[0]] = [ obj ] if len(newcrit): newcrit = "(" + newcrit + ")" for key in iter(merge): if len(newcrit) > 0: newcrit += " && " newcrit += "(" + " || ".join(map(self._filterTupleToString, merge[key])) + ")" if newcrit: criteria.append(newcrit) self.dataset[type] = [ (path.replace("(0)", "").replace("(-1)", ""), operator, value) for path, operator, value in self.parameters[type] ] def _applyFilters(self, criteria): self._applyFiltersForCategory(criteria, "classification") self._applyClassificationFilters(criteria) self._applyFiltersForCategory(criteria, "source") self._applyFiltersForCategory(criteria, "target") self._applyFiltersForCategory(criteria, "analyzer") def _getMissingAggregatedInfos(self, message, path_value_hash, parameters, criteria2, aggregated_count): selection = [ ] index = 0 selection_list = [ ] for path in ("alert.classification.text", "alert.analyzer(-1).node.name", "alert.analyzer(-1).name", "alert.analyzer(-1).model", "alert.assessment.impact.severity", "alert.assessment.impact.completion"): if not path_value_hash.has_key(path): selection_list += [ (path, index) ] index += 1 selection = [ "%s/group_by" % i[0] for i in selection_list ] alert_list = self.env.idmef_db.getValues( selection + ["max(alert.messageid)", "count(alert.messageid)" ], criteria2) alertsraw = { } nodesraw = { } for values in alert_list: for path, index in selection_list: path_value_hash[path] = values[index] max_messageid = values[-2] alert_count = values[-1] classification = path_value_hash["alert.classification.text"] analyzer_name = path_value_hash["alert.analyzer(-1).name"] analyzer_model = path_value_hash["alert.analyzer(-1).model"] analyzer_node_name = path_value_hash["alert.analyzer(-1).node.name"] severity = path_value_hash["alert.assessment.impact.severity"] completion = path_value_hash["alert.assessment.impact.completion"] alertkey = (classification or "") + "-" + (severity or "") + "-" + (completion or "") if alertsraw.has_key(alertkey): alertsraw[alertkey][-2] += alert_count else: alertsraw[alertkey] = ( [classification, severity, completion, alert_count, max_messageid] ) nodekey = (analyzer_name or analyzer_model or "") + "-" + (analyzer_node_name or "") if not nodesraw.has_key(nodekey): message.addSensor(path_value_hash) nodesraw[nodekey] = True res = alertsraw.values() res.sort(lambda x, y: cmp_severities(x[1], y[1])) result_count = 0 for classification, severity, completion, count, messageid in res: if result_count >= self._max_aggregated_classifications: continue result_count += 1 message["aggregated_classifications_hidden"] -= count infos = message.setInfos(count, classification, severity, completion) if count == 1: if aggregated_count == 1: message.reset() ident = self.env.idmef_db.getAlertIdents("alert.messageid = '%s'" % utils.escape_criteria(messageid))[0] message.setMessage(self._fetchMessage(ident), ident) else: infos["display"] = message.createMessageIdentLink(messageid, "alert_summary") else: entry_param = {} if classification is not None: entry_param["classification_object_%d" % self.parameters.max_index] = "alert.classification.text" entry_param["classification_operator_%d" % self.parameters.max_index] = "=" entry_param["classification_value_%d" % self.parameters.max_index] = classification entry_param["alert.assessment.impact.severity"] = severity or "n/a" entry_param["alert.assessment.impact.completion"] = completion or "n/a" entry_param["aggregated_target"] = \ entry_param["aggregated_source"] = \ entry_param["aggregated_analyzer"] = \ entry_param["aggregated_classification"] = "none" infos["display"] = utils.create_link(self.view_name, self.parameters - [ "offset", "aggregated_classification", "aggregated_source", "aggregated_target", "aggregated_analyzer" ] + parameters + entry_param) def _getPathValueType(self, path): p = prelude.idmef_path_new(path.encode("utf8")) t = prelude.idmef_path_get_value_type(p, -1) prelude.idmef_path_destroy(p) return t def _setAggregatedMessagesNoValues(self, criteria, ag_s, ag_t, ag_c, ag_a): ag_list = ag_s + ag_t + ag_c + ag_a ## selection = [ "%s/group_by" % path for path in ag_list ] if self.parameters["orderby"] == "time_asc": selection += [ "count(alert.create_time)", "max(alert.create_time)/order_asc" ] elif self.parameters["orderby"] == "time_desc": selection += [ "count(alert.create_time)", "max(alert.create_time)/order_desc" ] elif self.parameters["orderby"] == "count_desc": selection += [ "count(alert.create_time)/order_desc", "max(alert.create_time)" ] elif self.parameters["orderby"] == "count_asc": selection += [ "count(alert.create_time)/order_asc", "max(alert.create_time)" ] use_sensor_localtime = self.parameters["timezone"] == "sensor_localtime" if not use_sensor_localtime: selection += [ "min(alert.create_time)" ] results = self.env.idmef_db.getValues(selection, criteria) total_results = len(results) for values in results[self.parameters["offset"]:self.parameters["offset"]+self.parameters["limit"]]: start = 0 aggregated_source_values = [] aggregated_target_values = [] aggregated_classification_values = [] aggregated_analyzer_values = [] if len(ag_s) > 0: start = len(ag_s) aggregated_source_values = values[:len(ag_s)] if len(ag_t) > 0: last = start + len(ag_t) aggregated_target_values = values[start:last] start = last if len(ag_c) > 0: last = start + len(ag_c) if values[start:last]: aggregated_classification_values = values[start:last] start = last if len(ag_a) > 0: last = start + len(ag_a) if values[start:last]: aggregated_analyzer_values = values[start:last] start = last aggregated_count = values[start] criteria2 = criteria[:] delete_criteria = [ ] message = self.listed_aggregated_alert(self.view_name, self.env, self.parameters) valueshash = {} for path, value in zip(ag_list, values[:start]): valueshash[path] = value if path.find("source") != -1: direction = "source" elif path.find("target") != -1: direction = "target" else: direction = None if value == None: if self._getPathValueType(path) != prelude.IDMEF_VALUE_TYPE_STRING: criterion = "! %s" % (path) else: criterion = "(! %s || %s == '')" % (path, path) else: criterion = "%s == '%s'" % (path, utils.escape_criteria(unicode(value))) if direction != None: message.setMessageDirectionGeneric(direction, path, value) criteria2.append(criterion) delete_criteria.append(criterion) if use_sensor_localtime: time_min = self.env.idmef_db.getValues(["alert.create_time/order_asc"], criteria2, limit=1)[0][0] time_max = self.env.idmef_db.getValues(["alert.create_time/order_desc"], criteria2, limit=1)[0][0] else: time_max = values[start + 1] time_min = values[start + 2] parameters = self._createAggregationParameters(aggregated_classification_values, aggregated_source_values, aggregated_target_values, aggregated_analyzer_values) message["aggregated_classifications_total"] = aggregated_count message["aggregated_classifications_hidden"] = aggregated_count message["aggregated_classifications_hidden_expand"] = utils.create_link(self.view_name, self.parameters - [ "offset", "aggregated_source", "aggregated_target", "aggregated_analyzer" ] + parameters + { "aggregated_classification": "alert.classification.text" } ) self._getMissingAggregatedInfos(message, valueshash, parameters, criteria2, aggregated_count) delete_criteria.append("alert.create_time >= '%s'" % time_min.toYMDHMS()) delete_criteria.append("alert.create_time <= '%s'" % time_max.toYMDHMS()) self.dataset["messages"].append(message) message.setTime(time_min, time_max) if not message.has_key("delete"): message.setCriteriaForDeletion(delete_criteria) return total_results def _createAggregationParameters(self, aggregated_classification_values, aggregated_source_values, aggregated_target_values, aggregated_analyzer_values): parameters = { } for values, column in ((aggregated_classification_values, "classification"), (aggregated_source_values, "source"), (aggregated_target_values, "target"), (aggregated_analyzer_values, "analyzer")): i = self.parameters.max_index for path, value in zip(self.parameters["aggregated_%s" % column], values): parameters["%s_object_%d" % (column, i)] = path.replace("(0)", "").replace("(-1)", "") if value: parameters["%s_operator_%d" % (column, i)] = "=" else: parameters["%s_operator_%d" % (column, i)] = "!" parameters["%s_value_%d" % (column, i)] = value or "" i += 1 return parameters def _setMessages(self, criteria): self.dataset["aggregated_source"] = self.parameters["aggregated_source"] self.dataset["aggregated_target"] = self.parameters["aggregated_target"] self.dataset["aggregated_classification"] = self.parameters["aggregated_classification"] self.dataset["aggregated_analyzer"] = self.parameters["aggregated_analyzer"] ag_s = self.parameters["aggregated_source"][:] ag_t = self.parameters["aggregated_target"][:] ag_c = self.parameters["aggregated_classification"][:] ag_a = self.parameters["aggregated_analyzer"][:] for l in ag_s, ag_t, ag_c, ag_a: while "none" in l: l.remove("none") if len(ag_s + ag_t + ag_c + ag_a) > 0: return self._setAggregatedMessagesNoValues(criteria, ag_s, ag_t, ag_c, ag_a) return MessageListing._setMessages(self, criteria) def _paramChanged(self, column, paramlist): ret = 0 cd = self.parameters.getDefaultParams(column) default = self.parameters.getDefaultValues() default.update(cd) for param in paramlist + cd.keys(): if ret != 2 and self.parameters.isSaved(column, param): ret = 1 if not default.has_key(param): if self.parameters.has_key(param): if self.parameters[param] != []: #print "[%s] -> %s" % (param, self.parameters[param]) ret = 2 break continue if not self.parameters.has_key(param): #print "[%s] default=%s -> " % (param, default[param]) #continue ret = 2 break if type(default[param]) is list: default[param].sort() if type(self.parameters[param]) is list: self.parameters[param].sort() if default[param] != self.parameters[param]: #print "[%s] %s -> %s" % (param, default[param], self.parameters[param]) ret = 2 break return ret def _setDatasetConstants(self): for i in COLUMN_LIST: n = "aggregated_" + i self.dataset[n + "_saved"] = self.parameters.getDefault(n, usedb=True) self.dataset[n + "_default"] = self.parameters.getDefault(n, usedb=False) self.dataset[i + "_saved"] = self.parameters._saved[i] for i in ("alert.type", "alert.assessment.impact.severity", "alert.assessment.impact.completion"): self.dataset[i + "_saved"] = self.parameters.getDefault(i, usedb=True) self.dataset[i + "_default"] = self.parameters.getDefault(i, usedb=False) self.dataset["classification_filters"] = CLASSIFICATION_FILTERS self.dataset["classification_aggregations"] = CLASSIFICATION_AGGREGATIONS self.dataset["source_filters"] = SOURCE_FILTERS self.dataset["source_aggregations"] = SOURCE_AGGREGATIONS self.dataset["target_filters"] = TARGET_FILTERS self.dataset["target_aggregations"] = TARGET_AGGREGATIONS self.dataset["analyzer_filters"] = ANALYZER_FILTERS self.dataset["analyzer_aggregations"] = ANALYZER_AGGREGATIONS self.dataset["all_filters"] = { "classification" : CLASSIFICATION_FILTERS, "source": SOURCE_FILTERS, "target": TARGET_FILTERS, "analyzer": ANALYZER_FILTERS } self.dataset["all_aggregs"] = { "classification" : CLASSIFICATION_AGGREGATIONS, "source": SOURCE_AGGREGATIONS, "target": TARGET_AGGREGATIONS, "analyzer": ANALYZER_AGGREGATIONS } c_params = ["aggregated_classification"] + self.parameters.getDynamicParams("classification").keys() c_params += ["alert.type", "alert.assessment.impact.severity", "alert.assessment.impact.completion" ] s_params = ["aggregated_source"] + self.parameters.getDynamicParams("source").keys() t_params = ["aggregated_target"] + self.parameters.getDynamicParams("target").keys() a_params = ["aggregated_analyzer"] + self.parameters.getDynamicParams("analyzer").keys() self.dataset["classification_filtered"] = self._paramChanged("classification", c_params) self.dataset["source_filtered"] = self._paramChanged("source", s_params) self.dataset["target_filtered"] = self._paramChanged("target", t_params) self.dataset["analyzer_filtered"] = self._paramChanged("analyzer", a_params) def render(self): MessageListing.render(self) self._deleteMessages() self._setDatasetConstants() self.dataset["filters"] = self.env.db.getAlertFilterNames(self.user.login) self.dataset["current_filter"] = self.parameters.get("filter", "") criteria = [ ] if self.parameters.has_key("filter"): filter = self.env.db.getAlertFilter(self.user.login, self.parameters["filter"]) if filter: criteria.append("(%s)" % unicode(filter)) start = end = None if self.parameters.has_key("timeline_unit") and self.parameters["timeline_unit"] != "unlimited": start, end = self._getTimelineRange() criteria.append("alert.create_time >= '%s' && alert.create_time < '%s'" % (str(start), str(end))) self._applyFilters(criteria) self._adjustCriteria(criteria) self._setTimeline(start, end) self._setNavPrev(self.parameters["offset"]) self._setHiddenParameters() self.dataset["messages"] = [ ] total = self._setMessages(criteria) self.dataset["nav.from"] = self.parameters["offset"] + 1 self.dataset["nav.to"] = self.parameters["offset"] + len(self.dataset["messages"]) self.dataset["limit"] = self.parameters["limit"] self.dataset["total"] = total self.dataset["correlation_alert_view"] = False self._setNavNext(self.parameters["offset"], total) self._setTimezone() class ListedSensorAlert(ListedAlert): view_name = "sensor_alert_listing" class ListedSensorAggregatedAlert(ListedAggregatedAlert): view_name = "sensor_alert_listing" class CorrelationAlertListing(AlertListing, view.View): view_name = "correlation_alert_listing" view_parameters = CorrelationAlertListingParameters alert_type_default = [ "alert.correlation_alert.name" ] class ToolAlertListing(AlertListing, view.View): view_name = "tool_alert_listing" view_parameters = ToolAlertListingParameters alert_type_default = [ "alert.tool_alert.name" ] class SensorAlertListing(AlertListing, view.View): view_name = "sensor_alert_listing" view_parameters = SensorAlertListingParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "SensorAlertListing" listed_alert = ListedSensorAlert listed_aggregated_alert = ListedSensorAggregatedAlert def _setHiddenParameters(self): AlertListing._setHiddenParameters(self) self.dataset["hidden_parameters"].append(("analyzerid", self.parameters["analyzerid"])) def render(self): AlertListing.render(self) self.dataset["analyzer_infos"] = self.env.idmef_db.getAnalyzer(self.parameters["analyzerid"]) prewikka-1.0.0/prewikka/views/usermanagement.py0000664000076400007640000002050511340776405020741 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import view, Log, DataSet, User, Auth, Error, localization from prewikka import utils class UserSettingsDisplayParameters(view.RelativeViewParameters): def register(self): self.optional("login", str) self.optional("origin", str) class UserSettingsModifyParameters(UserSettingsDisplayParameters): def register(self): UserSettingsDisplayParameters.register(self) self.optional("language", str) self.optional("permissions", list, []) self.optional("password_current", str) self.optional("password_new", str) self.optional("password_new_confirmation", str) def normalize(self, view_name, user): view.Parameters.normalize(self, view_name, user) class UserDeleteParameters(view.Parameters): def register(self): self.optional("users", list, [ ]) class UserListing(view.View): view_name = "user_listing" view_parameters = view.Parameters view_permissions = [ User.PERM_USER_MANAGEMENT ] view_template = "UserListing" def hasPermission(self, perm, permlist): return perm in permlist def render(self): self.dataset["backend_can_create"] = self.env.auth.canCreateUser() self.dataset["backend_can_delete"] = self.env.auth.canDeleteUser() self.dataset["add_form_hiddens"] = [("view", "user_add_form")] self.dataset["permissions"] = User.ALL_PERMISSIONS self.dataset["can_set_password"] = self.env.auth and self.env.auth.canSetPassword() self.dataset["users"] = [ ] logins = self.env.auth.getUserLogins() logins.sort() for login in logins: permissions = self.env.db.getPermissions(login) tmp = { } tmp["login"] = login tmp["settings_link"] = utils.create_link("user_settings_display", { "login": login, "origin": self.view_name }) tmp["permissions"] = map(lambda perm: self.hasPermission(perm, permissions), User.ALL_PERMISSIONS) self.dataset["users"].append(tmp) class UserAddForm(view.View): view_name = "user_add_form" view_parameters = view.Parameters view_permissions = [ User.PERM_USER_MANAGEMENT ] view_template = "UserSettings" def render(self, errmsg=None): self.dataset["user.login"] = None self.dataset["user.origin"] = "user_listing" self.dataset["user.permissions"] = [] for perm in User.ALL_PERMISSIONS: self.dataset["user.permissions"] += [(perm, False)] self.dataset["errmsg"] = errmsg self.dataset["can_manage_user"] = self.user.has(User.PERM_USER_MANAGEMENT) self.dataset["can_change_password"] = self.env.auth.canSetPassword() self.dataset["ask_current_password"] = False self.dataset["available_languages"] = localization.getLanguagesAndIdentifiers() self.dataset["user.language"] = localization._DEFAULT_LANGUAGE self.dataset["hiddens"] = [ ("view", "user_add") ] self.dataset["properties"] = [ utils.text_property("Login", "login") ] if self.env.auth.canSetPassword(): self.dataset["properties"].extend((utils.password_property("Password", "password1"), utils.password_property("Password confirmation", "password2"))) for perm in User.ALL_PERMISSIONS: self.dataset["properties"].append(utils.boolean_property(perm, perm)) class UserDelete(UserListing): view_name = "user_delete" view_parameters = UserDeleteParameters def render(self): for user in self.parameters["users"]: self.env.db.deleteUser(user) self.parameters.clear() UserListing.render(self) class UserSettingsDisplay(view.View): view_name = "user_settings_display" view_parameters = UserSettingsDisplayParameters view_permissions = [ ] view_template = "UserSettings" def render(self): login = self.parameters.get("login", self.user.login) if login != self.user.login and not self.user.has(User.PERM_USER_MANAGEMENT): raise Error.PrewikkaUserError("Permission Denied", "Access denied to other users settings", log=Log.WARNING) self.dataset["available_languages"] = localization.getLanguagesAndIdentifiers() self.dataset["user.language"] = self.env.db.getLanguage(login) or localization._DEFAULT_LANGUAGE self.dataset["ask_current_password"] = (login == self.user.login) self.dataset["can_manage_user"] = self.user.has(User.PERM_USER_MANAGEMENT) self.dataset["can_change_password"] = self.env.auth.canSetPassword() self.dataset["user.login"] = login self.dataset["user.permissions"] = [ ] if self.parameters.has_key("origin"): self.dataset["user.origin"] = self.parameters["origin"] permissions = self.env.db.getPermissions(login) for perm in User.ALL_PERMISSIONS: self.dataset["user.permissions"].append((perm, perm in permissions)) class UserSettingsModify(UserSettingsDisplay): view_name = "user_settings_modify" view_parameters = UserSettingsModifyParameters view_permissions = [ ] def render(self): login = self.parameters.get("login", self.user.login) if login != self.user.login and not self.user.has(User.PERM_USER_MANAGEMENT): raise Error.PrewikkaUserError("Permission Denied", "Cannot modify other users settings", log=Log.WARNING) if self.user.has(User.PERM_USER_MANAGEMENT): self.env.db.setPermissions(login, self.parameters["permissions"]) if login == self.user.login: self.user.permissions = self.parameters["permissions"] lang = self.parameters["language"] if not lang in localization.getLanguagesIdentifiers(): raise Error.PrewikkaUserError("Invalid Language", "Specified language does not exist", log=Log.WARNING) if login == self.user.login: self.user.setLanguage(lang) self.env.db.setLanguage(login, lang) if self.parameters.has_key("password_new") and self.parameters.has_key("password_new_confirmation"): if login == self.user.login: try: self.env.auth.checkPassword(login, self.parameters.get("password_current", "")) except Auth.AuthError, e: raise Error.PrewikkaUserError("Password Error", "Invalid Password specified") if self.parameters["password_new"] != self.parameters["password_new_confirmation"]: raise Error.PrewikkaUserError("Password Error", "Password mismatch") self.env.auth.setPassword(login, self.parameters["password_new"]) origin = self.parameters.get("origin", None) self.parameters.clear() if origin: self.parameters["origin"] = origin self.parameters["login"] = login return UserSettingsDisplay.render(self) class UserSettingsAdd(UserSettingsModify, UserAddForm): view_name = "user_settings_add" view_parameters = UserSettingsModifyParameters view_permissions = [ User.PERM_USER_MANAGEMENT ] def render(self): login = self.parameters.get("login", self.user.login) if self.env.db.hasUser(login): UserAddForm.render(self, "User %s already exist" % login) else: self.env.db.createUser(login) permissions = filter(lambda perm: self.parameters.has_key(perm), User.ALL_PERMISSIONS) self.env.db.setPermissions(login, permissions) UserSettingsModify.render(self) prewikka-1.0.0/prewikka/views/stats.py0000664000076400007640000010223711340777332017067 0ustar yoannyoann# Copyright (C) 2005-2009 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # Author: Yoann Vandoorselaere # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import sys import time import copy import urllib import datetime from prewikka import User, view, Chart, utils, resolve try: import GeoIP geoip = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE) except: geoip = None DEFAULT_WIDTH = 800 DEFAULT_HEIGHT = 450 class DistributionStatsParameters(view.Parameters): def register(self): self.optional("timeline_type", str, default="hour", save=True) self.optional("from_year", int, save=True) self.optional("from_month", int, save=True) self.optional("from_day", int, save=True) self.optional("from_hour", int, save=True) self.optional("from_min", int, save=True) self.optional("to_year", int, save=True) self.optional("to_month", int, save=True) self.optional("to_day", int, save=True) self.optional("to_hour", int, save=True) self.optional("to_min", int, save=True) self.optional("filter", str, save=True) self.optional("idmef_filter", str) self.optional("apply", str) def normalize(self, view_name, user): do_save = self.has_key("_save") view.Parameters.normalize(self, view_name, user) if do_save and not self.has_key("filter"): user.delConfigValue(view_name, "filter") class StatsSummary(view.View): view_name = "stats_summary" view_template = "StatsSummary" view_permission = [ ] view_parameters = view.Parameters def render(self): pass class DistributionStats(view.View): view_template = "Stats" view_permissions = [ User.PERM_IDMEF_VIEW ] view_parameters = DistributionStatsParameters def _getNameFromMap(self, name, names_and_colors): if names_and_colors.has_key(name): return names_and_colors[name][0] return name def _namesAndColors2ColorMap(self, names_and_colors): d = utils.OrderedDict() for name, color in names_and_colors.values(): d[name] = color return d def _getBaseURL(self): start = long(time.mktime(self._period_start)) if self.parameters["timeline_type"] in ("month", "day", "hour"): unit = self.parameters["timeline_type"] value = 1 else: delta = long(time.mktime(self._period_end)) - start if delta > 3600: unit = "day" value = delta / (24 * 3600) + 1 else: unit = "hour" value = delta / 3600 + 1 filter_str = "" if self.parameters.has_key("filter"): filter_str = "&" + urllib.urlencode({"filter": self.parameters["filter"]}) return utils.create_link("alert_listing", { "timeline_unit": unit, "timeline_value": value, "timeline_start": start }) + filter_str def _addDistributionChart(self, title, value_name, width, height, path, criteria, sub_url_handler, limit=-1, dns=False, names_and_colors={}): base_url = self._getBaseURL() chart = { "title": title, "value_name": value_name } distribution = Chart.DistributionChart(self.user, width, height) if names_and_colors: distribution.setColorMap(self._namesAndColors2ColorMap(names_and_colors)) chart["chart"] = distribution chart["render"] = (distribution, title, base_url) results = self.env.idmef_db.getValues([ path + "/group_by", "count(%s)/order_desc" % path ], criteria=criteria + [ path ], limit=limit) if results: for value, count in results: if dns and value: v = resolve.AddressResolve(value) else: v = self._getNameFromMap(value or _(u"n/a"), names_and_colors) distribution.addLabelValuePair(v, count, base_url + "&" + sub_url_handler(value)) distribution.render(title) self.dataset["charts"].append(chart) def _processTimeCriteria(self): now = time.time() self._period_end = time.localtime(now) if self.parameters["timeline_type"] == "hour": self.dataset["timeline_hour_selected"] = "selected=\"selected\"" self._period_start = time.localtime(now - 3600) elif self.parameters["timeline_type"] == "day": self.dataset["timeline_day_selected"] = "selected=\"selected\"" tm = time.localtime(now - 24 * 3600) self._period_start = time.localtime(now - 24 * 3600) elif self.parameters["timeline_type"] == "month": self.dataset["timeline_month_selected"] = "selected=\"selected\"" tm = list(time.localtime(now)) tm[1] -= 1 self._period_start = time.localtime(time.mktime(tm)) else: self.dataset["timeline_custom_selected"] = "selected=\"selected\"" self._period_start = time.struct_time((self.parameters["from_year"], self.parameters["from_month"], self.parameters["from_day"], self.parameters["from_hour"], self.parameters["from_min"], 0, 0, 0, -1)) self._period_end = time.struct_time((self.parameters["to_year"], self.parameters["to_month"], self.parameters["to_day"], self.parameters["to_hour"], self.parameters["to_min"], 0, 0, 0, -1)) self.dataset["from_year"] = "%.4d" % self._period_start.tm_year self.dataset["from_month"] = "%.2d" % self._period_start.tm_mon self.dataset["from_day"] = "%.2d" % self._period_start.tm_mday self.dataset["from_hour"] = "%.2d" % self._period_start.tm_hour self.dataset["from_min"] = "%.2d" % self._period_start.tm_min self.dataset["to_year"] = "%.4d" % self._period_end.tm_year self.dataset["to_month"] = "%.2d" % self._period_end.tm_mon self.dataset["to_day"] = "%.2d" % self._period_end.tm_mday self.dataset["to_hour"] = "%.2d" % self._period_end.tm_hour self.dataset["to_min"] = "%.2d" % self._period_end.tm_min criteria = [ "alert.create_time >= '%d-%d-%d %d:%d:%d' && alert.create_time < '%d-%d-%d %d:%d:%d'" % \ (self._period_start.tm_year, self._period_start.tm_mon, self._period_start.tm_mday, self._period_start.tm_hour, self._period_start.tm_min, self._period_start.tm_sec, self._period_end.tm_year, self._period_end.tm_mon, self._period_end.tm_mday, self._period_end.tm_hour, self._period_end.tm_min, self._period_end.tm_sec) ] return criteria def _processFilterCriteria(self): c = [ ] if self.parameters.has_key("idmef_filter"): c.append(unicode(self.parameters["idmef_filter"])) self.dataset["current_filter"] = self.parameters.get("filter", "") if self.parameters.has_key("filter"): f = self.env.db.getAlertFilter(self.user.login, self.parameters["filter"]) if f: c.append(unicode(f)) return c def _processCriteria(self): criteria = [ ] criteria += self._processTimeCriteria() criteria += self._processFilterCriteria() return criteria def render(self): self.dataset["hidden_parameters"] = [ ("view", self.view_name) ] self.dataset["charts"] = [ ] self.dataset["filters"] = self.env.db.getAlertFilterNames(self.user.login) self.dataset["timeline_hour_selected"] = "" self.dataset["timeline_day_selected"] = "" self.dataset["timeline_month_selected"] = "" self.dataset["timeline_custom_selected"] = "" def _setPeriod(self): tm = time.localtime() period = "from %s/%s/%s %s:%s to %s/%s/%s %s:%s" % \ (self.dataset["from_year"], self.dataset["from_month"], self.dataset["from_day"], self.dataset["from_hour"], self.dataset["from_min"], self.dataset["to_year"], self.dataset["to_month"], self.dataset["to_day"], self.dataset["to_hour"], self.dataset["to_min"]) if self.parameters["timeline_type"] == "month": self.dataset["period"] = "Period: current month (%s)" % period elif self.parameters["timeline_type"] == "day": self.dataset["period"] = "Period: today (%s)" % period elif self.parameters["timeline_type"] == "hour": self.dataset["period"] = "Period: current hour (%s)" % period else: self.dataset["period"] = "Period: %s" % period def genPathValueURI(self, path, value, index=0, type=None): if value: operator = "=" else: value = "" operator = "!" if type == None: type = path.split(".")[1] idx = type.find("(") if idx != -1: type = type[0: idx] if type == "assessment": type = "classification" if type not in ("classification", "source", "target", "analyzer"): raise Exception, "The path '%s' cannot be mapped to a column" % path return utils.urlencode({ "%s_object_%d" % (type, index): path, "%s_operator_%d" % (type, index): operator, "%s_value_%d" % (type, index): value }) class GenericTimelineStats(DistributionStats): def _getAlertCount(self, criteria, link, zoom_view): d = {} results = self.env.idmef_db.getValues(self._getSelection(), criteria) if not results: return d for name, count in results: if zoom_view == "alert_listing": link += "&" + self.genPathValueURI(self._path, name) d[self._getNameFromMap(name or _(u"n/a"), self._names_and_colors)] = (count, link) return d def _newTimeline(self, user, width, height, stacked=False): if stacked: timeline = Chart.StackedTimelineChart(user, width, height) else: timeline = Chart.TimelineChart(user, width, height) if not self.parameters.has_key("idmef_filter"): timeline.enableMultipleValues(self._namesAndColors2ColorMap(self._names_and_colors)) return timeline def _getTimeCrit(self, start, step): tm1 = start #time.localtime(start) tm2 = start+step #time.localtime(start + step) c = [ "alert.create_time >= '%d-%d-%d %d:%d:%d' && alert.create_time < '%d-%d-%d %d:%d:%d'" % \ (tm1.year, tm1.month, tm1.day, tm1.hour, tm1.minute, tm1.second, tm2.year, tm2.month, tm2.day, tm2.hour, tm2.minute, tm2.second) ] return c def _getStep(self, type, absolute=False): start = None if type == "custom": type = self.getCustomUnit() start = datetime.datetime(*self._period_start[:6]) end = datetime.datetime(*self._period_end[:6]) else: end = datetime.datetime.today() if type == "min": if not start: start = end - datetime.timedelta(seconds=60) step = datetime.timedelta(seconds=1) label_tm_index = "%Hh%M:%S" zoom_view = "alert_listing" timeline_type = "min" timeline_unit = "" elif type == "hour": if not start: start = end - datetime.timedelta(minutes=60) step = datetime.timedelta(minutes=1) label_tm_index = "%Hh%M" zoom_view = "alert_listing" timeline_type = "min" timeline_unit = "" elif type == "day": if not start: start = end - datetime.timedelta(hours=24) step = datetime.timedelta(hours=1) label_tm_index = "%d/%Hh" zoom_view = "stats_timeline" timeline_type = "custom" timeline_unit = "hour" elif type == "month": if not start: start = end - datetime.timedelta(days=31) step = datetime.timedelta(days=1) label_tm_index = "%m/%d" zoom_view = "stats_timeline" timeline_type = "custom" timeline_unit = "day" elif type == "year": if not start: start = end - datetime.timedelta(days=365) step = datetime.timedelta(days=31) label_tm_index = "%m/%d" zoom_view = "stats_timeline" timeline_type = "custom" timeline_unit = "day" return start, end, step, label_tm_index, zoom_view, timeline_type, timeline_unit def _setTimelineZoom(self, base_parameters, start, end): #tm = time.localtime(start) base_parameters["from_year"] = start.year base_parameters["from_month"] = start.month base_parameters["from_day"] = start.day base_parameters["from_hour"] = start.hour base_parameters["from_min"] = start.minute #tm = time.localtime(end) base_parameters["to_year"] = end.year base_parameters["to_month"] = end.month base_parameters["to_day"] = end.day base_parameters["to_hour"] = end.hour base_parameters["to_min"] = end.minute def _generateTimeline(self, user, width, height): start, end, step, format, zoom_view, timeline_type, timeline_time = self._getStep(self.parameters["timeline_type"]) timeline = self._newTimeline(user, width, height) if timeline_type != "custom": base_parameters = { "timeline_unit": "min" } else: base_parameters = { "timeline_type": timeline_type } self.dataset["timeline_user_type"] = self.parameters.get("timeline_type") while start < end: c = self._getTimeCrit(start, step) + self._criteria if timeline_type != "custom": base_parameters["timeline_start"] = long(time.mktime(start.timetuple())) #long(start) else: self._setTimelineZoom(base_parameters, start, start + step) link = utils.create_link(zoom_view, base_parameters) count = self._getAlertCount(c, link, zoom_view) label = start.strftime(format) start += step timeline.addLabelValuePair(label, count, link) return timeline def getCustomUnit(self): start = long(time.mktime(self._period_start)) delta = long(time.mktime(self._period_end)) - start if delta > 86400: unit = "month" elif delta > 3600: unit = "day" elif delta > 60: unit = "hour" else: unit = "min" return unit def _getSelection(self): return ("%s/group_by" % self._path, "count(%s)/order_desc" % self._path) def _addTimelineChart(self, title, value_name, width, height, path, criteria, limit=-1, names_and_colors={}, allow_stacked=False, value_callback=None, zoom_type=None): self._path = path self._limit = limit self._value_callback = value_callback self._criteria = criteria self._zoom_type = zoom_type self._names_and_colors = names_and_colors base_url = self._getBaseURL() chart = { "title": title, "value_name": value_name } if limit > 0: res = self.env.idmef_db.getValues(self._getSelection(), criteria = criteria, limit=self._limit) c = u"" for name, count in res: if c: c += " || " if name: c += "%s = '%s'" % (self._path, utils.escape_criteria(name)) else: c += "! %s" % (self._path) if c: criteria.append(c) timeline = self._generateTimeline(self.user, width, height) timeline.render(title) chart["chart"] = timeline self.dataset["charts"].append(chart) self.dataset["zoom"] = self.parameters.get("zoom", None) class CategorizationStats(DistributionStats, GenericTimelineStats): view_name = "stats_categorization" def _renderClassifications(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Classifications"), _("Classification"), width, height, "alert.classification.text", criteria, lambda value: self.genPathValueURI("alert.classification.text", value, type="classification"), 10) def _renderReferences(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Alert References"), _("References"), width, height, "alert.classification.reference.name", criteria, lambda value: self.genPathValueURI("alert.classification.reference.name", value, type="classification"), 10) def _renderImpactSeverities(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): _severity_maps = utils.OrderedDict() _severity_maps["high"] = (_("High"), Chart.RED_STD) _severity_maps["medium"] = (_("Medium"), Chart.ORANGE_STD) _severity_maps["low"] = (_("Low"), Chart.GREEN_STD) _severity_maps["info"] = (_("Informational"), Chart.BLUE_STD) _severity_maps[None] = (_("N/a"), "000000") self._addDistributionChart(_("Severities"), _("Severity"), width, height, "alert.assessment.impact.severity", criteria, lambda value: self.genPathValueURI("alert.assessment.impact.severity", value, type="classification"), names_and_colors=_severity_maps) def _renderImpactTypes(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Alert Impact Types"), _("Impact Types"), width, height, "alert.assessment.impact.type", criteria, lambda value: self.genPathValueURI("alert.assessment.impact.type", value, type="classification")) def _renderClassificationsTrend(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): GenericTimelineStats._addTimelineChart(self, "Top 10 Classifications Trend", None, width, height, "alert.classification.text", criteria, limit = 10, zoom_type="classifications_trend") def render(self): DistributionStats.render(self) self.dataset["title"] = "Alerts categorization" criteria = self._processCriteria() self._setPeriod() self._renderClassificationsTrend(criteria) self._renderClassifications(criteria) self._renderReferences(criteria) self._renderImpactSeverities(criteria) self._renderImpactTypes(criteria) class SourceStats(DistributionStats, GenericTimelineStats): view_name = "stats_source" def _countryDistributionChart(self, criteria, width, height): base_url = self._getBaseURL() distribution = Chart.WorldChart(self.user, width, height) chart = { "title": _("Top Source Country"), "value_name": _("Country"), "chart": distribution } results = self.env.idmef_db.getValues([ "alert.source.node.address.address/group_by", "count(alert.source.node.address.address)"], criteria=criteria, limit=-1) if results: merge = { } for value, count in results: if value: if distribution.needCountryCode(): nvalue = geoip.country_code_by_addr(value) else: nvalue = geoip.country_name_by_addr(value) else: nvalue = None if not nvalue: nvalue = _(u"n/a") if not merge.has_key(nvalue): url_index = 0 merge[nvalue] = (0, 0, nvalue, "") else: url_index = merge[nvalue][1] encode = "&" + self.genPathValueURI("alert.source.node.address.address", value, type="source", index=url_index) merge[nvalue] = (merge[nvalue][0] + count, url_index + 1, nvalue, merge[nvalue][3] + encode) s = [ t[1] for t in merge.items() ] s.sort() s.reverse() results = s #[0:10] for item in results: distribution.addLabelValuePair(item[2], item[0]) distribution.render("Top 10 Source Country") chart["filename"] = distribution.getHref() chart["type"] = distribution.getType() self.dataset["charts"].append(chart) def _renderCountry(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): if geoip is not None: self._countryDistributionChart(criteria, width, height) def _renderAddresses(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Source Addresses"), _("Address"), width, height, "alert.source.node.address.address", criteria, lambda value: self.genPathValueURI("alert.source.node.address.address", value, type="source"), 10, dns=True) def _renderUsers(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Source Users"), _("User"), width, height, "alert.source.user.user_id.name", criteria, lambda value: self.genPathValueURI("alert.source.user.user_id.name", value, type="source"), 10) def _renderSourcesTrend(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): GenericTimelineStats._addTimelineChart(self, "Top 10 Sources Trend", None, DEFAULT_WIDTH, DEFAULT_HEIGHT, "alert.source.node.address.address", criteria, 10, zoom_type="sources_trend") def render(self): DistributionStats.render(self) self.dataset["title"] = "Top Alert Sources" criteria = self._processCriteria() self._setPeriod() self._renderCountry(criteria) self._renderSourcesTrend(criteria) self._renderAddresses(criteria) self._renderUsers(criteria) resolve.process(self.env.dns_max_delay) class TargetStats(DistributionStats): view_name = "stats_target" def _renderPorts(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): base_url = self._getBaseURL() title = "Top 10 Targeted Ports" distribution = Chart.DistributionChart(self.user, width, height) chart = { "title": title, "value_name": "Port", "chart": distribution } criteria = criteria[:] + [ "(alert.target.service.iana_protocol_number == 6 ||" "alert.target.service.iana_protocol_number == 17 ||" "alert.target.service.iana_protocol_name =* 'tcp' ||" "alert.target.service.iana_protocol_name =* 'udp' ||" "alert.target.service.protocol =* 'udp' ||" "alert.target.service.protocol =* 'tcp')" ] results = self.env.idmef_db.getValues([ "alert.target.service.port/group_by", "alert.target.service.iana_protocol_number/group_by", "alert.target.service.iana_protocol_name/group_by", "alert.target.service.protocol/group_by", "count(alert.target.service.port)/order_desc" ], criteria=criteria, limit=10) if not results: return merge = { _(u"n/a"): { }, u"tcp": { }, u"udp": { } } for port, iana_protocol_number, iana_protocol_name, protocol, count in results: if not port: continue if iana_protocol_number: protocol = utils.protocol_number_to_name(iana_protocol_number) elif iana_protocol_name: protocol = iana_protocol_name if not protocol: protocol = _(u"n/a") protocol = protocol.lower() if not merge.has_key(protocol): protocol = _(u"n/a") if not merge[protocol].has_key(port): merge[protocol][port] = 0 merge[protocol][port] += count results = [ ] for protocol, values in merge.items(): for port, count in values.items(): results.append((port, protocol, count)) results.sort(lambda x, y: int(y[2] - x[2])) for port, protocol, count in results: name = "%d / %s" % (port, protocol) distribution.addLabelValuePair(name, count, base_url + "&" + "target_object_0=alert.target.service.port&target_value_0=%d" % port) distribution.render(title) self.dataset["charts"].append(chart) def _renderAddresses(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Targeted Addresses"), _("Address"), width, height, "alert.target.node.address.address", criteria, lambda value: self.genPathValueURI("alert.target.node.address.address", value, type="target"), 10, dns=True) def _renderUsers(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Targeted Users"), _("User"), width, height, "alert.target.user.user_id.name", criteria, lambda value: self.genPathValueURI("alert.target.user.user_id.name", value, type="target"), 10) def render(self): DistributionStats.render(self) self.dataset["title"] = "Top Alert Targets" criteria = self._processCriteria() self._setPeriod() self._renderAddresses(criteria) self._renderPorts(criteria) self._renderUsers(criteria) resolve.process(self.env.dns_max_delay) class AnalyzerStats(DistributionStats, GenericTimelineStats): view_name = "stats_analyzer" def _renderAnalyzers(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): base_url = self._getBaseURL() title = "Top 10 analyzers" distribution = Chart.DistributionChart(self.user, width, height) chart = { "title": title, "value_name": "Analyzer", "chart": distribution } results = self.env.idmef_db.getValues([ "alert.analyzer(-1).name/group_by", "alert.analyzer(-1).node.name/group_by", "count(alert.analyzer(-1).name)/order_desc" ], criteria=criteria + [ "alert.analyzer(-1).name" ], limit=10) if results: for analyzer_name, node_name, count in results: value = analyzer_name or _(u"n/a") if node_name: value = "%s on %s" % (value, node_name) analyzer_criteria = self.genPathValueURI("alert.analyzer(-1).name", analyzer_name, type="analyzer") distribution.addLabelValuePair(value, count, base_url + "&" + analyzer_criteria) distribution.render(title) self.dataset["charts"].append(chart) def _renderModels(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Analyzer Models"), _("Model"), width, height, "alert.analyzer(-1).model", criteria, lambda value: self.genPathValueURI("alert.analyzer(-1).model", value, type="analyzer"), 10) def _renderClasses(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Analyzer Classes"), _("Class"), width, height, "alert.analyzer(-1).class", criteria, lambda value: self.genPathValueURI("alert.analyzer(-1).class", value, type="analyzer"), 10) def _renderNodeAddresses(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Top 10 Analyzer Node Addresses"), _("Address"), width, height, "alert.analyzer(-1).node.address.address", criteria, lambda value: self.genPathValueURI("alert.analyzer(-1).node.address.address", value, type="analyzer"), 10) def _renderNodeLocations(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): self._addDistributionChart(_("Analyzer Locations"), _("Location"), width, height, "alert.analyzer(-1).node.location", criteria, lambda value: self.genPathValueURI("alert.analyzer(-1).node.location", value, type="analyzer")) def _renderClassesTrend(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): GenericTimelineStats._addTimelineChart(self, "Top 10 Analyzer Classes Trend", None, width, height, "alert.analyzer(-1).class", criteria, limit = 10, zoom_type="analyzer_classes_trend") def render(self): DistributionStats.render(self) self.dataset["title"] = "Top Analyzers" criteria = self._processCriteria() self._setPeriod() self._renderClassesTrend(criteria) self._renderAnalyzers(criteria) self._renderModels(criteria) self._renderClasses(criteria) self._renderNodeAddresses(criteria) self._renderNodeLocations(criteria) class TimelineStats(GenericTimelineStats, AnalyzerStats, CategorizationStats, SourceStats): view_name = "stats_timeline" def _renderTimelineChart(self, criteria, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT): _severity_maps = utils.OrderedDict() _severity_maps["high"] = (_("High"), Chart.RED_STD) _severity_maps["medium"] = (_("Medium"), Chart.ORANGE_STD) _severity_maps["low"] = (_("Low"), Chart.GREEN_STD) _severity_maps["info"] = (_("Informational"), Chart.BLUE_STD) _severity_maps[None] = (_("N/a"), "000000") GenericTimelineStats._addTimelineChart(self, "Timeline", None, width, height, "alert.assessment.impact.severity", criteria, names_and_colors=_severity_maps) def render(self): DistributionStats.render(self) self.dataset["title"] = "Timeline" criteria = self._processCriteria() self._setPeriod() type = self.parameters.get("type", None) if type == "analyzer_classes_trend": AnalyzerStats._renderClassesTrend(self, criteria) elif type == "classifications_trend": CategorizationStats._renderClassificationsTrend(self, criteria) elif type == "sources_trend": SourceStats._renderSourcesTrend(self, criteria) else: self._renderTimelineChart(criteria) class AnalyzerTrendStats(GenericTimelineStats, AnalyzerStats): view_name = "stats_analyzer_trend" def render(self): DistributionStats.render(self) self.dataset["title"] = "Timeline" criteria = self._processCriteria() self._setPeriod() title = "Top 10 Analyzer Trend " + self.dataset["period"] AnalyzerStats._renderClassesTrend(self, criteria, width, height) prewikka-1.0.0/prewikka/views/heartbeatlisting.py0000664000076400007640000001426311340776573021271 0ustar yoannyoann# Copyright (C) 2004,2005,2006 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import view, User, utils from prewikka.views.messagelisting import MessageListing, MessageListingParameters, ListedMessage class HeartbeatListingParameters(MessageListingParameters): def register(self): MessageListingParameters.register(self) self.optional("heartbeat.analyzer(-1).name", str) self.optional("heartbeat.analyzer(-1).node.address.address", str) self.optional("heartbeat.analyzer(-1).node.name", str) self.optional("heartbeat.analyzer(-1).model", str) class SensorHeartbeatListingParameters(HeartbeatListingParameters): def register(self): HeartbeatListingParameters.register(self) self.mandatory("analyzerid", str) class ListedHeartbeat(ListedMessage): def setMessage(self, message, ident): self["delete"] = ident self["summary"] = self.createMessageLink(ident, "heartbeat_summary") self["details"] = self.createMessageLink(ident, "heartbeat_details") self["agent"] = self.createInlineFilteredField("heartbeat.analyzer(-1).name", message["heartbeat.analyzer(-1).name"]) self["model"] = self.createInlineFilteredField("heartbeat.analyzer(-1).model", message["heartbeat.analyzer(-1).model"]) self["node_name"] = self.createInlineFilteredField("heartbeat.analyzer(-1).node.name", message["heartbeat.analyzer(-1).node.name"]) self["node_addresses"] = [ ] for address in message["heartbeat.analyzer(-1).node.address"]: hfield = self.createHostField("heartbeat.analyzer(-1).node.address.address", address["address"], address["category"]) self["node_addresses"].append(hfield) self["time"] = self.createTimeField(message["heartbeat.create_time"], self.parameters["timezone"]) class HeartbeatListing(MessageListing, view.View): view_name = "heartbeat_listing" view_parameters = HeartbeatListingParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "HeartbeatListing" root = "heartbeat" filters = { } summary_view = "heartbeat_summary" details_view = "heartbeat_details" listed_heartbeat = ListedHeartbeat def _getMessageIdents(self, criteria, limit=-1, offset=-1, order_by="time_desc"): return self.env.idmef_db.getHeartbeatIdents(criteria, limit, offset, order_by) def _fetchMessage(self, ident): return self.env.idmef_db.getHeartbeat(ident) def _setMessage(self, message, ident): msg = self.listed_heartbeat(self.view_name, self.env, self.parameters) msg.view_name = self.view_name msg.setMessage(message, ident) return msg def _applyInlineFilters(self, criteria): filter_found = False for column, path in (("name", "heartbeat.analyzer(-1).name"), ("model", "heartbeat.analyzer(-1).model"), ("address", "heartbeat.analyzer(-1).node.address.address"), ("node_name", "heartbeat.analyzer(-1).node.name")): self.dataset[column + "_filtered"] = False if not filter_found: if self.parameters.has_key(path): criteria.append("%s == '%s'" % (path, utils.escape_criteria(self.parameters[path]))) self.dataset[column + "_filtered"] = True filter_found = True def _deleteMessage(self, ident): self.env.idmef_db.deleteHeartbeat(ident) def render(self): MessageListing.render(self) self._deleteMessages() criteria = [ ] start = end = None if self.parameters.has_key("timeline_unit") and self.parameters["timeline_unit"] != "unlimited": start, end = self._getTimelineRange() criteria.append("heartbeat.create_time >= '%s' && heartbeat.create_time < '%s'" % (str(start), str(end))) self._applyInlineFilters(criteria) self._adjustCriteria(criteria) self._setTimeline(start, end) self._setNavPrev(self.parameters["offset"]) count = self._setMessages(criteria) self._setHiddenParameters() self.dataset["nav.from"] = self.parameters["offset"] + 1 self.dataset["nav.to"] = self.parameters["offset"] + len(self.dataset["messages"]) self.dataset["limit"] = self.parameters["limit"] self.dataset["total"] = count self._setNavNext(self.parameters["offset"], count) self._setTimezone() class SensorHeartbeatListing(HeartbeatListing, view.View): view_name = "sensor_heartbeat_listing" view_parameters = SensorHeartbeatListingParameters view_permissions = [ User.PERM_IDMEF_VIEW ] view_template = "SensorHeartbeatListing" listed_heartbeat = ListedHeartbeat def _adjustCriteria(self, criteria): criteria.append("heartbeat.analyzer.analyzerid == '%s'" % self.parameters["analyzerid"]) def _setHiddenParameters(self): HeartbeatListing._setHiddenParameters(self) self.dataset["hidden_parameters"].append(("analyzerid", self.parameters["analyzerid"])) def render(self): HeartbeatListing.render(self) self.dataset["analyzer"] = self.env.idmef_db.getAnalyzer(self.parameters["analyzerid"]) prewikka-1.0.0/prewikka/views/commands.py0000664000076400007640000000366111340777332017533 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import os, subprocess from prewikka import view, User, utils class Error(Exception): pass class HostCommandParameters(view.RelativeViewParameters): def register(self): view.RelativeViewParameters.register(self) self.mandatory("host", str) self.mandatory("command", str) class Command(view.View): view_name = "Command" view_template = "Command" view_permissions = [ User.PERM_COMMAND ] view_parameters = HostCommandParameters def render(self): cmd = self.parameters["command"] try: command = self.env.host_commands[cmd] except KeyError: raise Error("Attempt to execute unregistered command '%s'" % cmd) command = command.replace("$host", self.parameters["host"]).split(" ") output = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True).communicate()[0] output = utils.toUnicode(output) output = utils.escape_html_string(output).replace(" ", " ").replace("\n", "
    ") self.dataset["command_output"] = output prewikka-1.0.0/prewikka/views/misc.py0000664000076400007640000000201611200051577016645 0ustar yoannyoann# Copyright (C) 2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import view class About(view.View): view_name = "about" view_template = "About" view_parameters = view.Parameters def render(self): pass prewikka-1.0.0/prewikka/templates/0000775000076400007640000000000011347720623016211 5ustar yoannyoannprewikka-1.0.0/prewikka/templates/About.py0000644000076400007640000004170411214154700017627 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout from prewikka import siteconfig ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715456.782759 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:36 2009' __CHEETAH_src__ = 'prewikka/templates/About.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:55:59 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class About(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(About, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_89429685 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''

    Prewikka ''') _v = VFFSL(SL,"siteconfig.version",True) # u'$siteconfig.version' on line 11, col 57 if _v is not None: write(_filter(_v, rawExpr=u'$siteconfig.version')) # from line 11, col 57. write(u'''


    PreludeIDS Technologies ''') if False: _("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.") _v = VFFSL(SL,"_",False)("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.") # u'$_("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.")' on line 16, col 67 if _v is not None: write(_filter(_v, rawExpr=u'$_("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.")')) # from line 16, col 67. write(u'''


    Prelude-IDS logo

    • ''') if False: _("Customizing Prelude") _v = VFFSL(SL,"_",False)("Customizing Prelude") # u'$_("Customizing Prelude")' on line 29, col 52 if _v is not None: write(_filter(_v, rawExpr=u'$_("Customizing Prelude")')) # from line 29, col 52. write(u'''

      ''') if False: _("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.") _v = VFFSL(SL,"_",False)("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.") # u'$_("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.")' on line 31, col 3 if _v is not None: write(_filter(_v, rawExpr=u'$_("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.")')) # from line 31, col 3. write(u'''

    • ''') if False: _("Software Maintenance and Technical Support") _v = VFFSL(SL,"_",False)("Software Maintenance and Technical Support") # u'$_("Software Maintenance and Technical Support")' on line 35, col 48 if _v is not None: write(_filter(_v, rawExpr=u'$_("Software Maintenance and Technical Support")')) # from line 35, col 48. write(u'''

      ''') if False: _("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. There are five support packages that provide our customers with peace of mind, knowing that they are not only covered for all outcomes, but that our experts are at hand to provide rapid and reliable solutions.") _v = VFFSL(SL,"_",False)("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. There are five support packages that provide our customers with peace of mind, knowing that they are not only covered for all outcomes, but that our experts are at hand to provide rapid and reliable solutions.") # u'$_("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. There are five support packages that provide our customers with peace of mind, knowing that they are not only covered for all outcomes, but that our experts are at hand to provide rapid and reliable solutions.")' on line 37, col 4 if _v is not None: write(_filter(_v, rawExpr=u'$_("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. There are five support packages that provide our customers with peace of mind, knowing that they are not only covered for all outcomes, but that our experts are at hand to provide rapid and reliable solutions.")')) # from line 37, col 4. write(u'''

    • ''') if False: _("Commercial licenses") _v = VFFSL(SL,"_",False)("Commercial licenses") # u'$_("Commercial licenses")' on line 41, col 48 if _v is not None: write(_filter(_v, rawExpr=u'$_("Commercial licenses")')) # from line 41, col 48. write(u'''

      ''') if False: _("The Prelude framework is licensed under the") _v = VFFSL(SL,"_",False)("The Prelude framework is licensed under the") # u'$_("The Prelude framework is licensed under the")' on line 43, col 3 if _v is not None: write(_filter(_v, rawExpr=u'$_("The Prelude framework is licensed under the")')) # from line 43, col 3. write(u''' General Public License. ''') if False: _("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.") _v = VFFSL(SL,"_",False)("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.") # u'$_("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.")' on line 44, col 3 if _v is not None: write(_filter(_v, rawExpr=u'$_("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.")')) # from line 44, col 3. write(u'''

    • ''') if False: _("Advice, Deployment and Training") _v = VFFSL(SL,"_",False)("Advice, Deployment and Training") # u'$_("Advice, Deployment and Training")' on line 48, col 48 if _v is not None: write(_filter(_v, rawExpr=u'$_("Advice, Deployment and Training")')) # from line 48, col 48. write(u'''

      ''') if False: _("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.") _v = VFFSL(SL,"_",False)("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.") # u'$_("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.")' on line 50, col 3 if _v is not None: write(_filter(_v, rawExpr=u'$_("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.")')) # from line 50, col 3. write(u'''


    ''') if False: _("Contact") _v = VFFSL(SL,"_",False)("Contact") # u'$_("Contact")' on line 64, col 10 if _v is not None: write(_filter(_v, rawExpr=u'$_("Contact")')) # from line 64, col 10. write(u''' ''') if False: _("Office") _v = VFFSL(SL,"_",False)("Office") # u'$_("Office")' on line 65, col 10 if _v is not None: write(_filter(_v, rawExpr=u'$_("Office")')) # from line 65, col 10. write(u''' ''') if False: _("Website") _v = VFFSL(SL,"_",False)("Website") # u'$_("Website")' on line 66, col 10 if _v is not None: write(_filter(_v, rawExpr=u'$_("Website")')) # from line 66, col 10. write(u'''
    info@prelude-ids.com 2, rue David Girin http://www.prelude-ids.com
    ''') if False: _("Phone:") _v = VFFSL(SL,"_",False)("Phone:") # u'$_("Phone:")' on line 74, col 10 if _v is not None: write(_filter(_v, rawExpr=u'$_("Phone:")')) # from line 74, col 10. write(u''' +33 8 70 70 21 58 69002 Lyon  
       ''') if False: _("Fax:") _v = VFFSL(SL,"_",False)("Fax:") # u'$_("Fax:")' on line 79, col 28 if _v is not None: write(_filter(_v, rawExpr=u'$_("Fax:")')) # from line 79, col 28. write(u''' +33 4 78 42 21 58 France  
    Copyright © 2004 - 2007 PreludeIDS Technologies. All right reserved.
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_89429685 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_About= 'writeBody' ## END CLASS DEFINITION if not hasattr(About, '_initCheetahAttributes'): templateAPIClass = getattr(About, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(About) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=About()).run() prewikka-1.0.0/prewikka/templates/Stats.tmpl0000664000076400007640000001144711340777332020216 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #block head_extra_content #end block #def gen_std($chart, $map_index)
    $chart.title
    #filter CleanOutput Chart
    #end filter #end def #block main_content #filter CleanOutput #set $fcnt = 0 #set $map_index = 0;

    $period

    #if $current_filter

    Filter: $current_filter

    #end if

    #end filter #for $chart in $charts #set $fcnt = $fcnt + 1 #set $map_index += 1 #end for
    $gen_std($chart, $map_index)

    #end block #def layout_start_hook
    #for $name, $value in $hidden_parameters #end for #end def #def layout_end_hook
    #end def #block menu_extra_content #filter CleanOutput
    $_("Filter:")
    $_("Time:")
    $_("From:") //
    :
    $_("To:") //
    :

     
    #end filter #end block prewikka-1.0.0/prewikka/templates/HTMLDocument.tmpl0000664000076400007640000000152611340777332021360 0ustar yoannyoann $document.title #for $css_file in $document.css_files #end for #for $js_file in $document.js_files #end for #def head_extra_content #end def $head_extra_content $body prewikka-1.0.0/prewikka/templates/MessageSummary.tmpl0000664000076400007640000000463111340776405022057 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #def layout_start_hook #end def #block main_content #set global $section_cnt = 0 #set global $row_classes = ("table_row_even", "table_row_odd") #set global $entry_value_classes = ("section_alert_entry_value_normal", "section_alert_entry_value_emphasis") #def display_table($section, $depth) #set $table_cnt = 0 #for table in $section.tables #if $depth == 0 and $table_cnt > 0 and $table.style.find("inline") == -1
    #end if #if $table.odd_even #else
    #end if #set $table_cnt += 1 #set $row_class="" #for row in $table.rows #for col in row #if $col.header #set $row_class="table_row_even" #elif $col.tables #set $row_class="" #else #end if #end for #end for
    $col.name$display_table($col, $depth + 1)$col.name
    #end for #end def #def display_node($sections) #for $section in $sections
    $section.title
    $display_table($section, 0) #if $section.entries #set $cnt = 0 #for $entry in $section.entries #if $entry.name #end if #set $cnt += 1 #end for
    $entry.name$entry.value
    #end if #set global $section_cnt += 1 #if $section.sections $display_node($section.sections) #end if
    #end for #end def
    $display_node($sections)
    #end block main_content prewikka-1.0.0/prewikka/templates/SensorListing.tmpl0000664000076400007640000001621611340777332021722 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #from prewikka.views.sensor import node_cmp #from prewikka.views.sensor import analyzer_cmp #from prewikka.views.sensor import getDominantStatus #def layout_start_hook #end def #block main_content #filter CleanOutput #if len($locations) > 0
    #end if
    #set $listing = $locations.keys() $listing.sort() #for $entry in $listing:
    #set $dominant = $getDominantStatus($locations[$entry]) #set $dclass = "heartbeat_analyze_sensor_status_" + $dominant #if $dominant != "online" #set $display = "block" #set $display_tmp = "none" #else #set $display = "none" #set $display_tmp = "block" #end if $entry
    #for $i in ( ("online", $ngettext("%d Online", "%d Online", $locations[$entry]["online"])), ("offline", $ngettext("%d Offline", "%d Offline", $locations[$entry]["offline"])), ("unknown", $ngettext("%d Unknown", "%d Unknown", $locations[$entry]["unknown"])), ("missing", $ngettext("%d Missing", "%d Missing", $locations[$entry]["missing"]))) #if $locations[$entry][$i[0]] > 0 #end if #end for
    #set $nlen = $len($locations[$entry]["nodes"]) #set $alen = $locations[$entry]["total"] $unicode($ngettext("%d Node", "%d Nodes", $nlen) % $nlen), $unicode($ngettext("%d Analyzer", "%d Analyzers", $alen) % $alen) $unicode($i[1] % $locations[$entry][$i[0]])
    #set $nlisting = $locations[$entry]["nodes"].values() $nlisting.sort(node_cmp) #for $node in $nlisting #set $cnt = 0 #set $row_classes = ("table_row_even", "table_row_odd") #set $row_class = $row_classes[$cnt%2] #set $dominant = $getDominantStatus($node) #set $dclass = "heartbeat_analyze_sensor_status_" + dominant #if $dominant != "online" #set $display = "block" #else #set $display = "none" #end if
    $node.node_name #for $addr in $node.node_addresses $addr.value - $_("Filter on address")
    - $_("Address information")
    #for $name, $link in $addr.host_commands - $name
    #end for

    #end for
    $node.ostype $node.osversion #for $i in ("online", "offline", "unknown", "missing") #if $node[$i] > 0 #end if #end for
    $_("Total:") $node["total"] $node[$i]
    #set $alisting = $node.analyzers $node.analyzers.sort(analyzer_cmp) #for $analyzer in $node.analyzers #set $cnt += 1 #end for
    $_("Delete") $_("Name") $_("Model") $_("Version") $_("Class") $_("Last heartbeat") $_("Status")
    $analyzer.name - $_("Alert listing")
    - $_("Heartbeat listing")
    - $_("Heartbeat analysis")
    $analyzer["model"] $analyzer["version"] $analyzer["class"] $analyzer["last_heartbeat_time"] $analyzer["status_meaning"]

    #end for

    #end for #if len($locations) > 0
    $_("Alerts") $_("Heartbeats")  
    #end if
    #end filter #end block main_content prewikka-1.0.0/prewikka/templates/utils.py0000644000076400007640000001727411340777371017741 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941689.6696711 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:14:49 2010' __CHEETAH_src__ = 'prewikka/templates/utils.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class utils(Template): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(utils, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def display_analyzer(self, analyzer, **KWS): ## CHEETAH: generated from #def display_analyzer(analyzer) at line 1, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    Name Type OS Node Name Node Location Node Address
    ''') _v = VFFSL(SL,"analyzer.name",True) or "n/a" if _v is not None: write(_filter(_v)) write(u''' ''') if VFFSL(SL,"analyzer.model",True): # generated from line 17, col 11 write(u''' ''') _v = VFFSL(SL,"analyzer.model",True) # u'$analyzer.model' on line 18, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.model')) # from line 18, col 13. write(u''' ''') if VFFSL(SL,"analyzer.version",True): # generated from line 19, col 13 write(u''' ''') _v = VFFSL(SL,"analyzer.version",True) # u'$analyzer.version' on line 20, col 15 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.version')) # from line 20, col 15. write(u''' ''') else: # generated from line 22, col 11 write(u''' n/a ''') write(u''' ''') if VFFSL(SL,"analyzer.ostype",True): # generated from line 27, col 11 write(u''' ''') _v = VFFSL(SL,"analyzer.ostype",True) # u'$analyzer.ostype' on line 28, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.ostype')) # from line 28, col 13. write(u''' ''') if VFFSL(SL,"analyzer.osversion",True): # generated from line 29, col 13 write(u''' ''') _v = VFFSL(SL,"analyzer.osversion",True) # u'$analyzer.osversion' on line 30, col 15 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.osversion')) # from line 30, col 15. write(u''' ''') else: # generated from line 32, col 11 write(u''' n/a ''') write(u''' ''') _v = VFFSL(SL,"analyzer.node_name",True) or "n/a" if _v is not None: write(_filter(_v)) write(u''' ''') _v = VFFSL(SL,"analyzer.node_location",True) or "n/a" if _v is not None: write(_filter(_v)) write(u''' ''') if len(VFFSL(SL,"analyzer.node_addresses",True)) > 0: # generated from line 39, col 11 for address in VFFSL(SL,"analyzer.node_addresses",True): # generated from line 40, col 13 write(u''' ''') _v = VFFSL(SL,"address",True) # u'$address' on line 41, col 15 if _v is not None: write(_filter(_v, rawExpr=u'$address')) # from line 41, col 15. write(u'''
    ''') else: # generated from line 43, col 11 write(u''' n/a ''') write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def respond(self, trans=None): ## CHEETAH: main method generated for this template if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_utils= 'respond' ## END CLASS DEFINITION if not hasattr(utils, '_initCheetahAttributes'): templateAPIClass = getattr(utils, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(utils) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=utils()).run() prewikka-1.0.0/prewikka/templates/TopLayout.py0000644000076400007640000001571411214154700020517 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.HTMLDocument import HTMLDocument ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715456.8824029 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:36 2009' __CHEETAH_src__ = 'prewikka/templates/TopLayout.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:55:59 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class TopLayout(HTMLDocument): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(TopLayout, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def body_class(self, **KWS): ## CHEETAH: generated from #def body_class() at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def body(self, **KWS): ## CHEETAH: generated from #block body at line 6, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' \t
    \t\t
    \t\t\t
    ''') _v = VFFSL(SL,"prewikka.software",True) # u'$prewikka.software' on line 10, col 39 if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.software')) # from line 10, col 39. write(u'''
    \t\t\t
    ''') _v = VFFSL(SL,"prewikka.place",True) # u'$prewikka.place' on line 11, col 36 if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.place')) # from line 11, col 36. write(u'''
    \t\t\t
    ''') _v = VFFSL(SL,"prewikka.title",True) # u'$prewikka.title' on line 12, col 36 if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.title')) # from line 12, col 36. write(u'''
    \t\t
    \t\t''') _v = VFFSL(SL,"toplayout_content",True) # u'$toplayout_content' on line 14, col 3 if _v is not None: write(_filter(_v, rawExpr=u'$toplayout_content')) # from line 14, col 3. write(u''' \t
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.body(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_TopLayout= 'writeBody' ## END CLASS DEFINITION if not hasattr(TopLayout, '_initCheetahAttributes'): templateAPIClass = getattr(TopLayout, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(TopLayout) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=TopLayout()).run() prewikka-1.0.0/prewikka/templates/HeartbeatListing.py0000644000076400007640000003300011340776407022012 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.MessageListing import MessageListing ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941191.602704 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:06:31 2010' __CHEETAH_src__ = 'prewikka/templates/HeartbeatListing.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:06:29 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class HeartbeatListing(MessageListing): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(HeartbeatListing, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def message_fields_header(self, **KWS): ## CHEETAH: generated from #block message_fields_header at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_98632394 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' ''') self._CHEETAH__globalSetVars["cnt"] = 0 write(u'''
    ''') if False: _("Agent") _v = VFFSL(SL,"_",False)("Agent") # u'$_("Agent")' on line 11, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$_("Agent")')) # from line 11, col 8. write(u'''
    ''') if VFFSL(SL,"name_filtered",True): # generated from line 12, col 3 write(u''' * ''') write(u'''
    ''') if False: _("Node address") _v = VFFSL(SL,"_",False)("Node address") # u'$_("Node address")' on line 18, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$_("Node address")')) # from line 18, col 8. write(u'''
    ''') if VFFSL(SL,"address_filtered",True): # generated from line 19, col 3 write(u''' * ''') write(u'''
    ''') if False: _("Node name") _v = VFFSL(SL,"_",False)("Node name") # u'$_("Node name")' on line 25, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$_("Node name")')) # from line 25, col 8. write(u'''
    ''') if VFFSL(SL,"node_name_filtered",True): # generated from line 26, col 3 write(u''' * ''') write(u'''
    ''') if False: _("Model") _v = VFFSL(SL,"_",False)("Model") # u'$_("Model")' on line 32, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$_("Model")')) # from line 32, col 8. write(u'''
    ''') if VFFSL(SL,"model_filtered",True): # generated from line 33, col 3 write(u''' * ''') write(u''' ''') if False: _("Time") _v = VFFSL(SL,"_",False)("Time") # u'$_("Time")' on line 38, col 5 if _v is not None: write(_filter(_v, rawExpr=u'$_("Time")')) # from line 38, col 5. write(u'''   ''') _filter = self._CHEETAH__currentFilter = _orig_filter_98632394 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def message_fields(self, **KWS): ## CHEETAH: generated from #block message_fields at line 46, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') _v = VFFSL(SL,"message.agent.value",True) # u'$message.agent.value' on line 49, col 41 if _v is not None: write(_filter(_v, rawExpr=u'$message.agent.value')) # from line 49, col 41. write(u''' - ''') if False: _("Heartbeat summary") _v = VFFSL(SL,"_",False)("Heartbeat summary") # u'$_("Heartbeat summary")' on line 51, col 33 if _v is not None: write(_filter(_v, rawExpr=u'$_("Heartbeat summary")')) # from line 51, col 33. write(u'''
    - ''') if False: _("Filter on agent") _v = VFFSL(SL,"_",False)("Filter on agent") # u'$_("Filter on agent")' on line 52, col 45 if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter on agent")')) # from line 52, col 45. write(u'''
    ''') if len(VFFSL(SL,"message.node_addresses",True)) > 0: # generated from line 57, col 3 for address in VFFSL(SL,"message.node_addresses",True): # generated from line 58, col 5 write(u''' ''') _v = VFFSL(SL,"address.value",True) # u'$address.value' on line 59, col 43 if _v is not None: write(_filter(_v, rawExpr=u'$address.value')) # from line 59, col 43. write(u''' - ''') if False: _("Filter on address") _v = VFFSL(SL,"_",False)("Filter on address") # u'$_("Filter on address")' on line 61, col 42 if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter on address")')) # from line 61, col 42. write(u'''
    - Address information
    ''') for name, link in VFFSL(SL,"address.host_commands",True): # generated from line 63, col 7 write(u''' - ''') _v = VFFSL(SL,"name",True) # u'$name' on line 64, col 25 if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 64, col 25. write(u'''
    ''') write(u'''

    ''') else: # generated from line 69, col 3 write(u''' n/a ''') write(u''' ''') _v = VFFSL(SL,"message.node_name.value",True) # u'$message.node_name.value' on line 75, col 45 if _v is not None: write(_filter(_v, rawExpr=u'$message.node_name.value')) # from line 75, col 45. write(u'''
    ''') _v = VFFSL(SL,"message.model.value",True) # u'$message.model.value' on line 79, col 42 if _v is not None: write(_filter(_v, rawExpr=u'$message.model.value')) # from line 79, col 42. write(u''' ''') _v = VFFSL(SL,"message.time.value",True) # u'$message.time.value' on line 82, col 5 if _v is not None: write(_filter(_v, rawExpr=u'$message.time.value')) # from line 82, col 5. write(u''' ''') self._CHEETAH__globalSetVars["cnt"] += 1 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.message_fields_header(trans=trans) write(u''' ''') self.message_fields(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_HeartbeatListing= 'writeBody' ## END CLASS DEFINITION if not hasattr(HeartbeatListing, '_initCheetahAttributes'): templateAPIClass = getattr(HeartbeatListing, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(HeartbeatListing) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=HeartbeatListing()).run() prewikka-1.0.0/prewikka/templates/About.tmpl0000664000076400007640000000706711200051577020164 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #from prewikka import siteconfig #block main_content #filter CleanOutput

    Prewikka $siteconfig.version


    PreludeIDS Technologies $_("provides support to Large Accounts, Major Companies and Government Agencies around the world, to improve and strengthen the security of their systems and networks.")


    Prelude-IDS logo

    • $_("Customizing Prelude")

      $_("In keeping with the Open Source spirit, we encourage you to participate in the development of your application. You can order customized versions of Prelude to suit your needs: adapting, adding on functionality etc. Because they are carried out by PreludeIDS engineers, you know that any modifications made to the system will be integrated optimally and guaranteed by our technical support department. Additionally, the company can extend Prelude to handle yet unsupported sensors (including proprietary), ruleset extension to handle new devices and porting of Prelude to unsupported operating systems.")

    • $_("Software Maintenance and Technical Support")

      $_("PreludeIDS maintenance and support services guarantee optimal operation of the Prelude platform on your infrastructure. There are five support packages that provide our customers with peace of mind, knowing that they are not only covered for all outcomes, but that our experts are at hand to provide rapid and reliable solutions.")

    • $_("Commercial licenses")

      $_("The Prelude framework is licensed under the") General Public License. $_("PreludeIDS provides specific commercial licenses to allow proprietary systems based on Prelude to be developed and to interoperate.")

    • $_("Advice, Deployment and Training")

      $_("Through our partners, you have access to an array of top-of-the-line security services. By advising you on how to secure your infrastructure, deploying Prelude and training your users, we provide a turnkey solution to secure your infrastructure, delivered by specialists.")


    $_("Contact") $_("Office") $_("Website")
    info@prelude-ids.com 2, rue David Girin http://www.prelude-ids.com
    $_("Phone:") +33 8 70 70 21 58 69002 Lyon  
       $_("Fax:") +33 4 78 42 21 58 France  
    Copyright © 2004 - 2007 PreludeIDS Technologies. All right reserved.
    #end filter #end block main_content prewikka-1.0.0/prewikka/templates/ClassicLayout.tmpl0000664000076400007640000000252011340777332021667 0ustar yoannyoann#extends prewikka.templates.TopLayout #def body_class() classic_body #end def #block toplayout_content #filter CleanOutput
    #for $name, $link in $interface.tabs #if $name == $interface.active_tab #set $class_ = 'topmenu_item_active' #else #set $class_ = 'topmenu_item_inactive' #end if #end for
    #if $prewikka.logout_link

    $_("logout")

    #end if
    #end filter

    $unicode($_("%(username)s on %(date)s") % { "username": $prewikka.userlink, "date": $prewikka.date })

    #filter CleanOutput
    #end filter #filter Filter #def layout_start_hook #end def $layout_start_hook #end filter #filter CleanOutput
    $main_content
    #def layout_end_hook #end def $layout_end_hook #end filter #end block toplayout_content prewikka-1.0.0/prewikka/templates/FilterEdition.tmpl0000664000076400007640000001125011200051577021640 0ustar yoannyoann#from prewikka import utils #extends prewikka.templates.ClassicLayout #block main_content #filter CleanOutput
    $_("Available filters")

    $_("Edition")
      +
    #end filter #filter Filter #end filter #filter CleanOutput
    $_("Formula:")
    $_("Name:")
    $_("Comment:")
    #end filter #end block main_content prewikka-1.0.0/prewikka/templates/HTMLDocument.py0000644000076400007640000001514111340777370021032 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941688.861634 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:14:48 2010' __CHEETAH_src__ = 'prewikka/templates/HTMLDocument.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class HTMLDocument(Template): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(HTMLDocument, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def head_extra_content(self, **KWS): ## CHEETAH: generated from #def head_extra_content at line 17, col 17. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def respond(self, trans=None): ## CHEETAH: main method generated for this template if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') _v = VFFSL(SL,"document.title",True) # u'$document.title' on line 5, col 24 if _v is not None: write(_filter(_v, rawExpr=u'$document.title')) # from line 5, col 24. write(u''' ''') for css_file in VFFSL(SL,"document.css_files",True): # generated from line 9, col 17 write(u''' ''') write(u''' ''') for js_file in VFFSL(SL,"document.js_files",True): # generated from line 13, col 17 write(u''' ''') write(u''' ''') _v = VFFSL(SL,"head_extra_content",True) # u'$head_extra_content' on line 19, col 17 if _v is not None: write(_filter(_v, rawExpr=u'$head_extra_content')) # from line 19, col 17. write(u''' ''') _v = VFFSL(SL,"body",True) # u'$body' on line 21, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$body')) # from line 21, col 9. write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_HTMLDocument= 'respond' ## END CLASS DEFINITION if not hasattr(HTMLDocument, '_initCheetahAttributes'): templateAPIClass = getattr(HTMLDocument, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(HTMLDocument) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=HTMLDocument()).run() prewikka-1.0.0/prewikka/templates/FilterEdition.py0000644000076400007640000003715011214154700021316 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka import utils from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715456.871655 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:36 2009' __CHEETAH_src__ = 'prewikka/templates/FilterEdition.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:55:59 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class FilterEdition(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(FilterEdition, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') _orig_filter_56347537 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') if False: _("Available filters") _v = VFFSL(SL,"_",False)("Available filters") # u'$_("Available filters")' on line 96, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$_("Available filters")')) # from line 96, col 9. write(u'''

    ''') if False: _("Edition") _v = VFFSL(SL,"_",False)("Edition") # u'$_("Edition")' on line 123, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$_("Edition")')) # from line 123, col 9. write(u'''
      +
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_56347537 _orig_filter_28191518 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_28191518 _orig_filter_13610326 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') if False: _("Formula:") _v = VFFSL(SL,"_",False)("Formula:") # u'$_("Formula:")' on line 151, col 7 if _v is not None: write(_filter(_v, rawExpr=u'$_("Formula:")')) # from line 151, col 7. write(u'''
    ''') if False: _("Name:") _v = VFFSL(SL,"_",False)("Name:") # u'$_("Name:")' on line 155, col 7 if _v is not None: write(_filter(_v, rawExpr=u'$_("Name:")')) # from line 155, col 7. write(u'''
    ''') if False: _("Comment:") _v = VFFSL(SL,"_",False)("Comment:") # u'$_("Comment:")' on line 159, col 36 if _v is not None: write(_filter(_v, rawExpr=u'$_("Comment:")')) # from line 159, col 36. write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_13610326 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_FilterEdition= 'writeBody' ## END CLASS DEFINITION if not hasattr(FilterEdition, '_initCheetahAttributes'): templateAPIClass = getattr(FilterEdition, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(FilterEdition) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=FilterEdition()).run() prewikka-1.0.0/prewikka/templates/TopLayout.tmpl0000664000076400007640000000061611200051577021043 0ustar yoannyoann#extends prewikka.templates.HTMLDocument #def body_class() #end def #block body
    $prewikka.software
    $prewikka.place
    $prewikka.title
    $toplayout_content
    #end block body prewikka-1.0.0/prewikka/templates/Command.py0000644000076400007640000001230311223112307020121 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path from os.path import getmtime, exists import time import types import __builtin__ from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import DummyTransaction from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS try: True, False except NameError: True, False = (1==1), (1==0) VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.0.1' __CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0) __CHEETAH_genTime__ = 1246532807.9366729 __CHEETAH_genTimestamp__ = 'Thu Jul 2 13:06:47 2009' __CHEETAH_src__ = 'prewikka/templates/Command.tmpl' __CHEETAH_srcLastModified__ = 'Thu Jul 2 13:06:46 2009' __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class Command(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): ClassicLayout.__init__(self, *args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write('''
    ''') _v = VFFSL(SL,"command_output",True) # '$command_output' on line 5, col 3 if _v is not None: write(_filter(_v, rawExpr='$command_output')) # from line 5, col 3. write('''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_Command= 'writeBody' ## END CLASS DEFINITION if not hasattr(Command, '_initCheetahAttributes'): templateAPIClass = getattr(Command, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(Command) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=Command()).run() prewikka-1.0.0/prewikka/templates/PropertiesChangeForm.tmpl0000664000076400007640000000144011200051577023165 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #block main_content
    #for $name, $value in $hiddens #end for #set $row_classes = ("table_row_even", "table_row_odd") #set $cnt = 0 #for $property in $properties #if $property.value #if $property.type == 'checkbox' #set $value = 'checked' #else #set $value = "value=" + $property.value #end if #else #set $value = "" #end if #set $cnt += 1 #end for
    $property.name

    #end block main_content prewikka-1.0.0/prewikka/templates/AlertListing.tmpl0000664000076400007640000007123411341167202021507 0ustar yoannyoann#from prewikka import User, utils #extends prewikka.templates.MessageListing #block head_extra_content #filter CleanOutput #end filter #end block #def define_inline_filter($obname, $preselect)
    $_('Filter on') [advanced]:   +
    #end def #def define_inline_aggreg($obname)
    $_('Group entry by:')   +
    #end def #def filter_enabled_marker($type) #if $type == 2 [$_("filtered")] #else [$_("filtered")] #end if #end def #def filter_reset()
     
    #end def #block message_fields_header $_("Classification") #if $classification_filtered $filter_enabled_marker($classification_filtered) #end if
    $filter_reset()
    $define_inline_filter("classification", "alert.classification.text")
    $define_inline_aggreg("classification")
    #if $correlation_alert_view #set $disabled="disabled=\"disabled\"" #else #set $disabled="" #end if #for name, path in (($N_("Alert"), "alert.create_time"), ($N_("CorrelationAlert"), "alert.correlation_alert.name"), ($N_("OverflowAlert"), "alert.overflow_alert.program"), ($N_("ToolAlert"), "alert.tool_alert.name")) #if path in $alert.type #set $checked = "checked='checked'" #else #set $checked = "" #end if #end for #for $item in $N_("info"), $N_("low"), $N_("medium"), $N_("high"), $N_("n/a") #end for #for item in $N_("succeeded"), $N_("failed"), $N_("n/a") #end for
    $_("Type:")  $_($name)
    $_("Severity:")$_($item)
    $_("Completion:")  $_($item)
    $_("Source") #if $source_filtered $filter_enabled_marker($source_filtered) #end if
    $filter_reset()
    $define_inline_filter("source", "alert.source.node.address.address")
    $define_inline_aggreg("source")
    $_("Target") #if $target_filtered $filter_enabled_marker($target_filtered) #end if
    $filter_reset()
    $define_inline_filter("target", "alert.target.node.address.address")
    $define_inline_aggreg("target")
    $_("Analyzer") #if $analyzer_filtered $filter_enabled_marker($analyzer_filtered) #end if
    $filter_reset()
    $define_inline_filter("analyzer", "alert.analyzer.name")
    $define_inline_aggreg("analyzer")
    $_("Time") #end block message_fields_header #def writeInlineFilter(inline_filter, optval=None, cl="") #if optval #if $inline_filter.already_filtered: $optval#slurp #else $optval#slurp #end if #else #if $inline_filter.already_filtered: $inline_filter.value#slurp #else $inline_filter.value#slurp #end if #end if #end def #def classificationWrite(info, text) $text - $_("See alert detail")
    - $_("Filter on this classification.text")
    #slurp #end def #def writeService($hstr, $direction) #if $direction.protocol.value #set $protocol = $direction.protocol.value.upper() #else #set $protocol = "" #end if #if $direction.service.value != None#$hstr$unicode($direction.service.value)#end if #filter Filter - $writeInlineFilter($direction.service, $_("Filter on this port/protocol"))
    #end filter #if $direction.port.value - $_("Port/protocol information") #else - $_("Port/protocol information") #end if
    #slurp #end def #block message_fields #filter CleanOutput #if $message.sub_alert_name $message.sub_alert_type#slurp #if $message.sub_alert_display #set $string = $ngettext("alert", "alerts", $message.sub_alert_number) ($message.sub_alert_number $string)#slurp #end if : $message.sub_alert_name
    #slurp #end if #if $message.aggregated and $message.aggregated_classifications_hidden > 0 #set $string = $_("%(hidden)d of %(total)d alerts not shown...") ($unicode($string % { "hidden": $message.aggregated_classifications_hidden, "total": $message.aggregated_classifications_total }) $_("expand"))
    #end if #for $info in $message.infos #if $info.classification.value #set $text = $info.classification.value #else #set $text = "n/a" #end if #if $message.aggregated and (len($message.infos) > 1 or $info.count > 1) #if $info.count == 1 $info.count x #filter Filter $classificationWrite($info, $text) #end filter #else $info.count x #if $info.classification.already_filtered $text #else $text #end if #end if #else #if $info.classification.already_filtered $text #else #filter Filter $classificationWrite($info, $text) #end filter #end if #end if #if $info.completion.value (#filter Filter$writeInlineFilter($info.completion, cl="impact_completion_" + $info.completion.value)#end filter#) #end if
    #set $sep = "(" #for url, name in $info.classification_references##slurp $sep#if $url#$name.value#else##filter Filter $writeInlineFilter($name)#end filter##end if##slurp #set $sep = ", " - #filter Filter $writeInlineFilter($name, $_("Filter on this reference"))#end filter#
    - Reference information
    #end for##if $info.classification_references#)#end if #end for #for $name, $direction, $hidden, $total, $expand in ($_("source"), $message.source, $message.aggregated_source_hidden, $message.aggregated_source_total, $message.aggregated_source_expand), ($_("target"), $message.target, $message.aggregated_target_hidden, $message.aggregated_target_total, $message.aggregated_target_expand) #set $need_hr = 0 #if $hidden > 0 #set $string = $_("%(hidden)d of %(total)d %(name)ss not shown...") ($unicode($string % { "hidden": $hidden, "total": $total, "name": $name }) $_("expand"))
    #end if #for $direction in $direction #if $need_hr
    #end if #set $need_hr = 1 #for $address in $direction.addresses $address.hostname - #filter Filter $writeInlineFilter($address, $unicode($_("Filter on this %s") % ($name))) #end filter
    #if $address.value and (not $address.category or $address.category in ("ipv4-addr", "ipv4-net", "ipv6-addr", "ipv6-net")) - $unicode($_("%s information") % ($name)).capitalize()
    #for $cmdname, $link in $address.host_commands - $cmdname
    #end for #end if
    #slurp #filter Filter $writeService(":", $direction) #end filter
    #end for #if $len($direction.addresses) == 0 #filter Filter $writeService("service:", $direction) #end filter #end if #set $cnt = 0 #for $name, $value, $extra in $direction.listed_values #if $cnt > 0
    #end if $name: #filter Filter $writeInlineFilter($value) #end filter #if $extra != None ($extra) #end if #set $cnt += 1 #end for #end for #end for #for $sensor in $message.sensors #if $sensor.name.value #filter Filter$writeInlineFilter($sensor.name)#end filter #end if #if $sensor.node_name.value (#filter Filter$writeInlineFilter($sensor.node_name)#end filter#) #end if
    #end for #if $message.aggregated #if $message.time_min.value == $message.time_max.value $message.time_min.value #else $message.time_max.value - $message.time_min.value #end if #else $message.time.value #if $message.analyzer_time.value (sent at $message.analyzer_time.value) #end if #end if #end filter #filter Filter #end filter #end block message_fields #block orderby_option #end block #block timeline_extra_content #filter CleanOutput $_("Filter") #end filter #filter Filter #end filter #end block prewikka-1.0.0/prewikka/templates/MessageListing.tmpl0000664000076400007640000002360511340777332022035 0ustar yoannyoann#from prewikka import User #extends prewikka.templates.ClassicLayout #def layout_start_hook
    #for $name, $value in $hidden_parameters #end for #end def #def layout_end_hook
    #end def #block main_content #def message_listing_header #end def $message_listing_header $message_fields_header #set $row_classes = ("table_row_even", "table_row_odd") #set $cnt = 0 #for $message in $messages #set global $message = $message $message_fields #set $cnt += 1 #end for #if $prewikka.user.has(User.PERM_IDMEF_ALTER) and $cnt #end if
    #if $prewikka.user.has(User.PERM_IDMEF_ALTER) #else   #end if
     
    #end block main_content #block orderby_option #end block #block menu_extra_content #def timeline_extra_content #end def $timeline_extra_content #filter CleanOutput
    $_("Period")
    $_("Timezone")
    $_("Limit")
    $_("Refresh") #if $auto_apply_enable == "true" #set $img = "prewikka/images/pause.png" #else: #set $img = "prewikka/images/play.png" #end if
    0:00
    Play/Pause

     

    #if not $timeline.start Unlimited
    -
    #else $timeline.start
    $timeline.end
    #end if $timeline.range_timezone
    #if $timeline.prev #else #end if #if $timeline.current #else #end if #if $timeline.next #else #end if
    $_("prev")$_("prev")$_("current")$_("current")$_("next")$_("next")
    #if $nav.prev #else #end if #if $nav.next #else #end if
    << <<< <> >>> >>
    $nav.from ... $nav.to ($_("total"):$total)
    #end filter #filter Filter #end filter #end block menu_extra_content #block body
    $prewikka.software
    $prewikka.place
    $prewikka.title
    $toplayout_content
    #end block body prewikka-1.0.0/prewikka/templates/__init__.py0000664000076400007640000000000011200051324020267 0ustar yoannyoannprewikka-1.0.0/prewikka/templates/UserListing.py0000644000076400007640000002211711340776407021040 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941191.643719 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:06:31 2010' __CHEETAH_src__ = 'prewikka/templates/UserListing.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:06:29 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class UserListing(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(UserListing, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_74284864 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') perm_cnt = 2 for perm in VFFSL(SL,"permissions",True): # generated from line 14, col 9 perm_cnt += 1 write(u''' ''') write(u''' ''') row_classes = ("table_row_even", "table_row_odd") cnt = 0 for user in VFFSL(SL,"users",True): # generated from line 23, col 3 write(u''' ''') for perm in VFFSL(SL,"user.permissions",True): # generated from line 26, col 7 perm = ("", "x")[VFFSL(SL,"perm",True)] write(u''' ''') write(u''' ''') cnt += 1 write(u'''
    ''') if False: _("Login") _v = VFFSL(SL,"_",False)("Login") # u'$_("Login")' on line 12, col 11 if _v is not None: write(_filter(_v, rawExpr=u'$_("Login")')) # from line 12, col 11. write(u'''''') _v = VFN(VFFSL(SL,"perm",True),"replace",False)("_", " ") if _v is not None: write(_filter(_v)) write(u'''
    ''') _v = VFFSL(SL,"user.login",True) # u'$user.login' on line 25, col 41 if _v is not None: write(_filter(_v, rawExpr=u'$user.login')) # from line 25, col 41. write(u'''''') _v = VFFSL(SL,"perm",True) # u'$perm' on line 28, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$perm')) # from line 28, col 13. write(u'''
    ''') if VFFSL(SL,"backend_can_delete",True): # generated from line 37, col 1 write(u''' ''') write(u''' ''') if VFFSL(SL,"backend_can_create",True): # generated from line 42, col 1 write(u'''
    ''') write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_74284864 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_UserListing= 'writeBody' ## END CLASS DEFINITION if not hasattr(UserListing, '_initCheetahAttributes'): templateAPIClass = getattr(UserListing, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(UserListing) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=UserListing()).run() prewikka-1.0.0/prewikka/templates/SensorListing.py0000644000076400007640000007307611340777370021405 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout from prewikka.views.sensor import node_cmp from prewikka.views.sensor import analyzer_cmp from prewikka.views.sensor import getDominantStatus ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941688.9659989 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:14:48 2010' __CHEETAH_src__ = 'prewikka/templates/SensorListing.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class SensorListing(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(SensorListing, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def layout_start_hook(self, **KWS): ## CHEETAH: generated from #def layout_start_hook at line 6, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 62, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_33583529 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' ''') if len(VFFSL(SL,"locations",True)) > 0: # generated from line 65, col 1 write(u'''
    ''') write(u'''
    ''') listing = VFN(VFFSL(SL,"locations",True),"keys",False)() _v = VFN(VFFSL(SL,"listing",True),"sort",False)() # u'$listing.sort()' on line 73, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$listing.sort()')) # from line 73, col 1. write(u''' ''') for entry in VFFSL(SL,"listing",True): # generated from line 75, col 1 write(u'''
    ''') dominant = VFFSL(SL,"getDominantStatus",False)(VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]) dclass = "heartbeat_analyze_sensor_status_" + VFFSL(SL,"dominant",True) write(u''' ''') if VFFSL(SL,"dominant",True) != "online": # generated from line 80, col 3 display = "block" display_tmp = "none" else: # generated from line 83, col 3 display = "none" display_tmp = "block" write(u''' ''') _v = VFFSL(SL,"entry",True) # u'$entry' on line 90, col 57 if _v is not None: write(_filter(_v, rawExpr=u'$entry')) # from line 90, col 57. write(u'''
    ''') if False: ngettext("%d Online", "%d Online", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["online"]) if False: ngettext("%d Offline", "%d Offline", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["offline"]) if False: ngettext("%d Unknown", "%d Unknown", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["unknown"]) if False: ngettext("%d Missing", "%d Missing", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["missing"]) for i in ( ("online", VFFSL(SL,"ngettext",False)("%d Online", "%d Online", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["online"])), ("offline", VFFSL(SL,"ngettext",False)("%d Offline", "%d Offline", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["offline"])), ("unknown", VFFSL(SL,"ngettext",False)("%d Unknown", "%d Unknown", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["unknown"])), ("missing", VFFSL(SL,"ngettext",False)("%d Missing", "%d Missing", VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["missing"]))): # generated from line 102, col 8 if VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)][VFFSL(SL,"i",True)[0]] > 0: # generated from line 106, col 9 write(u''' ''') write(u'''
    ''') nlen = VFFSL(SL,"len",False)(VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["nodes"]) alen = VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["total"] write(u''' ''') if False: ngettext("%d Node", "%d Nodes", VFFSL(SL,"nlen",True)) _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"ngettext",False)("%d Node", "%d Nodes", VFFSL(SL,"nlen",True)) % VFFSL(SL,"nlen",True)) # u'$unicode($ngettext("%d Node", "%d Nodes", $nlen) % $nlen)' on line 100, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$unicode($ngettext("%d Node", "%d Nodes", $nlen) % $nlen)')) # from line 100, col 8. write(u''', ''') if False: ngettext("%d Analyzer", "%d Analyzers", VFFSL(SL,"alen",True)) _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"ngettext",False)("%d Analyzer", "%d Analyzers", VFFSL(SL,"alen",True)) % VFFSL(SL,"alen",True)) # u'$unicode($ngettext("%d Analyzer", "%d Analyzers", $alen) % $alen)' on line 100, col 67 if _v is not None: write(_filter(_v, rawExpr=u'$unicode($ngettext("%d Analyzer", "%d Analyzers", $alen) % $alen)')) # from line 100, col 67. write(u''' ''') _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"i",True)[1] % VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)][VFFSL(SL,"i",True)[0]]) # u'$unicode($i[1] % $locations[$entry][$i[0]])' on line 107, col 57 if _v is not None: write(_filter(_v, rawExpr=u'$unicode($i[1] % $locations[$entry][$i[0]])')) # from line 107, col 57. write(u'''
    ''') nlisting = VFN(VFFSL(SL,"locations",True)[VFFSL(SL,"entry",True)]["nodes"],"values",False)() write(u''' ''') _v = VFN(VFFSL(SL,"nlisting",True),"sort",False)(node_cmp) # u'$nlisting.sort(node_cmp)' on line 116, col 4 if _v is not None: write(_filter(_v, rawExpr=u'$nlisting.sort(node_cmp)')) # from line 116, col 4. write(u''' ''') for node in VFFSL(SL,"nlisting",True): # generated from line 118, col 4 cnt = 0 row_classes = ("table_row_even", "table_row_odd") row_class = VFFSL(SL,"row_classes",True)[VFFSL(SL,"cnt",True)%2] dominant = VFFSL(SL,"getDominantStatus",False)(VFFSL(SL,"node",True)) dclass = "heartbeat_analyze_sensor_status_" + dominant write(u''' ''') if VFFSL(SL,"dominant",True) != "online": # generated from line 125, col 5 display = "block" else: # generated from line 127, col 5 display = "none" write(u'''
    ''') _v = VFFSL(SL,"node.node_name",True) # u'$node.node_name' on line 134, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$node.node_name')) # from line 134, col 13. write(u''' ''') for addr in VFFSL(SL,"node.node_addresses",True): # generated from line 136, col 10 write(u''' ''') _v = VFFSL(SL,"addr.value",True) # u'$addr.value' on line 137, col 49 if _v is not None: write(_filter(_v, rawExpr=u'$addr.value')) # from line 137, col 49. write(u''' - ''') if False: _("Filter on address") _v = VFFSL(SL,"_",False)("Filter on address") # u'$_("Filter on address")' on line 139, col 44 if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter on address")')) # from line 139, col 44. write(u'''
    - ''') if False: _("Address information") _v = VFFSL(SL,"_",False)("Address information") # u'$_("Address information")' on line 140, col 126 if _v is not None: write(_filter(_v, rawExpr=u'$_("Address information")')) # from line 140, col 126. write(u'''
    ''') for name, link in VFFSL(SL,"addr.host_commands",True): # generated from line 142, col 12 write(u''' - ''') _v = VFFSL(SL,"name",True) # u'$name' on line 143, col 30 if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 143, col 30. write(u'''
    ''') write(u'''

    ''') write(u'''
    ''') _v = VFFSL(SL,"node.ostype",True) # u'$node.ostype' on line 149, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$node.ostype')) # from line 149, col 13. write(u''' ''') _v = VFFSL(SL,"node.osversion",True) # u'$node.osversion' on line 150, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$node.osversion')) # from line 150, col 13. write(u''' ''') for i in ("online", "offline", "unknown", "missing"): # generated from line 158, col 12 if VFFSL(SL,"node",True)[VFFSL(SL,"i",True)] > 0: # generated from line 159, col 13 write(u''' ''') write(u'''
    ''') if False: _("Total:") _v = VFFSL(SL,"_",False)("Total:") # u'$_("Total:")' on line 156, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$_("Total:")')) # from line 156, col 13. write(u''' ''') _v = VFFSL(SL,"node",True)["total"] # u'$node["total"]' on line 156, col 38 if _v is not None: write(_filter(_v, rawExpr=u'$node["total"]')) # from line 156, col 38. write(u''' ''') _v = VFFSL(SL,"node",True)[VFFSL(SL,"i",True)] # u'$node[$i]' on line 161, col 25 if _v is not None: write(_filter(_v, rawExpr=u'$node[$i]')) # from line 161, col 25. write(u'''
    ''') alisting = VFFSL(SL,"node.analyzers",True) write(u''' ''') _v = VFN(VFFSL(SL,"node.analyzers",True),"sort",False)(analyzer_cmp) # u'$node.analyzers.sort(analyzer_cmp)' on line 187, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$node.analyzers.sort(analyzer_cmp)')) # from line 187, col 6. write(u''' ''') for analyzer in VFFSL(SL,"node.analyzers",True): # generated from line 189, col 6 cnt += 1 write(u''' ''') write(u'''
    ''') if False: _("Delete") _v = VFFSL(SL,"_",False)("Delete") # u'$_("Delete")' on line 177, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$_("Delete")')) # from line 177, col 12. write(u''' ''') if False: _("Name") _v = VFFSL(SL,"_",False)("Name") # u'$_("Name")' on line 178, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$_("Name")')) # from line 178, col 12. write(u''' ''') if False: _("Model") _v = VFFSL(SL,"_",False)("Model") # u'$_("Model")' on line 179, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$_("Model")')) # from line 179, col 12. write(u''' ''') if False: _("Version") _v = VFFSL(SL,"_",False)("Version") # u'$_("Version")' on line 180, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$_("Version")')) # from line 180, col 12. write(u''' ''') if False: _("Class") _v = VFFSL(SL,"_",False)("Class") # u'$_("Class")' on line 181, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$_("Class")')) # from line 181, col 12. write(u''' ''') if False: _("Last heartbeat") _v = VFFSL(SL,"_",False)("Last heartbeat") # u'$_("Last heartbeat")' on line 182, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$_("Last heartbeat")')) # from line 182, col 12. write(u''' ''') if False: _("Status") _v = VFFSL(SL,"_",False)("Status") # u'$_("Status")' on line 183, col 40 if _v is not None: write(_filter(_v, rawExpr=u'$_("Status")')) # from line 183, col 40. write(u'''
    ''') _v = VFFSL(SL,"analyzer.name",True) # u'$analyzer.name' on line 195, col 47 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.name')) # from line 195, col 47. write(u''' - ''') if False: _("Alert listing") _v = VFFSL(SL,"_",False)("Alert listing") # u'$_("Alert listing")' on line 197, col 46 if _v is not None: write(_filter(_v, rawExpr=u'$_("Alert listing")')) # from line 197, col 46. write(u'''
    - ''') if False: _("Heartbeat listing") _v = VFFSL(SL,"_",False)("Heartbeat listing") # u'$_("Heartbeat listing")' on line 198, col 50 if _v is not None: write(_filter(_v, rawExpr=u'$_("Heartbeat listing")')) # from line 198, col 50. write(u'''
    - ''') if False: _("Heartbeat analysis") _v = VFFSL(SL,"_",False)("Heartbeat analysis") # u'$_("Heartbeat analysis")' on line 199, col 50 if _v is not None: write(_filter(_v, rawExpr=u'$_("Heartbeat analysis")')) # from line 199, col 50. write(u'''
    ''') _v = VFFSL(SL,"analyzer",True)["model"] # u'$analyzer["model"]' on line 202, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["model"]')) # from line 202, col 12. write(u''' ''') _v = VFFSL(SL,"analyzer",True)["version"] # u'$analyzer["version"]' on line 203, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["version"]')) # from line 203, col 12. write(u''' ''') _v = VFFSL(SL,"analyzer",True)["class"] # u'$analyzer["class"]' on line 204, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["class"]')) # from line 204, col 12. write(u''' ''') _v = VFFSL(SL,"analyzer",True)["last_heartbeat_time"] # u'$analyzer["last_heartbeat_time"]' on line 205, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["last_heartbeat_time"]')) # from line 205, col 12. write(u''' ''') _v = VFFSL(SL,"analyzer",True)["status_meaning"] # u'$analyzer["status_meaning"]' on line 206, col 100 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer["status_meaning"]')) # from line 206, col 100. write(u'''

    ''') write(u'''

    ''') write(u''' ''') if len(VFFSL(SL,"locations",True)) > 0: # generated from line 221, col 1 write(u'''
    ''') if False: _("Alerts") _v = VFFSL(SL,"_",False)("Alerts") # u'$_("Alerts")' on line 223, col 64 if _v is not None: write(_filter(_v, rawExpr=u'$_("Alerts")')) # from line 223, col 64. write(u''' ''') if False: _("Heartbeats") _v = VFFSL(SL,"_",False)("Heartbeats") # u'$_("Heartbeats")' on line 224, col 68 if _v is not None: write(_filter(_v, rawExpr=u'$_("Heartbeats")')) # from line 224, col 68. write(u'''  
    ''') write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_33583529 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_SensorListing= 'writeBody' ## END CLASS DEFINITION if not hasattr(SensorListing, '_initCheetahAttributes'): templateAPIClass = getattr(SensorListing, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(SensorListing) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=SensorListing()).run() prewikka-1.0.0/prewikka/templates/utils.tmpl0000664000076400007640000000222211340777332020247 0ustar yoannyoann#def display_analyzer(analyzer)
    Name Type OS Node Name Node Location Node Address
    #echo $analyzer.name or "n/a" # #if $analyzer.model $analyzer.model #if $analyzer.version $analyzer.version #end if #else n/a #end if #if $analyzer.ostype $analyzer.ostype #if $analyzer.osversion $analyzer.osversion #end if #else n/a #end if #echo $analyzer.node_name or "n/a" # #echo $analyzer.node_location or "n/a" # #if len($analyzer.node_addresses) > 0 #for $address in $analyzer.node_addresses $address
    #end for #else n/a #end if
    #end def prewikka-1.0.0/prewikka/templates/SensorAlertListing.tmpl0000664000076400007640000000025611200051325022665 0ustar yoannyoann#from prewikka.templates.utils import utils #extends prewikka.templates.AlertListing #def message_listing_header() $utils().display_analyzer($analyzer_infos)
    #end def prewikka-1.0.0/prewikka/templates/SensorHeartbeatListing.py0000644000076400007640000001247211214154701023201 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.utils import utils from prewikka.templates.HeartbeatListing import HeartbeatListing ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715457.6548181 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:37 2009' __CHEETAH_src__ = 'prewikka/templates/SensorHeartbeatListing.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:53:09 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class SensorHeartbeatListing(HeartbeatListing): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(SensorHeartbeatListing, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def message_listing_header(self, **KWS): ## CHEETAH: generated from #def message_listing_header() at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _v = VFN(VFFSL(SL,"utils",False)(),"display_analyzer",False)(VFFSL(SL,"analyzer",True)) # u'$utils().display_analyzer($analyzer)' on line 5, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$utils().display_analyzer($analyzer)')) # from line 5, col 1. write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_SensorHeartbeatListing= 'writeBody' ## END CLASS DEFINITION if not hasattr(SensorHeartbeatListing, '_initCheetahAttributes'): templateAPIClass = getattr(SensorHeartbeatListing, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(SensorHeartbeatListing) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=SensorHeartbeatListing()).run() prewikka-1.0.0/prewikka/templates/SensorAlertListing.py0000644000076400007640000001243711214154701022352 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.utils import utils from prewikka.templates.AlertListing import AlertListing ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715457.579129 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:37 2009' __CHEETAH_src__ = 'prewikka/templates/SensorAlertListing.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:53:09 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class SensorAlertListing(AlertListing): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(SensorAlertListing, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def message_listing_header(self, **KWS): ## CHEETAH: generated from #def message_listing_header() at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _v = VFN(VFFSL(SL,"utils",False)(),"display_analyzer",False)(VFFSL(SL,"analyzer_infos",True)) # u'$utils().display_analyzer($analyzer_infos)' on line 5, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$utils().display_analyzer($analyzer_infos)')) # from line 5, col 1. write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_SensorAlertListing= 'writeBody' ## END CLASS DEFINITION if not hasattr(SensorAlertListing, '_initCheetahAttributes'): templateAPIClass = getattr(SensorAlertListing, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(SensorAlertListing) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=SensorAlertListing()).run() prewikka-1.0.0/prewikka/templates/Command.tmpl0000664000076400007640000000016711223112306020453 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #block main_content
    $command_output
    #end block prewikka-1.0.0/prewikka/templates/UserSettings.tmpl0000664000076400007640000000677711340777332021571 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #def layout_start_hook #end def #block main_content #filter CleanOutput
    #if $user.login #else #end if #if $user.origin #end if
    $_("Account information") #if $user.login #else #if $errmsg #end if #end if #set $row_classes = ("table_row_even", "table_row_odd")
    $_("Login:")

    $user.login

    $errmsg
    Login:
    $_("Language:")
    $_("Permissions:")
    #set $cnt = 0 #set $checked_cnt = 0 #if $can_manage_user #set $disabled = "" #else #set $disabled = "disabled=\"disabled\"" #end if #for $perm, $value in $user.permissions #set $cnt += 1 #end for #if $cnt == $checked_cnt #set $checked = "checked=\"checked\"" #else #set $checked = "" #end if
    $perm #if $value #set $checked_cnt += 1 #set $checked = "checked=\"checked\"" #else #set $checked = "" #end if
     $_("Check All")

    #if $can_change_password
    $_("Change password") #if $ask_current_password #end if
    $_("Current password:")
    $_("New password:")
    $_("Confirm new password:")

    #end if
    #end filter #end block main_content prewikka-1.0.0/prewikka/templates/SensorHeartbeatListing.tmpl0000664000076400007640000000025411200051325023513 0ustar yoannyoann#from prewikka.templates.utils import utils #extends prewikka.templates.HeartbeatListing #def message_listing_header() $utils().display_analyzer($analyzer)
    #end def prewikka-1.0.0/prewikka/templates/PropertiesChangeForm.py0000644000076400007640000001723411214154700022644 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715456.907383 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:36 2009' __CHEETAH_src__ = 'prewikka/templates/PropertiesChangeForm.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:55:59 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class PropertiesChangeForm(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(PropertiesChangeForm, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') for name, value in VFFSL(SL,"hiddens",True): # generated from line 5, col 1 write(u'''\t ''') write(u''' ''') row_classes = ("table_row_even", "table_row_odd") cnt = 0 for property in VFFSL(SL,"properties",True): # generated from line 11, col 2 write(u'''\t\t \t\t\t ''') if VFFSL(SL,"property.value",True): # generated from line 14, col 4 if VFFSL(SL,"property.type",True) == 'checkbox': # generated from line 15, col 5 value = 'checked' else: # generated from line 17, col 5 value = "value=" + VFFSL(SL,"property.value",True) else: # generated from line 20, col 4 value = "" write(u'''\t\t\t \t\t ''') cnt += 1 write(u'''\t
    ''') _v = VFFSL(SL,"property.name",True) # u'$property.name' on line 13, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$property.name')) # from line 13, col 8. write(u'''
    \t
    \t
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_PropertiesChangeForm= 'writeBody' ## END CLASS DEFINITION if not hasattr(PropertiesChangeForm, '_initCheetahAttributes'): templateAPIClass = getattr(PropertiesChangeForm, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(PropertiesChangeForm) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=PropertiesChangeForm()).run() prewikka-1.0.0/prewikka/templates/IDMEFBrowser.py0000644000076400007640000001377511214443570020762 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path from os.path import getmtime, exists import time import types import __builtin__ from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import DummyTransaction from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka import IDMEFTree ################################################## ## MODULE CONSTANTS try: True, False except NameError: True, False = (1==1), (1==0) VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.0.1' __CHEETAH_versionTuple__ = (2, 0, 1, 'final', 0) __CHEETAH_genTime__ = 1244809080.6162069 __CHEETAH_genTimestamp__ = 'Fri Jun 12 14:18:00 2009' __CHEETAH_src__ = 'prewikka/templates/IDMEFBrowser.tmpl' __CHEETAH_srcLastModified__ = 'Fri Jun 12 14:17:59 2009' __CHEETAH_docstring__ = 'Autogenerated by CHEETAH: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class IDMEFBrowser(Template): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): Template.__init__(self, *args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def browser(self, root, **KWS): ## CHEETAH: generated from #def browser(root) at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body if VFFSL(SL,"root",True) is not None: # generated from line 4, col 2 idmef = VFFSL(SL,"root",True) else: # generated from line 6, col 2 idmef = VFN(VFFSL(SL,"IDMEFTree",True),"IDMEFTree",False)(); write(''' ''') for k in VFN(VFFSL(SL,"idmef",True),"keys",False)(): # generated from line 10, col 2 if VFFSL(SL,"idmef",True)[VFFSL(SL,"k",True)]: # generated from line 11, col 9 write(''' browser(''') _v = VFFSL(SL,"idmef",True)[VFFSL(SL,"k",True)] # '$idmef[$k]' on line 12, col 25 if _v is not None: write(_filter(_v, rawExpr='$idmef[$k]')) # from line 12, col 25. write(''') ''') write(''' tree["''') _v = VFFSL(SL,"k",True) # '$k' on line 15, col 15 if _v is not None: write(_filter(_v, rawExpr='$k')) # from line 15, col 15. write('''"] = ''') _v = VFFSL(SL,"k",True) # '$k' on line 15, col 22 if _v is not None: write(_filter(_v, rawExpr='$k')) # from line 15, col 22. write(''' ''') write(''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def respond(self, trans=None): ## CHEETAH: main method generated for this template if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_IDMEFBrowser= 'respond' ## END CLASS DEFINITION if not hasattr(IDMEFBrowser, '_initCheetahAttributes'): templateAPIClass = getattr(IDMEFBrowser, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(IDMEFBrowser) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=IDMEFBrowser()).run() prewikka-1.0.0/prewikka/templates/HeartbeatListing.tmpl0000664000076400007640000000340611340776405022345 0ustar yoannyoann#extends prewikka.templates.MessageListing #block message_fields_header #filter CleanOutput #set global $cnt = 0
    $_("Agent")
    #if $name_filtered * #end if
    $_("Node address")
    #if $address_filtered * #end if
    $_("Node name")
    #if $node_name_filtered * #end if
    $_("Model")
    #if $model_filtered * #end if $_("Time")   #end filter #end block message_fields_header #block message_fields $message.agent.value - $_("Heartbeat summary")
    - $_("Filter on agent")
    #if len($message.node_addresses) > 0 #for $address in $message.node_addresses $address.value - $_("Filter on address")
    - Address information
    #for $name, $link in $address.host_commands - $name
    #end for

    #end for #else n/a #end if $message.node_name.value
    $message.model.value $message.time.value #set global $cnt += 1 #end block message_fields prewikka-1.0.0/prewikka/templates/ClassicLayout.py0000644000076400007640000003603311340777371021352 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.TopLayout import TopLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941689.0029171 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:14:49 2010' __CHEETAH_src__ = 'prewikka/templates/ClassicLayout.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class ClassicLayout(TopLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(ClassicLayout, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def body_class(self, **KWS): ## CHEETAH: generated from #def body_class() at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''classic_body ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def layout_start_hook(self, **KWS): ## CHEETAH: generated from #def layout_start_hook at line 35, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def menu_extra_content(self, **KWS): ## CHEETAH: generated from #def menu_extra_content at line 53, col 3. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def layout_end_hook(self, **KWS): ## CHEETAH: generated from #def layout_end_hook at line 60, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def toplayout_content(self, **KWS): ## CHEETAH: generated from #block toplayout_content at line 7, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_57219176 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') for name, link in VFFSL(SL,"interface.tabs",True): # generated from line 11, col 3 if VFFSL(SL,"name",True) == VFFSL(SL,"interface.active_tab",True): # generated from line 12, col 5 class_ = 'topmenu_item_active' else: # generated from line 14, col 5 class_ = 'topmenu_item_inactive' write(u''' ''') write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_57219176 write(u'''

    ''') if False: _("%(username)s on %(date)s") _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"_",False)("%(username)s on %(date)s") % { "username": VFFSL(SL,"prewikka.userlink",True), "date": VFFSL(SL,"prewikka.date",True) }) # u'$unicode($_("%(username)s on %(date)s") % { "username": $prewikka.userlink, "date": $prewikka.date })' on line 28, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$unicode($_("%(username)s on %(date)s") % { "username": $prewikka.userlink, "date": $prewikka.date })')) # from line 28, col 8. write(u'''

    ''') _orig_filter_23257037 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_23257037 _orig_filter_49548771 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' ''') _v = VFFSL(SL,"layout_start_hook",True) # u'$layout_start_hook' on line 37, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$layout_start_hook')) # from line 37, col 1. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_49548771 _orig_filter_28678886 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') _v = VFFSL(SL,"main_content",True) # u'$main_content' on line 58, col 16 if _v is not None: write(_filter(_v, rawExpr=u'$main_content')) # from line 58, col 16. write(u'''
    ''') _v = VFFSL(SL,"layout_end_hook",True) # u'$layout_end_hook' on line 62, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$layout_end_hook')) # from line 62, col 1. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_16664837 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.toplayout_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_ClassicLayout= 'writeBody' ## END CLASS DEFINITION if not hasattr(ClassicLayout, '_initCheetahAttributes'): templateAPIClass = getattr(ClassicLayout, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(ClassicLayout) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=ClassicLayout()).run() prewikka-1.0.0/prewikka/templates/ErrorTemplate.tmpl0000664000076400007640000000134211340777332021676 0ustar yoannyoann#import cgi #extends prewikka.templates.ClassicLayout #block main_content #filter CleanOutput
    $name

    $message

    #if $traceback

    #end if

    #end filter #end block main_content prewikka-1.0.0/prewikka/templates/HeartbeatAnalyze.tmpl0000664000076400007640000000277011200051577022331 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #block main_content #set $row_classes = ("table_row_even", "table_row_odd") #set $cnt = 0 #set $cnt += 1
    Name Model OS Node Name Node Location Node Address Latest heartbeat Current status
    $analyzer.name $analyzer.model $analyzer.version $analyzer.ostype $analyzer.osversion $analyzer.node_name $analyzer.node_location #if len($analyzer.node_addresses) > 0 #for $address in $analyzer.node_addresses $address
    #end for #else n/a #end if
    $analyzer.last_heartbeat_time $analyzer.status_meaning
    #set $row_classes = ("table_row_even", "table_row_odd") #set $cnt = 0 #for $event in $analyzer.events #set $cnt += 1 #end for
    Events
    $event.value
    #end block prewikka-1.0.0/prewikka/templates/LoginPasswordForm.tmpl0000664000076400007640000000175211200051577022524 0ustar yoannyoann#extends prewikka.templates.TopLayout #block toplayout_content #filter CleanOutput
    User authentication #for $name, $value in $arguments #if type($value) is list #for $val in $value #end for #else #end if #end for
    Login:
    Password:
    $message
    #end filter #end block toplayout_content prewikka-1.0.0/prewikka/templates/HeartbeatAnalyze.py0000644000076400007640000002321011214154701021771 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715457.758189 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:37 2009' __CHEETAH_src__ = 'prewikka/templates/HeartbeatAnalyze.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:55:59 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class HeartbeatAnalyze(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(HeartbeatAnalyze, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') row_classes = ("table_row_even", "table_row_odd") cnt = 0 write(u''' ''') cnt += 1 write(u'''
    Name Model OS Node Name Node Location Node Address Latest heartbeat Current status
    ''') _v = VFFSL(SL,"analyzer.name",True) # u'$analyzer.name' on line 23, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.name')) # from line 23, col 9. write(u''' ''') _v = VFFSL(SL,"analyzer.model",True) # u'$analyzer.model' on line 24, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.model')) # from line 24, col 9. write(u''' ''') _v = VFFSL(SL,"analyzer.version",True) # u'$analyzer.version' on line 24, col 25 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.version')) # from line 24, col 25. write(u''' ''') _v = VFFSL(SL,"analyzer.ostype",True) # u'$analyzer.ostype' on line 25, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.ostype')) # from line 25, col 9. write(u''' ''') _v = VFFSL(SL,"analyzer.osversion",True) # u'$analyzer.osversion' on line 25, col 26 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.osversion')) # from line 25, col 26. write(u''' ''') _v = VFFSL(SL,"analyzer.node_name",True) # u'$analyzer.node_name' on line 26, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.node_name')) # from line 26, col 9. write(u''' ''') _v = VFFSL(SL,"analyzer.node_location",True) # u'$analyzer.node_location' on line 27, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.node_location')) # from line 27, col 9. write(u''' ''') if len(VFFSL(SL,"analyzer.node_addresses",True)) > 0: # generated from line 29, col 7 for address in VFFSL(SL,"analyzer.node_addresses",True): # generated from line 30, col 9 write(u''' ''') _v = VFFSL(SL,"address",True) # u'$address' on line 31, col 11 if _v is not None: write(_filter(_v, rawExpr=u'$address')) # from line 31, col 11. write(u'''
    ''') else: # generated from line 33, col 7 write(u''' n/a ''') write(u'''
    ''') _v = VFFSL(SL,"analyzer.last_heartbeat_time",True) # u'$analyzer.last_heartbeat_time' on line 37, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.last_heartbeat_time')) # from line 37, col 9. write(u''' ''') _v = VFFSL(SL,"analyzer.status_meaning",True) # u'$analyzer.status_meaning' on line 39, col 10 if _v is not None: write(_filter(_v, rawExpr=u'$analyzer.status_meaning')) # from line 39, col 10. write(u'''
    ''') row_classes = ("table_row_even", "table_row_odd") cnt = 0 for event in VFFSL(SL,"analyzer.events",True): # generated from line 54, col 5 write(u''' ''') cnt += 1 write(u'''
    Events
    ''') _v = VFFSL(SL,"event.value",True) # u'$event.value' on line 55, col 101 if _v is not None: write(_filter(_v, rawExpr=u'$event.value')) # from line 55, col 101. write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_HeartbeatAnalyze= 'writeBody' ## END CLASS DEFINITION if not hasattr(HeartbeatAnalyze, '_initCheetahAttributes'): templateAPIClass = getattr(HeartbeatAnalyze, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(HeartbeatAnalyze) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=HeartbeatAnalyze()).run() prewikka-1.0.0/prewikka/templates/MessageDetails.tmpl0000664000076400007640000000141111200051577021767 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #block main_content #def display_node($node) #set $display = ("block", "none")[$node.hidden]
    #for $entry in $node.entries #if isinstance($entry.value, dict) $display_node($entry.value) #else
    $entry.name
    $entry.value
    #end if #end for
    #end def $display_node($node) #end block main_content prewikka-1.0.0/prewikka/templates/Database.py0000644000076400007640000003311011340715371020260 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout from prewikka import siteconfig ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266916089.1082349 __CHEETAH_genTimestamp__ = 'Tue Feb 23 10:08:09 2010' __CHEETAH_src__ = 'prewikka/templates/Database.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 10:06:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class Database(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(Database, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_90474992 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') if VFFSL(SL,"dblist",True): # generated from line 39, col 1 write(u'''
    Database Listing ''') for id, desc, default, link in VFFSL(SL,"dblist",True): # generated from line 49, col 1 write(u''' ''') if VFFSL(SL,"default",True) is True: # generated from line 53, col 1 write(u''' ''') else: # generated from line 55, col 1 write(u''' ''') write(u''' ''') write(u'''
    Identifier Description Default Remove
    ''') _v = VFFSL(SL,"id",True) # u'$id' on line 51, col 30 if _v is not None: write(_filter(_v, rawExpr=u'$id')) # from line 51, col 30. write(u''' ''') _v = VFFSL(SL,"desc",True) # u'$desc' on line 52, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$desc')) # from line 52, col 14. write(u'''


    ''') write(u'''
    Database Settings ''') if VFFSL(SL,"sqlite3_selected",True): # generated from line 118, col 1 display = ""; else: # generated from line 120, col 1 display = "display: none"; write(u'''
    Type
    Host
    Port
    Database
    Username
    Password
    SQL logfile
    File

    Please enter an identifier and an optional description in order to identify this database:
    Identifier
    Description
    ''') if VFFSL(SL,"error",True): # generated from line 142, col 2 write(u'''
    ''') _v = VFFSL(SL,"error",True) # u'$error' on line 143, col 39 if _v is not None: write(_filter(_v, rawExpr=u'$error')) # from line 143, col 39. write(u'''
    ''') write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_90474992 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_Database= 'writeBody' ## END CLASS DEFINITION if not hasattr(Database, '_initCheetahAttributes'): templateAPIClass = getattr(Database, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(Database) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=Database()).run() prewikka-1.0.0/prewikka/templates/MessageDetails.py0000644000076400007640000002040611214154701021444 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715457.7935669 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:37 2009' __CHEETAH_src__ = 'prewikka/templates/MessageDetails.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:55:59 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class MessageDetails(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(MessageDetails, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def display_node(self, node, **KWS): ## CHEETAH: generated from #def display_node($node) at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body display = ("block", "none")[VFFSL(SL,"node.hidden",True)] write(u'''
    \t \t
    ''') for entry in VFFSL(SL,"node.entries",True): # generated from line 9, col 3 if isinstance(VFFSL(SL,"entry.value",True), dict): # generated from line 10, col 4 write(u'''\t\t\t\t''') _v = VFFSL(SL,"display_node",False)(VFFSL(SL,"entry.value",True)) # u'$display_node($entry.value)' on line 11, col 5 if _v is not None: write(_filter(_v, rawExpr=u'$display_node($entry.value)')) # from line 11, col 5. write(u''' ''') else: # generated from line 12, col 4 write(u'''\t\t\t\t
    \t\t\t\t\t
    ''') _v = VFFSL(SL,"entry.name",True) # u'$entry.name' on line 14, col 46 if _v is not None: write(_filter(_v, rawExpr=u'$entry.name')) # from line 14, col 46. write(u'''
    \t\t\t\t\t
    ''') _v = VFFSL(SL,"entry.value",True) # u'$entry.value' on line 15, col 47 if _v is not None: write(_filter(_v, rawExpr=u'$entry.value')) # from line 15, col 47. write(u'''
    \t\t\t\t
    ''') write(u'''\t
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') _v = VFFSL(SL,"display_node",False)(VFFSL(SL,"node",True)) # u'$display_node($node)' on line 23, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$display_node($node)')) # from line 23, col 1. write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_MessageDetails= 'writeBody' ## END CLASS DEFINITION if not hasattr(MessageDetails, '_initCheetahAttributes'): templateAPIClass = getattr(MessageDetails, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(MessageDetails) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=MessageDetails()).run() prewikka-1.0.0/prewikka/templates/UserSettings.py0000644000076400007640000004034511340777371021233 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941689.7337101 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:14:49 2010' __CHEETAH_src__ = 'prewikka/templates/UserSettings.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class UserSettings(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(UserSettings, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def layout_start_hook(self, **KWS): ## CHEETAH: generated from #def layout_start_hook at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 18, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_94785286 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') if VFFSL(SL,"user.login",True): # generated from line 24, col 1 write(u''' ''') else: # generated from line 27, col 1 write(u''' ''') write(u''' ''') if VFFSL(SL,"user.origin",True): # generated from line 31, col 1 write(u''' ''') write(u'''
    ''') if False: _("Account information") _v = VFFSL(SL,"_",False)("Account information") # u'$_("Account information")' on line 36, col 10 if _v is not None: write(_filter(_v, rawExpr=u'$_("Account information")')) # from line 36, col 10. write(u''' ''') if VFFSL(SL,"user.login",True): # generated from line 39, col 1 write(u''' ''') else: # generated from line 46, col 1 write(u''' ''') if VFFSL(SL,"errmsg",True): # generated from line 48, col 4 write(u''' \t ''') write(u''' ''') write(u''' ''') row_classes = ("table_row_even", "table_row_odd") write(u'''
    ''') if False: _("Login:") _v = VFFSL(SL,"_",False)("Login:") # u'$_("Login:")' on line 41, col 41 if _v is not None: write(_filter(_v, rawExpr=u'$_("Login:")')) # from line 41, col 41. write(u'''

    ''') _v = VFFSL(SL,"user.login",True) # u'$user.login' on line 43, col 70 if _v is not None: write(_filter(_v, rawExpr=u'$user.login')) # from line 43, col 70. write(u'''

    ''') _v = VFFSL(SL,"errmsg",True) # u'$errmsg' on line 50, col 42 if _v is not None: write(_filter(_v, rawExpr=u'$errmsg')) # from line 50, col 42. write(u'''
    Login:
    ''') if False: _("Language:") _v = VFFSL(SL,"_",False)("Language:") # u'$_("Language:")' on line 61, col 41 if _v is not None: write(_filter(_v, rawExpr=u'$_("Language:")')) # from line 61, col 41. write(u'''
    ''') if False: _("Permissions:") _v = VFFSL(SL,"_",False)("Permissions:") # u'$_("Permissions:")' on line 80, col 21 if _v is not None: write(_filter(_v, rawExpr=u'$_("Permissions:")')) # from line 80, col 21. write(u'''
    ''') cnt = 0 checked_cnt = 0 write(u''' ''') if VFFSL(SL,"can_manage_user",True): # generated from line 91, col 1 disabled = "" else: # generated from line 93, col 1 disabled = "disabled=\"disabled\"" write(u''' ''') for perm, value in VFFSL(SL,"user.permissions",True): # generated from line 97, col 7 write(u''' ''') cnt += 1 write(u''' ''') if VFFSL(SL,"cnt",True) == VFFSL(SL,"checked_cnt",True): # generated from line 115, col 1 checked = "checked=\"checked\"" else: # generated from line 117, col 1 checked = "" write(u'''
    ''') _v = VFFSL(SL,"perm",True) # u'$perm' on line 99, col 38 if _v is not None: write(_filter(_v, rawExpr=u'$perm')) # from line 99, col 38. write(u''' ''') if VFFSL(SL,"value",True): # generated from line 101, col 9 checked_cnt += 1 checked = "checked=\"checked\"" else: # generated from line 104, col 9 checked = "" write(u'''
     ''') if False: _("Check All") _v = VFFSL(SL,"_",False)("Check All") # u'$_("Check All")' on line 121, col 50 if _v is not None: write(_filter(_v, rawExpr=u'$_("Check All")')) # from line 121, col 50. write(u'''

    ''') if VFFSL(SL,"can_change_password",True): # generated from line 133, col 1 write(u'''
    ''') if False: _("Change password") _v = VFFSL(SL,"_",False)("Change password") # u'$_("Change password")' on line 135, col 11 if _v is not None: write(_filter(_v, rawExpr=u'$_("Change password")')) # from line 135, col 11. write(u''' ''') if VFFSL(SL,"ask_current_password",True): # generated from line 137, col 5 write(u''' ''') write(u'''
    ''') if False: _("Current password:") _v = VFFSL(SL,"_",False)("Current password:") # u'$_("Current password:")' on line 139, col 11 if _v is not None: write(_filter(_v, rawExpr=u'$_("Current password:")')) # from line 139, col 11. write(u'''
    ''') if False: _("New password:") _v = VFFSL(SL,"_",False)("New password:") # u'$_("New password:")' on line 144, col 11 if _v is not None: write(_filter(_v, rawExpr=u'$_("New password:")')) # from line 144, col 11. write(u'''
    ''') if False: _("Confirm new password:") _v = VFFSL(SL,"_",False)("Confirm new password:") # u'$_("Confirm new password:")' on line 148, col 11 if _v is not None: write(_filter(_v, rawExpr=u'$_("Confirm new password:")')) # from line 148, col 11. write(u'''

    ''') write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_94785286 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_UserSettings= 'writeBody' ## END CLASS DEFINITION if not hasattr(UserSettings, '_initCheetahAttributes'): templateAPIClass = getattr(UserSettings, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(UserSettings) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=UserSettings()).run() prewikka-1.0.0/prewikka/templates/MessageListing.py0000644000076400007640000011175711340777371021520 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka import User from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941689.6445751 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:14:49 2010' __CHEETAH_src__ = 'prewikka/templates/MessageListing.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class MessageListing(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(MessageListing, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def layout_start_hook(self, **KWS): ## CHEETAH: generated from #def layout_start_hook at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') for name, value in VFFSL(SL,"hidden_parameters",True): # generated from line 146, col 1 write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def layout_end_hook(self, **KWS): ## CHEETAH: generated from #def layout_end_hook at line 151, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def message_listing_header(self, **KWS): ## CHEETAH: generated from #def message_listing_header at line 158, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 156, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') _v = VFFSL(SL,"message_listing_header",True) # u'$message_listing_header' on line 160, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$message_listing_header')) # from line 160, col 1. write(u''' ''') _v = VFFSL(SL,"message_fields_header",True) # u'$message_fields_header' on line 163, col 3 if _v is not None: write(_filter(_v, rawExpr=u'$message_fields_header')) # from line 163, col 3. write(u''' ''') row_classes = ("table_row_even", "table_row_odd") cnt = 0 write(u''' ''') for message in VFFSL(SL,"messages",True): # generated from line 168, col 5 self._CHEETAH__globalSetVars["message"] = VFFSL(SL,"message",True) write(u''' ''') _v = VFFSL(SL,"message_fields",True) # u'$message_fields' on line 171, col 11 if _v is not None: write(_filter(_v, rawExpr=u'$message_fields')) # from line 171, col 11. write(u''' ''') cnt += 1 write(u''' ''') if VFN(VFFSL(SL,"prewikka.user",True),"has",False)(User.PERM_IDMEF_ALTER) and VFFSL(SL,"cnt",True): # generated from line 184, col 1 write(u''' ''') write(u'''
    ''') if VFN(VFFSL(SL,"prewikka.user",True),"has",False)(User.PERM_IDMEF_ALTER): # generated from line 173, col 13 write(u''' ''') else: # generated from line 175, col 13 write(u'''   ''') write(u'''
     
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def orderby_option(self, **KWS): ## CHEETAH: generated from #block orderby_option at line 199, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def timeline_extra_content(self, **KWS): ## CHEETAH: generated from #def timeline_extra_content at line 207, col 3. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def menu_extra_content(self, **KWS): ## CHEETAH: generated from #block menu_extra_content at line 204, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') _v = VFFSL(SL,"timeline_extra_content",True) # u'$timeline_extra_content' on line 209, col 3 if _v is not None: write(_filter(_v, rawExpr=u'$timeline_extra_content')) # from line 209, col 3. write(u''' ''') _orig_filter_33935114 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') if False: _("Period") _v = VFFSL(SL,"_",False)("Period") # u'$_("Period")' on line 212, col 33 if _v is not None: write(_filter(_v, rawExpr=u'$_("Period")')) # from line 212, col 33. write(u'''
    ''') if False: _("Timezone") _v = VFFSL(SL,"_",False)("Timezone") # u'$_("Timezone")' on line 227, col 37 if _v is not None: write(_filter(_v, rawExpr=u'$_("Timezone")')) # from line 227, col 37. write(u'''
    ''') if False: _("Limit") _v = VFFSL(SL,"_",False)("Limit") # u'$_("Limit")' on line 238, col 34 if _v is not None: write(_filter(_v, rawExpr=u'$_("Limit")')) # from line 238, col 34. write(u'''
    ''') if False: _("Refresh") _v = VFFSL(SL,"_",False)("Refresh") # u'$_("Refresh")' on line 251, col 31 if _v is not None: write(_filter(_v, rawExpr=u'$_("Refresh")')) # from line 251, col 31. write(u''' ''') if VFFSL(SL,"auto_apply_enable",True) == "true": # generated from line 254, col 5 img = "prewikka/images/pause.png" else: # generated from line 256, col 5 img = "prewikka/images/play.png" write(u'''
    0:00
    Play/Pause

     

    ''') if not VFFSL(SL,"timeline.start",True): # generated from line 283, col 1 write(u''' Unlimited
    -
    ''') else: # generated from line 286, col 1 write(u''' ''') _v = VFFSL(SL,"timeline.start",True) # u'$timeline.start' on line 287, col 2 if _v is not None: write(_filter(_v, rawExpr=u'$timeline.start')) # from line 287, col 2. write(u'''
    ''') _v = VFFSL(SL,"timeline.end",True) # u'$timeline.end' on line 288, col 2 if _v is not None: write(_filter(_v, rawExpr=u'$timeline.end')) # from line 288, col 2. write(u'''
    ''') write(u''' ''') _v = VFFSL(SL,"timeline.range_timezone",True) # u'$timeline.range_timezone' on line 290, col 2 if _v is not None: write(_filter(_v, rawExpr=u'$timeline.range_timezone')) # from line 290, col 2. write(u'''
    ''') if VFFSL(SL,"timeline.prev",True): # generated from line 299, col 5 write(u''' ''') else: # generated from line 301, col 5 write(u''' ''') write(u''' ''') if VFFSL(SL,"timeline.current",True): # generated from line 305, col 5 write(u''' ''') else: # generated from line 307, col 5 write(u''' ''') write(u''' ''') if VFFSL(SL,"timeline.next",True): # generated from line 311, col 5 write(u''' ''') else: # generated from line 313, col 5 write(u''' ''') write(u'''
    ''') if False: _("prev") _v = VFFSL(SL,"_",False)("prev") # u'$_("prev")' on line 300, col 68 if _v is not None: write(_filter(_v, rawExpr=u'$_("prev")')) # from line 300, col 68. write(u'''''') if False: _("prev") _v = VFFSL(SL,"_",False)("prev") # u'$_("prev")' on line 302, col 47 if _v is not None: write(_filter(_v, rawExpr=u'$_("prev")')) # from line 302, col 47. write(u'''''') if False: _("current") _v = VFFSL(SL,"_",False)("current") # u'$_("current")' on line 306, col 70 if _v is not None: write(_filter(_v, rawExpr=u'$_("current")')) # from line 306, col 70. write(u'''''') if False: _("current") _v = VFFSL(SL,"_",False)("current") # u'$_("current")' on line 308, col 51 if _v is not None: write(_filter(_v, rawExpr=u'$_("current")')) # from line 308, col 51. write(u'''''') if False: _("next") _v = VFFSL(SL,"_",False)("next") # u'$_("next")' on line 312, col 68 if _v is not None: write(_filter(_v, rawExpr=u'$_("next")')) # from line 312, col 68. write(u'''''') if False: _("next") _v = VFFSL(SL,"_",False)("next") # u'$_("next")' on line 314, col 47 if _v is not None: write(_filter(_v, rawExpr=u'$_("next")')) # from line 314, col 47. write(u'''
    ''') if VFFSL(SL,"nav.prev",True): # generated from line 325, col 5 write(u''' ''') else: # generated from line 328, col 5 write(u''' ''') if VFFSL(SL,"nav.next",True): # generated from line 332, col 5 write(u''' ''') else: # generated from line 335, col 5 write(u''' ''') write(u'''
    << <<< <> >>> >>
    ''') _v = VFFSL(SL,"nav.from",True) # u'$nav.from' on line 342, col 7 if _v is not None: write(_filter(_v, rawExpr=u'$nav.from')) # from line 342, col 7. write(u''' ... ''') _v = VFFSL(SL,"nav.to",True) # u'$nav.to' on line 342, col 21 if _v is not None: write(_filter(_v, rawExpr=u'$nav.to')) # from line 342, col 21. write(u''' (''') if False: _("total") _v = VFFSL(SL,"_",False)("total") # u'$_("total")' on line 342, col 30 if _v is not None: write(_filter(_v, rawExpr=u'$_("total")')) # from line 342, col 30. write(u''':''') _v = VFFSL(SL,"total",True) # u'$total' on line 342, col 42 if _v is not None: write(_filter(_v, rawExpr=u'$total')) # from line 342, col 42. write(u''')
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_33935114 _orig_filter_97343894 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _filter = self._CHEETAH__currentFilter = _orig_filter_97343894 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def body(self, **KWS): ## CHEETAH: generated from #block body at line 352, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') _v = VFFSL(SL,"prewikka.software",True) # u'$prewikka.software' on line 356, col 60 if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.software')) # from line 356, col 60. write(u'''
    ''') _v = VFFSL(SL,"prewikka.place",True) # u'$prewikka.place' on line 357, col 57 if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.place')) # from line 357, col 57. write(u'''
    ''') _v = VFFSL(SL,"prewikka.title",True) # u'$prewikka.title' on line 358, col 57 if _v is not None: write(_filter(_v, rawExpr=u'$prewikka.title')) # from line 358, col 57. write(u'''
    ''') _v = VFFSL(SL,"toplayout_content",True) # u'$toplayout_content' on line 360, col 17 if _v is not None: write(_filter(_v, rawExpr=u'$toplayout_content')) # from line 360, col 17. write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) write(u''' ''') self.orderby_option(trans=trans) write(u''' ''') self.menu_extra_content(trans=trans) write(u''' ''') self.body(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_MessageListing= 'writeBody' ## END CLASS DEFINITION if not hasattr(MessageListing, '_initCheetahAttributes'): templateAPIClass = getattr(MessageListing, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(MessageListing) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=MessageListing()).run() prewikka-1.0.0/prewikka/templates/AlertListing.py0000644000076400007640000033020411341167263021163 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka import User, utils from prewikka.templates.MessageListing import MessageListing ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1267003059.569206 __CHEETAH_genTimestamp__ = 'Wed Feb 24 10:17:39 2010' __CHEETAH_src__ = 'prewikka/templates/AlertListing.tmpl' __CHEETAH_srcLastModified__ = 'Wed Feb 24 10:16:50 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class AlertListing(MessageListing): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(AlertListing, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def head_extra_content(self, **KWS): ## CHEETAH: generated from #block head_extra_content at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_66027672 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_45552563 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def define_inline_filter(self, obname, preselect, **KWS): ## CHEETAH: generated from #def define_inline_filter($obname, $preselect) at line 454, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') if False: _('Filter on') _v = VFFSL(SL,"_",False)('Filter on') # u"$_('Filter on')" on line 457, col 13 if _v is not None: write(_filter(_v, rawExpr=u"$_('Filter on')")) # from line 457, col 13. write(u''' [advanced]:   +
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def define_inline_aggreg(self, obname, **KWS): ## CHEETAH: generated from #def define_inline_aggreg($obname) at line 502, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') if False: _('Group entry by:') _v = VFFSL(SL,"_",False)('Group entry by:') # u"$_('Group entry by:')" on line 505, col 13 if _v is not None: write(_filter(_v, rawExpr=u"$_('Group entry by:')")) # from line 505, col 13. write(u'''   +
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def filter_enabled_marker(self, type, **KWS): ## CHEETAH: generated from #def filter_enabled_marker($type) at line 523, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') if VFFSL(SL,"type",True) == 2: # generated from line 525, col 4 write(u''' [''') if False: _("filtered") _v = VFFSL(SL,"_",False)("filtered") # u'$_("filtered")' on line 526, col 39 if _v is not None: write(_filter(_v, rawExpr=u'$_("filtered")')) # from line 526, col 39. write(u'''] ''') else: # generated from line 527, col 4 write(u''' [''') if False: _("filtered") _v = VFFSL(SL,"_",False)("filtered") # u'$_("filtered")' on line 528, col 30 if _v is not None: write(_filter(_v, rawExpr=u'$_("filtered")')) # from line 528, col 30. write(u'''] ''') write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def filter_reset(self, **KWS): ## CHEETAH: generated from #def filter_reset() at line 533, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
     
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def message_fields_header(self, **KWS): ## CHEETAH: generated from #block message_fields_header at line 547, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') if False: _("Classification") _v = VFFSL(SL,"_",False)("Classification") # u'$_("Classification")' on line 551, col 33 if _v is not None: write(_filter(_v, rawExpr=u'$_("Classification")')) # from line 551, col 33. write(u''' ''') if VFFSL(SL,"classification_filtered",True): # generated from line 552, col 5 write(u''' ''') _v = VFFSL(SL,"filter_enabled_marker",False)(VFFSL(SL,"classification_filtered",True)) # u'$filter_enabled_marker($classification_filtered)' on line 553, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$filter_enabled_marker($classification_filtered)')) # from line 553, col 6. write(u''' ''') write(u'''
    ''') _v = VFFSL(SL,"filter_reset",False)() # u'$filter_reset()' on line 598, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$filter_reset()')) # from line 598, col 6. write(u'''
    ''') _v = VFFSL(SL,"define_inline_filter",False)("classification", "alert.classification.text") # u'$define_inline_filter("classification", "alert.classification.text")' on line 557, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_filter("classification", "alert.classification.text")')) # from line 557, col 14. write(u'''
    ''') _v = VFFSL(SL,"define_inline_aggreg",False)("classification") # u'$define_inline_aggreg("classification")' on line 558, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_aggreg("classification")')) # from line 558, col 14. write(u'''
    ''') if VFFSL(SL,"correlation_alert_view",True): # generated from line 563, col 9 disabled = "disabled=\"disabled\"" else: # generated from line 565, col 9 disabled = "" write(u''' ''') if False: N_("Alert") if False: N_("CorrelationAlert") if False: N_("OverflowAlert") if False: N_("ToolAlert") for name, path in ((VFFSL(SL,"N_",False)("Alert"), "alert.create_time"), (VFFSL(SL,"N_",False)("CorrelationAlert"), "alert.correlation_alert.name"), (VFFSL(SL,"N_",False)("OverflowAlert"), "alert.overflow_alert.program"), (VFFSL(SL,"N_",False)("ToolAlert"), "alert.tool_alert.name")): # generated from line 569, col 9 if path in VFFSL(SL,"alert.type",True): # generated from line 571, col 10 checked = "checked='checked'" else: # generated from line 573, col 10 checked = "" write(u''' ''') write(u''' ''') if False: N_("info") if False: N_("low") if False: N_("medium") if False: N_("high") if False: N_("n/a") for item in VFFSL(SL,"N_",False)("info"), VFFSL(SL,"N_",False)("low"), VFFSL(SL,"N_",False)("medium"), VFFSL(SL,"N_",False)("high"), VFFSL(SL,"N_",False)("n/a"): # generated from line 583, col 9 write(u''' ''') write(u''' ''') if False: N_("succeeded") if False: N_("failed") if False: N_("n/a") for item in VFFSL(SL,"N_",False)("succeeded"), VFFSL(SL,"N_",False)("failed"), VFFSL(SL,"N_",False)("n/a"): # generated from line 592, col 9 write(u''' ''') write(u'''
    ''') if False: _("Type:") _v = VFFSL(SL,"_",False)("Type:") # u'$_("Type:")' on line 561, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$_("Type:")')) # from line 561, col 13. write(u'''  ''') if False: _(VFFSL(SL,"name",True)) _v = VFFSL(SL,"_",False)(VFFSL(SL,"name",True)) # u'$_($name)' on line 577, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$_($name)')) # from line 577, col 13. write(u'''
    ''') if False: _("Severity:") _v = VFFSL(SL,"_",False)("Severity:") # u'$_("Severity:")' on line 582, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$_("Severity:")')) # from line 582, col 13. write(u'''''') if False: _(VFFSL(SL,"item",True)) _v = VFFSL(SL,"_",False)(VFFSL(SL,"item",True)) # u'$_($item)' on line 584, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$_($item)')) # from line 584, col 13. write(u'''
    ''') if False: _("Completion:") _v = VFFSL(SL,"_",False)("Completion:") # u'$_("Completion:")' on line 589, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$_("Completion:")')) # from line 589, col 13. write(u'''  ''') if False: _(VFFSL(SL,"item",True)) _v = VFFSL(SL,"_",False)(VFFSL(SL,"item",True)) # u'$_($item)' on line 593, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$_($item)')) # from line 593, col 13. write(u'''
    ''') if False: _("Source") _v = VFFSL(SL,"_",False)("Source") # u'$_("Source")' on line 604, col 33 if _v is not None: write(_filter(_v, rawExpr=u'$_("Source")')) # from line 604, col 33. write(u''' ''') if VFFSL(SL,"source_filtered",True): # generated from line 605, col 4 write(u''' ''') _v = VFFSL(SL,"filter_enabled_marker",False)(VFFSL(SL,"source_filtered",True)) # u'$filter_enabled_marker($source_filtered)' on line 606, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$filter_enabled_marker($source_filtered)')) # from line 606, col 6. write(u''' ''') write(u'''
    ''') _v = VFFSL(SL,"filter_reset",False)() # u'$filter_reset()' on line 612, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$filter_reset()')) # from line 612, col 6. write(u'''
    ''') _v = VFFSL(SL,"define_inline_filter",False)("source", "alert.source.node.address.address") # u'$define_inline_filter("source", "alert.source.node.address.address")' on line 610, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_filter("source", "alert.source.node.address.address")')) # from line 610, col 14. write(u'''
    ''') _v = VFFSL(SL,"define_inline_aggreg",False)("source") # u'$define_inline_aggreg("source")' on line 611, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_aggreg("source")')) # from line 611, col 14. write(u'''
    ''') if False: _("Target") _v = VFFSL(SL,"_",False)("Target") # u'$_("Target")' on line 618, col 33 if _v is not None: write(_filter(_v, rawExpr=u'$_("Target")')) # from line 618, col 33. write(u''' ''') if VFFSL(SL,"target_filtered",True): # generated from line 619, col 4 write(u''' ''') _v = VFFSL(SL,"filter_enabled_marker",False)(VFFSL(SL,"target_filtered",True)) # u'$filter_enabled_marker($target_filtered)' on line 620, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$filter_enabled_marker($target_filtered)')) # from line 620, col 6. write(u''' ''') write(u'''
    ''') _v = VFFSL(SL,"filter_reset",False)() # u'$filter_reset()' on line 626, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$filter_reset()')) # from line 626, col 6. write(u'''
    ''') _v = VFFSL(SL,"define_inline_filter",False)("target", "alert.target.node.address.address") # u'$define_inline_filter("target", "alert.target.node.address.address")' on line 624, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_filter("target", "alert.target.node.address.address")')) # from line 624, col 14. write(u'''
    ''') _v = VFFSL(SL,"define_inline_aggreg",False)("target") # u'$define_inline_aggreg("target")' on line 625, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_aggreg("target")')) # from line 625, col 14. write(u'''
    ''') if False: _("Analyzer") _v = VFFSL(SL,"_",False)("Analyzer") # u'$_("Analyzer")' on line 632, col 33 if _v is not None: write(_filter(_v, rawExpr=u'$_("Analyzer")')) # from line 632, col 33. write(u''' ''') if VFFSL(SL,"analyzer_filtered",True): # generated from line 633, col 4 write(u''' ''') _v = VFFSL(SL,"filter_enabled_marker",False)(VFFSL(SL,"analyzer_filtered",True)) # u'$filter_enabled_marker($analyzer_filtered)' on line 634, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$filter_enabled_marker($analyzer_filtered)')) # from line 634, col 6. write(u''' ''') write(u'''
    ''') _v = VFFSL(SL,"filter_reset",False)() # u'$filter_reset()' on line 640, col 6 if _v is not None: write(_filter(_v, rawExpr=u'$filter_reset()')) # from line 640, col 6. write(u'''
    ''') _v = VFFSL(SL,"define_inline_filter",False)("analyzer", "alert.analyzer.name") # u'$define_inline_filter("analyzer", "alert.analyzer.name")' on line 638, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_filter("analyzer", "alert.analyzer.name")')) # from line 638, col 14. write(u'''
    ''') _v = VFFSL(SL,"define_inline_aggreg",False)("analyzer") # u'$define_inline_aggreg("analyzer")' on line 639, col 14 if _v is not None: write(_filter(_v, rawExpr=u'$define_inline_aggreg("analyzer")')) # from line 639, col 14. write(u'''
    ''') if False: _("Time") _v = VFFSL(SL,"_",False)("Time") # u'$_("Time")' on line 645, col 7 if _v is not None: write(_filter(_v, rawExpr=u'$_("Time")')) # from line 645, col 7. write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeInlineFilter(self, inline_filter, optval=None, cl="", **KWS): ## CHEETAH: generated from #def writeInlineFilter(inline_filter, optval=None, cl="") at line 651, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body if optval: # generated from line 652, col 1 if VFFSL(SL,"inline_filter.already_filtered",True): # generated from line 653, col 1 write(u'''''') _v = VFFSL(SL,"optval",True) # u'$optval' on line 654, col 19 if _v is not None: write(_filter(_v, rawExpr=u'$optval')) # from line 654, col 19. write(u'''''') else: # generated from line 655, col 1 write(u'''''') _v = VFFSL(SL,"optval",True) # u'$optval' on line 656, col 52 if _v is not None: write(_filter(_v, rawExpr=u'$optval')) # from line 656, col 52. write(u'''''') else: # generated from line 658, col 1 if VFFSL(SL,"inline_filter.already_filtered",True): # generated from line 659, col 1 write(u'''''') _v = VFFSL(SL,"inline_filter.value",True) # u'$inline_filter.value' on line 660, col 19 if _v is not None: write(_filter(_v, rawExpr=u'$inline_filter.value')) # from line 660, col 19. write(u'''''') else: # generated from line 661, col 1 write(u'''''') _v = VFFSL(SL,"inline_filter.value",True) # u'$inline_filter.value' on line 662, col 52 if _v is not None: write(_filter(_v, rawExpr=u'$inline_filter.value')) # from line 662, col 52. write(u'''''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def classificationWrite(self, info, text, **KWS): ## CHEETAH: generated from #def classificationWrite(info, text) at line 667, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''''') _v = VFFSL(SL,"text",True) # u'$text' on line 668, col 67 if _v is not None: write(_filter(_v, rawExpr=u'$text')) # from line 668, col 67. write(u''' - ''') if False: _("See alert detail") _v = VFFSL(SL,"_",False)("See alert detail") # u'$_("See alert detail")' on line 669, col 27 if _v is not None: write(_filter(_v, rawExpr=u'$_("See alert detail")')) # from line 669, col 27. write(u'''
    - ''') if False: _("Filter on this classification.text") _v = VFFSL(SL,"_",False)("Filter on this classification.text") # u'$_("Filter on this classification.text")' on line 670, col 48 if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter on this classification.text")')) # from line 670, col 48. write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeService(self, hstr, direction, **KWS): ## CHEETAH: generated from #def writeService($hstr, $direction) at line 674, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body if VFFSL(SL,"direction.protocol.value",True): # generated from line 675, col 1 protocol = VFN(VFFSL(SL,"direction.protocol.value",True),"upper",False)() else: # generated from line 677, col 1 protocol = "" if VFFSL(SL,"direction.service.value",True) != None: # generated from line 680, col 1 _v = VFFSL(SL,"hstr",True) # u'$hstr' on line 680, col 38 if _v is not None: write(_filter(_v, rawExpr=u'$hstr')) # from line 680, col 38. write(u'''''') _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"direction.service.value",True)) # u'$unicode($direction.service.value)' on line 680, col 72 if _v is not None: write(_filter(_v, rawExpr=u'$unicode($direction.service.value)')) # from line 680, col 72. write(u''' ''') _orig_filter_63287189 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''- ''') if False: _("Filter on this port/protocol") _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"direction.service",True), VFFSL(SL,"_",False)("Filter on this port/protocol")) # u'$writeInlineFilter($direction.service, $_("Filter on this port/protocol"))' on line 683, col 26 if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($direction.service, $_("Filter on this port/protocol"))')) # from line 683, col 26. write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_63287189 write(u''' ''') if VFFSL(SL,"direction.port.value",True): # generated from line 684, col 9 write(u''' - ''') if False: _("Port/protocol information") _v = VFFSL(SL,"_",False)("Port/protocol information") # u'$_("Port/protocol information")' on line 685, col 166 if _v is not None: write(_filter(_v, rawExpr=u'$_("Port/protocol information")')) # from line 685, col 166. write(u''' ''') else: # generated from line 686, col 9 write(u''' - ''') if False: _("Port/protocol information") _v = VFFSL(SL,"_",False)("Port/protocol information") # u'$_("Port/protocol information")' on line 687, col 17 if _v is not None: write(_filter(_v, rawExpr=u'$_("Port/protocol information")')) # from line 687, col 17. write(u''' ''') write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def message_fields(self, **KWS): ## CHEETAH: generated from #block message_fields at line 693, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_25989606 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' ''') if VFFSL(SL,"message.sub_alert_name",True): # generated from line 697, col 3 write(u''' ''') _v = VFFSL(SL,"message.sub_alert_type",True) # u'$message.sub_alert_type' on line 698, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$message.sub_alert_type')) # from line 698, col 8. if VFFSL(SL,"message.sub_alert_display",True): # generated from line 699, col 5 write(u''' ''') if False: ngettext("alert", "alerts", VFFSL(SL,"message.sub_alert_number",True)) string = VFFSL(SL,"ngettext",False)("alert", "alerts", VFFSL(SL,"message.sub_alert_number",True)) write(u''' (''') _v = VFFSL(SL,"message.sub_alert_number",True) # u'$message.sub_alert_number' on line 701, col 45 if _v is not None: write(_filter(_v, rawExpr=u'$message.sub_alert_number')) # from line 701, col 45. write(u''' ''') _v = VFFSL(SL,"string",True) # u'$string' on line 701, col 75 if _v is not None: write(_filter(_v, rawExpr=u'$string')) # from line 701, col 75. write(u''')''') write(u''': ''') _v = VFFSL(SL,"message.sub_alert_name",True) # u'$message.sub_alert_name' on line 703, col 44 if _v is not None: write(_filter(_v, rawExpr=u'$message.sub_alert_name')) # from line 703, col 44. write(u'''
    ''') write(u''' ''') if VFFSL(SL,"message.aggregated",True) and VFFSL(SL,"message.aggregated_classifications_hidden",True) > 0: # generated from line 706, col 3 write(u''' ''') if False: _("%(hidden)d of %(total)d alerts not shown...") string = VFFSL(SL,"_",False)("%(hidden)d of %(total)d alerts not shown...") write(u''' (''') _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"string",True) % { "hidden": VFFSL(SL,"message.aggregated_classifications_hidden",True), "total": VFFSL(SL,"message.aggregated_classifications_total",True) }) # u'$unicode($string % { "hidden": $message.aggregated_classifications_hidden, "total": $message.aggregated_classifications_total })' on line 708, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$unicode($string % { "hidden": $message.aggregated_classifications_hidden, "total": $message.aggregated_classifications_total })')) # from line 708, col 9. write(u''' ''') if False: _("expand") _v = VFFSL(SL,"_",False)("expand") # u'$_("expand")' on line 709, col 65 if _v is not None: write(_filter(_v, rawExpr=u'$_("expand")')) # from line 709, col 65. write(u''')
    ''') write(u''' ''') for info in VFFSL(SL,"message.infos",True): # generated from line 713, col 3 if VFFSL(SL,"info.classification.value",True): # generated from line 714, col 5 text = VFFSL(SL,"info.classification.value",True) else: # generated from line 716, col 5 text = "n/a" write(u''' ''') if VFFSL(SL,"message.aggregated",True) and (len(VFFSL(SL,"message.infos",True)) > 1 or VFFSL(SL,"info.count",True) > 1): # generated from line 720, col 5 if VFFSL(SL,"info.count",True) == 1: # generated from line 721, col 7 write(u''' ''') _v = VFFSL(SL,"info.count",True) # u'$info.count' on line 722, col 8 if _v is not None: write(_filter(_v, rawExpr=u'$info.count')) # from line 722, col 8. write(u''' x ''') _orig_filter_82669679 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"classificationWrite",False)(VFFSL(SL,"info",True), VFFSL(SL,"text",True)) # u'$classificationWrite($info, $text)' on line 723, col 24 if _v is not None: write(_filter(_v, rawExpr=u'$classificationWrite($info, $text)')) # from line 723, col 24. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_82669679 write(u''' ''') else: # generated from line 724, col 7 write(u''' ''') _v = VFFSL(SL,"info.count",True) # u'$info.count' on line 725, col 31 if _v is not None: write(_filter(_v, rawExpr=u'$info.count')) # from line 725, col 31. write(u''' x ''') if VFFSL(SL,"info.classification.already_filtered",True): # generated from line 726, col 8 write(u''' ''') _v = VFFSL(SL,"text",True) # u'$text' on line 727, col 60 if _v is not None: write(_filter(_v, rawExpr=u'$text')) # from line 727, col 60. write(u''' ''') else: # generated from line 728, col 8 write(u''' ''') _v = VFFSL(SL,"text",True) # u'$text' on line 729, col 99 if _v is not None: write(_filter(_v, rawExpr=u'$text')) # from line 729, col 99. write(u''' ''') else: # generated from line 732, col 5 if VFFSL(SL,"info.classification.already_filtered",True): # generated from line 733, col 7 write(u''' ''') _v = VFFSL(SL,"text",True) # u'$text' on line 734, col 76 if _v is not None: write(_filter(_v, rawExpr=u'$text')) # from line 734, col 76. write(u''' ''') else: # generated from line 735, col 7 write(u''' ''') _orig_filter_62816141 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"classificationWrite",False)(VFFSL(SL,"info",True), VFFSL(SL,"text",True)) # u'$classificationWrite($info, $text)' on line 736, col 23 if _v is not None: write(_filter(_v, rawExpr=u'$classificationWrite($info, $text)')) # from line 736, col 23. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_62816141 write(u''' ''') write(u''' ''') if VFFSL(SL,"info.completion.value",True): # generated from line 740, col 5 write(u''' (''') _orig_filter_16311933 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"info.completion",True), cl="impact_completion_" + VFFSL(SL,"info.completion.value",True)) # u'$writeInlineFilter($info.completion, cl="impact_completion_" + $info.completion.value)' on line 741, col 22 if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($info.completion, cl="impact_completion_" + $info.completion.value)')) # from line 741, col 22. _filter = self._CHEETAH__currentFilter = _orig_filter_16311933 write(u''') ''') write(u'''
    ''') sep = "(" write(u''' ''') for url, name in VFFSL(SL,"info.classification_references",True): # generated from line 747, col 1 _v = VFFSL(SL,"sep",True) # u'$sep' on line 748, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$sep')) # from line 748, col 1. if VFFSL(SL,"url",True): # generated from line 748, col 5 write(u'''''') _v = VFFSL(SL,"name.value",True) # u'$name.value' on line 748, col 43 if _v is not None: write(_filter(_v, rawExpr=u'$name.value')) # from line 748, col 43. write(u'''''') else: # generated from line 748, col 58 _orig_filter_12694750 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"name",True)) # u'$writeInlineFilter($name)' on line 748, col 79 if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($name)')) # from line 748, col 79. _filter = self._CHEETAH__currentFilter = _orig_filter_12694750 sep = ", " write(u''' - ''') _orig_filter_35051930 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter if False: _("Filter on this reference") _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"name",True), VFFSL(SL,"_",False)("Filter on this reference")) # u'$writeInlineFilter($name, $_("Filter on this reference"))' on line 751, col 19 if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($name, $_("Filter on this reference"))')) # from line 751, col 19. _filter = self._CHEETAH__currentFilter = _orig_filter_35051930 write(u'''
    - Reference information
    ''') if VFFSL(SL,"info.classification_references",True): # generated from line 753, col 17 write(u''')''') write(u''' ''') write(u''' ''') if False: _("source") if False: _("target") for name, direction, hidden, total, expand in (VFFSL(SL,"_",False)("source"), VFFSL(SL,"message.source",True), VFFSL(SL,"message.aggregated_source_hidden",True), VFFSL(SL,"message.aggregated_source_total",True), VFFSL(SL,"message.aggregated_source_expand",True)), (VFFSL(SL,"_",False)("target"), VFFSL(SL,"message.target",True), VFFSL(SL,"message.aggregated_target_hidden",True), VFFSL(SL,"message.aggregated_target_total",True), VFFSL(SL,"message.aggregated_target_expand",True)): # generated from line 760, col 1 write(u''' ''') need_hr = 0 write(u''' ''') if VFFSL(SL,"hidden",True) > 0: # generated from line 764, col 1 write(u''' ''') if False: _("%(hidden)d of %(total)d %(name)ss not shown...") string = VFFSL(SL,"_",False)("%(hidden)d of %(total)d %(name)ss not shown...") write(u''' (''') _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"string",True) % { "hidden": VFFSL(SL,"hidden",True), "total": VFFSL(SL,"total",True), "name": VFFSL(SL,"name",True) }) # u'$unicode($string % { "hidden": $hidden, "total": $total, "name": $name })' on line 766, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$unicode($string % { "hidden": $hidden, "total": $total, "name": $name })')) # from line 766, col 12. write(u''' ''') if False: _("expand") _v = VFFSL(SL,"_",False)("expand") # u'$_("expand")' on line 767, col 26 if _v is not None: write(_filter(_v, rawExpr=u'$_("expand")')) # from line 767, col 26. write(u''')
    ''') write(u''' ''') for direction in VFFSL(SL,"direction",True): # generated from line 771, col 1 if VFFSL(SL,"need_hr",True): # generated from line 772, col 7 write(u'''
    ''') write(u''' ''') need_hr = 1 write(u''' ''') for address in VFFSL(SL,"direction.addresses",True): # generated from line 778, col 7 write(u''' ''') _v = VFFSL(SL,"address.hostname",True) # u'$address.hostname' on line 779, col 37 if _v is not None: write(_filter(_v, rawExpr=u'$address.hostname')) # from line 779, col 37. write(u''' - ''') _orig_filter_60542421 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter if False: _("Filter on this %s") _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"address",True), VFFSL(SL,"unicode",False)(VFFSL(SL,"_",False)("Filter on this %s") % (VFFSL(SL,"name",True)))) # u'$writeInlineFilter($address, $unicode($_("Filter on this %s") % ($name)))' on line 780, col 27 if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($address, $unicode($_("Filter on this %s") % ($name)))')) # from line 780, col 27. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_60542421 write(u'''
    ''') if VFFSL(SL,"address.value",True) and (not VFFSL(SL,"address.category",True) or VFFSL(SL,"address.category",True) in ("ipv4-addr", "ipv4-net", "ipv6-addr", "ipv6-net")): # generated from line 783, col 8 write(u''' - ''') if False: _("%s information") _v = VFN(VFFSL(SL,"unicode",False)(VFFSL(SL,"_",False)("%s information") % (VFFSL(SL,"name",True))),"capitalize",False)() # u'$unicode($_("%s information") % ($name)).capitalize()' on line 784, col 127 if _v is not None: write(_filter(_v, rawExpr=u'$unicode($_("%s information") % ($name)).capitalize()')) # from line 784, col 127. write(u'''
    ''') for cmdname, link in VFFSL(SL,"address.host_commands",True): # generated from line 786, col 11 write(u''' - ''') _v = VFFSL(SL,"cmdname",True) # u'$cmdname' on line 787, col 28 if _v is not None: write(_filter(_v, rawExpr=u'$cmdname')) # from line 787, col 28. write(u'''
    ''') write(u'''
    ''') _orig_filter_37575375 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"writeService",False)(":", VFFSL(SL,"direction",True)) # u'$writeService(":", $direction)' on line 791, col 16 if _v is not None: write(_filter(_v, rawExpr=u'$writeService(":", $direction)')) # from line 791, col 16. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_37575375 write(u'''
    ''') write(u''' ''') if VFFSL(SL,"len",False)(VFFSL(SL,"direction.addresses",True)) == 0: # generated from line 795, col 7 write(u''' ''') _orig_filter_54695530 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"writeService",False)("service:", VFFSL(SL,"direction",True)) # u'$writeService("service:", $direction)' on line 796, col 24 if _v is not None: write(_filter(_v, rawExpr=u'$writeService("service:", $direction)')) # from line 796, col 24. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_54695530 write(u''' ''') write(u''' ''') cnt = 0 for name, value, extra in VFFSL(SL,"direction.listed_values",True): # generated from line 800, col 6 if VFFSL(SL,"cnt",True) > 0: # generated from line 801, col 10 write(u'''
    ''') write(u''' ''') _v = VFFSL(SL,"name",True) # u'$name' on line 805, col 10 if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 805, col 10. write(u''': ''') _orig_filter_23199653 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"value",True)) # u'$writeInlineFilter($value)' on line 805, col 32 if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($value)')) # from line 805, col 32. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_23199653 write(u''' ''') if VFFSL(SL,"extra",True) != None: # generated from line 806, col 10 write(u''' (''') _v = VFFSL(SL,"extra",True) # u'$extra' on line 807, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$extra')) # from line 807, col 12. write(u''') ''') write(u''' ''') cnt += 1 write(u''' ''') write(u''' ''') for sensor in VFFSL(SL,"message.sensors",True): # generated from line 818, col 3 if VFFSL(SL,"sensor.name.value",True): # generated from line 819, col 5 write(u''' ''') _orig_filter_87412113 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"sensor.name",True)) # u'$writeInlineFilter($sensor.name)' on line 820, col 20 if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($sensor.name)')) # from line 820, col 20. _filter = self._CHEETAH__currentFilter = _orig_filter_87412113 write(u''' ''') if VFFSL(SL,"sensor.node_name.value",True): # generated from line 822, col 5 write(u''' (''') _orig_filter_69167741 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _v = VFFSL(SL,"writeInlineFilter",False)(VFFSL(SL,"sensor.node_name",True)) # u'$writeInlineFilter($sensor.node_name)' on line 823, col 22 if _v is not None: write(_filter(_v, rawExpr=u'$writeInlineFilter($sensor.node_name)')) # from line 823, col 22. _filter = self._CHEETAH__currentFilter = _orig_filter_69167741 write(u''') ''') write(u'''
    ''') write(u''' ''') if VFFSL(SL,"message.aggregated",True): # generated from line 829, col 3 if VFFSL(SL,"message.time_min.value",True) == VFFSL(SL,"message.time_max.value",True): # generated from line 830, col 5 write(u''' ''') _v = VFFSL(SL,"message.time_min.value",True) # u'$message.time_min.value' on line 831, col 7 if _v is not None: write(_filter(_v, rawExpr=u'$message.time_min.value')) # from line 831, col 7. write(u''' ''') else: # generated from line 832, col 5 write(u''' ''') _v = VFFSL(SL,"message.time_max.value",True) # u'$message.time_max.value' on line 833, col 7 if _v is not None: write(_filter(_v, rawExpr=u'$message.time_max.value')) # from line 833, col 7. write(u''' - ''') _v = VFFSL(SL,"message.time_min.value",True) # u'$message.time_min.value' on line 834, col 7 if _v is not None: write(_filter(_v, rawExpr=u'$message.time_min.value')) # from line 834, col 7. write(u''' ''') else: # generated from line 836, col 3 write(u''' ''') _v = VFFSL(SL,"message.time.value",True) # u'$message.time.value' on line 837, col 5 if _v is not None: write(_filter(_v, rawExpr=u'$message.time.value')) # from line 837, col 5. write(u''' ''') if VFFSL(SL,"message.analyzer_time.value",True): # generated from line 838, col 5 write(u''' (sent at ''') _v = VFFSL(SL,"message.analyzer_time.value",True) # u'$message.analyzer_time.value' on line 839, col 16 if _v is not None: write(_filter(_v, rawExpr=u'$message.analyzer_time.value')) # from line 839, col 16. write(u''') ''') write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_25989606 _orig_filter_92441775 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _filter = self._CHEETAH__currentFilter = _orig_filter_92441775 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def orderby_option(self, **KWS): ## CHEETAH: generated from #block orderby_option at line 849, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def timeline_extra_content(self, **KWS): ## CHEETAH: generated from #block timeline_extra_content at line 857, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_74673310 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' ''') if False: _("Filter") _v = VFFSL(SL,"_",False)("Filter") # u'$_("Filter")' on line 860, col 33 if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter")')) # from line 860, col 33. write(u''' ''') _filter = self._CHEETAH__currentFilter = _orig_filter_74673310 _orig_filter_29643203 = _filter filterName = u'Filter' if self._CHEETAH__filters.has_key("Filter"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter _filter = self._CHEETAH__currentFilter = _orig_filter_29643203 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.head_extra_content(trans=trans) write(u''' ''') self.message_fields_header(trans=trans) write(u''' ''') self.message_fields(trans=trans) write(u''' ''') self.orderby_option(trans=trans) write(u''' ''') self.timeline_extra_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_AlertListing= 'writeBody' ## END CLASS DEFINITION if not hasattr(AlertListing, '_initCheetahAttributes'): templateAPIClass = getattr(AlertListing, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(AlertListing) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=AlertListing()).run() prewikka-1.0.0/prewikka/templates/ErrorTemplate.py0000644000076400007640000001515011340777371021355 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers import cgi from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941689.751287 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:14:49 2010' __CHEETAH_src__ = 'prewikka/templates/ErrorTemplate.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class ErrorTemplate(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(ErrorTemplate, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 4, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_58314137 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') _v = VFFSL(SL,"name",True) # u'$name' on line 9, col 31 if _v is not None: write(_filter(_v, rawExpr=u'$name')) # from line 9, col 31. write(u'''

    ''') _v = VFFSL(SL,"message",True) # u'$message' on line 10, col 10 if _v is not None: write(_filter(_v, rawExpr=u'$message')) # from line 10, col 10. write(u'''

    ''') if VFFSL(SL,"traceback",True): # generated from line 11, col 4 write(u'''

    ''') write(u'''

    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_58314137 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_ErrorTemplate= 'writeBody' ## END CLASS DEFINITION if not hasattr(ErrorTemplate, '_initCheetahAttributes'): templateAPIClass = getattr(ErrorTemplate, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(ErrorTemplate) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=ErrorTemplate()).run() prewikka-1.0.0/prewikka/templates/LoginPasswordForm.py0000644000076400007640000001726511214154701022202 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.TopLayout import TopLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.1' __CHEETAH_versionTuple__ = (2, 2, 1, 'final', 0) __CHEETAH_genTime__ = 1244715457.776834 __CHEETAH_genTimestamp__ = 'Thu Jun 11 12:17:37 2009' __CHEETAH_src__ = 'prewikka/templates/LoginPasswordForm.tmpl' __CHEETAH_srcLastModified__ = 'Tue May 5 16:55:59 2009' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class LoginPasswordForm(TopLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(LoginPasswordForm, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def toplayout_content(self, **KWS): ## CHEETAH: generated from #block toplayout_content at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_93740668 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    User authentication ''') for name, value in VFFSL(SL,"arguments",True): # generated from line 11, col 7 if type(VFFSL(SL,"value",True)) is list: # generated from line 12, col 9 for val in VFFSL(SL,"value",True): # generated from line 13, col 11 write(u''' ''') else: # generated from line 16, col 9 write(u''' ''') write(u'''
    Login:
    Password:
    ''') _v = VFFSL(SL,"message",True) # u'$message' on line 31, col 41 if _v is not None: write(_filter(_v, rawExpr=u'$message')) # from line 31, col 41. write(u'''
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_93740668 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.toplayout_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_LoginPasswordForm= 'writeBody' ## END CLASS DEFINITION if not hasattr(LoginPasswordForm, '_initCheetahAttributes'): templateAPIClass = getattr(LoginPasswordForm, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(LoginPasswordForm) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=LoginPasswordForm()).run() prewikka-1.0.0/prewikka/templates/UserListing.tmpl0000664000076400007640000000252611340776405021366 0ustar yoannyoann#extends prewikka.templates.ClassicLayout #block main_content #filter CleanOutput
    #set $perm_cnt = 2 #for $perm in $permissions #set $perm_cnt +=1 #end for #set $row_classes = ("table_row_even", "table_row_odd") #set $cnt = 0 #for $user in $users #for $perm in $user.permissions #set $perm = ("", "x")[$perm] #end for #set $cnt += 1 #end for
    $_("Login")#echo $perm.replace("_", " ") #
    $user.login$perm
    #if $backend_can_delete #end if #if $backend_can_create
    #end if
    #end filter #end block main_content prewikka-1.0.0/prewikka/templates/Stats.py0000644000076400007640000005747211340777370017702 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941688.8439829 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:14:48 2010' __CHEETAH_src__ = 'prewikka/templates/Stats.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:14:18 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class Stats(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(Stats, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def head_extra_content(self, **KWS): ## CHEETAH: generated from #block head_extra_content at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def gen_std(self, chart, map_index, **KWS): ## CHEETAH: generated from #def gen_std($chart, $map_index) at line 43, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') _v = VFFSL(SL,"chart.title",True) # u'$chart.title' on line 45, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$chart.title')) # from line 45, col 9. write(u'''
    ''') _orig_filter_40583543 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' Chart
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_40583543 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 62, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_86779617 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter fcnt = 0 map_index = 0; write(u'''

    ''') _v = VFFSL(SL,"period",True) # u'$period' on line 67, col 5 if _v is not None: write(_filter(_v, rawExpr=u'$period')) # from line 67, col 5. write(u'''

    ''') if VFFSL(SL,"current_filter",True): # generated from line 69, col 1 write(u'''

    Filter: ''') _v = VFFSL(SL,"current_filter",True) # u'$current_filter' on line 70, col 13 if _v is not None: write(_filter(_v, rawExpr=u'$current_filter')) # from line 70, col 13. write(u'''

    ''') write(u'''

    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_86779617 write(u''' ''') for chart in VFFSL(SL,"charts",True): # generated from line 78, col 1 write(u''' ''') fcnt = VFFSL(SL,"fcnt",True) + 1 map_index += 1 write(u'''
    ''') _v = VFFSL(SL,"gen_std",False)(VFFSL(SL,"chart",True), VFFSL(SL,"map_index",True)) # u'$gen_std($chart, $map_index)' on line 80, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$gen_std($chart, $map_index)')) # from line 80, col 9. write(u'''

    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def layout_start_hook(self, **KWS): ## CHEETAH: generated from #def layout_start_hook at line 94, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') for name, value in VFFSL(SL,"hidden_parameters",True): # generated from line 96, col 1 write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def layout_end_hook(self, **KWS): ## CHEETAH: generated from #def layout_end_hook at line 102, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def menu_extra_content(self, **KWS): ## CHEETAH: generated from #block menu_extra_content at line 107, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body _orig_filter_88077668 = _filter filterName = u'CleanOutput' if self._CHEETAH__filters.has_key("CleanOutput"): _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] else: _filter = self._CHEETAH__currentFilter = \ self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u'''
    ''') if False: _("Filter:") _v = VFFSL(SL,"_",False)("Filter:") # u'$_("Filter:")' on line 112, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$_("Filter:")')) # from line 112, col 9. write(u'''
    ''') if False: _("Time:") _v = VFFSL(SL,"_",False)("Time:") # u'$_("Time:")' on line 128, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$_("Time:")')) # from line 128, col 9. write(u'''
    ''') if False: _("From:") _v = VFFSL(SL,"_",False)("From:") # u'$_("From:")' on line 139, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$_("From:")')) # from line 139, col 9. write(u''' //
    :
    ''') if False: _("To:") _v = VFFSL(SL,"_",False)("To:") # u'$_("To:")' on line 147, col 9 if _v is not None: write(_filter(_v, rawExpr=u'$_("To:")')) # from line 147, col 9. write(u''' //
    :

     
    ''') _filter = self._CHEETAH__currentFilter = _orig_filter_88077668 ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.head_extra_content(trans=trans) write(u''' ''') self.main_content(trans=trans) write(u''' ''') self.menu_extra_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_Stats= 'writeBody' ## END CLASS DEFINITION if not hasattr(Stats, '_initCheetahAttributes'): templateAPIClass = getattr(Stats, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(Stats) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=Stats()).run() prewikka-1.0.0/prewikka/templates/MessageSummary.py0000644000076400007640000003704111340776406021533 0ustar yoannyoann#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path import __builtin__ from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatibleVersion as RequiredCheetahVersion from Cheetah.Version import MinCompatibleVersionTuple as RequiredCheetahVersionTuple from Cheetah.Template import Template from Cheetah.DummyTransaction import * from Cheetah.NameMapper import NotFound, valueForName, valueFromSearchList, valueFromFrameOrSearchList from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from prewikka.templates.ClassicLayout import ClassicLayout ################################################## ## MODULE CONSTANTS VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time __CHEETAH_version__ = '2.2.2' __CHEETAH_versionTuple__ = (2, 2, 2, 'final', 0) __CHEETAH_genTime__ = 1266941190.8187261 __CHEETAH_genTimestamp__ = 'Tue Feb 23 17:06:30 2010' __CHEETAH_src__ = 'prewikka/templates/MessageSummary.tmpl' __CHEETAH_srcLastModified__ = 'Tue Feb 23 17:06:29 2010' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: raise AssertionError( 'This template was compiled with Cheetah version' ' %s. Templates compiled before version %s must be recompiled.'%( __CHEETAH_version__, RequiredCheetahVersion)) ################################################## ## CLASSES class MessageSummary(ClassicLayout): ################################################## ## CHEETAH GENERATED METHODS def __init__(self, *args, **KWs): super(MessageSummary, self).__init__(*args, **KWs) if not self._CHEETAH__instanceInitialized: cheetahKWArgs = {} allowedKWs = 'searchList namespaces filter filtersLib errorCatcher'.split() for k,v in KWs.items(): if k in allowedKWs: cheetahKWArgs[k] = v self._initCheetahInstance(**cheetahKWArgs) def layout_start_hook(self, **KWS): ## CHEETAH: generated from #def layout_start_hook at line 3, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def display_table(self, section, depth, **KWS): ## CHEETAH: generated from #def display_table($section, $depth) at line 29, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') table_cnt = 0 for table in VFFSL(SL,"section.tables",True): # generated from line 32, col 3 write(u'''\t\t ''') if VFFSL(SL,"depth",True) == 0 and VFFSL(SL,"table_cnt",True) > 0 and VFN(VFFSL(SL,"table.style",True),"find",False)("inline") == -1: # generated from line 34, col 3 write(u'''\t\t
    ''') write(u''' ''') if VFFSL(SL,"table.odd_even",True): # generated from line 38, col 17 write(u'''\t\t ''') else: # generated from line 40, col 3 write(u'''\t\t
    ''') write(u''' ''') table_cnt += 1 row_class = "" for row in VFFSL(SL,"table.rows",True): # generated from line 46, col 4 write(u'''\t\t ''') for col in row: # generated from line 48, col 6 if VFFSL(SL,"col.header",True): # generated from line 49, col 7 write(u'''\t\t ''') row_class = "table_row_even" elif VFFSL(SL,"col.tables",True): # generated from line 52, col 7 write(u'''\t\t ''') row_class = "" else: # generated from line 55, col 21 write(u'''\t\t ''') write(u'''\t\t ''') write(u'''\t\t
    ''') _v = VFFSL(SL,"col.name",True) # u'$col.name' on line 50, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$col.name')) # from line 50, col 12. write(u'''''') _v = VFFSL(SL,"display_table",False)(VFFSL(SL,"col",True), VFFSL(SL,"depth",True) + 1) # u'$display_table($col, $depth + 1)' on line 53, col 12 if _v is not None: write(_filter(_v, rawExpr=u'$display_table($col, $depth + 1)')) # from line 53, col 12. write(u'''''') _v = VFFSL(SL,"col.name",True) # u'$col.name' on line 56, col 31 if _v is not None: write(_filter(_v, rawExpr=u'$col.name')) # from line 56, col 31. write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def display_node(self, sections, **KWS): ## CHEETAH: generated from #def display_node($sections) at line 66, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body for section in VFFSL(SL,"sections",True): # generated from line 67, col 1 write(u'''
    \t\t''') _v = VFFSL(SL,"section.title",True) # u'$section.title' on line 69, col 23 if _v is not None: write(_filter(_v, rawExpr=u'$section.title')) # from line 69, col 23. write(u''' \t\t
    \t\t''') _v = VFFSL(SL,"display_table",False)(VFFSL(SL,"section",True), 0) # u'$display_table($section, 0)' on line 71, col 3 if _v is not None: write(_filter(_v, rawExpr=u'$display_table($section, 0)')) # from line 71, col 3. write(u''' ''') if VFFSL(SL,"section.entries",True): # generated from line 73, col 3 write(u'''\t\t \t\t\t ''') cnt = 0 for entry in VFFSL(SL,"section.entries",True): # generated from line 77, col 4 write(u''' \t\t\t\t ''') if VFFSL(SL,"entry.name",True): # generated from line 81, col 19 write(u''' ''') write(u'''\t\t\t\t \t\t\t\t ''') cnt += 1 write(u'''\t\t
    ''') _v = VFFSL(SL,"entry.name",True) # u'$entry.name' on line 82, col 77 if _v is not None: write(_filter(_v, rawExpr=u'$entry.name')) # from line 82, col 77. write(u'''''') _v = VFFSL(SL,"entry.value",True) # u'$entry.value' on line 84, col 55 if _v is not None: write(_filter(_v, rawExpr=u'$entry.value')) # from line 84, col 55. write(u'''
    ''') write(u''' ''') self._CHEETAH__globalSetVars["section_cnt"] += 1 write(u''' ''') if VFFSL(SL,"section.sections",True): # generated from line 94, col 3 write(u'''\t\t ''') _v = VFFSL(SL,"display_node",False)(VFFSL(SL,"section.sections",True)) # u'$display_node($section.sections)' on line 95, col 7 if _v is not None: write(_filter(_v, rawExpr=u'$display_node($section.sections)')) # from line 95, col 7. write(u''' ''') write(u''' \t\t
    \t
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def main_content(self, **KWS): ## CHEETAH: generated from #block main_content at line 24, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body self._CHEETAH__globalSetVars["section_cnt"] = 0 self._CHEETAH__globalSetVars["row_classes"] = ("table_row_even", "table_row_odd") self._CHEETAH__globalSetVars["entry_value_classes"] = ("section_alert_entry_value_normal", "section_alert_entry_value_emphasis") write(u'''
    ''') _v = VFFSL(SL,"display_node",False)(VFFSL(SL,"sections",True)) # u'$display_node($sections)' on line 105, col 1 if _v is not None: write(_filter(_v, rawExpr=u'$display_node($sections)')) # from line 105, col 1. write(u'''
    ''') ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" def writeBody(self, **KWS): ## CHEETAH: main method generated for this template trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called if not trans: trans = DummyTransaction() _dummyTrans = True else: _dummyTrans = False write = trans.response().write SL = self._CHEETAH__searchList _filter = self._CHEETAH__currentFilter ######################################## ## START - generated method body write(u''' ''') self.main_content(trans=trans) ######################################## ## END - generated method body return _dummyTrans and trans.response().getvalue() or "" ################################################## ## CHEETAH GENERATED ATTRIBUTES _CHEETAH__instanceInitialized = False _CHEETAH_version = __CHEETAH_version__ _CHEETAH_versionTuple = __CHEETAH_versionTuple__ _CHEETAH_genTime = __CHEETAH_genTime__ _CHEETAH_genTimestamp = __CHEETAH_genTimestamp__ _CHEETAH_src = __CHEETAH_src__ _CHEETAH_srcLastModified = __CHEETAH_srcLastModified__ _mainCheetahMethod_for_MessageSummary= 'writeBody' ## END CLASS DEFINITION if not hasattr(MessageSummary, '_initCheetahAttributes'): templateAPIClass = getattr(MessageSummary, '_CHEETAH_templateClass', Template) templateAPIClass._addCheetahPlumbingCodeToClass(MessageSummary) # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. # For more information visit http://www.CheetahTemplate.org/ ################################################## ## if run from command line: if __name__ == '__main__': from Cheetah.TemplateCmdLineIface import CmdLineIface CmdLineIface(templateObj=MessageSummary()).run() prewikka-1.0.0/prewikka/Config.py0000664000076400007640000000503111200051577015762 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import MyConfigParser, siteconfig class Config: def __init__(self, filename=None): if not filename: filename=siteconfig.conf_dir + "/prewikka.conf" self.general = MyConfigParser.ConfigParserSection("general") self.interface = MyConfigParser.ConfigParserSection("interface") self.host_commands = MyConfigParser.ConfigParserSection("host_commands") self.database = MyConfigParser.ConfigParserSection("database") self.idmef_database = MyConfigParser.ConfigParserSection("idmef_database") self.admin = None self.auth = None self.logs = [ ] self.views = [ ] file = MyConfigParser.MyConfigParser(filename) file.load() for section in file.getSections(): if " " in section.name: type, name = section.name.split(" ") section.name = name handler = "_set_" + type if hasattr(self, handler): getattr(self, handler)(section) else: setattr(self, section.name, section) def _set_general(self, general): self.general = general def _set_interface(self, interface): self.interface = interface def _set_database(self, database): self.database = database def _set_idmef_database(self, idmef_database): self.idmef_database = idmef_database def _set_admin(self, admin): self.admin = admin def _set_auth(self, auth): self.auth = auth def _set_log(self, log): self.logs.append({log.name: log}) def _set_view(self, view): self.views.append(view) prewikka-1.0.0/prewikka/_threading_local.py0000664000076400007640000001556411340776573020066 0ustar yoannyoann"""Thread-local objects. (Note that this module provides a Python version of the threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the `local` class from `threading`.) Thread-local objects support the management of thread-local data. If you have data that you want to be local to a thread, simply create a thread-local object and use its attributes: >>> mydata = local() >>> mydata.number = 42 >>> mydata.number 42 You can also access the local-object's dictionary: >>> mydata.__dict__ {'number': 42} >>> mydata.__dict__.setdefault('widgets', []) [] >>> mydata.widgets [] What's important about thread-local objects is that their data are local to a thread. If we access the data in a different thread: >>> log = [] >>> def f(): ... items = mydata.__dict__.items() ... items.sort() ... log.append(items) ... mydata.number = 11 ... log.append(mydata.number) >>> import threading >>> thread = threading.Thread(target=f) >>> thread.start() >>> thread.join() >>> log [[], 11] we get different data. Furthermore, changes made in the other thread don't affect data seen in this thread: >>> mydata.number 42 Of course, values you get from a local object, including a __dict__ attribute, are for whatever thread was current at the time the attribute was read. For that reason, you generally don't want to save these values across threads, as they apply only to the thread they came from. You can create custom local objects by subclassing the local class: >>> class MyLocal(local): ... number = 2 ... initialized = False ... def __init__(self, **kw): ... if self.initialized: ... raise SystemError('__init__ called too many times') ... self.initialized = True ... self.__dict__.update(kw) ... def squared(self): ... return self.number ** 2 This can be useful to support default values, methods and initialization. Note that if you define an __init__ method, it will be called each time the local object is used in a separate thread. This is necessary to initialize each thread's dictionary. Now if we create a local object: >>> mydata = MyLocal(color='red') Now we have a default number: >>> mydata.number 2 an initial color: >>> mydata.color 'red' >>> del mydata.color And a method that operates on the data: >>> mydata.squared() 4 As before, we can access the data in a separate thread: >>> log = [] >>> thread = threading.Thread(target=f) >>> thread.start() >>> thread.join() >>> log [[('color', 'red'), ('initialized', True)], 11] without affecting this thread's data: >>> mydata.number 2 >>> mydata.color Traceback (most recent call last): ... AttributeError: 'MyLocal' object has no attribute 'color' Note that subclasses can define slots, but they are not thread local. They are shared across threads: >>> class MyLocal(local): ... __slots__ = 'number' >>> mydata = MyLocal() >>> mydata.number = 42 >>> mydata.color = 'red' So, the separate thread: >>> thread = threading.Thread(target=f) >>> thread.start() >>> thread.join() affects what we see: >>> mydata.number 11 >>> del mydata """ __all__ = ["local"] # We need to use objects from the threading module, but the threading # module may also want to use our `local` class, if support for locals # isn't compiled in to the `thread` module. This creates potential problems # with circular imports. For that reason, we don't import `threading` # until the bottom of this file (a hack sufficient to worm around the # potential problems). Note that almost all platforms do have support for # locals in the `thread` module, and there is no circular import problem # then, so problems introduced by fiddling the order of imports here won't # manifest on most boxes. class _localbase(object): __slots__ = '_local__key', '_local__args', '_local__lock' def __new__(cls, *args, **kw): self = object.__new__(cls) key = '_local__key', 'thread.local.' + str(id(self)) object.__setattr__(self, '_local__key', key) object.__setattr__(self, '_local__args', (args, kw)) object.__setattr__(self, '_local__lock', RLock()) if args or kw and (cls.__init__ is object.__init__): raise TypeError("Initialization arguments are not supported") # We need to create the thread dict in anticipation of # __init__ being called, to make sure we don't call it # again ourselves. dict = object.__getattribute__(self, '__dict__') currentThread().__dict__[key] = dict return self def _patch(self): key = object.__getattribute__(self, '_local__key') d = currentThread().__dict__.get(key) if d is None: d = {} currentThread().__dict__[key] = d object.__setattr__(self, '__dict__', d) # we have a new instance dict, so call out __init__ if we have # one cls = type(self) if cls.__init__ is not object.__init__: args, kw = object.__getattribute__(self, '_local__args') cls.__init__(self, *args, **kw) else: object.__setattr__(self, '__dict__', d) class local(_localbase): def __getattribute__(self, name): lock = object.__getattribute__(self, '_local__lock') lock.acquire() try: _patch(self) return object.__getattribute__(self, name) finally: lock.release() def __setattr__(self, name, value): lock = object.__getattribute__(self, '_local__lock') lock.acquire() try: _patch(self) return object.__setattr__(self, name, value) finally: lock.release() def __delattr__(self, name): lock = object.__getattribute__(self, '_local__lock') lock.acquire() try: _patch(self) return object.__delattr__(self, name) finally: lock.release() def __del__(self): import threading key = object.__getattribute__(self, '_local__key') try: threads = list(enumerate()) except: # If enumerate fails, as it seems to do during # shutdown, we'll skip cleanup under the assumption # that there is nothing to clean up. return for thread in threads: try: __dict__ = thread.__dict__ except AttributeError: # Thread is dying, rest in peace. continue if key in __dict__: try: del __dict__[key] except KeyError: pass # didn't have anything in this thread try: from threading import currentThread, enumerate, RLock except: from dummy_threading import currentThread, enumerate, RLock prewikka-1.0.0/prewikka/view.py0000664000076400007640000001562511341170505015540 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from copy import copy import Error, Log, utils class ParameterError(Exception): pass class InvalidParameterError(Error.PrewikkaUserError): def __init__(self, name): Error.PrewikkaUserError.__init__(self, _("Parameters Normalization failed"), "Parameter '%s' is not valid" % name, log=Log.WARNING) class InvalidParameterValueError(Error.PrewikkaUserError): def __init__(self, name, value): Error.PrewikkaUserError.__init__(self, _("Parameters Normalization failed"), "Invalid value '%s' for parameter '%s'" % (value, name), log=Log.WARNING) class MissingParameterError(Error.PrewikkaUserError): def __init__(self, name): Error.PrewikkaUserError.__init__(self, _("Parameters Normalization failed"), "Required parameter '%s' is missing" % name, log=Log.WARNING) class Parameters(dict): allow_extra_parameters = False def __init__(self, *args, **kwargs): apply(dict.__init__, (self, ) + args, kwargs) self._hard_default = {} self._default = {} self._parameters = { } self.register() self.optional("_error_back", str) self.optional("_error_retry", str) self.optional("_save", str) def register(self): pass def mandatory(self, name, type): if type is str: type = unicode self._parameters[name] = { "type": type, "mandatory": True, "save": False } def optional(self, name, type, default=None, save=False): if type is str: type = unicode if default is not None: self._default[name] = self._hard_default[name] = default self._parameters[name] = { "type": type, "mandatory": False, "default": default, "save": save } def _parseValue(self, name, value): parameter_type = self._parameters[name]["type"] if parameter_type is list: if not type(value) is list: value = [ value ] try: value = parameter_type(value) except (ValueError, TypeError): raise InvalidParameterValueError(name, value) return value def normalize(self, view, user): do_load = True for name, value in self.items(): if isinstance(value, str): value = self[name] = utils.toUnicode(value) try: value = self._parseValue(name, value) except KeyError: if self.allow_extra_parameters: continue raise InvalidParameterError(name) if not self._parameters.has_key(name) or self._parameters[name]["mandatory"] is not True: do_load = False if self._parameters[name]["save"] and self.has_key("_save"): user.setConfigValue(view, name, value) self[name] = value # Go through unset parameters. # - Error out on mandatory parameters, # - Load default value for optional parameters that got one. # - Load last user value for parameter. for name in self._parameters.keys(): got_param = self.has_key(name) if not got_param: if self._parameters[name]["mandatory"]: raise MissingParameterError(name) elif self._parameters[name]["default"] != None: self[name] = self._parameters[name]["default"] if self._parameters[name]["save"]: try: value = self._parseValue(name, user.getConfigValue(view, name)) except KeyError: continue self._default[name] = value if do_load and not got_param: self[name] = value try: self.pop("_save") except: pass return do_load def getDefault(self, param, usedb=True): return self.getDefaultValues(usedb)[param] def getDefaultValues(self, usedb=True): if not usedb: return self._hard_default else: return self._default def isSaved(self, param): if not self._parameters.has_key(param): return False if not self._parameters[param].has_key("save") or not self._parameters[param]["save"]: return False val1 = self._hard_default[param] val2 = self[param] if type(val1) is list: val1.sort() if type(val2) is list: val2.sort() if val1 == val2: return False return True def isDefault(self, param, usedb=True): if not usedb: return self._hard_default.has_key(param) else: return self._default.has_key(param) def __add__(self, src): dst = copy(self) dst.update(src) return dst def __sub__(self, keys): new = copy(self) for key in keys: try: del new[key] except KeyError: pass return new def copy(self): new = self.__class__() new.update(self) return new class RelativeViewParameters(Parameters): def register(self): self.mandatory("origin", str) class Views: view_initialized = False view_slots = { } def init(self, env): pass def get(self): for name, attrs in self.view_slots.items(): attrs["name"] = name attrs["object"] = self attrs["handler"] = "render_" + name return self.view_slots class View(Views): view_name = None view_parameters = None view_permissions = [ ] view_template = None def get(self): return { self.view_name: { "name": self.view_name, "object": self, "handler": "render", "parameters": self.view_parameters, "permissions": self.view_permissions, "template": self.view_template } } prewikka-1.0.0/prewikka/resolve.py0000664000076400007640000001027011340777332016246 0ustar yoannyoann# Copyright (C) 2008 PreludeIDS Technologies. All Rights Reserved. # Author: Yoann Vandoorselaere # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import time import socket resolver = None import_fail = None try: from twisted.internet import reactor from twisted.names import client, dns, hosts, cache, resolve except Exception, err: import_fail = err try: from threading import Lock except ImportError: from dummy_threading import Lock class DNSResolver: def __init__(self): self._query = 0 self._lock = Lock() self._cache = cache.CacheResolver() rlist = [ self._cache, client.Resolver('/etc/resolv.conf') ] self._resolve = resolve.ResolverChain(rlist) def _error_cb(self, failure): self._query -= 1 if failure.check(dns.DomainError, dns.AuthoritativeDomainError): return def _resolve_cb(self, (ans, auth, add), ptr, resolve_cb): self._query -= 1 name = unicode(ans[0].payload.name) resolve_cb(name) q = dns.Query(name, ans[0].type, ans[0].cls) self._cache.cacheResult(q, (ans, auth, add)) def _ip_reverse(self, addr): try: parts = list(socket.inet_pton(socket.AF_INET6, addr).encode('hex_codec')) origin = ".ip6.arpa" except: parts = ["%d" % ord(byte) for byte in socket.inet_aton(addr)] origin = ".in-addr.arpa" parts.reverse() return '.'.join(parts) + origin def process(self, timeout=0): end = now = time.time() final = now + timeout while True: self._lock.acquire() if self._query == 0: self._lock.release() break reactor.runUntilCurrent(); reactor.doIteration(timeout) self._lock.release() end = time.time() if end >= final: break #print "max=%f elapsed:%f" % (timeout, end-now) def doQuery(self, addr, resolve_cb): self._lock.acquire() self._query += 1 self._resolve.lookupPointer(addr).addCallback(self._resolve_cb, addr, resolve_cb).addErrback(self._error_cb) self._lock.release() self.process() def resolve(self, addr, resolve_cb): try: addr = self._ip_reverse(addr) except: return self.doQuery(addr, resolve_cb) self.process() class AddressResolve: def _resolve_cb(self, value): if self._formater: value = self._formater(self._addr, value) self._name = value def __init__(self, addr, format=None): global resolver self._addr = addr self._name = None self._formater = format if resolver: resolver.resolve(addr, self._resolve_cb) def __len__(self): return len(unicode(self)) def resolveSucceed(self): if self._name: return True else: return False def __str__(self): if resolver: resolver.process() return self._name or self._addr def __repr__(self): return unicode(self) def process(timeout=0): global resolver if resolver: resolver.process(timeout) def init(env): global resolver if env.dns_max_delay == -1: return if import_fail: env.log.warning("Asynchronous DNS resolution disabled: twisted.names and twisted.internet required: %s" % err) return resolver = DNSResolver() prewikka-1.0.0/prewikka/Database.py0000664000076400007640000002704711340777332016305 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import sys import time from preludedb import * from prewikka import User, Filter, utils, siteconfig class DatabaseError(Exception): pass class _DatabaseInvalidError(DatabaseError): def __init__(self, resource): self._resource = resource def __str__(self): return "invalid %s '%s'" % (self.type, self._resource) class DatabaseInvalidUserError(_DatabaseInvalidError): type = "user" class DatabaseInvalidSessionError(_DatabaseInvalidError): type = "session" class DatabaseInvalidFilterError(_DatabaseInvalidError): type = "filter" class DatabaseSchemaError(Exception): pass def get_timestamp(s): return s and time.mktime(time.strptime(s, "%Y-%m-%d %H:%M:%S")) or None class Database: required_version = "0.9.11" # We reference preludedb_sql_destroy since it might be deleted # prior Database.__del__() is called. _sql_destroy = preludedb_sql_destroy _sql = None def __init__(self, config): settings = preludedb_sql_settings_new() for name, default in (("file", None), ("host", "localhost"), ("port", None), ("name", "prewikka"), ("user", "prewikka"), ("pass", None)): value = config.get(name, default) if value: preludedb_sql_settings_set(settings, name.encode("utf8"), value.encode("utf8")) db_type = config.get("type", "mysql") self._sql = preludedb_sql_new(db_type.encode("utf8"), settings) if config.has_key("log"): preludedb_sql_enable_query_logging(self._sql, config["log"].encode("utf8")) # check if the database has been created try: version = self.query("SELECT version FROM Prewikka_Version")[0][0] except PreludeDBError, e: raise DatabaseSchemaError(unicode(utils.toUnicode(e))) if version != self.required_version: d = { "version": version, "reqversion": self.required_version } raise DatabaseSchemaError(_("Database schema version %(version)s found when %(reqversion)s was required") % d) # We don't want to impose an SQL upgrade script for this specific change, # but this can be moved to an SQL script upon the next schema update. self.query("UPDATE Prewikka_User_Configuration SET value='n/a' WHERE (name='alert.assessment.impact.completion' OR name='alert.assessment.impact.severity') AND value='none'") def __del__(self): if self._sql: self._sql_destroy(self._sql) def queries_from_file(self, filename): content = open(filename).read() for query in content.split(";"): query = query.strip() if len(query) > 0: self.query(query) def query(self, query): try: _table = preludedb_sql_query(self._sql, query.encode("utf8")) if not _table: return [ ] columns = preludedb_sql_table_get_column_count(_table) table = [ ] while True: _row = preludedb_sql_table_fetch_row(_table) if not _row: break row = [ ] table.append(row) for col in range(columns): _field = preludedb_sql_row_fetch_field(_row, col) if _field: row.append(utils.toUnicode(preludedb_sql_field_to_string(_field))) else: row.append(None) preludedb_sql_table_destroy(_table) except PreludeDBError, e: raise PreludeDBError(e.errno) return table def transaction_start(self): preludedb_sql_transaction_start(self._sql) def transaction_end(self): preludedb_sql_transaction_end(self._sql) def transaction_abort(self): preludedb_sql_transaction_abort(self._sql) def error(self): return def escape(self, data): if data: data = data.encode("utf8") return utils.toUnicode(preludedb_sql_escape(self._sql, data)) def datetime(self, t): if t is None: return "NULL" return "'" + utils.time_to_ymdhms(time.localtime(t)) + "'" def hasUser(self, login): rows = self.query("SELECT login FROM Prewikka_User WHERE login = %s" % self.escape(login)) return bool(rows) def createUser(self, login, email=None): self.query("INSERT INTO Prewikka_User (login, email) VALUES (%s,%s)" % \ (self.escape(login), self.escape(email))) def deleteUser(self, login): login = self.escape(login) self.transaction_start() try: self.query("DELETE FROM Prewikka_User WHERE login = %s" % login) self.query("DELETE FROM Prewikka_Permission WHERE login = %s" % login) self.query("DELETE FROM Prewikka_Session WHERE login = %s" % login) rows = self.query("SELECT id FROM Prewikka_Filter WHERE login = %s" % login) if len(rows) > 0: lst = ", ".join([ id[0] for id in rows ]) self.query("DELETE FROM Prewikka_Filter_Criterion WHERE Prewikka_Filter_Criterion.id IN (%s)" % lst) self.query("DELETE FROM Prewikka_Filter WHERE login = %s" % login) except: self.transaction_abort() raise self.transaction_end() def getConfiguration(self, login): login = self.escape(login) rows = self.query("SELECT view, name, value FROM Prewikka_User_Configuration WHERE login = %s" % login) config = { } for view, name, value in rows: if not config.has_key(view): config[view] = { } if not config[view].has_key(name): config[view][name] = value else: if isinstance(config[view][name], (str, unicode)): config[view][name] = [ config[view][name] ] config[view][name] = config[view][name] + [ value ] return config def getUserLogins(self): return map(lambda r: r[0], self.query("SELECT login FROM Prewikka_User")) def getUser(self, login): return User.User(self, login, self.getLanguage(login), self.getPermissions(login), self.getConfiguration(login)) def setPassword(self, login, password): self.query("UPDATE Prewikka_User SET password=%s WHERE login = %s" % (self.escape(password), self.escape(login))) def getPassword(self, login): rows = self.query("SELECT login, password FROM Prewikka_User WHERE login = %s" % (self.escape(login))) if not rows or rows[0][0] != login: raise DatabaseInvalidUserError(login) return rows[0][1] def hasPassword(self, login): return bool(self.query("SELECT password FROM Prewikka_User WHERE login = %s AND password IS NOT NULL" % self.escape(login))) def setLanguage(self, login, lang): self.query("UPDATE Prewikka_User SET lang=%s WHERE login = %s" % (self.escape(lang), self.escape(login))) def getLanguage(self, login): rows = self.query("SELECT lang FROM Prewikka_User WHERE login = %s" % (self.escape(login))) if len(rows) > 0: return rows[0][0] return None def setPermissions(self, login, permissions): self.transaction_start() self.query("DELETE FROM Prewikka_Permission WHERE login = %s" % self.escape(login)) for perm in permissions: self.query("INSERT INTO Prewikka_Permission VALUES (%s,%s)" % (self.escape(login), self.escape(perm))) self.transaction_end() def getPermissions(self, login): return map(lambda r: r[0], self.query("SELECT permission FROM Prewikka_Permission WHERE login = %s" % self.escape(login))) def createSession(self, sessionid, login, time): self.query("INSERT INTO Prewikka_Session VALUES(%s,%s,%s)" % (self.escape(sessionid), self.escape(login), self.datetime(time))) def updateSession(self, sessionid, time): self.query("UPDATE Prewikka_Session SET time=%s WHERE sessionid=%s" % (self.datetime(time), self.escape(sessionid))) def getSession(self, sessionid): rows = self.query("SELECT login, time FROM Prewikka_Session WHERE sessionid = %s" % self.escape(sessionid)) if not rows: raise DatabaseInvalidSessionError(sessionid) login, t = rows[0] return login, get_timestamp(t) def deleteSession(self, sessionid): self.query("DELETE FROM Prewikka_Session WHERE sessionid = %s" % self.escape(sessionid)) def deleteExpiredSessions(self, time): self.query("DELETE FROM Prewikka_Session WHERE time < %s" % self.datetime(time)) def getAlertFilterNames(self, login): return map(lambda r: r[0], self.query("SELECT name FROM Prewikka_Filter WHERE login = %s" % self.escape(login))) def setFilter(self, login, filter): if self.query("SELECT name FROM Prewikka_Filter WHERE login = %s AND name = %s" % (self.escape(login), self.escape(filter.name))): self.deleteFilter(login, filter.name) self.transaction_start() self.query("INSERT INTO Prewikka_Filter (login, name, comment, formula) VALUES (%s, %s, %s, %s)" % (self.escape(login), self.escape(filter.name), self.escape(filter.comment), self.escape(filter.formula))) id = int(self.query("SELECT MAX(id) FROM Prewikka_Filter")[0][0]) for name, element in filter.elements.items(): self.query("INSERT INTO Prewikka_Filter_Criterion (id, name, path, operator, value) VALUES (%d, %s, %s, %s, %s)" % ((id, self.escape(name)) + tuple([ self.escape(e) for e in element ]))) self.transaction_end() def getAlertFilter(self, login, name): rows = self.query("SELECT id, comment, formula FROM Prewikka_Filter WHERE login = %s AND name = %s" % (self.escape(login), self.escape(name))) if len(rows) == 0: return None id, comment, formula = rows[0] elements = { } for element_name, path, operator, value in \ self.query("SELECT name, path, operator, value FROM Prewikka_Filter_Criterion WHERE id = %d" % int(id)): elements[element_name] = path, operator, value return Filter.Filter(name, comment, elements, formula) def deleteFilter(self, login, name): id = long(self.query("SELECT id FROM Prewikka_Filter WHERE login = %s AND name = %s" % (self.escape(login), self.escape(name)))[0][0]) self.query("DELETE FROM Prewikka_Filter WHERE id = %d" % id) self.query("DELETE FROM Prewikka_Filter_Criterion WHERE id = %d" % id) prewikka-1.0.0/prewikka/localization.py0000664000076400007640000000720411340777332017262 0ustar yoannyoann# coding=UTF-8 # Copyright (C) 2007 PreludeIDS Technologies. All Rights Reserved. # Author: Yoann Vandoorselaere # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import locale, gettext, __builtin__, time from prewikka import siteconfig, utils try: from threading import local, Lock except ImportError: # copy of _thread_local.py from python 2.5 from dummy_threading import Lock from prewikka._threading_local import local _lock = Lock() _DEFAULT_LANGUAGE = "en" _localized_thread = local() _all_locale = { _DEFAULT_LANGUAGE: None } def _safeGettext(s): try: return utils.toUnicode(_localized_thread.data.gettext(s)) except: return s def _safeNgettext(singular, plural, num): try: return utils.toUnicode(_localized_thread.data.ngettext(singular, plural, num)) except: if num <= 1: return singular else: return plural def _deferredGettext(s): return s gettext.install("prewikka", siteconfig.locale_dir) __builtin__._ = _safeGettext __builtin__.N_ = _deferredGettext __builtin__.ngettext = _safeNgettext _LANGUAGES = { "Deutsch": "de", u"Español": "es", "English": "en", u"Français": "fr", "Polski": "pl", "Portuguese (Brazilian)": "pt_BR", u"Русский": "ru" } def setLocale(lang): if not lang: lang = _DEFAULT_LANGUAGE _lock.acquire() if not _all_locale.has_key(lang): _all_locale[lang] = gettext.translation("prewikka", siteconfig.locale_dir, languages=[lang]) _lock.release() _localized_thread.data = _all_locale[lang] def getLanguages(): l = _LANGUAGES.keys() l.sort() return l def getLanguagesIdentifiers(): return _LANGUAGES.values() def getLanguagesAndIdentifiers(): l = _LANGUAGES.keys() l.sort() return [ (_(x), _LANGUAGES[x]) for x in l ] def getCurrentCharset(): try: return _localized_thread.data.charset() except: return "iso-8859-1" def getDate(): _localized_month = [ _("January"), _("February"), _("March"), _("April"), _("May"), _("June"), _("July"), _("August"), _("September"), _("November"), _("October"), _("December") ] _localized_weekday = [ _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), _("Saturday"), _("Sunday") ] weekday, day, month, year = utils.toUnicode(time.strftime("%A %d %B %Y")).split() return u" ".join((_(weekday).lower(), day, _(month).lower(), year)) prewikka-1.0.0/prewikka/Core.py0000664000076400007640000003247711340777332015474 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import os, copy, time import prelude, preludedb, CheetahFilters import prewikka.views from prewikka import view, Config, Log, Database, IDMEFDatabase, \ User, Auth, DataSet, Error, utils, siteconfig, localization, resolve try: from threading import Lock except ImportError: from dummy_threading import Lock class InvalidQueryError(Error.PrewikkaUserError): def __init__(self, message): Error.PrewikkaUserError.__init__(self, "Invalid query", message, log=Log.ERROR) class Logout(view.View): view_name = "logout" view_parameters = view.Parameters view_permissions = [ ] def render(self): self.env.auth.logout(self.request) def init_dataset(dataset, config, request): interface = config.interface dataset["document.title"] = "[PREWIKKA]" dataset["document.charset"] = localization.getCurrentCharset() dataset["document.css_files"] = [ "prewikka/css/style.css" ] dataset["document.js_files"] = [ "prewikka/js/jquery.js", "prewikka/js/functions.js" ] dataset["prewikka.title"] = interface.getOptionValue("title", " ") dataset["prewikka.software"] = interface.getOptionValue("software", " ") dataset["prewikka.place"] = interface.getOptionValue("place", " ") dataset["prewikka.date"] = localization.getDate() val = config.general.getOptionValue("external_link_new_window", "true") if (not val and config.general.has_key("external_link_new_window")) or (val == None or val.lower() in ["true", "yes"]): dataset["prewikka.external_link_target"] = "_blank" else: dataset["prewikka.external_link_target"] = "_self" dataset["arguments"] = [] for name, value in request.arguments.items(): if name in ("_login", "_password"): continue if name == "view" and value == "logout": continue dataset["arguments"].append((name, utils.toUnicode(value))) def load_template(name, dataset): template = getattr(__import__("prewikka.templates." + name, globals(), locals(), [ name ]), name)(filtersLib=CheetahFilters) for key, value in dataset.items(): setattr(template, key, value) return template _core_cache = { } _core_cache_lock = Lock() def get_core_from_config(path, threaded=False): global _core_cache global _core_cache_lock if not path: path = siteconfig.conf_dir + "/prewikka.conf" if threaded: _core_cache_lock.acquire() if not _core_cache.has_key(path): _core_cache[path] = Core(path) if threaded: _core_cache_lock.release() return _core_cache[path] class Core: def _checkVersion(self): self._prelude_version_error = None if not prelude.prelude_check_version(siteconfig.libprelude_required_version): self._prelude_version_error = "Prewikka %s require libprelude %s or higher" % (siteconfig.version, siteconfig.libprelude_required_version) elif not preludedb.preludedb_check_version(siteconfig.libpreludedb_required_version): self._prelude_version_error = "Prewikka %s require libpreludedb %s or higher" % (siteconfig.version, siteconfig.libpreludedb_required_version) def __init__(self, config=None): class Env: pass self._env = Env() self._env.auth = None # In case of database error self._env.config = Config.Config(config) self._env.log = Log.Log(self._env.config) self._env.dns_max_delay = float(self._env.config.general.getOptionValue("dns_max_delay", 0)) self._env.max_aggregated_source = int(self._env.config.general.getOptionValue("max_aggregated_source", 10)) self._env.max_aggregated_target = int(self._env.config.general.getOptionValue("max_aggregated_target", 10)) self._env.default_locale = self._env.config.general.getOptionValue("default_locale", None) if self._env.dns_max_delay != -1: resolve.init(self._env) preludedb.preludedb_init() self._checkVersion() self._database_schema_error = None try: self._initDatabase() except Database.DatabaseSchemaError, e: self._database_schema_error = e return self._env.idmef_db = IDMEFDatabase.IDMEFDatabase(self._env.config.idmef_database) self._initHostCommands() self._loadViews() self._loadModules() self._initAuth() def _initDatabase(self): config = { } for key in self._env.config.database.keys(): config[key] = self._env.config.database.getOptionValue(key) self._env.db = Database.Database(config) def _initHostCommands(self): self._env.host_commands = { } for option in self._env.config.host_commands.getOptions(): if os.access(option.value.split(" ")[0], os.X_OK): self._env.host_commands[option.name] = option.value def _initAuth(self): if self._env.auth.canLogout(): self._views.update(Logout().get()) def _loadViews(self): self._view_to_tab = { } self._view_to_section = { } for section, tabs in (prewikka.views.events_section, prewikka.views.agents_section, prewikka.views.stats_section, prewikka.views.settings_section, prewikka.views.about_section): for tab, views in tabs: for view in views: self._view_to_tab[view] = tab self._view_to_section[view] = section self._views = { } for object in prewikka.views.objects: self._views.update(object.get()) def _loadModule(self, type, name, config): module = __import__("prewikka.modules.%s.%s.%s" % (type, name, name), globals(), locals(), [ name ]) return module.load(self._env, config) def _loadModules(self): config = self._env.config if config.auth: self._env.auth = self._loadModule("auth", config.auth.name, config.auth) else: self._env.auth = self._loadModule("auth", "anonymous", config.auth) def _setupView(self, view, request, parameters, user): object = view["object"] if not object.view_initialized: object.init(self._env) object.view_initialized = True object = copy.copy(object) object.request = request object.parameters = parameters object.user = user object.dataset = DataSet.DataSet() object.env = self._env return object def _cleanupView(self, view): del view.request del view.parameters del view.user del view.dataset del view.env def _setupDataSet(self, dataset, request, user, view=None, parameters={}): init_dataset(dataset, self._env.config, request) sections = prewikka.views.events_section, prewikka.views.agents_section, prewikka.views.stats_section, prewikka.views.settings_section, \ prewikka.views.about_section section_to_tabs = { } dataset["interface.sections"] = [ ] for section_name, tabs in sections: first_tab = None for tab_name, views in tabs: view_name = views[0] if not user or user.has(self._views[view_name]["permissions"]): if not first_tab: first_tab = view_name section_to_tabs[section_name] = [] section_to_tabs[section_name] += [ ((tab_name, utils.create_link(views[0]))) ] if first_tab: dataset["interface.sections"].append( (section_name, utils.create_link(first_tab)) ) if isinstance(parameters, prewikka.view.RelativeViewParameters) and parameters.has_key("origin"): view_name = parameters["origin"] elif view: view_name = view["name"] else: view_name = None if view_name and self._view_to_section.has_key(view_name): active_section = self._view_to_section[view_name] active_tab = self._view_to_tab[view_name] tabs = section_to_tabs.get(active_section, []) else: active_section, tabs, active_tab = "", [ ], "" dataset["interface.tabs"] = tabs dataset["prewikka.user"] = user if user: dataset["prewikka.userlink"] = "%s" % (utils.create_link("user_settings_display"), utils.escape_html_string(user.login)) dataset["interface.active_tab"] = active_tab dataset["interface.active_section"] = active_section dataset["prewikka.logout_link"] = (user and self._env.auth.canLogout()) and utils.create_link("logout") or None def _printDataSet(self, dataset, level=0): for key, value in dataset.items(): print " " * level * 8, if isinstance(value, DataSet.DataSet): print key + ":" self._printDataSet(value, level + 1) else: print "%s: %s" % (key, repr(value)) def _checkPermissions(self, request, view, user): if user and view.has_key("permissions"): if not user.has(view["permissions"]): raise User.PermissionDeniedError(view["name"]) def _getParameters(self, request, view, user): parameters = view["parameters"](request.arguments) - [ "view" ] parameters.normalize(view["name"], user) return parameters def _getView(self, request, user): name = request.getView() try: return self._views[name] except KeyError: raise InvalidQueryError("View '%s' does not exist" % name) def checkAuth(self, request): user = self._env.auth.getUser(request) if not user.language and self._env.default_locale: user.setLanguage(self._env.default_locale) return user def prepareError(self, e, request, user, login, view): e = unicode(e) self._env.log.error(e, request, login) error = Error.PrewikkaUserError("Prewikka internal error", e, display_traceback=not self._env.config.general.has_key("disable_error_traceback")) self._setupDataSet(error.dataset, request, user, view=view) return error def process(self, request): login = None view = None user = None encoding = self._env.config.general.getOptionValue("encoding", "utf8") try: if self._prelude_version_error: raise Error.PrewikkaUserError("Version Requirement error", self._prelude_version_error) if self._database_schema_error != None: raise Error.PrewikkaUserError("Database error", self._database_schema_error) user = self.checkAuth(request) login = user.login view = self._getView(request, user) self._checkPermissions(request, view, user) parameters = self._getParameters(request, view, user) view_object = self._setupView(view, request, parameters, user) if not isinstance(view_object, Logout): self._env.log.info("Loading view", request, user.login) getattr(view_object, view["handler"])() self._setupDataSet(view_object.dataset, request, user, view, parameters) dataset = view_object.dataset template_name = view["template"] self._cleanupView(view_object) except Error.PrewikkaUserError, e: if e._log_priority: self._env.log.log(e._log_priority, unicode(e), request=request, user=login or e._log_user) self._setupDataSet(e.dataset, request, user, view=view) dataset, template_name = e.dataset, e.template except Exception, e: error = self.prepareError(e, request, user, login, view) dataset, template_name = error.dataset, error.template #self._printDataSet(dataset) template = load_template(template_name, dataset) # We check the character set after loading the template, # since the template might trigger a language change. dataset["document.charset"] = localization.getCurrentCharset() resolve.process(self._env.dns_max_delay) try: request.content = template.respond() except Exception, e: error = self.prepareError(e, request, user, login, view) request.content = load_template(error.template, error.dataset).respond() request.content = request.content.encode(encoding, "xmlcharrefreplace") request.sendResponse() prewikka-1.0.0/prewikka/modules/0000775000076400007640000000000011347720623015663 5ustar yoannyoannprewikka-1.0.0/prewikka/modules/__init__.py0000664000076400007640000000000011200051324017741 0ustar yoannyoannprewikka-1.0.0/prewikka/modules/auth/0000775000076400007640000000000011347720623016624 5ustar yoannyoannprewikka-1.0.0/prewikka/modules/auth/__init__.py0000664000076400007640000000000011200051324020702 0ustar yoannyoannprewikka-1.0.0/prewikka/modules/auth/loginpassword/0000775000076400007640000000000011347720623021517 5ustar yoannyoannprewikka-1.0.0/prewikka/modules/auth/loginpassword/loginpassword.py0000664000076400007640000000474311340777332024776 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import md5 from prewikka import Auth, User, Database class MyLoginPasswordAuth(Auth.LoginPasswordAuth): def __init__(self, env, config): user = config.getOptionValue("initial_admin_user", User.ADMIN_LOGIN) passwd = config.getOptionValue("initial_admin_pass", User.ADMIN_LOGIN) expiration = int(config.getOptionValue("expiration", 60)) * 60 Auth.LoginPasswordAuth.__init__(self, env, expiration) has_user_manager = False for login in self.getUserLogins(): permissions = self.db.getPermissions(login) if User.PERM_USER_MANAGEMENT in permissions: has_user_manager = True break if not has_user_manager: if not self.db.hasUser(user): self.db.createUser(user) if not self.db.hasPassword(user): self.setPassword(user, passwd) self.db.setPermissions(user, User.ALL_PERMISSIONS) def _hash(self, data): return md5.new(data.encode("utf8")).hexdigest() def createUser(self, login): return self.db.createUser(login) def deleteUser(self, login): return self.db.deleteUser(login) def checkPassword(self, login, password): try: real_password = self.db.getPassword(login) except Database.DatabaseError: raise Auth.AuthError() if real_password == None or self._hash(password) != real_password: raise Auth.AuthError() def setPassword(self, login, password): self.db.setPassword(login, self._hash(password)) def load(env, config): return MyLoginPasswordAuth(env, config) prewikka-1.0.0/prewikka/modules/auth/loginpassword/__init__.py0000664000076400007640000000000011200051324023575 0ustar yoannyoannprewikka-1.0.0/prewikka/modules/auth/anonymous/0000775000076400007640000000000011347720623020654 5ustar yoannyoannprewikka-1.0.0/prewikka/modules/auth/anonymous/__init__.py0000664000076400007640000000000011340776405022755 0ustar yoannyoannprewikka-1.0.0/prewikka/modules/auth/anonymous/anonymous.py0000664000076400007640000000271611340776405023266 0ustar yoannyoann# Copyright (C) 2007 PreludeIDS Technologies. All Rights Reserved. # Author: Yoann Vandoorselaere # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. from prewikka import Auth, User class AnonymousAuth(Auth.Auth): def __init__(self, env): Auth.Auth.__init__(self, env) if not self.db.hasUser("anonymous"): self.db.createUser("anonymous") self._permissions = User.ALL_PERMISSIONS[:] self._permissions.remove(User.PERM_USER_MANAGEMENT) self.db.setPermissions("anonymous", self._permissions) def getUser(self, request): return User.User(self.db, "anonymous", self.db.getLanguage("anonymous"), self._permissions, self.db.getConfiguration("anonymous")) def load(env, config): return AnonymousAuth(env) prewikka-1.0.0/prewikka/modules/auth/cgi/0000775000076400007640000000000011347720623017366 5ustar yoannyoannprewikka-1.0.0/prewikka/modules/auth/cgi/__init__.py0000664000076400007640000000000211200051577021460 0ustar yoannyoann prewikka-1.0.0/prewikka/modules/auth/cgi/cgi.py0000664000076400007640000000357711340777332020520 0ustar yoannyoann# Copyright (C) 2006 PreludeIDS Technologies. All Rights Reserved. # Author: Tilman Baumann # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import os from prewikka import Auth, User, Database class CGIAuth(Auth.Auth): def __init__(self, env, config): Auth.Auth.__init__(self, env) default_admin_user = config.getOptionValue("default_admin_user", None) if default_admin_user != None: if not self.db.hasUser(default_admin_user): self.db.createUser(default_admin_user) self.db.setPermissions(default_admin_user, User.ALL_PERMISSIONS) def deleteUser(self, login): self.db.deleteUser(login) def getUser(self, request): user = request.getRemoteUser() if not user: raise Auth.AuthError(message=_("CGI Authentication failed: no user specified.")) user = user.toUnicode(user) # Create the user in the Prewikka database, so that its permission # might be modified by another administrative user. if not self.db.hasUser(user): self.db.createUser(user) return self.db.getUser(user) def load(env, config): return CGIAuth(env, config) prewikka-1.0.0/prewikka/DataSet.py0000664000076400007640000000275311200051577016112 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import sys class DataSet(dict): def __setitem__(self, key, value): keys = key.split(".", 1) if len(keys) == 1: dict.__setitem__(self, key, value) else: key1, key2 = keys if not self.has_key(key1): dict.__setitem__(self, key1, DataSet()) dict.__getitem__(self, key1)[key2] = value def __getitem__(self, key): try: keys = key.split(".", 1) if len(keys) == 1: return dict.__getitem__(self, key) return dict.__getitem__(self, keys[0])[keys[1]] except KeyError: return "" prewikka-1.0.0/prewikka/Filter.py0000664000076400007640000000614411340777332016021 0ustar yoannyoann# Copyright (C) 2004,2005 PreludeIDS Technologies. All Rights Reserved. # Author: Nicolas Delon # # This file is part of the Prewikka program. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # 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; see the file COPYING. If not, write to # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. import re import prelude from prewikka import utils class Error(Exception): pass class CriteriaIDMEF: def __init__(self, root=prelude.IDMEF_CLASS_ID_MESSAGE, text=""): self.CriteriaList = [] self._idmef_class_tree(root, text, self.CriteriaList) def _idmef_class_tree(self, root, criteria_root, outlist): i = 0 while True: name = prelude.idmef_class_get_child_name(root, i) if name == None: break if criteria_root != None: criteria = "%s.%s" % (criteria_root, name) else: criteria = "%s" % (name) if criteria == "alert.target.file.linkage": break if prelude.idmef_class_get_child_value_type(root, i) == prelude.IDMEF_VALUE_TYPE_CLASS: self._idmef_class_tree(prelude.idmef_class_get_child_class(root, i), criteria, outlist) else: outlist.append(criteria) i = i + 1 class Filter: def __init__(self, name, comment, elements, formula): self.name = name self.comment = comment self.elements = elements self.formula = formula crit = prelude.idmef_criteria_new_from_string(unicode(self).encode("utf8")) prelude.idmef_criteria_destroy(crit) def _replace(self, element): element = element.group(1) if element in ("and", "AND", "&&"): return "&&" if element in ("or", "OR", "||"): return "||" if not self.elements.has_key(element): raise Error(_("Invalid filter element '%s' referenced from filter formula") % element) criteria, operator, value = self.elements[element] return "%s %s '%s'" % (criteria, operator, utils.escape_criteria(value)) def __str__(self): return re.sub("(\w+)", self._replace, self.formula) AlertFilterList = CriteriaIDMEF(prelude.IDMEF_CLASS_ID_ALERT, "alert").CriteriaList HeartbeatFilterList = CriteriaIDMEF(prelude.IDMEF_CLASS_ID_HEARTBEAT, "heartbeat").CriteriaList if __name__ == "__main__": print Filter("foo", "", { "A": ("alert.source(0).node.category", "=", "blah"), "B": ("alert.messageid", "=", "2") }, "(A or B)") prewikka-1.0.0/prewikka/cairoplot.py0000664000076400007640000030667211340777332016601 0ustar yoannyoann#!/usr/bin/env python # -*- coding: utf-8 -*- # CairoPlot.py # # Copyright (c) 2008 Rodrigo Moreira Araújo # # Author: Rodrigo Moreiro Araujo # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # 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 Lesser General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA #Contributor: João S. O. Bueno #TODO: review BarPlot Code #TODO: x_label colision problem on Horizontal Bar Plot #TODO: y_label's eat too much space on HBP __version__ = 1.1 import cairo import math import random HORZ = 0 VERT = 1 NORM = 2 COLORS = {"red" : (1.0,0.0,0.0,1.0), "lime" : (0.0,1.0,0.0,1.0), "blue" : (0.0,0.0,1.0,1.0), "maroon" : (0.5,0.0,0.0,1.0), "green" : (0.0,0.5,0.0,1.0), "navy" : (0.0,0.0,0.5,1.0), "yellow" : (1.0,1.0,0.0,1.0), "magenta" : (1.0,0.0,1.0,1.0), "cyan" : (0.0,1.0,1.0,1.0), "orange" : (1.0,0.5,0.0,1.0), "white" : (1.0,1.0,1.0,1.0), "black" : (0.0,0.0,0.0,1.0), "gray" : (0.5,0.5,0.5,1.0), "light_gray" : (0.9,0.9,0.9,1.0), "transparent" : (0.0,0.0,0.0,0.0)} THEMES = {"black_red" : [(0.0,0.0,0.0,1.0), (1.0,0.0,0.0,1.0)], "red_green_blue" : [(1.0,0.0,0.0,1.0), (0.0,1.0,0.0,1.0), (0.0,0.0,1.0,1.0)], "red_orange_yellow" : [(1.0,0.2,0.0,1.0), (1.0,0.7,0.0,1.0), (1.0,1.0,0.0,1.0)], "yellow_orange_red" : [(1.0,1.0,0.0,1.0), (1.0,0.7,0.0,1.0), (1.0,0.2,0.0,1.0)], "rainbow" : [(1.0,0.0,0.0,1.0), (1.0,0.5,0.0,1.0), (1.0,1.0,0.0,1.0), (0.0,1.0,0.0,1.0), (0.0,0.0,1.0,1.0), (0.3, 0.0, 0.5,1.0), (0.5, 0.0, 1.0, 1.0)]} def colors_from_theme( theme, series_length, mode = 'solid' ): colors = [] if theme not in THEMES.keys() : raise Exception, "Theme not defined" color_steps = THEMES[theme] n_colors = len(color_steps) if series_length <= n_colors: colors = [color + tuple([mode]) for color in color_steps[0:n_colors]] else: iterations = [(series_length - n_colors)/(n_colors - 1) for i in color_steps[:-1]] over_iterations = (series_length - n_colors) % (n_colors - 1) for i in range(n_colors - 1): if over_iterations <= 0: break iterations[i] += 1 over_iterations -= 1 for index,color in enumerate(color_steps[:-1]): colors.append(color + tuple([mode])) if iterations[index] == 0: continue next_color = color_steps[index+1] color_step = ((next_color[0] - color[0])/(iterations[index] + 1), (next_color[1] - color[1])/(iterations[index] + 1), (next_color[2] - color[2])/(iterations[index] + 1), (next_color[3] - color[3])/(iterations[index] + 1)) for i in range( iterations[index] ): colors.append((color[0] + color_step[0]*(i+1), color[1] + color_step[1]*(i+1), color[2] + color_step[2]*(i+1), color[3] + color_step[3]*(i+1), mode)) colors.append(color_steps[-1] + tuple([mode])) return colors def other_direction(direction): "explicit is better than implicit" if direction == HORZ: return VERT else: return HORZ #Class definition class Plot(object): def __init__(self, surface=None, data=None, width=640, height=480, background=None, border = 0, x_labels = None, y_labels = None, series_colors = None): random.seed(2) self.create_surface(surface, width, height) self.dimensions = {} self.dimensions[HORZ] = width self.dimensions[VERT] = height self.context = cairo.Context(self.surface) self.labels={} self.labels[HORZ] = x_labels self.labels[VERT] = y_labels self.load_series(data, x_labels, y_labels, series_colors) self.font_size = 10 self.set_background (background) self.border = border self.borders = {} self.line_color = (0.5, 0.5, 0.5) self.line_width = 0.5 self.label_color = (0.0, 0.0, 0.0) self.grid_color = (0.8, 0.8, 0.8) def create_surface(self, surface, width=None, height=None): self.filename = None if isinstance(surface, cairo.Surface): self.surface = surface return if not type(surface) in (str, unicode): raise TypeError("Surface should be either a Cairo surface or a filename, not %s" % surface) sufix = surface.rsplit(".")[-1].lower() self.filename = surface if sufix == "png": self.surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height) elif sufix == "ps": self.surface = cairo.PSSurface(surface, width, height) elif sufix == "pdf": self.surface = cairo.PSSurface(surface, width, height) else: if sufix != "svg": self.filename += ".svg" self.surface = cairo.SVGSurface(self.filename, width, height) def commit(self): try: self.context.show_page() if self.filename and self.filename.endswith(".png"): self.surface.write_to_png(self.filename) else: self.surface.finish() except cairo.Error: pass def load_series (self, data, x_labels=None, y_labels=None, series_colors=None): #FIXME: implement Series class for holding series data, # labels and presentation properties #data can be a list, a list of lists or a dictionary with #each item as a labeled data series. #we should (for the time being) create a list of lists #and set labels for teh series rom teh values provided. self.series_labels = [] self.data = [] #dictionary if hasattr(data, "keys"): self.series_labels = data.keys() for key in self.series_labels: self.data.append(data[key]) #lists of lists: elif max([hasattr(item,'__delitem__') for item in data]) : self.data = data self.series_labels = range(len(data)) #list else: self.data = [data] self.series_labels = None #TODO: allow user passed series_widths self.series_widths = [1.0 for series in self.data] self.process_colors( series_colors ) def process_colors( self, series_colors, length = None, mode = 'solid' ): #series_colors might be None, a theme, a string of colors names or a string of color tuples if length is None : length = len( self.data ) #no colors passed if not series_colors: #Randomize colors self.series_colors = [ [random.random() for i in range(3)] + [1.0, mode] for series in range( length ) ] else: #Just theme pattern if not hasattr( series_colors, "__iter__" ): theme = series_colors self.series_colors = colors_from_theme( theme.lower(), length ) #Theme pattern and mode elif not hasattr(series_colors, '__delitem__') and not hasattr( series_colors[0], "__iter__" ): theme = series_colors[0] mode = series_colors[1] self.series_colors = colors_from_theme( theme.lower(), length, mode ) #List else: self.series_colors = series_colors for index, color in enumerate( self.series_colors ): #element is a color name if not hasattr(color, "__iter__"): self.series_colors[index] = COLORS[color.lower()] + tuple([mode]) #element is rgb tuple instead of rgba elif len( color ) == 3 : self.series_colors[index] += (1.0,mode) #element has 4 elements, might be rgba tuple or rgb tuple with mode elif len( color ) == 4 : #last element is mode if not hasattr(color[3], "__iter__"): self.series_colors[index] += tuple([color[3]]) self.series_colors[index][3] = 1.0 #last element is alpha else: self.series_colors[index] += tuple([mode]) def get_width(self): return self.surface.get_width() def get_height(self): return self.surface.get_height() def set_background(self, background): if background is None: self.background = (0.0,0.0,0.0,0.0) elif type(background) in (cairo.LinearGradient, tuple): self.background = background elif not hasattr(background,"__iter__"): colors = background.split(" ") if len(colors) == 1 and colors[0] in COLORS: self.background = COLORS[background] elif len(colors) > 1: self.background = cairo.LinearGradient(self.dimensions[HORZ] / 2, 0, self.dimensions[HORZ] / 2, self.dimensions[VERT]) for index,color in enumerate(colors): self.background.add_color_stop_rgba(float(index)/(len(colors)-1),*COLORS[color]) else: raise TypeError ("Background should be either cairo.LinearGradient or a 3-tuple, not %s" % type(background)) def render_background(self): if isinstance(self.background, cairo.LinearGradient): self.context.set_source(self.background) else: self.context.set_source_rgba(*self.background) self.context.rectangle(0,0, self.dimensions[HORZ], self.dimensions[VERT]) self.context.fill() def render_bounding_box(self): self.context.set_source_rgba(*self.line_color) self.context.set_line_width(self.line_width) self.context.rectangle(self.border, self.border, self.dimensions[HORZ] - 2 * self.border, self.dimensions[VERT] - 2 * self.border) self.context.stroke() def render(self): pass class ScatterPlot( Plot ): def __init__(self, surface=None, data=None, errorx=None, errory=None, width=640, height=480, background=None, border=0, axis = False, dash = False, discrete = False, dots = 0, grid = False, series_legend = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, z_bounds = None, x_title = None, y_title = None, series_colors = None, circle_colors = None ): self.bounds = {} self.bounds[HORZ] = x_bounds self.bounds[VERT] = y_bounds self.bounds[NORM] = z_bounds self.titles = {} self.titles[HORZ] = x_title self.titles[VERT] = y_title self.max_value = {} self.axis = axis self.discrete = discrete self.dots = dots self.grid = grid self.series_legend = series_legend self.variable_radius = False self.x_label_angle = math.pi / 2.5 self.circle_colors = circle_colors Plot.__init__(self, surface, data, width, height, background, border, x_labels, y_labels, series_colors) self.dash = None if dash: if hasattr(dash, "keys"): self.dash = [dash[key] for key in self.series_labels] elif max([hasattr(item,'__delitem__') for item in data]) : self.dash = dash else: self.dash = [dash] self.load_errors(errorx, errory) def convert_list_to_tuple(self, data): #Data must be converted from lists of coordinates to a single # list of tuples out_data = zip(*data) if len(data) == 3: self.variable_radius = True return out_data def load_series(self, data, x_labels = None, y_labels = None, series_colors=None): #Dictionary with lists if hasattr(data, "keys") : if hasattr( data.values()[0][0], "__delitem__" ) : for key in data.keys() : data[key] = self.convert_list_to_tuple(data[key]) elif len(data.values()[0][0]) == 3: self.variable_radius = True #List elif hasattr(data[0], "__delitem__") : #List of lists if hasattr(data[0][0], "__delitem__") : for index,value in enumerate(data) : data[index] = self.convert_list_to_tuple(value) #List elif type(data[0][0]) != type((0,0)): data = self.convert_list_to_tuple(data) #Three dimensional data elif len(data[0][0]) == 3: self.variable_radius = True #List with three dimensional tuples elif len(data[0]) == 3: self.variable_radius = True Plot.load_series(self, data, x_labels, y_labels, series_colors) self.calc_boundaries() self.calc_labels() def load_errors(self, errorx, errory): self.errors = None if errorx == None and errory == None: return self.errors = {} self.errors[HORZ] = None self.errors[VERT] = None #asimetric errors if errorx and hasattr(errorx[0], "__delitem__"): self.errors[HORZ] = errorx #simetric errors elif errorx: self.errors[HORZ] = [errorx] #asimetric errors if errory and hasattr(errory[0], "__delitem__"): self.errors[VERT] = errory #simetric errors elif errory: self.errors[VERT] = [errory] def calc_labels(self): if not self.labels[HORZ]: amplitude = self.bounds[HORZ][1] - self.bounds[HORZ][0] if amplitude % 10: #if horizontal labels need floating points self.labels[HORZ] = ["%.2lf" % (float(self.bounds[HORZ][0] + (amplitude * i / 10.0))) for i in range(11) ] else: self.labels[HORZ] = ["%d" % (int(self.bounds[HORZ][0] + (amplitude * i / 10.0))) for i in range(11) ] if not self.labels[VERT]: amplitude = self.bounds[VERT][1] - self.bounds[VERT][0] if amplitude % 10: #if vertical labels need floating points self.labels[VERT] = ["%.2lf" % (float(self.bounds[VERT][0] + (amplitude * i / 10.0))) for i in range(11) ] else: self.labels[VERT] = ["%d" % (int(self.bounds[VERT][0] + (amplitude * i / 10.0))) for i in range(11) ] def calc_extents(self, direction): self.context.set_font_size(self.font_size * 0.8) self.max_value[direction] = max(self.context.text_extents(item)[2] for item in self.labels[direction]) self.borders[other_direction(direction)] = self.max_value[direction] + self.border + 20 def calc_boundaries(self): #HORZ = 0, VERT = 1, NORM = 2 min_data_value = [0,0,0] max_data_value = [0,0,0] for serie in self.data : for tuple in serie : for index, item in enumerate(tuple) : if item > max_data_value[index]: max_data_value[index] = item elif item < min_data_value[index]: min_data_value[index] = item if not self.bounds[HORZ]: self.bounds[HORZ] = (min_data_value[HORZ], max_data_value[HORZ]) if not self.bounds[VERT]: self.bounds[VERT] = (min_data_value[VERT], max_data_value[VERT]) if not self.bounds[NORM]: self.bounds[NORM] = (min_data_value[NORM], max_data_value[NORM]) def calc_all_extents(self): self.calc_extents(HORZ) self.calc_extents(VERT) self.plot_height = self.dimensions[VERT] - 2 * self.borders[VERT] self.plot_width = self.dimensions[HORZ] - 2* self.borders[HORZ] self.plot_top = self.dimensions[VERT] - self.borders[VERT] def calc_steps(self): #Calculates all the x, y, z and color steps series_amplitude = [self.bounds[index][1] - self.bounds[index][0] for index in range(3)] if series_amplitude[HORZ]: self.horizontal_step = float (self.plot_width) / series_amplitude[HORZ] else: self.horizontal_step = 0.00 if series_amplitude[VERT]: self.vertical_step = float (self.plot_height) / series_amplitude[VERT] else: self.vertical_step = 0.00 if series_amplitude[NORM]: if self.variable_radius: self.z_step = float (self.bounds[NORM][1]) / series_amplitude[NORM] if self.circle_colors: self.circle_color_step = tuple([float(self.circle_colors[1][i]-self.circle_colors[0][i])/series_amplitude[NORM] for i in range(4)]) else: self.z_step = 0.00 self.circle_color_step = ( 0.0, 0.0, 0.0, 0.0 ) def get_circle_color(self, value): return tuple( [self.circle_colors[0][i] + value*self.circle_color_step[i] for i in range(4)] ) def render(self): self.calc_all_extents() self.calc_steps() self.render_background() self.render_bounding_box() if self.axis: self.render_axis() if self.grid: self.render_grid() self.render_labels() self.render_plot() if self.errors: self.render_errors() if self.series_legend and self.series_labels: self.render_legend() def render_axis(self): #Draws both the axis lines and their titles cr = self.context cr.set_source_rgba(*self.line_color) cr.move_to(self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT]) cr.line_to(self.borders[HORZ], self.borders[VERT]) cr.stroke() cr.move_to(self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT]) cr.line_to(self.dimensions[HORZ] - self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT]) cr.stroke() cr.set_source_rgba(*self.label_color) self.context.set_font_size( 1.2 * self.font_size ) if self.titles[HORZ]: title_width,title_height = cr.text_extents(self.titles[HORZ])[2:4] cr.move_to( self.dimensions[HORZ]/2 - title_width/2, self.borders[VERT] - title_height/2 ) cr.show_text( self.titles[HORZ] ) if self.titles[VERT]: title_width,title_height = cr.text_extents(self.titles[VERT])[2:4] cr.move_to( self.dimensions[HORZ] - self.borders[HORZ] + title_height/2, self.dimensions[VERT]/2 - title_width/2) cr.rotate( math.pi/2 ) cr.show_text( self.titles[VERT] ) cr.rotate( -math.pi/2 ) def render_grid(self): cr = self.context horizontal_step = float( self.plot_height ) / ( len( self.labels[VERT] ) - 1 ) vertical_step = float( self.plot_width ) / ( len( self.labels[HORZ] ) - 1 ) x = self.borders[HORZ] + vertical_step y = self.plot_top - horizontal_step for label in self.labels[HORZ][:-1]: cr.set_source_rgba(*self.grid_color) cr.move_to(x, self.dimensions[VERT] - self.borders[VERT]) cr.line_to(x, self.borders[VERT]) cr.stroke() x += vertical_step for label in self.labels[VERT][:-1]: cr.set_source_rgba(*self.grid_color) cr.move_to(self.borders[HORZ], y) cr.line_to(self.dimensions[HORZ] - self.borders[HORZ], y) cr.stroke() y -= horizontal_step def render_labels(self): self.context.set_font_size(self.font_size * 0.8) self.render_horz_labels() self.render_vert_labels() def render_horz_labels(self): cr = self.context step = float( self.plot_width ) / ( len( self.labels[HORZ] ) - 1 ) x = self.borders[HORZ] for item in self.labels[HORZ]: cr.set_source_rgba(*self.label_color) width = cr.text_extents(item)[2] cr.move_to(x, self.dimensions[VERT] - self.borders[VERT] + 5) cr.rotate(self.x_label_angle) cr.show_text(item) cr.rotate(-self.x_label_angle) x += step def render_vert_labels(self): cr = self.context step = ( self.plot_height ) / ( len( self.labels[VERT] ) - 1 ) y = self.plot_top for item in self.labels[VERT]: cr.set_source_rgba(*self.label_color) width = cr.text_extents(item)[2] cr.move_to(self.borders[HORZ] - width - 5,y) cr.show_text(item) y -= step def render_legend(self): cr = self.context cr.set_font_size(self.font_size) cr.set_line_width(self.line_width) widest_word = max(self.series_labels, key = lambda item: self.context.text_extents(item)[2]) tallest_word = max(self.series_labels, key = lambda item: self.context.text_extents(item)[3]) max_width = self.context.text_extents(widest_word)[2] max_height = self.context.text_extents(tallest_word)[3] * 1.1 color_box_height = max_height / 2 color_box_width = color_box_height * 2 #Draw a bounding box bounding_box_width = max_width + color_box_width + 15 bounding_box_height = (len(self.series_labels)+0.5) * max_height cr.set_source_rgba(1,1,1) cr.rectangle(self.dimensions[HORZ] - self.borders[HORZ] - bounding_box_width, self.borders[VERT], bounding_box_width, bounding_box_height) cr.fill() cr.set_source_rgba(*self.line_color) cr.set_line_width(self.line_width) cr.rectangle(self.dimensions[HORZ] - self.borders[HORZ] - bounding_box_width, self.borders[VERT], bounding_box_width, bounding_box_height) cr.stroke() for idx,key in enumerate(self.series_labels): #Draw color box cr.set_source_rgba(*self.series_colors[idx][:4]) cr.rectangle(self.dimensions[HORZ] - self.borders[HORZ] - max_width - color_box_width - 10, self.borders[VERT] + color_box_height + (idx*max_height) , color_box_width, color_box_height) cr.fill() cr.set_source_rgba(0, 0, 0) cr.rectangle(self.dimensions[HORZ] - self.borders[HORZ] - max_width - color_box_width - 10, self.borders[VERT] + color_box_height + (idx*max_height), color_box_width, color_box_height) cr.stroke() #Draw series labels cr.set_source_rgba(0, 0, 0) cr.move_to(self.dimensions[HORZ] - self.borders[HORZ] - max_width - 5, self.borders[VERT] + ((idx+1)*max_height)) cr.show_text(key) def render_errors(self): cr = self.context cr.rectangle(self.borders[HORZ], self.borders[VERT], self.plot_width, self.plot_height) cr.clip() radius = self.dots x0 = self.borders[HORZ] - self.bounds[HORZ][0]*self.horizontal_step y0 = self.borders[VERT] - self.bounds[VERT][0]*self.vertical_step for index, serie in enumerate(self.data): cr.set_source_rgba(*self.series_colors[index][:4]) for number, tuple in enumerate(serie): x = x0 + self.horizontal_step * tuple[0] y = self.dimensions[VERT] - y0 - self.vertical_step * tuple[1] if self.errors[HORZ]: cr.move_to(x, y) x1 = x - self.horizontal_step * self.errors[HORZ][0][number] cr.line_to(x1, y) cr.line_to(x1, y - radius) cr.line_to(x1, y + radius) cr.stroke() if self.errors[HORZ] and len(self.errors[HORZ]) == 2: cr.move_to(x, y) x1 = x + self.horizontal_step * self.errors[HORZ][1][number] cr.line_to(x1, y) cr.line_to(x1, y - radius) cr.line_to(x1, y + radius) cr.stroke() if self.errors[VERT]: cr.move_to(x, y) y1 = y + self.vertical_step * self.errors[VERT][0][number] cr.line_to(x, y1) cr.line_to(x - radius, y1) cr.line_to(x + radius, y1) cr.stroke() if self.errors[VERT] and len(self.errors[VERT]) == 2: cr.move_to(x, y) y1 = y - self.vertical_step * self.errors[VERT][1][number] cr.line_to(x, y1) cr.line_to(x - radius, y1) cr.line_to(x + radius, y1) cr.stroke() def render_plot(self): cr = self.context if self.discrete: cr.rectangle(self.borders[HORZ], self.borders[VERT], self.plot_width, self.plot_height) cr.clip() x0 = self.borders[HORZ] - self.bounds[HORZ][0]*self.horizontal_step y0 = self.borders[VERT] - self.bounds[VERT][0]*self.vertical_step radius = self.dots for number, serie in enumerate (self.data): cr.set_source_rgba(*self.series_colors[number][:4]) for tuple in serie : if self.variable_radius: radius = tuple[2]*self.z_step if self.circle_colors: cr.set_source_rgba( *self.get_circle_color( tuple[2]) ) x = x0 + self.horizontal_step*tuple[0] y = y0 + self.vertical_step*tuple[1] cr.arc(x, self.dimensions[VERT] - y, radius, 0, 2*math.pi) cr.fill() else: cr.rectangle(self.borders[HORZ], self.borders[VERT], self.plot_width, self.plot_height) cr.clip() x0 = self.borders[HORZ] - self.bounds[HORZ][0]*self.horizontal_step y0 = self.borders[VERT] - self.bounds[VERT][0]*self.vertical_step radius = self.dots for number, serie in enumerate (self.data): last_tuple = None cr.set_source_rgba(*self.series_colors[number][:4]) for tuple in serie : x = x0 + self.horizontal_step*tuple[0] y = y0 + self.vertical_step*tuple[1] if self.dots: if self.variable_radius: radius = tuple[2]*self.z_step cr.arc(x, self.dimensions[VERT] - y, radius, 0, 2*math.pi) cr.fill() if last_tuple : old_x = x0 + self.horizontal_step*last_tuple[0] old_y = y0 + self.vertical_step*last_tuple[1] cr.move_to( old_x, self.dimensions[VERT] - old_y ) cr.line_to( x, self.dimensions[VERT] - y) cr.set_line_width(self.series_widths[number]) # Display line as dash line if self.dash and self.dash[number]: s = self.series_widths[number] cr.set_dash([s*3, s*3], 0) cr.stroke() cr.set_dash([]) last_tuple = tuple class DotLinePlot(ScatterPlot): def __init__(self, surface=None, data=None, width=640, height=480, background=None, border=0, axis = False, dash = False, dots = 0, grid = False, series_legend = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, x_title = None, y_title = None, series_colors = None): ScatterPlot.__init__(self, surface, data, None, None, width, height, background, border, axis, dash, False, dots, grid, series_legend, x_labels, y_labels, x_bounds, y_bounds, None, x_title, y_title, series_colors, None ) def load_series(self, data, x_labels = None, y_labels = None, series_colors=None): Plot.load_series(self, data, x_labels, y_labels, series_colors) for serie in self.data : for index,value in enumerate(serie): serie[index] = (index, value) self.calc_boundaries() self.calc_labels() class FunctionPlot(ScatterPlot): def __init__(self, surface=None, data=None, width=640, height=480, background=None, border=0, axis = False, discrete = False, dots = 0, grid = False, series_legend = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, x_title = None, y_title = None, series_colors = None, step = 1): self.function = data self.step = step self.discrete = discrete data, x_bounds = self.load_series_from_function( self.function, x_bounds ) ScatterPlot.__init__(self, surface, data, None, None, width, height, background, border, axis, False, discrete, dots, grid, series_legend, x_labels, y_labels, x_bounds, y_bounds, None, x_title, y_title, series_colors, None ) def load_series(self, data, x_labels = None, y_labels = None, series_colors=None): Plot.load_series(self, data, x_labels, y_labels, series_colors) for serie in self.data : for index,value in enumerate(serie): serie[index] = (self.bounds[HORZ][0] + self.step*index, value) self.calc_boundaries() self.calc_labels() def load_series_from_function( self, function, x_bounds ): #TODO: Add the possibility for the user to define multiple functions with different discretization parameters #This function converts a function, a list of functions or a dictionary #of functions into its corresponding array of data data = None #if no bounds are provided if x_bounds == None: x_bounds = (0,10) if hasattr(function, "keys"): #dictionary: data = {} for key in function.keys(): data[ key ] = [] i = x_bounds[0] while i <= x_bounds[1] : data[ key ].append( function[ key ](i) ) i += self.step elif hasattr(function, "__delitem__"): #list of functions data = [] for index,f in enumerate( function ) : data.append( [] ) i = x_bounds[0] while i <= x_bounds[1] : data[ index ].append( f(i) ) i += self.step else: #function data = [] i = x_bounds[0] while i <= x_bounds[1] : data.append( function(i) ) i += self.step return data, x_bounds def calc_labels(self): if not self.labels[HORZ]: self.labels[HORZ] = [] i = self.bounds[HORZ][0] while i<=self.bounds[HORZ][1]: self.labels[HORZ].append(str(i)) i += float(self.bounds[HORZ][1] - self.bounds[HORZ][0])/10 ScatterPlot.calc_labels(self) def render_plot(self): if not self.discrete: ScatterPlot.render_plot(self) else: last = None cr = self.context for number, series in enumerate (self.data): cr.set_source_rgba(*self.series_colors[number][:4]) x0 = self.borders[HORZ] - self.bounds[HORZ][0]*self.horizontal_step y0 = self.borders[VERT] - self.bounds[VERT][0]*self.vertical_step for tuple in series: x = x0 + self.horizontal_step * tuple[0] y = y0 + self.vertical_step * tuple[1] cr.move_to(x, self.dimensions[VERT] - y) cr.line_to(x, self.plot_top) cr.set_line_width(self.series_widths[number]) cr.stroke() if self.dots: cr.new_path() cr.arc(x, self.dimensions[VERT] - y, 3, 0, 2.1 * math.pi) cr.close_path() cr.fill() class BarPlot(Plot): def __init__(self, surface = None, data = None, width = 640, height = 480, background = "white light_gray", border = 0, display_values = False, grid = False, rounded_corners = False, stack = False, three_dimension = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, series_colors = None, main_dir = None): self.bounds = {} self.bounds[HORZ] = x_bounds self.bounds[VERT] = y_bounds self.display_values = display_values self.grid = grid self.rounded_corners = rounded_corners self.stack = stack self.three_dimension = three_dimension self.x_label_angle = math.pi / 2.5 self.main_dir = main_dir self.max_value = {} self.plot_dimensions = {} self.steps = {} self.value_label_color = (0.5,0.5,0.5,1.0) Plot.__init__(self, surface, data, width, height, background, border, x_labels, y_labels, series_colors) def load_series(self, data, x_labels = None, y_labels = None, series_colors = None): Plot.load_series(self, data, x_labels, y_labels, series_colors) self.calc_boundaries() def process_colors(self, series_colors): #Data for a BarPlot might be a List or a List of Lists. #On the first case, colors must be generated for all bars, #On the second, colors must be generated for each of the inner lists. if hasattr(self.data[0], '__getitem__'): length = max(len(series) for series in self.data) else: length = len( self.data ) Plot.process_colors( self, series_colors, length, 'linear') def calc_boundaries(self): if not self.bounds[self.main_dir]: if self.stack: max_data_value = max(sum(serie) for serie in self.data) else: max_data_value = max(max(serie) for serie in self.data) self.bounds[self.main_dir] = (0, max_data_value) if not self.bounds[other_direction(self.main_dir)]: self.bounds[other_direction(self.main_dir)] = (0, len(self.data)) def calc_extents(self, direction): self.max_value[direction] = 0 if self.labels[direction]: widest_word = max(self.labels[direction], key = lambda item: self.context.text_extents(item)[2]) self.max_value[direction] = self.context.text_extents(widest_word)[3 - direction] self.borders[other_direction(direction)] = (2-direction)*self.max_value[direction] + self.border + direction*(5) else: self.borders[other_direction(direction)] = self.border def calc_horz_extents(self): self.calc_extents(HORZ) def calc_vert_extents(self): self.calc_extents(VERT) def calc_all_extents(self): self.calc_horz_extents() self.calc_vert_extents() other_dir = other_direction(self.main_dir) self.value_label = 0 if self.display_values: if self.stack: self.value_label = self.context.text_extents(str(max(sum(serie) for serie in self.data)))[2 + self.main_dir] else: self.value_label = self.context.text_extents(str(max(max(serie) for serie in self.data)))[2 + self.main_dir] if self.labels[self.main_dir]: self.plot_dimensions[self.main_dir] = self.dimensions[self.main_dir] - 2*self.borders[self.main_dir] - self.value_label else: self.plot_dimensions[self.main_dir] = self.dimensions[self.main_dir] - self.borders[self.main_dir] - 1.2*self.border - self.value_label self.plot_dimensions[other_dir] = self.dimensions[other_dir] - self.borders[other_dir] - self.border self.plot_top = self.dimensions[VERT] - self.borders[VERT] def calc_steps(self): other_dir = other_direction(self.main_dir) self.series_amplitude = self.bounds[self.main_dir][1] - self.bounds[self.main_dir][0] if self.series_amplitude: self.steps[self.main_dir] = float(self.plot_dimensions[self.main_dir])/self.series_amplitude else: self.steps[self.main_dir] = 0.00 series_length = len(self.data) self.steps[other_dir] = float(self.plot_dimensions[other_dir])/(series_length + 0.1*(series_length + 1)) self.space = 0.1*self.steps[other_dir] def render(self): self.calc_all_extents() self.calc_steps() self.render_background() self.render_bounding_box() if self.grid: self.render_grid() if self.three_dimension: self.render_ground() if self.display_values: self.render_values() self.render_labels() self.render_plot() if self.series_labels: self.render_legend() def draw_3d_rectangle_front(self, x0, y0, x1, y1, shift): self.context.rectangle(x0-shift, y0+shift, x1-x0, y1-y0) def draw_3d_rectangle_side(self, x0, y0, x1, y1, shift): self.context.move_to(x1-shift,y0+shift) self.context.line_to(x1, y0) self.context.line_to(x1, y1) self.context.line_to(x1-shift, y1+shift) self.context.line_to(x1-shift, y0+shift) self.context.close_path() def draw_3d_rectangle_top(self, x0, y0, x1, y1, shift): self.context.move_to(x0-shift,y0+shift) self.context.line_to(x0, y0) self.context.line_to(x1, y0) self.context.line_to(x1-shift, y0+shift) self.context.line_to(x0-shift, y0+shift) self.context.close_path() def draw_round_rectangle(self, x0, y0, x1, y1): self.context.arc(x0+5, y0+5, 5, -math.pi, -math.pi/2) self.context.line_to(x1-5, y0) self.context.arc(x1-5, y0+5, 5, -math.pi/2, 0) self.context.line_to(x1, y1-5) self.context.arc(x1-5, y1-5, 5, 0, math.pi/2) self.context.line_to(x0+5, y1) self.context.arc(x0+5, y1-5, 5, math.pi/2, math.pi) self.context.line_to(x0, y0+5) self.context.close_path() def render_ground(self): self.draw_3d_rectangle_front(self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT], self.dimensions[HORZ] - self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT] + 5, 10) self.context.fill() self.draw_3d_rectangle_side (self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT], self.dimensions[HORZ] - self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT] + 5, 10) self.context.fill() self.draw_3d_rectangle_top (self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT], self.dimensions[HORZ] - self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT] + 5, 10) self.context.fill() def render_labels(self): self.context.set_font_size(self.font_size * 0.8) if self.labels[HORZ]: self.render_horz_labels() if self.labels[VERT]: self.render_vert_labels() def render_legend(self): cr = self.context cr.set_font_size(self.font_size) cr.set_line_width(self.line_width) widest_word = max(self.series_labels, key = lambda item: self.context.text_extents(item)[2]) tallest_word = max(self.series_labels, key = lambda item: self.context.text_extents(item)[3]) max_width = self.context.text_extents(widest_word)[2] max_height = self.context.text_extents(tallest_word)[3] * 1.1 + 5 color_box_height = max_height / 2 color_box_width = color_box_height * 2 #Draw a bounding box bounding_box_width = max_width + color_box_width + 15 bounding_box_height = (len(self.series_labels)+0.5) * max_height cr.set_source_rgba(1,1,1) cr.rectangle(self.dimensions[HORZ] - self.border - bounding_box_width, self.border, bounding_box_width, bounding_box_height) cr.fill() cr.set_source_rgba(*self.line_color) cr.set_line_width(self.line_width) cr.rectangle(self.dimensions[HORZ] - self.border - bounding_box_width, self.border, bounding_box_width, bounding_box_height) cr.stroke() for idx,key in enumerate(self.series_labels): #Draw color box cr.set_source_rgba(*self.series_colors[idx][:4]) cr.rectangle(self.dimensions[HORZ] - self.border - max_width - color_box_width - 10, self.border + color_box_height + (idx*max_height) , color_box_width, color_box_height) cr.fill() cr.set_source_rgba(0, 0, 0) cr.rectangle(self.dimensions[HORZ] - self.border - max_width - color_box_width - 10, self.border + color_box_height + (idx*max_height), color_box_width, color_box_height) cr.stroke() #Draw series labels cr.set_source_rgba(0, 0, 0) cr.move_to(self.dimensions[HORZ] - self.border - max_width - 5, self.border + ((idx+1)*max_height)) cr.show_text(key) class HorizontalBarPlot(BarPlot): def __init__(self, surface = None, data = None, width = 640, height = 480, background = "white light_gray", border = 0, display_values = False, grid = False, rounded_corners = False, stack = False, three_dimension = False, series_labels = None, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, series_colors = None): BarPlot.__init__(self, surface, data, width, height, background, border, display_values, grid, rounded_corners, stack, three_dimension, x_labels, y_labels, x_bounds, y_bounds, series_colors, HORZ) self.series_labels = series_labels def calc_vert_extents(self): self.calc_extents(VERT) if self.labels[HORZ] and not self.labels[VERT]: self.borders[HORZ] += 10 def draw_rectangle_bottom(self, x0, y0, x1, y1): self.context.arc(x0+5, y1-5, 5, math.pi/2, math.pi) self.context.line_to(x0, y0+5) self.context.arc(x0+5, y0+5, 5, -math.pi, -math.pi/2) self.context.line_to(x1, y0) self.context.line_to(x1, y1) self.context.line_to(x0+5, y1) self.context.close_path() def draw_rectangle_top(self, x0, y0, x1, y1): self.context.arc(x1-5, y0+5, 5, -math.pi/2, 0) self.context.line_to(x1, y1-5) self.context.arc(x1-5, y1-5, 5, 0, math.pi/2) self.context.line_to(x0, y1) self.context.line_to(x0, y0) self.context.line_to(x1, y0) self.context.close_path() def draw_rectangle(self, index, length, x0, y0, x1, y1): if length == 1: BarPlot.draw_rectangle(self, x0, y0, x1, y1) elif index == 0: self.draw_rectangle_bottom(x0, y0, x1, y1) elif index == length-1: self.draw_rectangle_top(x0, y0, x1, y1) else: self.context.rectangle(x0, y0, x1-x0, y1-y0) #TODO: Review BarPlot.render_grid code def render_grid(self): self.context.set_source_rgba(0.8, 0.8, 0.8) if self.labels[HORZ]: self.context.set_font_size(self.font_size * 0.8) step = (self.dimensions[HORZ] - 2*self.borders[HORZ] - self.value_label)/(len(self.labels[HORZ])-1) x = self.borders[HORZ] next_x = 0 for item in self.labels[HORZ]: width = self.context.text_extents(item)[2] if x - width/2 > next_x and x - width/2 > self.border: self.context.move_to(x, self.border) self.context.line_to(x, self.dimensions[VERT] - self.borders[VERT]) self.context.stroke() next_x = x + width/2 x += step else: lines = 11 horizontal_step = float(self.plot_dimensions[HORZ])/(lines-1) x = self.borders[HORZ] for y in xrange(0, lines): self.context.move_to(x, self.border) self.context.line_to(x, self.dimensions[VERT] - self.borders[VERT]) self.context.stroke() x += horizontal_step def render_horz_labels(self): step = (self.dimensions[HORZ] - 2*self.borders[HORZ])/(len(self.labels[HORZ])-1) x = self.borders[HORZ] next_x = 0 for item in self.labels[HORZ]: self.context.set_source_rgba(*self.label_color) width = self.context.text_extents(item)[2] if x - width/2 > next_x and x - width/2 > self.border: self.context.move_to(x - width/2, self.dimensions[VERT] - self.borders[VERT] + self.max_value[HORZ] + 3) self.context.show_text(item) next_x = x + width/2 x += step def render_vert_labels(self): series_length = len(self.labels[VERT]) step = (self.plot_dimensions[VERT] - (series_length + 1)*self.space)/(len(self.labels[VERT])) y = self.border + step/2 + self.space for item in self.labels[VERT]: self.context.set_source_rgba(*self.label_color) width, height = self.context.text_extents(item)[2:4] self.context.move_to(self.borders[HORZ] - width - 5, y + height/2) self.context.show_text(item) y += step + self.space self.labels[VERT].reverse() def render_values(self): self.context.set_source_rgba(*self.value_label_color) self.context.set_font_size(self.font_size * 0.8) if self.stack: for i,series in enumerate(self.data): value = sum(series) height = self.context.text_extents(str(value))[3] x = self.borders[HORZ] + value*self.steps[HORZ] + 2 y = self.borders[VERT] + (i+0.5)*self.steps[VERT] + (i+1)*self.space + height/2 self.context.move_to(x, y) self.context.show_text(str(value)) else: for i,series in enumerate(self.data): inner_step = self.steps[VERT]/len(series) y0 = self.border + i*self.steps[VERT] + (i+1)*self.space for number,key in enumerate(series): height = self.context.text_extents(str(key))[3] self.context.move_to(self.borders[HORZ] + key*self.steps[HORZ] + 2, y0 + 0.5*inner_step + height/2, ) self.context.show_text(str(key)) y0 += inner_step def render_plot(self): if self.stack: for i,series in enumerate(self.data): x0 = self.borders[HORZ] y0 = self.borders[VERT] + i*self.steps[VERT] + (i+1)*self.space for number,key in enumerate(series): if self.series_colors[number][4] in ('radial','linear') : linear = cairo.LinearGradient( key*self.steps[HORZ]/2, y0, key*self.steps[HORZ]/2, y0 + self.steps[VERT] ) color = self.series_colors[number] linear.add_color_stop_rgba(0.0, 3.5*color[0]/5.0, 3.5*color[1]/5.0, 3.5*color[2]/5.0,1.0) linear.add_color_stop_rgba(1.0, *color[:4]) self.context.set_source(linear) elif self.series_colors[number][4] == 'solid': self.context.set_source_rgba(*self.series_colors[number][:4]) if self.rounded_corners: self.draw_rectangle(number, len(series), x0, y0, x0+key*self.steps[HORZ], y0+self.steps[VERT]) self.context.fill() else: self.context.rectangle(x0, y0, key*self.steps[HORZ], self.steps[VERT]) self.context.fill() x0 += key*self.steps[HORZ] else: for i,series in enumerate(self.data): inner_step = self.steps[VERT]/len(series) x0 = self.borders[HORZ] y0 = self.border + i*self.steps[VERT] + (i+1)*self.space for number,key in enumerate(series): linear = cairo.LinearGradient(key*self.steps[HORZ]/2, y0, key*self.steps[HORZ]/2, y0 + inner_step) color = self.series_colors[number] linear.add_color_stop_rgba(0.0, 3.5*color[0]/5.0, 3.5*color[1]/5.0, 3.5*color[2]/5.0,1.0) linear.add_color_stop_rgba(1.0, *color[:4]) self.context.set_source(linear) if self.rounded_corners and key != 0: BarPlot.draw_round_rectangle(self,x0, y0, x0 + key*self.steps[HORZ], y0 + inner_step) self.context.fill() else: self.context.rectangle(x0, y0, key*self.steps[HORZ], inner_step) self.context.fill() y0 += inner_step class VerticalBarPlot(BarPlot): def __init__(self, surface = None, data = None, width = 640, height = 480, background = "white light_gray", border = 0, display_values = False, grid = False, rounded_corners = False, stack = False, three_dimension = False, series_labels = None, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, series_colors = None): BarPlot.__init__(self, surface, data, width, height, background, border, display_values, grid, rounded_corners, stack, three_dimension, x_labels, y_labels, x_bounds, y_bounds, series_colors, VERT) self.series_labels = series_labels def calc_vert_extents(self): self.calc_extents(VERT) if self.labels[VERT] and not self.labels[HORZ]: self.borders[VERT] += 10 def draw_rectangle_bottom(self, x0, y0, x1, y1): self.context.move_to(x1,y1) self.context.arc(x1-5, y1-5, 5, 0, math.pi/2) self.context.line_to(x0+5, y1) self.context.arc(x0+5, y1-5, 5, math.pi/2, math.pi) self.context.line_to(x0, y0) self.context.line_to(x1, y0) self.context.line_to(x1, y1) self.context.close_path() def draw_rectangle_top(self, x0, y0, x1, y1): self.context.arc(x0+5, y0+5, 5, -math.pi, -math.pi/2) self.context.line_to(x1-5, y0) self.context.arc(x1-5, y0+5, 5, -math.pi/2, 0) self.context.line_to(x1, y1) self.context.line_to(x0, y1) self.context.line_to(x0, y0) self.context.close_path() def draw_rectangle(self, index, length, x0, y0, x1, y1): if length == 1: BarPlot.draw_rectangle(self, x0, y0, x1, y1) elif index == 0: self.draw_rectangle_bottom(x0, y0, x1, y1) elif index == length-1: self.draw_rectangle_top(x0, y0, x1, y1) else: self.context.rectangle(x0, y0, x1-x0, y1-y0) def render_grid(self): self.context.set_source_rgba(0.8, 0.8, 0.8) if self.labels[VERT]: lines = len(self.labels[VERT]) vertical_step = float(self.plot_dimensions[self.main_dir])/(lines-1) y = self.borders[VERT] + self.value_label else: lines = 11 vertical_step = float(self.plot_dimensions[self.main_dir])/(lines-1) y = 1.2*self.border + self.value_label for x in xrange(0, lines): self.context.move_to(self.borders[HORZ], y) self.context.line_to(self.dimensions[HORZ] - self.border, y) self.context.stroke() y += vertical_step def render_ground(self): self.draw_3d_rectangle_front(self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT], self.dimensions[HORZ] - self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT] + 5, 10) self.context.fill() self.draw_3d_rectangle_side (self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT], self.dimensions[HORZ] - self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT] + 5, 10) self.context.fill() self.draw_3d_rectangle_top (self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT], self.dimensions[HORZ] - self.borders[HORZ], self.dimensions[VERT] - self.borders[VERT] + 5, 10) self.context.fill() def render_horz_labels(self): series_length = len(self.labels[HORZ]) step = float (self.plot_dimensions[HORZ] - (series_length + 1)*self.space)/len(self.labels[HORZ]) x = self.borders[HORZ] + step/2 + self.space next_x = 0 for item in self.labels[HORZ]: self.context.set_source_rgba(*self.label_color) width = self.context.text_extents(item)[2] if x - width/2 > next_x and x - width/2 > self.borders[HORZ]: self.context.move_to(x - width/2, self.dimensions[VERT] - self.borders[VERT] + self.max_value[HORZ] + 3) self.context.show_text(item) next_x = x + width/2 x += step + self.space def render_vert_labels(self): self.context.set_source_rgba(*self.label_color) y = self.borders[VERT] + self.value_label step = (self.dimensions[VERT] - 2*self.borders[VERT] - self.value_label)/(len(self.labels[VERT]) - 1) self.labels[VERT].reverse() for item in self.labels[VERT]: width, height = self.context.text_extents(item)[2:4] self.context.move_to(self.borders[HORZ] - width - 5, y + height/2) self.context.show_text(item) y += step self.labels[VERT].reverse() def render_values(self): self.context.set_source_rgba(*self.value_label_color) self.context.set_font_size(self.font_size * 0.8) if self.stack: for i,series in enumerate(self.data): value = sum(series) width = self.context.text_extents(str(value))[2] x = self.borders[HORZ] + (i+0.5)*self.steps[HORZ] + (i+1)*self.space - width/2 y = value*self.steps[VERT] + 2 self.context.move_to(x, self.plot_top-y) self.context.show_text(str(value)) else: for i,series in enumerate(self.data): inner_step = self.steps[HORZ]/len(series) x0 = self.borders[HORZ] + i*self.steps[HORZ] + (i+1)*self.space for number,key in enumerate(series): width = self.context.text_extents(str(key))[2] self.context.move_to(x0 + 0.5*inner_step - width/2, self.plot_top - key*self.steps[VERT] - 2) self.context.show_text(str(key)) x0 += inner_step def render_plot(self): if self.stack: for i,series in enumerate(self.data): x0 = self.borders[HORZ] + i*self.steps[HORZ] + (i+1)*self.space y0 = 0 for number,key in enumerate(series): if self.series_colors[number][4] in ('linear','radial'): linear = cairo.LinearGradient( x0, key*self.steps[VERT]/2, x0 + self.steps[HORZ], key*self.steps[VERT]/2 ) color = self.series_colors[number] linear.add_color_stop_rgba(0.0, 3.5*color[0]/5.0, 3.5*color[1]/5.0, 3.5*color[2]/5.0,1.0) linear.add_color_stop_rgba(1.0, *color[:4]) self.context.set_source(linear) elif self.series_colors[number][4] == 'solid': self.context.set_source_rgba(*self.series_colors[number][:4]) if self.rounded_corners: self.draw_rectangle(number, len(series), x0, self.plot_top - y0 - key*self.steps[VERT], x0 + self.steps[HORZ], self.plot_top - y0) self.context.fill() else: self.context.rectangle(x0, self.plot_top - y0 - key*self.steps[VERT], self.steps[HORZ], key*self.steps[VERT]) self.context.fill() y0 += key*self.steps[VERT] else: for i,series in enumerate(self.data): inner_step = self.steps[HORZ]/len(series) y0 = self.borders[VERT] x0 = self.borders[HORZ] + i*self.steps[HORZ] + (i+1)*self.space for number,key in enumerate(series): if self.series_colors[number][4] == 'linear': linear = cairo.LinearGradient( x0, key*self.steps[VERT]/2, x0 + inner_step, key*self.steps[VERT]/2 ) color = self.series_colors[number] linear.add_color_stop_rgba(0.0, 3.5*color[0]/5.0, 3.5*color[1]/5.0, 3.5*color[2]/5.0,1.0) linear.add_color_stop_rgba(1.0, *color[:4]) self.context.set_source(linear) elif self.series_colors[number][4] == 'solid': self.context.set_source_rgba(*self.series_colors[number][:4]) if self.rounded_corners and key != 0: BarPlot.draw_round_rectangle(self, x0, self.plot_top - key*self.steps[VERT], x0+inner_step, self.plot_top) self.context.fill() elif self.three_dimension: self.draw_3d_rectangle_front(x0, self.plot_top - key*self.steps[VERT], x0+inner_step, self.plot_top, 5) self.context.fill() self.draw_3d_rectangle_side(x0, self.plot_top - key*self.steps[VERT], x0+inner_step, self.plot_top, 5) self.context.fill() self.draw_3d_rectangle_top(x0, self.plot_top - key*self.steps[VERT], x0+inner_step, self.plot_top, 5) self.context.fill() else: self.context.rectangle(x0, self.plot_top - key*self.steps[VERT], inner_step, key*self.steps[VERT]) self.context.fill() x0 += inner_step class StreamChart(VerticalBarPlot): def __init__(self, surface = None, data = None, width = 640, height = 480, background = "white light_gray", border = 0, grid = False, series_legend = None, x_labels = None, x_bounds = None, y_bounds = None, series_colors = None): VerticalBarPlot.__init__(self, surface, data, width, height, background, border, False, grid, False, True, False, None, x_labels, None, x_bounds, y_bounds, series_colors) def calc_steps(self): other_dir = other_direction(self.main_dir) self.series_amplitude = self.bounds[self.main_dir][1] - self.bounds[self.main_dir][0] if self.series_amplitude: self.steps[self.main_dir] = float(self.plot_dimensions[self.main_dir])/self.series_amplitude else: self.steps[self.main_dir] = 0.00 series_length = len(self.data) self.steps[other_dir] = float(self.plot_dimensions[other_dir])/series_length def render_legend(self): pass def ground(self, index): sum_values = sum(self.data[index]) return -0.5*sum_values def calc_angles(self): middle = self.plot_top - self.plot_dimensions[VERT]/2.0 self.angles = [tuple([0.0 for x in range(len(self.data)+1)])] for x_index in range(1, len(self.data)-1): t = [] x0 = self.borders[HORZ] + (0.5 + x_index - 1)*self.steps[HORZ] x2 = self.borders[HORZ] + (0.5 + x_index + 1)*self.steps[HORZ] y0 = middle - self.ground(x_index-1)*self.steps[VERT] y2 = middle - self.ground(x_index+1)*self.steps[VERT] t.append(math.atan(float(y0-y2)/(x0-x2))) for data_index in range(len(self.data[x_index])): x0 = self.borders[HORZ] + (0.5 + x_index - 1)*self.steps[HORZ] x2 = self.borders[HORZ] + (0.5 + x_index + 1)*self.steps[HORZ] y0 = middle - self.ground(x_index-1)*self.steps[VERT] - self.data[x_index-1][data_index]*self.steps[VERT] y2 = middle - self.ground(x_index+1)*self.steps[VERT] - self.data[x_index+1][data_index]*self.steps[VERT] for i in range(0,data_index): y0 -= self.data[x_index-1][i]*self.steps[VERT] y2 -= self.data[x_index+1][i]*self.steps[VERT] if data_index == len(self.data[0])-1 and False: self.context.set_source_rgba(0.0,0.0,0.0,0.3) self.context.move_to(x0,y0) self.context.line_to(x2,y2) self.context.stroke() self.context.arc(x0,y0,2,0,2*math.pi) self.context.fill() t.append(math.atan(float(y0-y2)/(x0-x2))) self.angles.append(tuple(t)) self.angles.append(tuple([0.0 for x in range(len(self.data)+1)])) def render_plot(self): self.calc_angles() middle = self.plot_top - self.plot_dimensions[VERT]/2.0 p = 0.4*self.steps[HORZ] for data_index in range(len(self.data[0])-1,-1,-1): self.context.set_source_rgba(*self.series_colors[data_index][:4]) #draw the upper line for x_index in range(len(self.data)-1) : x1 = self.borders[HORZ] + (0.5 + x_index)*self.steps[HORZ] y1 = middle - self.ground(x_index)*self.steps[VERT] - self.data[x_index][data_index]*self.steps[VERT] x2 = self.borders[HORZ] + (0.5 + x_index + 1)*self.steps[HORZ] y2 = middle - self.ground(x_index + 1)*self.steps[VERT] - self.data[x_index + 1][data_index]*self.steps[VERT] for i in range(0,data_index): y1 -= self.data[x_index][i]*self.steps[VERT] y2 -= self.data[x_index+1][i]*self.steps[VERT] if x_index == 0: self.context.move_to(x1,y1) ang1 = self.angles[x_index][data_index+1] ang2 = self.angles[x_index+1][data_index+1] + math.pi self.context.curve_to(x1+p*math.cos(ang1),y1+p*math.sin(ang1), x2+p*math.cos(ang2),y2+p*math.sin(ang2), x2,y2) for x_index in range(len(self.data)-1,0,-1) : x1 = self.borders[HORZ] + (0.5 + x_index)*self.steps[HORZ] y1 = middle - self.ground(x_index)*self.steps[VERT] x2 = self.borders[HORZ] + (0.5 + x_index - 1)*self.steps[HORZ] y2 = middle - self.ground(x_index - 1)*self.steps[VERT] for i in range(0,data_index): y1 -= self.data[x_index][i]*self.steps[VERT] y2 -= self.data[x_index-1][i]*self.steps[VERT] if x_index == len(self.data)-1: self.context.line_to(x1,y1+2) #revert angles by pi degrees to take the turn back ang1 = self.angles[x_index][data_index] + math.pi ang2 = self.angles[x_index-1][data_index] self.context.curve_to(x1+p*math.cos(ang1),y1+p*math.sin(ang1), x2+p*math.cos(ang2),y2+p*math.sin(ang2), x2,y2+2) self.context.close_path() self.context.fill() if False: self.context.move_to(self.borders[HORZ] + 0.5*self.steps[HORZ], middle) for x_index in range(len(self.data)-1) : x1 = self.borders[HORZ] + (0.5 + x_index)*self.steps[HORZ] y1 = middle - self.ground(x_index)*self.steps[VERT] - self.data[x_index][data_index]*self.steps[VERT] x2 = self.borders[HORZ] + (0.5 + x_index + 1)*self.steps[HORZ] y2 = middle - self.ground(x_index + 1)*self.steps[VERT] - self.data[x_index + 1][data_index]*self.steps[VERT] for i in range(0,data_index): y1 -= self.data[x_index][i]*self.steps[VERT] y2 -= self.data[x_index+1][i]*self.steps[VERT] ang1 = self.angles[x_index][data_index+1] ang2 = self.angles[x_index+1][data_index+1] + math.pi self.context.set_source_rgba(1.0,0.0,0.0) self.context.arc(x1+p*math.cos(ang1),y1+p*math.sin(ang1),2,0,2*math.pi) self.context.fill() self.context.set_source_rgba(0.0,0.0,0.0) self.context.arc(x2+p*math.cos(ang2),y2+p*math.sin(ang2),2,0,2*math.pi) self.context.fill() '''self.context.set_source_rgba(0.0,0.0,0.0,0.3) self.context.arc(x2,y2,2,0,2*math.pi) self.context.fill()''' self.context.move_to(x1,y1) self.context.line_to(x1+p*math.cos(ang1),y1+p*math.sin(ang1)) self.context.stroke() self.context.move_to(x2,y2) self.context.line_to(x2+p*math.cos(ang2),y2+p*math.sin(ang2)) self.context.stroke() if False: for x_index in range(len(self.data)-1,0,-1) : x1 = self.borders[HORZ] + (0.5 + x_index)*self.steps[HORZ] y1 = middle - self.ground(x_index)*self.steps[VERT] x2 = self.borders[HORZ] + (0.5 + x_index - 1)*self.steps[HORZ] y2 = middle - self.ground(x_index - 1)*self.steps[VERT] for i in range(0,data_index): y1 -= self.data[x_index][i]*self.steps[VERT] y2 -= self.data[x_index-1][i]*self.steps[VERT] #revert angles by pi degrees to take the turn back ang1 = self.angles[x_index][data_index] + math.pi ang2 = self.angles[x_index-1][data_index] self.context.set_source_rgba(0.0,1.0,0.0) self.context.arc(x1+p*math.cos(ang1),y1+p*math.sin(ang1),2,0,2*math.pi) self.context.fill() self.context.set_source_rgba(0.0,0.0,1.0) self.context.arc(x2+p*math.cos(ang2),y2+p*math.sin(ang2),2,0,2*math.pi) self.context.fill() '''self.context.set_source_rgba(0.0,0.0,0.0,0.3) self.context.arc(x2,y2,2,0,2*math.pi) self.context.fill()''' self.context.move_to(x1,y1) self.context.line_to(x1+p*math.cos(ang1),y1+p*math.sin(ang1)) self.context.stroke() self.context.move_to(x2,y2) self.context.line_to(x2+p*math.cos(ang2),y2+p*math.sin(ang2)) self.context.stroke() #break #self.context.arc(self.dimensions[HORZ]/2, self.dimensions[VERT]/2,50,0,3*math.pi/2) #self.context.fill() class PiePlot(Plot): def __init__ (self, surface = None, data = None, width = 640, height = 480, background = "white light_gray", gradient = False, shadow = False, colors = None): Plot.__init__( self, surface, data, width, height, background, series_colors = colors ) self.center = (self.dimensions[HORZ]/2, self.dimensions[VERT]/2) self.total = sum(self.data) self.radius = min(self.dimensions[HORZ]/3,self.dimensions[VERT]/3) self.gradient = gradient self.shadow = shadow def load_series(self, data, x_labels=None, y_labels=None, series_colors=None): Plot.load_series(self, data, x_labels, y_labels, series_colors) self.data = sorted(self.data) def draw_piece(self, angle, next_angle): self.context.move_to(self.center[0],self.center[1]) self.context.line_to(self.center[0] + self.radius*math.cos(angle), self.center[1] + self.radius*math.sin(angle)) self.context.arc(self.center[0], self.center[1], self.radius, angle, next_angle) self.context.line_to(self.center[0], self.center[1]) self.context.close_path() def render(self): self.render_background() self.render_bounding_box() if self.shadow: self.render_shadow() self.render_plot() self.render_series_labels() def render_shadow(self): horizontal_shift = 3 vertical_shift = 3 self.context.set_source_rgba(0, 0, 0, 0.5) self.context.arc(self.center[0] + horizontal_shift, self.center[1] + vertical_shift, self.radius, 0, 2*math.pi) self.context.fill() def render_series_labels(self): angle = 0 next_angle = 0 x0,y0 = self.center cr = self.context for number,key in enumerate(self.series_labels): next_angle = angle + 2.0*math.pi*self.data[number]/self.total cr.set_source_rgba(*self.series_colors[number][:4]) w = cr.text_extents(key)[2] if (angle + next_angle)/2 < math.pi/2 or (angle + next_angle)/2 > 3*math.pi/2: cr.move_to(x0 + (self.radius+10)*math.cos((angle+next_angle)/2), y0 + (self.radius+10)*math.sin((angle+next_angle)/2) ) else: cr.move_to(x0 + (self.radius+10)*math.cos((angle+next_angle)/2) - w, y0 + (self.radius+10)*math.sin((angle+next_angle)/2) ) cr.show_text(key) angle = next_angle def render_plot(self): angle = 0 next_angle = 0 x0,y0 = self.center cr = self.context for number,series in enumerate(self.data): next_angle = angle + 2.0*math.pi*series/self.total if self.gradient or self.series_colors[number][4] in ('linear','radial'): gradient_color = cairo.RadialGradient(self.center[0], self.center[1], 0, self.center[0], self.center[1], self.radius) gradient_color.add_color_stop_rgba(0.3, *self.series_colors[number][:4]) gradient_color.add_color_stop_rgba(1, self.series_colors[number][0]*0.7, self.series_colors[number][1]*0.7, self.series_colors[number][2]*0.7, self.series_colors[number][3]) cr.set_source(gradient_color) else: cr.set_source_rgba(*self.series_colors[number][:4]) self.draw_piece(angle, next_angle) cr.fill() cr.set_source_rgba(1.0, 1.0, 1.0) self.draw_piece(angle, next_angle) cr.stroke() angle = next_angle class DonutPlot(PiePlot): def __init__ (self, surface = None, data = None, width = 640, height = 480, background = "white light_gray", gradient = False, shadow = False, colors = None, inner_radius=-1): Plot.__init__( self, surface, data, width, height, background, series_colors = colors ) self.center = ( self.dimensions[HORZ]/2, self.dimensions[VERT]/2 ) self.total = sum( self.data ) self.radius = min( self.dimensions[HORZ]/3,self.dimensions[VERT]/3 ) self.inner_radius = inner_radius*self.radius if inner_radius == -1: self.inner_radius = self.radius/3 self.gradient = gradient self.shadow = shadow def draw_piece(self, angle, next_angle): self.context.move_to(self.center[0] + (self.inner_radius)*math.cos(angle), self.center[1] + (self.inner_radius)*math.sin(angle)) self.context.line_to(self.center[0] + self.radius*math.cos(angle), self.center[1] + self.radius*math.sin(angle)) self.context.arc(self.center[0], self.center[1], self.radius, angle, next_angle) self.context.line_to(self.center[0] + (self.inner_radius)*math.cos(next_angle), self.center[1] + (self.inner_radius)*math.sin(next_angle)) self.context.arc_negative(self.center[0], self.center[1], self.inner_radius, next_angle, angle) self.context.close_path() def render_shadow(self): horizontal_shift = 3 vertical_shift = 3 self.context.set_source_rgba(0, 0, 0, 0.5) self.context.arc(self.center[0] + horizontal_shift, self.center[1] + vertical_shift, self.inner_radius, 0, 2*math.pi) self.context.arc_negative(self.center[0] + horizontal_shift, self.center[1] + vertical_shift, self.radius, 0, -2*math.pi) self.context.fill() class GanttChart (Plot) : def __init__(self, surface = None, data = None, width = 640, height = 480, x_labels = None, y_labels = None, colors = None): self.bounds = {} self.max_value = {} Plot.__init__(self, surface, data, width, height, x_labels = x_labels, y_labels = y_labels, series_colors = colors) def load_series(self, data, x_labels=None, y_labels=None, series_colors=None): Plot.load_series(self, data, x_labels, y_labels, series_colors) self.calc_boundaries() def calc_boundaries(self): self.bounds[HORZ] = (0,len(self.data)) for item in self.data: if hasattr(item, "__delitem__"): for sub_item in item: end_pos = max(sub_item) else: end_pos = max(item) self.bounds[VERT] = (0,end_pos) def calc_extents(self, direction): self.max_value[direction] = 0 if self.labels[direction]: self.max_value[direction] = max(self.context.text_extents(item)[2] for item in self.labels[direction]) else: self.max_value[direction] = self.context.text_extents( str(self.bounds[direction][1] + 1) )[2] def calc_horz_extents(self): self.calc_extents(HORZ) self.borders[HORZ] = 100 + self.max_value[HORZ] def calc_vert_extents(self): self.calc_extents(VERT) self.borders[VERT] = self.dimensions[VERT]/(self.bounds[HORZ][1] + 1) def calc_steps(self): self.horizontal_step = (self.dimensions[HORZ] - self.borders[HORZ])/(len(self.labels[VERT])) self.vertical_step = self.borders[VERT] def render(self): self.calc_horz_extents() self.calc_vert_extents() self.calc_steps() self.render_background() self.render_labels() self.render_grid() self.render_plot() def render_background(self): cr = self.context cr.set_source_rgba(255,255,255) cr.rectangle(0,0,self.dimensions[HORZ], self.dimensions[VERT]) cr.fill() for number,item in enumerate(self.data): linear = cairo.LinearGradient(self.dimensions[HORZ]/2, self.borders[VERT] + number*self.vertical_step, self.dimensions[HORZ]/2, self.borders[VERT] + (number+1)*self.vertical_step) linear.add_color_stop_rgba(0,1.0,1.0,1.0,1.0) linear.add_color_stop_rgba(1.0,0.9,0.9,0.9,1.0) cr.set_source(linear) cr.rectangle(0,self.borders[VERT] + number*self.vertical_step,self.dimensions[HORZ],self.vertical_step) cr.fill() def render_grid(self): cr = self.context cr.set_source_rgba(0.7, 0.7, 0.7) cr.set_dash((1,0,0,0,0,0,1)) cr.set_line_width(0.5) for number,label in enumerate(self.labels[VERT]): h = cr.text_extents(label)[3] cr.move_to(self.borders[HORZ] + number*self.horizontal_step, self.vertical_step/2 + h) cr.line_to(self.borders[HORZ] + number*self.horizontal_step, self.dimensions[VERT]) cr.stroke() def render_labels(self): self.context.set_font_size(0.02 * self.dimensions[HORZ]) self.render_horz_labels() self.render_vert_labels() def render_horz_labels(self): cr = self.context labels = self.labels[HORZ] if not labels: labels = [str(i) for i in range(1, self.bounds[HORZ][1] + 1) ] for number,label in enumerate(labels): if label != None: cr.set_source_rgba(0.5, 0.5, 0.5) w,h = cr.text_extents(label)[2], cr.text_extents(label)[3] cr.move_to(40,self.borders[VERT] + number*self.vertical_step + self.vertical_step/2 + h/2) cr.show_text(label) def render_vert_labels(self): cr = self.context labels = self.labels[VERT] if not labels: labels = [str(i) for i in range(1, self.bounds[VERT][1] + 1) ] for number,label in enumerate(labels): w,h = cr.text_extents(label)[2], cr.text_extents(label)[3] cr.move_to(self.borders[HORZ] + number*self.horizontal_step - w/2, self.vertical_step/2) cr.show_text(label) def render_rectangle(self, x0, y0, x1, y1, color): self.draw_shadow(x0, y0, x1, y1) self.draw_rectangle(x0, y0, x1, y1, color) def draw_rectangular_shadow(self, gradient, x0, y0, w, h): self.context.set_source(gradient) self.context.rectangle(x0,y0,w,h) self.context.fill() def draw_circular_shadow(self, x, y, radius, ang_start, ang_end, mult, shadow): gradient = cairo.RadialGradient(x, y, 0, x, y, 2*radius) gradient.add_color_stop_rgba(0, 0, 0, 0, shadow) gradient.add_color_stop_rgba(1, 0, 0, 0, 0) self.context.set_source(gradient) self.context.move_to(x,y) self.context.line_to(x + mult[0]*radius,y + mult[1]*radius) self.context.arc(x, y, 8, ang_start, ang_end) self.context.line_to(x,y) self.context.close_path() self.context.fill() def draw_rectangle(self, x0, y0, x1, y1, color): cr = self.context middle = (x0+x1)/2 linear = cairo.LinearGradient(middle,y0,middle,y1) linear.add_color_stop_rgba(0,3.5*color[0]/5.0, 3.5*color[1]/5.0, 3.5*color[2]/5.0,1.0) linear.add_color_stop_rgba(1,*color[:4]) cr.set_source(linear) cr.arc(x0+5, y0+5, 5, 0, 2*math.pi) cr.arc(x1-5, y0+5, 5, 0, 2*math.pi) cr.arc(x0+5, y1-5, 5, 0, 2*math.pi) cr.arc(x1-5, y1-5, 5, 0, 2*math.pi) cr.rectangle(x0+5,y0,x1-x0-10,y1-y0) cr.rectangle(x0,y0+5,x1-x0,y1-y0-10) cr.fill() def draw_shadow(self, x0, y0, x1, y1): shadow = 0.4 h_mid = (x0+x1)/2 v_mid = (y0+y1)/2 h_linear_1 = cairo.LinearGradient(h_mid,y0-4,h_mid,y0+4) h_linear_2 = cairo.LinearGradient(h_mid,y1-4,h_mid,y1+4) v_linear_1 = cairo.LinearGradient(x0-4,v_mid,x0+4,v_mid) v_linear_2 = cairo.LinearGradient(x1-4,v_mid,x1+4,v_mid) h_linear_1.add_color_stop_rgba( 0, 0, 0, 0, 0) h_linear_1.add_color_stop_rgba( 1, 0, 0, 0, shadow) h_linear_2.add_color_stop_rgba( 0, 0, 0, 0, shadow) h_linear_2.add_color_stop_rgba( 1, 0, 0, 0, 0) v_linear_1.add_color_stop_rgba( 0, 0, 0, 0, 0) v_linear_1.add_color_stop_rgba( 1, 0, 0, 0, shadow) v_linear_2.add_color_stop_rgba( 0, 0, 0, 0, shadow) v_linear_2.add_color_stop_rgba( 1, 0, 0, 0, 0) self.draw_rectangular_shadow(h_linear_1,x0+4,y0-4,x1-x0-8,8) self.draw_rectangular_shadow(h_linear_2,x0+4,y1-4,x1-x0-8,8) self.draw_rectangular_shadow(v_linear_1,x0-4,y0+4,8,y1-y0-8) self.draw_rectangular_shadow(v_linear_2,x1-4,y0+4,8,y1-y0-8) self.draw_circular_shadow(x0+4, y0+4, 4, math.pi, 3*math.pi/2, (-1,0), shadow) self.draw_circular_shadow(x1-4, y0+4, 4, 3*math.pi/2, 2*math.pi, (0,-1), shadow) self.draw_circular_shadow(x0+4, y1-4, 4, math.pi/2, math.pi, (0,1), shadow) self.draw_circular_shadow(x1-4, y1-4, 4, 0, math.pi/2, (1,0), shadow) def render_plot(self): for number,item in enumerate(self.data): if hasattr(item, "__delitem__") : for space in item: self.render_rectangle(self.borders[HORZ] + space[0]*self.horizontal_step, self.borders[VERT] + number*self.vertical_step + self.vertical_step/4.0, self.borders[HORZ] + space[1]*self.horizontal_step, self.borders[VERT] + number*self.vertical_step + 3.0*self.vertical_step/4.0, self.series_colors[number]) else: space = item self.render_rectangle(self.borders[HORZ] + space[0]*self.horizontal_step, self.borders[VERT] + number*self.vertical_step + self.vertical_step/4.0, self.borders[HORZ] + space[1]*self.horizontal_step, self.borders[VERT] + number*self.vertical_step + 3.0*self.vertical_step/4.0, self.series_colors[number]) # Function definition def scatter_plot(name, data = None, errorx = None, errory = None, width = 640, height = 480, background = "white light_gray", border = 0, axis = False, dash = False, discrete = False, dots = False, grid = False, series_legend = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, z_bounds = None, x_title = None, y_title = None, series_colors = None, circle_colors = None): ''' - Function to plot scatter data. - Parameters data - The values to be ploted might be passed in a two basic: list of points: [(0,0), (0,1), (0,2)] or [(0,0,1), (0,1,4), (0,2,1)] lists of coordinates: [ [0,0,0] , [0,1,2] ] or [ [0,0,0] , [0,1,2] , [1,4,1] ] Notice that these kinds of that can be grouped in order to form more complex data using lists of lists or dictionaries; series_colors - Define color values for each of the series circle_colors - Define a lower and an upper bound for the circle colors for variable radius (3 dimensions) series ''' plot = ScatterPlot( name, data, errorx, errory, width, height, background, border, axis, dash, discrete, dots, grid, series_legend, x_labels, y_labels, x_bounds, y_bounds, z_bounds, x_title, y_title, series_colors, circle_colors ) plot.render() plot.commit() def dot_line_plot(name, data, width, height, background = "white light_gray", border = 0, axis = False, dash = False, dots = False, grid = False, series_legend = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, x_title = None, y_title = None, series_colors = None): ''' - Function to plot graphics using dots and lines. dot_line_plot (name, data, width, height, background = "white light_gray", border = 0, axis = False, grid = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None) - Parameters name - Name of the desired output file, no need to input the .svg as it will be added at runtim; data - The list, list of lists or dictionary holding the data to be plotted; width, height - Dimensions of the output image; background - A 3 element tuple representing the rgb color expected for the background or a new cairo linear gradient. If left None, a gray to white gradient will be generated; border - Distance in pixels of a square border into which the graphics will be drawn; axis - Whether or not the axis are to be drawn; dash - Boolean or a list or a dictionary of booleans indicating whether or not the associated series should be drawn in dashed mode; dots - Whether or not dots should be drawn on each point; grid - Whether or not the gris is to be drawn; series_legend - Whether or not the legend is to be drawn; x_labels, y_labels - lists of strings containing the horizontal and vertical labels for the axis; x_bounds, y_bounds - tuples containing the lower and upper value bounds for the data to be plotted; x_title - Whether or not to plot a title over the x axis. y_title - Whether or not to plot a title over the y axis. - Examples of use data = [0, 1, 3, 8, 9, 0, 10, 10, 2, 1] CairoPlot.dot_line_plot('teste', data, 400, 300) data = { "john" : [10, 10, 10, 10, 30], "mary" : [0, 0, 3, 5, 15], "philip" : [13, 32, 11, 25, 2] } x_labels = ["jan/2008", "feb/2008", "mar/2008", "apr/2008", "may/2008" ] CairoPlot.dot_line_plot( 'test', data, 400, 300, axis = True, grid = True, series_legend = True, x_labels = x_labels ) ''' plot = DotLinePlot( name, data, width, height, background, border, axis, dash, dots, grid, series_legend, x_labels, y_labels, x_bounds, y_bounds, x_title, y_title, series_colors ) plot.render() plot.commit() def function_plot(name, data, width, height, background = "white light_gray", border = 0, axis = True, dots = False, discrete = False, grid = False, series_legend = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, x_title = None, y_title = None, series_colors = None, step = 1): ''' - Function to plot functions. function_plot(name, data, width, height, background = "white light_gray", border = 0, axis = True, grid = False, dots = False, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, step = 1, discrete = False) - Parameters name - Name of the desired output file, no need to input the .svg as it will be added at runtim; data - The list, list of lists or dictionary holding the data to be plotted; width, height - Dimensions of the output image; background - A 3 element tuple representing the rgb color expected for the background or a new cairo linear gradient. If left None, a gray to white gradient will be generated; border - Distance in pixels of a square border into which the graphics will be drawn; axis - Whether or not the axis are to be drawn; grid - Whether or not the gris is to be drawn; dots - Whether or not dots should be shown at each point; x_labels, y_labels - lists of strings containing the horizontal and vertical labels for the axis; x_bounds, y_bounds - tuples containing the lower and upper value bounds for the data to be plotted; step - the horizontal distance from one point to the other. The smaller, the smoother the curve will be; discrete - whether or not the function should be plotted in discrete format. - Example of use data = lambda x : x**2 CairoPlot.function_plot('function4', data, 400, 300, grid = True, x_bounds=(-10,10), step = 0.1) ''' plot = FunctionPlot( name, data, width, height, background, border, axis, discrete, dots, grid, series_legend, x_labels, y_labels, x_bounds, y_bounds, x_title, y_title, series_colors, step ) plot.render() plot.commit() def pie_plot( name, data, width, height, background = "white light_gray", gradient = False, shadow = False, colors = None ): ''' - Function to plot pie graphics. pie_plot(name, data, width, height, background = "white light_gray", gradient = False, colors = None) - Parameters name - Name of the desired output file, no need to input the .svg as it will be added at runtim; data - The list, list of lists or dictionary holding the data to be plotted; width, height - Dimensions of the output image; background - A 3 element tuple representing the rgb color expected for the background or a new cairo linear gradient. If left None, a gray to white gradient will be generated; gradient - Whether or not the pie color will be painted with a gradient; shadow - Whether or not there will be a shadow behind the pie; colors - List of slices colors. - Example of use teste_data = {"john" : 123, "mary" : 489, "philip" : 890 , "suzy" : 235} CairoPlot.pie_plot("pie_teste", teste_data, 500, 500) ''' plot = PiePlot( name, data, width, height, background, gradient, shadow, colors ) plot.render() plot.commit() def donut_plot(name, data, width, height, background = "white light_gray", gradient = False, shadow = False, colors = None, inner_radius = -1): ''' - Function to plot donut graphics. donut_plot(name, data, width, height, background = "white light_gray", gradient = False, inner_radius = -1) - Parameters name - Name of the desired output file, no need to input the .svg as it will be added at runtim; data - The list, list of lists or dictionary holding the data to be plotted; width, height - Dimensions of the output image; background - A 3 element tuple representing the rgb color expected for the background or a new cairo linear gradient. If left None, a gray to white gradient will be generated; shadow - Whether or not there will be a shadow behind the donut; gradient - Whether or not the donut color will be painted with a gradient; colors - List of slices colors; inner_radius - The radius of the donut's inner circle. - Example of use teste_data = {"john" : 123, "mary" : 489, "philip" : 890 , "suzy" : 235} CairoPlot.donut_plot("donut_teste", teste_data, 500, 500) ''' plot = DonutPlot(name, data, width, height, background, gradient, shadow, colors, inner_radius) plot.render() plot.commit() def gantt_chart(name, pieces, width, height, x_labels, y_labels, colors): ''' - Function to generate Gantt Charts. gantt_chart(name, pieces, width, height, x_labels, y_labels, colors): - Parameters name - Name of the desired output file, no need to input the .svg as it will be added at runtim; pieces - A list defining the spaces to be drawn. The user must pass, for each line, the index of its start and the index of its end. If a line must have two or more spaces, they must be passed inside a list; width, height - Dimensions of the output image; x_labels - A list of names for each of the vertical lines; y_labels - A list of names for each of the horizontal spaces; colors - List containing the colors expected for each of the horizontal spaces - Example of use pieces = [ (0.5,5.5) , [(0,4),(6,8)] , (5.5,7) , (7,8)] x_labels = [ 'teste01', 'teste02', 'teste03', 'teste04'] y_labels = [ '0001', '0002', '0003', '0004', '0005', '0006', '0007', '0008', '0009', '0010' ] colors = [ (1.0, 0.0, 0.0), (1.0, 0.7, 0.0), (1.0, 1.0, 0.0), (0.0, 1.0, 0.0) ] CairoPlot.gantt_chart('gantt_teste', pieces, 600, 300, x_labels, y_labels, colors) ''' plot = GanttChart(name, pieces, width, height, x_labels, y_labels, colors) plot.render() plot.commit() def vertical_bar_plot(name, data, width, height, background = "white light_gray", border = 0, display_values = False, grid = False, rounded_corners = False, stack = False, three_dimension = False, series_labels = None, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, colors = None): #TODO: Fix docstring for vertical_bar_plot ''' - Function to generate vertical Bar Plot Charts. bar_plot(name, data, width, height, background, border, grid, rounded_corners, three_dimension, x_labels, y_labels, x_bounds, y_bounds, colors): - Parameters name - Name of the desired output file, no need to input the .svg as it will be added at runtime; data - The list, list of lists or dictionary holding the data to be plotted; width, height - Dimensions of the output image; background - A 3 element tuple representing the rgb color expected for the background or a new cairo linear gradient. If left None, a gray to white gradient will be generated; border - Distance in pixels of a square border into which the graphics will be drawn; grid - Whether or not the gris is to be drawn; rounded_corners - Whether or not the bars should have rounded corners; three_dimension - Whether or not the bars should be drawn in pseudo 3D; x_labels, y_labels - lists of strings containing the horizontal and vertical labels for the axis; x_bounds, y_bounds - tuples containing the lower and upper value bounds for the data to be plotted; colors - List containing the colors expected for each of the bars. - Example of use data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] CairoPlot.vertical_bar_plot ('bar2', data, 400, 300, border = 20, grid = True, rounded_corners = False) ''' plot = VerticalBarPlot(name, data, width, height, background, border, display_values, grid, rounded_corners, stack, three_dimension, series_labels, x_labels, y_labels, x_bounds, y_bounds, colors) plot.render() plot.commit() def horizontal_bar_plot(name, data, width, height, background = "white light_gray", border = 0, display_values = False, grid = False, rounded_corners = False, stack = False, three_dimension = False, series_labels = None, x_labels = None, y_labels = None, x_bounds = None, y_bounds = None, colors = None): #TODO: Fix docstring for horizontal_bar_plot ''' - Function to generate Horizontal Bar Plot Charts. bar_plot(name, data, width, height, background, border, grid, rounded_corners, three_dimension, x_labels, y_labels, x_bounds, y_bounds, colors): - Parameters name - Name of the desired output file, no need to input the .svg as it will be added at runtime; data - The list, list of lists or dictionary holding the data to be plotted; width, height - Dimensions of the output image; background - A 3 element tuple representing the rgb color expected for the background or a new cairo linear gradient. If left None, a gray to white gradient will be generated; border - Distance in pixels of a square border into which the graphics will be drawn; grid - Whether or not the gris is to be drawn; rounded_corners - Whether or not the bars should have rounded corners; three_dimension - Whether or not the bars should be drawn in pseudo 3D; x_labels, y_labels - lists of strings containing the horizontal and vertical labels for the axis; x_bounds, y_bounds - tuples containing the lower and upper value bounds for the data to be plotted; colors - List containing the colors expected for each of the bars. - Example of use data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] CairoPlot.bar_plot ('bar2', data, 400, 300, border = 20, grid = True, rounded_corners = False) ''' plot = HorizontalBarPlot(name, data, width, height, background, border, display_values, grid, rounded_corners, stack, three_dimension, series_labels, x_labels, y_labels, x_bounds, y_bounds, colors) plot.render() plot.commit() def stream_chart(name, data, width, height, background = "white light_gray", border = 0, grid = False, series_legend = None, x_labels = None, x_bounds = None, y_bounds = None, colors = None): #TODO: Fix docstring for horizontal_bar_plot plot = StreamChart(name, data, width, height, background, border, grid, series_legend, x_labels, x_bounds, y_bounds, colors) plot.render() plot.commit() prewikka-1.0.0/conf/0000775000076400007640000000000011347720623013323 5ustar yoannyoannprewikka-1.0.0/conf/prewikka.conf0000664000076400007640000000577111340777332016023 0ustar yoannyoann[general] # Number of heartbeat to analyze in the heartbeat analysis view. #heartbeat_count: 30 # If the offset between two heartbeat is off by more than the specified # offset (in seconds), the analyzer will be represented as offline. #heartbeat_error_margin: 3 # This setting tell Prewikka to not show the full exception when # an error occur: #disable_error_traceback # Open external (references, IP lookup, and port lookup) links # in a new windows. external_link_new_window # When a defined number of classification, source, or target exceed # the default value (10), an expension link will be provided to lookup # the remaining entry. # #max_aggregated_source: 10 #max_aggregated_target: 10 #max_aggregated_classification: 10 # Asynchronous DNS resolution (require twisted.names and twisted.internet) # # While rendering view containing address scheduled for asynchronous # DNS resolution, it is possible that the rendering terminate too fast # for all DNS requests to complete. # # The dns_max_delay setting determine Prewikka behavior: # - [-1] No DNS resolution is performed. # - [0] Do not wait, immediatly send results to the client. # - [x] Wait at most x seconds, then send results to the client. # # dns_max_delay: 0 # Default locale to use (default is English): # default_locale: fr # Default encoding to use (default is UTF8): # encoding: utf8 [interface] software: Prewikka place: company ltd. title: Prelude console [host_commands] # # You can use the $host variable that will be substituted with # the source/target host value. # #MyCommand: /path/to/command #Command Title: /usr/bin/test -x $host -a [idmef_database] # # if your database is a sqlite file, please use: # # type: sqlite3 # file: /path/to/your/sqlite_database # type: mysql host: localhost user: prelude pass: prelude name: prelude [database] type: mysql host: localhost user: prelude pass: prelude name: prewikka # Standard login / password authentication: [auth loginpassword] expiration: 60 # If there is no user with administrative right defined in the database, # the initial user will be created according to these settings: initial_admin_user: admin initial_admin_pass: admin # Rely on webserver for user authentication: # # User that authenticate for the first time won't have any permission. # If the "default_admin_user" option is provided, the specified user will # be granted ALL access, allowing to edit other users permissions. # # [auth cgi] # default_admin_user: myuser # Disable Prewikka authentication: # [auth anonymous] # Logging configuration: # - You can activate several log section. # - Log level might be set to all/debug, info, warning, error, critical. # If unspecified, the default level is "warning". # [log stderr] # level: info # [log file] # level: debug # file: /tmp/prewikka.log # [log syslog] # level: info # [log nteventlog] # level: info # [log smtp] # level: warning # host: mail.domain.com # from: user@address # to: recipient1@address, recipient2@address, recipientN@address # subject: Subject to use